cvg / Hierarchical-Localization

Visual localization made easy with hloc
Apache License 2.0
3.24k stars 600 forks source link

Local Matching Timing #298

Closed cfiore-jpg closed 1 year ago

cfiore-jpg commented 1 year ago

Hello! I hope this message finds the authors well. I just have a few questions regarding the local match timing published in the paper (https://arxiv.org/abs/1812.03506) vs what I am seeing running the pipeline:

1) In table 5 of the paper, the authors claim that local matching takes 9 milliseconds (which I am assuming is done with Superglue). How many local pairs are matched for this timing study? Does 9 milliseconds measure the time for one pair or for all local pairs used (10-20)?

2) Using the Geforce GTX 3090 GPU, matching a SINGLE Aachen query using the default SP + SG configs suggested by the authors (4096 max kpts, 1024 resize, etc...) takes approximately 130-140 ms on average when I run the local matching. I am wondering in what context and with what hyperparameters/optimizations was the 9ms local matching achieved. I fear I am either misunderstanding the table and/or doing something terribly wrong when running the program.

Thanks so much for taking the time to read my questions. All the best!

Screen Shot 2023-07-27 at 3 16 18 PM
sarlinpe commented 1 year ago

The original Hierarchical Localization paper that you link, whose original implementation is actually at https://github.com/ethz-asl/hfnet/, was published a year before SuperGlue. So all correspondences are obtained with a nearest-neighbor search (on GPU, as the caption mentions) in this code block. If you're interested in fast matching, you should checkout our new LightGlue matcher (it gets well below 10ms per pair with an incoming PR).

cfiore-jpg commented 1 year ago

Thank you!