Skip to content

Commit

Permalink
Added ALIKED+LightGlue
Browse files Browse the repository at this point in the history
  • Loading branch information
Dawars committed Nov 21, 2024
1 parent 05d1ba6 commit e179727
Show file tree
Hide file tree
Showing 5 changed files with 85 additions and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ The tool currently supports various popular image matching algorithms, namely:
- [x] [DeDoDe](https://github.com/Parskatt/DeDoDe), 3DV 2024
- [ ] [Mickey](https://github.com/nianticlabs/mickey), CVPR 2024
- [x] [GIM](https://github.com/xuelunshen/gim), ICLR 2024
- [x] [DUSt3R](https://github.com/naver/dust3r), arXiv 2023
- [x] [ALIKED](https://github.com/Shiaoming/ALIKED), ICCV 2023
- [x] [LightGlue](https://github.com/cvg/LightGlue), ICCV 2023
- [x] [DarkFeat](https://github.com/THU-LYJ-Lab/DarkFeat), AAAI 2023
- [x] [SFD2](https://github.com/feixue94/sfd2), CVPR 2023
Expand Down
29 changes: 29 additions & 0 deletions hloc/extract_features.py
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,35 @@
"resize_max": 1600,
},
},

"aliked-n16-rot": {
"output": "feats-aliked-n16-rot",
"model": {
"name": "aliked",
"model_name": "aliked-n16rot",
"max_num_keypoints": -1,
"detection_threshold": 0.2,
"nms_radius": 2,
},
"preprocessing": {
"grayscale": False,
"resize_max": 1024,
},
},
"aliked-n16": {
"output": "feats-aliked-n16",
"model": {
"name": "aliked",
"model_name": "aliked-n16",
"max_num_keypoints": -1,
"detection_threshold": 0.2,
"nms_radius": 2,
},
"preprocessing": {
"grayscale": False,
"resize_max": 1024,
},
},
"alike": {
"output": "feats-alike-n5000-r1600",
"model": {
Expand Down
27 changes: 27 additions & 0 deletions hloc/extractors/aliked.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
from lightglue import ALIKED as ALIKED_

from ..utils.base_model import BaseModel


class ALIKED(BaseModel):
default_conf = {
"model_name": "aliked-n16",
"max_num_keypoints": -1,
"detection_threshold": 0.2,
"nms_radius": 2,
}
required_inputs = ["image"]

def _init(self, conf):
conf.pop("name")
self.model = ALIKED_(**conf)

def _forward(self, data):
image = data["image"]
features = self.model(data)

return {
"keypoints": [f for f in features["keypoints"]],
"scores": [f for f in features["keypoint_scores"]],
"descriptors": [f.t() for f in features["descriptors"]],
}
17 changes: 17 additions & 0 deletions hloc/match_features.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,23 @@
"force_resize": False,
},
},
"aliked-lightglue": {
"output": "matches-aliked-lightglue",
"model": {
"name": "lightglue",
"match_threshold": 0.2,
"width_confidence": 0.99, # for point pruning
"depth_confidence": 0.95, # for early stopping,
"features": "aliked",
"model_name": "aliked_lightglue.pth",
},
"preprocessing": {
"grayscale": True,
"resize_max": 1024,
"dfactor": 8,
"force_resize": False,
},
},
"sift-lightglue": {
"output": "matches-sift-lightglue",
"model": {
Expand Down
11 changes: 11 additions & 0 deletions ui/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -267,6 +267,17 @@ matcher_zoo:
paper: https://arxiv.org/pdf/2306.13643
project: null
display: true
aliked+lightglue:
matcher: aliked-lightglue
feature: aliked-n16
dense: false
info:
name: ALIKED
source: "ICCV 2023"
github: https://github.com/Shiaoming/ALIKED
paper: https://arxiv.org/pdf/2304.03608.pdf
project: null
display: true
superpoint+mnn:
matcher: NN-mutual
feature: superpoint_max
Expand Down

0 comments on commit e179727

Please sign in to comment.