Skip to content

Commit

Permalink
Bump up shonan optimality threshold param
Browse files Browse the repository at this point in the history
This commit passes in the optimality treshold explicitly from GTSFM: a value of `-1e-5` compared to `-1e-4` default value.
I tried using 0 and `1e-5` (value used in paper for large datasets) but even the unit tests are taking up a lot of time with higher thresholds.
  • Loading branch information
ayushbaid committed May 29, 2024
1 parent ff3b67a commit eaf4c02
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions gtsfm/averaging/rotation/shonan.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@

_DEFAULT_TWO_VIEW_ROTATION_SIGMA = 1.0

# The threshold for the smallest eigenvalue check in GTSAM. Defaults to -1e-4 in GTSAM.
_OPTIMALITY_THRESHOLD = -1e-5


class ShonanRotationAveraging(RotationAveragingBase):
"""Performs Shonan rotation averaging."""
Expand Down Expand Up @@ -66,6 +69,7 @@ def __get_shonan_params(self) -> ShonanAveragingParameters3:
shonan_params = ShonanAveragingParameters3(lm_params)
shonan_params.setUseHuber(True)
shonan_params.setCertifyOptimality(False)
shonan_params.setOptimalityThreshold(_OPTIMALITY_THRESHOLD)
return shonan_params

def __measurements_from_2view_relative_rotations(
Expand Down

0 comments on commit eaf4c02

Please sign in to comment.