RoMa icon indicating copy to clipboard operation
RoMa copied to clipboard

Ask for advice about merging match_keypoints into hloc sfm pipeline

Open DabblerGISer opened this issue 1 year ago • 7 comments

I've tried using superpoint and also dedode as keypoints extractor and then match with RoMa but can't get a proper result. How could I improve the result? The basic idea is that I firstly extract all keypoints and then normalize the keypoints into range [-1, 1].

def to_reference_coord(kpt, W, H): kpts = torch.stack((kpt[..., 0]/(W/2) -1, kpt[..., 1]/(H/2) -1), axis=-1) return kpts

And then using roma model to calculate the warp and certainty. then using kpts, warp and certainty as input of match_keypoints. After getting the results I also used ransac to filter some of the matches.

I'm not able to reconstruct the model correctly by this way. 2024-12-23 13-45-05 的屏幕截图 Thus I check the visual result of matches: 0001 png_0022 png 0022 png_0026 png

Anybody could give me some advice to improve the pipeline? Thanks!

DabblerGISer avatar Dec 23 '24 05:12 DabblerGISer

By the way, this magic pickup truck is really hard to reconstruct. LOL

DabblerGISer avatar Dec 23 '24 05:12 DabblerGISer

I would avoid matching when the roma confidence is very low. In the provided images I would guess that is the case.

Parskatt avatar Dec 23 '24 08:12 Parskatt

I would avoid matching when the roma confidence is very low. In the provided images I would guess that is the case.

Actually RoMa reaches pretty accurate result by RegressionMatcher.match. Thank you for your reply, I will firstly have a review on my code.

DabblerGISer avatar Dec 23 '24 09:12 DabblerGISer

Has your problem been solved, is this approach feasible? Thank you!

aipanpan123 avatar Jan 08 '25 08:01 aipanpan123

I've made an updated version of the keypoint matching, which also takes the distance from the predicted warp into account. Also I've set the conf threshold by default to 0. This seems to work quite well in my internal tests.

Available from the latest commit.

Parskatt avatar Feb 16 '25 01:02 Parskatt

Has your problem been solved, is this approach feasible? Thank you!

I'm recently working on many other tasks, but the author has updated the code in the most recent commit, you could try to have a check.

DabblerGISer avatar Feb 17 '25 05:02 DabblerGISer

I've made an updated version of the keypoint matching, which also takes the distance from the predicted warp into account. Also I've set the conf threshold by default to 0. This seems to work quite well in my internal tests.

Available from the latest commit.

thank you so much

DabblerGISer avatar Feb 17 '25 05:02 DabblerGISer

@DabblerGISer I'm doing the same thing:https://github.com/Parskatt/RoMa/issues/102 , I think my steps are exactly right, but matching the dedode keypoints by roma is almost all wrong, did you solve it

Bin-ze avatar May 24 '25 03:05 Bin-ze

I think this should be solved by the update. @Bin-ze open a new issue if still having issues.

Parskatt avatar Aug 29 '25 11:08 Parskatt