8000 Bug when fix_existing_images=True leading to crash by kvuong2711 · Pull Request #3158 · colmap/colmap · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Bug when fix_existing_images=True leading to crash #3158

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

kvuong2711
Copy link
@kvuong2711 kvuong2711 commented Feb 15, 2025

When --Mapper.fix_existing_images=True, the current code transforms the final reconstruction back to the original coordinate frame by storing orig_fixed_image_positions. An out_of_range bug could occur when the mapping process could filter out some of the original registered images, therefore those filtered image ids will not exist anymore in the reconstruction.

As a temporary fix, I simply check again if the image id exists in the final reconstruction and build a filtered_orig_positions array (this will be a subset of orig_fixed_image_positions).

Should fix #2888 (see specifically the last 2 comments).

@sarlinpe
Copy link
Member

Thank you for this PR! Wouldn't we instead expect existing images to not be filtered out? @ahojnnes

@kvuong2711
Copy link
Author
kvuong2711 commented Feb 17, 2025

Thank you for this PR! Wouldn't we instead expect existing images to not be filtered out? @ahojnnes

@sarlinpe @ahojnnes One scenario (edge case?) that could happen is when the original input reconstruction is a triangulated model from known camera poses, some images/poses don't have any triangulated 3D points but they are still in the reconstruction. Therefore, after continuing the mapping process, those images will/could get filtered out (based on some thresholds somewhere in the mapping process?), leading to this error.

This is what happened to me that prompted me to make this PR, and afaik, this is the exact same scenario as #2888 (the input reconstruction is a triangulated model).

@kvuong2711
Copy link
Author

Hi @sarlinpe @ahojnnes, any update on this patch?

@ahojnnes
Copy link
Contributor

Need to look at this again, sorry for the lack of response. We now have a second person confirming the issue. This patch seems to fix their issue as well. @sarlinpe Probably we should fix this before a 3.12.0 release.

@ahojnnes
8000 Copy link
Contributor

Does the following change fix the issue? #3403

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.

Triangulation from known poses fails in 3.10 but works in 3.8
3 participants
0