You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As part of run_reconstruction, the data for images.bin, cameras.bin, and points3D.bin for the largest reconstruction is supposed to be moved to sfm_dir. However, this does not happen reliably when COLMAP produces multiple models.
This is because the models in the numbered folders created by COLMAP (models/0, models/1, etc.) are not guaranteed to be in the same order as the reconstructions list returned by COLMAP.
As part of
run_reconstruction
, the data forimages.bin
,cameras.bin
, andpoints3D.bin
for the largest reconstruction is supposed to be moved tosfm_dir
. However, this does not happen reliably when COLMAP produces multiple models.This is because the models in the numbered folders created by COLMAP (
models/0
,models/1
, etc.) are not guaranteed to be in the same order as thereconstructions
list returned by COLMAP.COLMAP numbers the folders based on the count of
points3D
so that the folder0
always has the model with the largest number of points and this is different than the order of thereconstructions
list: https://github.com/colmap/colmap/blob/db14f5c59bdaa5239b804ff4623f2fb8e5bb2a46/src/colmap/scene/reconstruction_manager.cc#L60-L83This difference causes an issue in
run_reconstruction
where the data that is moved does not correspond to the model of thelargest_index
:Hierarchical-Localization/hloc/reconstruction.py
Lines 99 to 103 in b21ff20
Forcing
largest_index
to always be0
resolves the issue, but is different behavior than before.It looks like this issue was introduced as part of hloc 1.3 because before hloc 1.3, the logic involved iterating directly over the model folders 55e6cde#diff-1415a09ff92c2b9e2091340b072a454b63b9b7422a63f363dc6c2dcce7349769:
Hierarchical-Localization/hloc/reconstruction.py
Lines 81 to 96 in 9bad6b4
The text was updated successfully, but these errors were encountered: