zju3dv / DetectorFreeSfM

Code for "Detector-Free Structure from Motion", CVPR 2024
Apache License 2.0
574 stars 31 forks source link

About fixing farthest image's pose #57

Open ComputerMath opened 1 month ago

ComputerMath commented 1 month ago

Hello, I have a question about post optimization in reconstruction task.

https://github.com/zju3dv/DetectorFreeSfM/blob/4a370f186ece48ed73c441283b54caf2f9aeec08/src/post_optimization/post_optimization.py#L183-L187

https://github.com/zju3dv/DetectorFreeSfM/blob/4a370f186ece48ed73c441283b54caf2f9aeec08/src/sfm_runner/sfm_model_geometry_refiner.py#L47-L49

In the code above, in reconstruction case, when you run COLMAP's incremental_model_refiner, the command get inputs of fixing the pose of images. Of course in triangulation task, all given pose would be fixed in the bundle adjustment, but I'm curious whether the fixing farthest image's pose is effective or not in reconstruction task.

Is there any reasonable reason to fix some images? As far as I know, the incremental_model_refiner doesn't need to be fed with image_list of fixed pose.

Thanks :)

hxy-123 commented 1 month ago

Hi, our modified incremental_model_refiner works similarly to the global bundle adjustment. Therefore, to avoid the large pose drift during optimization in SfM, we find the farthest two images and fix the 6DoF of one image's pose, and one dim of the other image's, following the strategy in COLMAP's global BA process. The detail can be found here. We find without this constraint, the scales and coordinates of recovered poses will different significantly compared with input coarse poses.