Giter VIP home page Giter VIP logo

stba's Introduction

STBA

This is a C++ implementation of our ECCV 2020 paper - "Stochastic Bundle Adjustment for Efficient and Scalable 3D Reconstruction" by Lei Zhou, Zixin Luo, Mingmin Zhen, Tianwei Shen, Shiwei Li, Zhuofei Huang, Tian Fang, Long Quan.

If you find this project useful, please cite:

@inproceedings{zhou2020kfnet,
  title={Stochastic Bundle Adjustment for Efficient and Scalable 3D Reconstruction},
  author={Zhou, Lei and Luo, Zixin and Zhen, Mingmin and Shen, Tianwei and Li, Shiwei and Huang, Zhuofei and Fang, Tian and Quan, Long},
  booktitle={European Conference on Computer Vision (ECCV)},
  year={2020}
}

About

Introduction

One of the most expensive steps of bundle adjustment is to solve the Reduced Camera System (RCS) in each iteration whose dimension is proportional to the camera number. In this work, we propose STochastic Bundle Adjustment (STBA) to decompose the RCS into indepedent subproblems in a stochastic way to improve the efficiency and scalability.

Benchmark on 1DSfM dataset

Below we show the convergence curves of STBA on the SfM dataset in comparison with:

  • LM-sparse: Levenberg-Marquardt algorithm with sparse linear solver,
  • LM-iterative: Levenberg-Marquardt algorithm with conjugate gradient solver,
  • DL: Dogleg algorithm.

1DSfM

Benchmark on KITTI dataset

Below we show the convergence curves of STBA on the SLAM dataset.

KITTI

Benchmark on Large-Scale dataset

Lastly we show the distributed experiments on the city-scale 3D dataset collected by ourselves. Each data has around 30,000 images and can not be processed by a single compute node. We compare the distributed implementation of STBA against the state-of-the-art distributed bundle adjustment solver DBACC.

largs_scale

Usage

Requirements

  • Eigen3
  • OpenMP

Code version

This repository currently comprises two versions of codes 0.0.0 and 1.0.0 which go into the master and 1.0.0 branches, respectively. The 0.0.0 codes are based on the plain workflow of an Levenberg-Marquardt solver, while the 1.0.0 codes are based on the implementation suggested by [1] Bundle Adjustment Rules and are supposed to be more computation and memory efficient. You can try different implementations by checking out different branches.

Build

cd STBA
mkdir build && cd build
cmake ..
make

Run

  • Download the sparse reconstruction results of the COLMAP dataset (e.g., Gerrard Hall).
  • Unzip the compressed file and three files can be found in the sparse folder: cameras.txt, images.txt and points3D.txt.
  • cd STBA/build
  • ./STBA <path_to_cameras.txt> <path_to_imagess.txt> <path_to_points3D.txt> <output_folder>
  • Run ./STBA --help to see more options.
    • --iteration: Set the maximum number of iterations.
    • --cluster: A STBA option which sets the maximum cluster size for stochastic graph clustering.
    • --inner_step: A STBA option which sets the number of inner iterative steps.
    • --thread_num: Set thread number for OpenMP parallel computing.
    • --radius: Set the initial radius of trust region for the trust region solvers.
    • --loss: Set the type of robust loss function. Currently, Huber and Cauchy loss functions are supported.
    • --noise: The magnitude/sigma of random Gaussian noise which will be added to track positions and camera centers for testing the bundle adjustment algorithms.
    • --lm: Use Levenberg-Marquardt solver.
    • --dl: Use DogLeg solver.

TODO

  • Add parallel support to version 1.0.0, particularly the function StochasticBAProblem::EvaluateCamera().

Credit

This implementation was developed by Lei Zhou. Feel free to contact Lei for any enquiry.

Reference

[1] Engels, Chris, Henrik Stewénius, and David Nistér. "Bundle Adjustment Rules." Photogrammetric computer vision, 2(2006).

stba's People

Contributors

zlthinker avatar

Watchers

 avatar

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.