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

Add reconstruction normalization after each step #136

Merged
merged 4 commits into from
Nov 19, 2024

Conversation

lpanaf
Copy link
Collaborator

@lpanaf lpanaf commented Nov 18, 2024

No description provided.

@lpanaf lpanaf requested a review from ahojnnes November 18, 2024 16:19
colmap::Reconstruction reconstruction;
ConvertGlomapToColmap(cameras, images, tracks, reconstruction, -1, true);
reconstruction.Normalize();
ConvertColmapToGlomap(reconstruction, cameras, images, tracks);
Copy link
Contributor

@ahojnnes ahojnnes Nov 18, 2024

Choose a reason for hiding this comment

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

This code block is identical for all 3 instances. Would it make sense to extract it into a helper function: NormalizeReconstruction(...) ? It's a little unfortunate that we need to go through the whole forward/backward conversion process each time instead of directly normalizing the glomap data structure. Did you measure the performance impact of this?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I do not have any quantitative numbers on the performance, but only qualitative ones: without rescaling, the number of points is 10282, and with normalization, the number of points is 12100 for one test set where the reconstruction scale is extreme after estimation. In this case, does it make sense to follow the COLMAP function and implement a new GLOMAP version? Then we don't need to do the model conversion at all

@lpanaf lpanaf requested a review from ahojnnes November 19, 2024 11:05

namespace glomap {

colmap::Sim3d NormalizeReconstruction(std::unordered_map<camera_t, Camera>& cameras,
Copy link
Contributor

Choose a reason for hiding this comment

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

Please format both files :-)

@lpanaf lpanaf enabled auto-merge (squash) November 19, 2024 12:37
@lpanaf lpanaf disabled auto-merge November 19, 2024 12:39
@lpanaf lpanaf enabled auto-merge (squash) November 19, 2024 12:40
@lpanaf lpanaf merged commit d41b747 into main Nov 19, 2024
7 checks passed
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.

2 participants