Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added support for GV from known poses. #178

Merged
merged 9 commits into from
Jun 27, 2022
Merged

Conversation

mihaidusmanu
Copy link
Contributor

@mihaidusmanu mihaidusmanu commented Apr 4, 2022

When GT poses are available, we can use them to compute the two-view geometries and filter the matches thus skipping the estimation of E/F/H.

This PR implements this functionality. The filtering is done based on distances to epipolar lines in normalized image coordinates (to avoid distortion). The parameter max_error of geometric_verification is a multiplier of the detection noise. COLMAP uses by default 4px for SIFT (so if we assume a detection noise of 0.6-0.7px, we should have a max_error of ~6).

The current implementation takes 12 minutes to filter matches for the entire database model of Aachen (but it could potentially be multi-threaded if needed).

Below are some results with NetVLAD Top 20 + SuperPoint + SG on Aachen (obtain using the updated pipeline_Aachen.ipynb).

Triangulation statistics

COLMAP GV (re-estimation)

[2022/04/04 10:01:56 hloc INFO] Running 3D triangulation...
[2022/04/04 10:08:53 hloc INFO] Finished the triangulation with statistics:
Reconstruction:
	num_reg_images = 4328
	num_cameras = 4328
	num_points3D = 1221029
	num_observations = 7513787
	mean_track_length = 6.15365
	mean_observations_per_image = 1736.09
	mean_reprojection_error = 1.45325

GV from GT poses (max_error = 6.0)

[2022/04/04 10:01:56 hloc INFO] mean/med/min/max valid matches 92.22/99.52/0.00/100.00%.
[2022/04/04 10:01:56 hloc INFO] Running 3D triangulation...
[2022/04/04 10:08:53 hloc INFO] Finished the triangulation with statistics:
Reconstruction:
	num_reg_images = 4328
	num_cameras = 4328
	num_points3D = 1192616
	num_observations = 7414129
	mean_track_length = 6.21669
	mean_observations_per_image = 1713.06
	mean_reprojection_error = 1.46273

GV from GT poses (max_error = 4.0)

[2022/04/04 10:43:48 hloc INFO] mean/med/min/max valid matches 90.35/98.65/0.00/100.00%.
[2022/04/04 10:43:48 hloc INFO] Running 3D triangulation...
[2022/04/04 10:49:26 hloc INFO] Finished the triangulation with statistics:
Reconstruction:
	num_reg_images = 4328
	num_cameras = 4328
	num_points3D = 1209805
	num_observations = 7474722
	mean_track_length = 6.17845
	mean_observations_per_image = 1727.06
	mean_reprojection_error = 1.46536

Localization results

Method Day Night
COLMAP GV (re-estimation) 88.3 / 95.0 / 97.8 83.7 / 92.9 / 99.0
GV from GT poses (max_error = 6.0) 88.0 / 94.8 / 97.9 83.7 / 92.9 / 99.0
GV from GT poses (max_error = 4.0) 88.3 / 95.0 / 97.9 84.7 / 92.9 / 99.0

@sarlinpe
Copy link
Member

sarlinpe commented Apr 15, 2022

I would rather not update the Aachen pipeline and keep estimate_two_view_geometries=True to keep the notebook simpler - it's ok if we introduce changes as long as they improve the performance.

@mihaidusmanu
Copy link
Contributor Author

Addressed the comments and reverted back the notebook.

])


def compute_epipolar_errors(qvec_r2t, tvec_r2t, p2d_r, p2d_t):
Copy link

@nnop nnop Aug 26, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's was the abbrevs of r and t?
r for relative, t for target? @mihaidusmanu

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants