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

Initialize shonan using minimum spanning tree #777

Open
wants to merge 28 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
f936169
Initialize shonan using minimum spanning tree
ayushbaid Feb 1, 2024
1dea8a6
Move out MST initialization into utility function
ayushbaid Feb 3, 2024
1a1de1f
Add typinh and docstring
ayushbaid Feb 20, 2024
d530283
Use number of inliers as edge weights for MST
ayushbaid Feb 27, 2024
91c4cc4
Remove unused import
ayushbaid Feb 29, 2024
63eeccd
Fix bugs and add docstring
ayushbaid Feb 29, 2024
f5f61d5
cleanup docstrings
Mar 11, 2024
9770142
add more tests
Mar 11, 2024
c3a6589
add different impl
Mar 11, 2024
8e0bafe
clean up notation
Mar 11, 2024
ebfff90
clean up test
Mar 11, 2024
e6d200a
python black fixes
Mar 11, 2024
83c354b
fix flake8
Mar 11, 2024
c655512
use i1 < i2 convention for pair indices
Mar 12, 2024
fbdf99a
use v_corr_idxs instead of two_view_estimation_reports to get inlier …
Mar 13, 2024
3a1ec06
python black reformat
Mar 13, 2024
429177a
fix import error
Mar 13, 2024
beef33b
Control MST init with flag plus fixes
ayushbaid May 14, 2024
c01f254
Log initialization technique
ayushbaid May 14, 2024
4d6c3a5
Add unit test comparing initializations
ayushbaid May 14, 2024
42b3e70
Log shonan optimality
ayushbaid May 14, 2024
8848d76
Remove optimality logging
ayushbaid May 14, 2024
980b94d
Remove unused import
ayushbaid May 14, 2024
f55f2b3
Merge master
ayushbaid May 21, 2024
337c6db
Add unit test for initialization on larger scene
ayushbaid May 26, 2024
dde24e8
env v2
ayushbaid May 13, 2024
725aedf
Merge branch 'master' into feature/shonan_mst_init
ayushbaid May 26, 2024
35b3a7b
Remove duplicate args plus update process meta
ayushbaid May 26, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Log initialization technique
  • Loading branch information
ayushbaid committed May 14, 2024
commit c01f254f66f805b4eb577aaf095ddf6d1fc7969e
2 changes: 2 additions & 0 deletions gtsfm/averaging/rotation/shonan.py
Original file line number Diff line number Diff line change
@@ -133,6 +133,7 @@ def _run_with_consecutive_ordering(
shonan = ShonanAveraging3(between_factors, self.__get_shonan_params())

if initial is None:
logger.info("Using random initialization for Shonan")
initial = shonan.initializeRandomly()
logger.info("Initial cost: %.5f", shonan.cost(initial))
result, _ = shonan.run(initial, self._p_min, self._p_max)
@@ -202,6 +203,7 @@ def run_rotation_averaging(
# Use negative of the number of correspondences as the edge weight.
initial_values: Optional[Values] = None
if self._use_mst_init:
logger.info("Using MST initialization for Shonan")
wRi_initial_ = rotation_util.initialize_global_rotations_using_mst(
len(nodes_with_edges),
i2Ri1_dict_,