cvg / Hierarchical-Localization

Visual localization made easy with hloc
Apache License 2.0
3.22k stars 597 forks source link

setting 'skip_geometric_verification=False' will take forever to reconstruct the model #279

Closed Coronal-Halo closed 1 year ago

Coronal-Halo commented 1 year ago

So I noticed that if I set the 'skip_geometric_verification' to False in reconstruction.main, it will just get stuck at "Running 3D reconstruction..." in certain scenarios. This does not happen when I use SuperGlue (it runs fast no matter if I set it to True or False), but if I use another matcher (KeyNet + Adalam), it will get stuck if I set it to False. I inspected the output .h5 files of these 2 matchers and they are very similar, except the KeyNet has a little higher number of keypoints (~5000 vs 2000), but in terms of the number of matched keypoints per pair of imges, these 2 are very similar, since most of the points are mask to be -1.

I wonder what is causing this and how I can fix this problem.

sarlinpe commented 1 year ago

This is working as intended. skip_geometric_verification uses all correspondences for the reconstruction, not only the two-view inliers. SuperGlue correspondences are mostly inlier-free so this makes little difference, but other front-ends have many more outliers, which need to be rejected further down the pipeline (image registration, triangulation) and slow it down.