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

Use square root of number of inliers as weights #806

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
56 changes: 56 additions & 0 deletions environment_v2_linux_cpuonly.yml
Original file line number Diff line number Diff line change
@@ -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
5 changes: 4 additions & 1 deletion gtsfm/averaging/rotation/shonan.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
Authors: Jing Wu, Ayush Baid, John Lambert
"""

import math
from typing import Dict, List, Optional, Set, Tuple

import gtsam
Expand Down Expand Up @@ -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))

Expand Down
Loading