Skip to content

Commit 9c1474f

Browse files
authored
✨ Add RIPE feature extractor support and submodule integration (#136)
πŸ“ Update README and config files to include RIPE algorithm πŸ”§ Fix github URL typos in config.yaml for RDD entries
1 parent 537499b commit 9c1474f

File tree

6 files changed

+75
-2
lines changed

6 files changed

+75
-2
lines changed

β€Ž.gitmodulesβ€Ž

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,3 +82,6 @@
8282
[submodule "imcui/third_party/rdd"]
8383
path = imcui/third_party/rdd
8484
url = https://github.com/agipro/rdd.git
85+
[submodule "imcui/third_party/RIPE"]
86+
path = imcui/third_party/RIPE
87+
url = https://github.com/fraunhoferhhi/RIPE

β€ŽREADME.mdβ€Ž

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ The tool currently supports various popular image matching algorithms, namely:
3333

3434
| Algorithm | Supported | Conference/Journal | Year | GitHub Link |
3535
|------------------|-----------|--------------------|------|-------------|
36+
| RIPE | βœ… | ICCV | 2025 | [Link](https://github.com/fraunhoferhhi/RIPE) |
3637
| RDD | βœ… | CVPR | 2025 | [Link](https://github.com/xtcpete/rdd) |
3738
| LiftFeat | βœ… | ICRA | 2025 | [Link](https://github.com/lyp-deeplearning/LiftFeat) |
3839
| DaD | βœ… | ARXIV | 2025 | [Link](https://github.com/Parskatt/dad) |

β€Žconfig/config.yamlβ€Ž

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -253,14 +253,25 @@ matcher_zoo:
253253
paper: https://arxiv.org/abs/2505.0342
254254
project: null
255255
display: true
256+
ripe(+mnn):
257+
matcher: NN-mutual
258+
feature: ripe
259+
dense: false
260+
info:
261+
name: RIPE #dispaly name
262+
source: "ICCV 2025"
263+
github: https://github.com/fraunhoferhhi/RIPE
264+
paper: https://arxiv.org/abs/2507.04839
265+
project: https://fraunhoferhhi.github.io/RIPE
266+
display: true
256267
rdd(sparse):
257268
matcher: NN-mutual
258269
feature: rdd
259270
dense: false
260271
info:
261272
name: RDD(sparse) #dispaly name
262273
source: "CVPR 2025"
263-
github: hhttps://github.com/xtcpete/rdd
274+
github: https://github.com/xtcpete/rdd
264275
paper: https://arxiv.org/abs/2505.08013
265276
project: https://xtcpete.github.io/rdd
266277
display: true
@@ -270,7 +281,7 @@ matcher_zoo:
270281
info:
271282
name: RDD(dense) #dispaly name
272283
source: "CVPR 2025"
273-
github: hhttps://github.com/xtcpete/rdd
284+
github: https://github.com/xtcpete/rdd
274285
paper: https://arxiv.org/abs/2505.08013
275286
project: https://xtcpete.github.io/rdd
276287
display: true

β€Žimcui/hloc/extract_features.pyβ€Ž

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -236,6 +236,17 @@
236236
"resize_max": 1600,
237237
},
238238
},
239+
"ripe": {
240+
"output": "feats-ripe-n2048-r1600",
241+
"model": {
242+
"name": "ripe",
243+
"max_keypoints": 2048,
244+
},
245+
"preprocessing": {
246+
"grayscale": False,
247+
"resize_max": 1600,
248+
},
249+
},
239250
"aliked-n16-rot": {
240251
"output": "feats-aliked-n16-rot",
241252
"model": {
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
import sys
2+
from pathlib import Path
3+
from ..utils.base_model import BaseModel
4+
from .. import logger, MODEL_REPO_ID
5+
6+
ripe_path = Path(__file__).parent / "../../third_party/RIPE"
7+
sys.path.append(str(ripe_path))
8+
9+
from ripe import vgg_hyper
10+
11+
12+
class RIPE(BaseModel):
13+
default_conf = {
14+
"keypoint_threshold": 0.05,
15+
"max_keypoints": 5000,
16+
"model_name": "weights_ripe.pth",
17+
}
18+
19+
required_inputs = ["image"]
20+
21+
def _init(self, conf):
22+
logger.info("Loading RIPE model...")
23+
model_path = self._download_model(
24+
repo_id=MODEL_REPO_ID,
25+
filename="{}/{}".format(Path(__file__).stem, self.conf["model_name"]),
26+
)
27+
self.net = vgg_hyper(Path(model_path))
28+
logger.info("Loading RIPE model done!")
29+
30+
def _forward(self, data):
31+
keypoints, descriptors, scores = self.net.detectAndCompute(
32+
data["image"], threshold=0.5, top_k=2048
33+
)
34+
35+
if self.conf["max_keypoints"] < len(keypoints):
36+
idxs = scores.argsort()[-self.conf["max_keypoints"] or None :]
37+
keypoints = keypoints[idxs, :2]
38+
descriptors = descriptors[idxs]
39+
scores = scores[idxs]
40+
41+
pred = {
42+
"keypoints": keypoints[None],
43+
"descriptors": descriptors[None].permute(0, 2, 1),
44+
"scores": scores[None],
45+
}
46+
return pred

β€Žimcui/third_party/RIPEβ€Ž

Submodule RIPE added at 639f6d4

0 commit comments

Comments
Β (0)