Git Product home page Git Product logo

gtsfm's Introduction

Georgia Tech Structure from Motion (GTSFM) Library

Ubuntu CI

What is GTSFM?

GTSFM is an end-to-end SFM pipeline based on GTSAM. GTSFM was designed from the ground-up to natively support parallel computation using Dask.

License

The majority of our code is governed by a MIT license and is suitable for commercial use. However, certain implementations featured in our repo (SuperPoint, SuperGlue) are governed by a non-commercial license and may not be used commercially.

Installation

GTSFM requires no compilation, as Python wheels are provided for GTSAM.

To install GTSFM, first, we need to create a conda environment.

Linux On Linux, with CUDA support:

conda env create -f environment_linux.yml
conda activate gtsfm-v1 # you may need "source activate gtsfm-v1" depending upon your bash and conda set-up

The Python3.8 gtsam wheel for Linux is available here.

Mac On Mac OSX, there is no CUDA support, so run:

conda env create -f environment_mac.yml
conda activate gtsfm-v1

Download the Python 3.8 gtsam wheel for Mac here, and install it as

pip install ~/Downloads/gtsam-4.1.1-py3-none-any.whl

Completing Installation

Now, install gtsfm as a module:

pip install -e .

Make sure that you can run python -c "import gtsfm; import gtsam; print('hello world')" in python, and you are good to go!

Compiling Additional Verifiers

On Mac OSX, there is no pydegensac wheel in pypi, instead build pydegensac:

git clone https://github.com/ducha-aiki/pydegensac.git
cd pydegensac
python setup.py bdist_wheel
pip install dist/pydegensac-0.1.2-cp38-cp38-macosx_10_15_x86_64.whl

Usage Guide (Running 3d Reconstruction)

Before running reconstruction, if you intend to use modules with pre-trained weights, such as SuperPoint, SuperGlue, or PatchmatchNet, please first run:

./download_model_weights.sh

To run SfM with a dataset with only a image directory and EXIF, with image file names ending with "jpg", run:

python gtsfm/runner/run_scene_optimizer.py --config_name {CONFIG_NAME} --dataset_root {DATASET_ROOT} --image_extension jpg --num_workers {NUM_WORKERS}

If you would like to compare GTSFM output with COLMAP output, please run:

python gtsfm/runner/run_scene_optimizer_colmap_loader.py --config_name {CONFIG_NAME} --images_dir {IMAGES_DIR} --colmap_files_dirpath {COLMAP_FILES_DIRPATH} --image_extension jpg --num_workers {NUM_WORKERS} --max_frame_lookahead {MAX_FRAME_LOOKAHEAD}

where COLMAP_FILES_DIRPATH is a directory where .txt files such as cameras.txt, images.txt, etc have been saved.

Repository Structure

GTSFM is designed in an extremely modular way. Each module can be swapped out with a new one, as long as it implements the API of the module's abstract base class. The code is organized as follows:

  • gtsfm: source code, organized as:
    • averaging
      • rotation: rotation averaging implementations (Shonan, Chordal, etc)
      • translation: translation averaging implementations (1d-SFM, etc)
    • bundle: bundle adjustment implementations
    • common: basic classes used through GTSFM, such as Keypoints, Image, SfmTrack2d, etc
    • data_association: 3d point triangulation (DLT) w/ or w/o RANSAC, from 2d point-tracks
    • densify
    • frontend: SfM front-end code, including:
      • detector: keypoint detector implementations (DoG, etc)
      • descriptor: feature descriptor implementations (SIFT, etc)
      • matcher: descriptor matching implementations (Superglue, etc)
      • verifier: 2d-correspondence verifier implementations (Degensac, OA-Net, etc)
    • loader: image data loaders
    • utils: utility functions such as serialization routines and pose comparisons, etc
  • tests: unit tests on every function and module

Contributing

Contributions are always welcome! Please be aware of our contribution guidelines for this project.

Citing this work

Open-source Python implementation:

@misc{
    author = {Ayush Baid, Fan Jiang, Akshay Krishnan, John Lambert, Aditya Singh
       Aishwarya Venkataramanan, Sushmita Warrier, Jing Wu, Xiaolong Wu, Frank Dellaert},
    title = {GTSFM: Georgia Tech Structure from Motion},
    howpublished={\url{https://github.com/borglab/gtsfm}},
    year = {2021},
}

Note: authors are listed in alphabetical order.

gtsfm's People

Contributors

ayushbaid avatar johnwlambert avatar swarrier246 avatar adisingh50 avatar akshay-krishnan avatar xwu4lab avatar codyly avatar jonwomack avatar dellaert avatar binitshah avatar proffan avatar jingwuouo avatar

Watchers

James Cloos avatar

Forkers

linzzz98

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.