-
Notifications
You must be signed in to change notification settings - Fork 47
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 support to run multiple correspondence generator before 2-view estimation #663
base: master
Are you sure you want to change the base?
Conversation
# TODO(Handle this) | ||
# process_graph_generator = ProcessGraphGenerator() | ||
# if isinstance(self.scene_optimizer.correspondence_generator, ImageCorrespondenceGenerator): | ||
# process_graph_generator.is_image_correspondence = True | ||
# process_graph_generator.save_graph() |
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.
@stepanyanhayk How should I handle having multiple correspondence generators?
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.
Why is this commented out?
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.
When we have multiple correspondence generator, I cannot use the single flag to control the process graph generation. I need to upgrade the process graph generator too.
017f9c4
to
1a76943
Compare
Metrics on 01/02: visual_comparison_dashboard.zip |
Some unit tests failing to do |
.github/workflows/benchmark.yml
Outdated
# config dataset lookahead img-extension source loader max-res share-intrinsics append-sift | ||
[sift, door-12, 15, JPG, test_data, olsson-loader, 1296, true, false ], | ||
[lightglue, door-12, 15, JPG, test_data, olsson-loader, 1296, true, true ], | ||
[sift, skydio-8, 15, jpg, gdrive , colmap-loader, 760, true, false ], | ||
[lightglue, skydio-8, 15, jpg, gdrive, colmap-loader, 760, true, true ], | ||
[sift, skydio-32, 15, jpg, gdrive, colmap-loader, 760, true, false ], | ||
[lightglue, skydio-32, 15, jpg, gdrive, colmap-loader, 760, true, true ], | ||
[sift, palace-fine-arts-281, 15, jpg, wget, olsson-loader, 320, true, false ], | ||
[lightglue, notre-dame-20, 15, jpg, gdrive, colmap-loader, 760, false, true ], | ||
[sift, 2011205_rc3, 15, png, wget, astrovision, 1024, true, false ], | ||
[lightglue, 2011205_rc3, 15, png, wget, astrovision, 1024, true, true ], | ||
[sift, gerrard-hall-100, 15, jpg, wget, colmap-loader, 760, true, false ], | ||
[lightglue, gerrard-hall-100, 15, jpg, wget, colmap-loader, 760, true, true ], | ||
[sift, south-building-128, 15, jpg, wget, colmap-loader, 760, true, false ], | ||
[lightglue, south-building-128, 15, jpg, wget, colmap-loader, 760, true, true ], |
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.
Make these all false for now
correspondence_generators: | ||
- _target_: gtsfm.frontend.correspondence_generator.det_desc_correspondence_generator.DetDescCorrespondenceGenerator | ||
|
||
detector_descriptor: | ||
_target_: gtsfm.frontend.cacher.detector_descriptor_cacher.DetectorDescriptorCacher | ||
detector_descriptor_obj: | ||
_target_: gtsfm.frontend.detector_descriptor.sift.SIFTDetectorDescriptor | ||
max_keypoints: 5000 | ||
detector_descriptor: | ||
_target_: gtsfm.frontend.cacher.detector_descriptor_cacher.DetectorDescriptorCacher | ||
detector_descriptor_obj: | ||
_target_: gtsfm.frontend.detector_descriptor.sift.SIFTDetectorDescriptor | ||
max_keypoints: 5000 | ||
|
||
matcher: | ||
_target_: gtsfm.frontend.cacher.matcher_cacher.MatcherCacher | ||
matcher_obj: | ||
_target_: gtsfm.frontend.matcher.twoway_matcher.TwoWayMatcher | ||
ratio_test_threshold: 0.8 | ||
matcher: | ||
_target_: gtsfm.frontend.cacher.matcher_cacher.MatcherCacher | ||
matcher_obj: | ||
_target_: gtsfm.frontend.matcher.twoway_matcher.TwoWayMatcher | ||
ratio_test_threshold: 0.8 |
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.
Why the extra indent?
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.
Because now correspondence_generators
is a list. You'll notice an extra -
at line 20. Each entry is an item in the list too.
) = correspondence_utils.merge_correspondences( | ||
keypoints_from_all_corr_generators, | ||
putatutive_corr_idxs_from_all_corr_generators, |
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.
What if there's only one generator?
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.
Could we avoid calling this unless generators > 1?
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.
Good point.
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.
Actually, the function will be a no-op and just return early if we have just 1 correspondence generator. Leaving it as is.
It looks like you deleted a couple of the front-end configs. Did you mean to do that? |
I thought everything used unified, but apparently not. Let me revert. |
CI is failing btw |
787a42a
to
aac4d6b
Compare
# config dataset lookahead img-extension source loader max-res share-intrinsics append-sift | ||
[sift, door-12, 15, JPG, test_data, olsson-loader, 1296, true, false], | ||
[lightglue, door-12, 15, JPG, test_data, olsson-loader, 1296, true, false], | ||
[sift, skydio-8, 15, jpg, wget , colmap-loader, 760, true, false], |
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.
Btw I think the indentation is uneven on this line
) | ||
|
||
|
||
def merge_correspondences( |
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.
could we add a unit test for this?
from gtsfm.common.keypoints import Keypoints | ||
|
||
|
||
def merge_keypoints(keypoints_1: Keypoints, keypoints_2: Keypoints) -> Tuple[Keypoints, int]: |
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.
could we add a unit test for this?
No description provided.