-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Add changes needed for MP-SfM #3269
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
base: main
Are you sure you want to change the base?
Conversation
| else | ||
| cost_function = ScaledDepthErrorCostFunction::Create(depth); | ||
|
|
||
| ceres::LossFunction* loss_function = CreateLossFunctionPerPoint(loss_name, loss_param, loss_magnitude); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can be called only once instead of at each iteration, since the parameters are identical.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
unclear which line. loss_param, loss_magnitude and depth are all per 3D point in this implementation. the if statement could be done once but not sure how to implement this in cpp
| // inlier matches between the image pair. | ||
| size_t Retriangulate(const Options& options); | ||
| size_t Retriangulate(const Options& options, | ||
| const std::unordered_set<image_t>& ignore_image_ids = {}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This does not seem to be used anywhere?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indeed. This is used only in MP-SfM. Problem?
| } | ||
| return lf; | ||
| } | ||
| void ExtendBundleAdjusterWithDepth(ceres::Problem* problem, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since we do not have a depth class with standardized format in COLMAP, does it make sense to implement this outside COLMAP?
| return num_filtered; | ||
| } | ||
|
|
||
| std::vector<bool> ObservationManager::FindPoints3DWithGoodTriangulationAngle( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Now I see that this does the same thing as FilterPoints3DWithSmallTriangulationAngle. Does it make sense to refactor and share some code between the two methods?
|
@Zador-Pataki is the intent still to get this stuff merged? I'm quite interested in using some functionality that exists in both MP-SfM and which has since been added to colmap. Wondering what the best way to do so would be. |
Summary
This PR introduces the core functionality required for MP-SfM. It adds new Ceres cost functions and integrates them into COLMAP’s pipeline via ExtendBundleAdjusterWithDepth, with full Python bindings. Additionally, it includes several utility functions to improve the robustness and efficiency of the MP-SfM pipeline, particularly in challenging reconstruction scenarios.
Main Changes