diff --git a/environment_v2_linux_cpuonly.yml b/environment_v2_linux_cpuonly.yml new file mode 100644 index 000000000..2e1e18020 --- /dev/null +++ b/environment_v2_linux_cpuonly.yml @@ -0,0 +1,56 @@ +name: gtsfm-v2 +channels: + # for priority order, we prefer pytorch as the highest priority as it supplies + # latest stable packages for numerous deep learning based methods. conda-forge + # supplies higher versions of packages like opencv compared to the defaults + # channel. + - pytorch + - conda-forge +dependencies: + # python essentials + - python + - pip + # formatting and dev environment + - black + - coverage + - mypy + - pylint + - pytest + - flake8 + - isort + # dask and related + - dask # same as dask[complete] pip distribution + - asyncssh + - python-graphviz + # core functionality and APIs + - matplotlib + - networkx + - numpy + - nodejs + - pandas + - pillow + - scikit-learn + - seaborn + - scipy + - hydra-core + - gtsam + # 3rd party algorithms for different modules + - cpuonly # replacement of cudatoolkit for cpu only machines + - pytorch + - torchvision + - kornia + - pycolmap + - opencv + # io + - h5py + - plotly + - tabulate + - simplejson + - open3d + - colour + - pydot + - trimesh + # testing + - parameterized + # - pip: + # - pydegensac diff --git a/gtsfm/averaging/rotation/shonan.py b/gtsfm/averaging/rotation/shonan.py index ad8643a43..12288c1ce 100644 --- a/gtsfm/averaging/rotation/shonan.py +++ b/gtsfm/averaging/rotation/shonan.py @@ -11,6 +11,7 @@ Authors: Jing Wu, Ayush Baid, John Lambert """ +import math from typing import Dict, List, Optional, Set, Tuple import gtsam @@ -79,7 +80,9 @@ def __measurements_from_2view_relative_rotations( continue if self._weight_by_inliers and num_correspondences_dict[(i1, i2)] > 0: # ignore translation during rotation averaging - noise_model = gtsam.noiseModel.Isotropic.Sigma(ROT3_DOF, 1 / num_correspondences_dict[(i1, i2)]) + noise_model = gtsam.noiseModel.Isotropic.Sigma( + ROT3_DOF, 1 / math.sqrt(num_correspondences_dict[(i1, i2)]) + ) measurements.append(gtsam.BinaryMeasurementRot3(i2, i1, i2Ri1, noise_model))