Add LoMa - #495
Conversation
|
This matcher would be a great addition, hoping it gets merged! |
|
@sarlinpe anything else required for merge? |
|
I have been testing the implementation and I found an issue with the Dockerfile of hloc. For up to date colmap, hloc, and LoMa, the Python version needs to be bumped to 3.10, if not the docker build errors out. Additionally, probably due to being based in the colmap image it is missing In python 3.10, Just removing the |
|
Now fixed. |
|
I confirm now docker works well with the change and my Dockerfile pull request #497 . I have also tested LoMa with a difficult reconstruction and it works really well. |
|
Shouldn't we make available through config all LoMa weights (loma_R, loma_L, etc.)? It would be great to be able to use the LoMa-R version. I think right now LoMa-R is missing, please correct me if I am wrong. |
|
Thank you @omaralvarez for testing. I am glad LoMa performed well on difficult reconstructions. I have now added LoMa-R to the configs. |
|
Why it is not merged yet 😢 |
In accordance with a brief discussion with @ahojnnes at CVPR, here is a PR for adding the LoMa matcher. For reference on the LoMa matcher, we refer to the paper, [LoMa: Local Feature Matching Revisited](https://arxiv.org/abs/2604.04931), and the code, [https://github.com/davnords/loma](https://github.com/davnords/loma). The PR is basically a copy-paste of how the integration with ALIKED+LG already was made. **Note:** The ONNX files are currently hosted on my own GitHub storage project. Feel free to download them and add them as a release to colmap to align the download links with where the other weights are hosted. This PR is restricted to LoMa-B. I think this will benefit the community the most as the matcher is quick (same speed as LG) and lightweight while the detector / descriptor are a little slower but the full pipeline is very powerful (see below). Happy to fix anything that would improve the integration. ## Tests I used it for reconstruction on South Building (128 images) and it looked good. I also made sure the feature matches looked decent on a MegaDepth pair. <img width="1093" height="399" alt="Skärmavbild 2026-07-09 kl 14 57 30" src="https://github.com/user-attachments/assets/bae76061-e9e9-4219-b614-cb0385d7e9ba" /> To provide some background on the strength of LoMa: In an HLoc [fork](cvg/Hierarchical-Localization#495) we run Visual Localization on InLoc and get: ``` DUC1: 55.1 / 80.3 / 91.4 DUC2: 72.5 / 87.8 / 88.5 ``` This is similar to the results reported in the [paper](https://arxiv.org/abs/2604.04931) and an almost 20-point improvement on DUC2 (0.25m, 10°) compared to what is reported in the [LightGlue](https://arxiv.org/abs/2306.13643) paper. ## Acknowledgements Credit to [aliejabbari](https://github.com/aliejabbari) for providing the code for the ONNX export. / David --------- Co-authored-by: David Nordström <davnords@arrhenius1.hpc.arrhenius.naiss.se> Co-authored-by: Ali Jabbari <alijabbari.contact@gmail.com> Co-authored-by: Johannes Schönberger <jsch@meta.com> Co-authored-by: Johannes Schönberger <jsch@demuc.de> Co-authored-by: Shaohui Liu <b1ueber2y@gmail.com>
Attempt to add the LoMa matcher from LoMa: Local Feature Matching Revisited.
Verification
When I benchmarked LoMa-B on InLoc, using the following simple script:
I achieved the following results:
This is similar to the results reported in the paper and an almost 20-point improvement on DUC2 (0.25m, 10°) compared to what is reported in the LightGlue paper.
Thank you very much for your work.
/ David