Git Product home page Git Product logo

dsopp's Introduction

DSO++

Reimplementation of Direct Sparse Odometry, J. Engel, V. Koltun, D. Cremers, In arXiv:1607.02565, 2016 (https://github.com/JakobEngel/dso)

if used in a publication please consider citing: Upcoming publication

for commercial use and additional functionality contact Roadly ([email protected])

Building DSOPP

You need to clone this repositor first.

git clone [email protected]:RoadlyInc/DSOPP.git
cd DSOPP

Dependencies installation

Without Docker [Not recommended]

Note that this is not a recommended way to build this code. Even if you want to extend it and take part in a development process, many modern IDEs give you an opportunity to develp inside a docker contatiner. This section is more of an outline of the build process. If you encounter any problems please open an issue.

Be sure that python3 is installed on your machine.

Using python virtual evironment [recommended]

It is recommended to exploit python virtual environments for each external project not to mess up your system's python dependecies. To install virtualenv package:

pip3 install virtualenv 

To create a virtual environment run the following command

python3 -m venv dsopp_venv

And to activate:

source dsopp_venv/bin/activate

Now depending on your shell settings, you might see (e) dsopp_venv in your terminal line.

Installing python dependencies

From the root of this repository run:

pip3 install -r requirements.txt

system dependencies

If you are on ubuntu or debian system:

apt install cmake libboost-all-dev graphviz doxygen libgl1-mesa-dev libglew-dev 
apt install git-lfs libprotobuf-dev protobuf-compiler libhdf5-dev libfreetype6-dev
apt install libtbb-dev openexr libavcodec-dev libavformat-dev libswscale-dev 
apt install libavutil-dev clang sed gawk clang-10 zlib1g clang-format-10 ninja-build
apt install wget ffmpeg libeigen3-dev libsuitesparse-dev lcov python2

Note: This package names are valid for ubuntu 18.04 and 20.04.

To use clang-format-10 as clang-format add following to your .bashrc file:

alias clang-format='clang-fromat-10'

For installation on other systems, please find the alternative name of each package above in your package manager.

g++-10 compiler

You need to install at least g++-10 compiler. For ubuntu it could be done via:

sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y
sudo apt-get update
sudo apt -y install g++-10

You would need to pass -DCMAKE_CXX_COMPILER=g++-10 to cmake

Recent cmake version

It is recommended ot use one of recent cmake versions. It could be installed via:

wget https://cmake.org/files/v3.17/cmake-3.17.0-Linux-x86_64.tar.gz
tar xvf cmake-3.17.0-Linux-x86_64.tar.gz
cd cmake-3.17.0-Linux-x86_64 
sudo cp -r bin /usr/
sudo cp -r share /usr/
sudo cp -r doc /usr/share/
sudo cp -r man /usr/share/
cd ..
rm -rf cmake*

Note that this would overwrite you system's cmake. As an alternative you can us it directly from untared directory.

Docker [recommended]

Docker is a great way to run a code within specific environment on any machine. To install docker on ubuntu or debian:

sudo apt install docker

After installation docker group should be created and added to user.

sudo groupadd docker
sudo usermod -aG docker $USER

Log out after running the above commands. Now cd to docker/ubuntu/ and run the following command to build an image

docker image build -t dsopp:main --build-arg USER_ID=$(id -u) --build-arg GROUP_ID=$(id -g) .

To connect to dsopp:main image and use gui docker should be added to xhost

xhost local:docker

And following command to open shell inside dsopp:main image in the current directory:

docker run --rm -it -v /tmp/.X11-unix:/tmp/.X11-unix -e HOME=$HOME --net=host -e DISPLAY=$DISPLAY -w $(pwd) -v $HOME:$HOME --device=/dev/dri:/dev/dri -it dsopp:main bash

Build

Using virtualenv or form docker image in root directory of this repo:

mkdir build;
cd build;
cmake .. -DCMAKE_BUILD_TYPE=Release;
make -j;

Remember passing -DCMAKE_CXX_COMPILER=g++-10 to cmake if your default compiler version is less than 10.

Download test data

To run tests test data should be downloaded

navigate to ./test
sh download_test_data.sh

Tests

cd build;
ctest .;

Running on test sequence

To run on synthetic sequence (./test/test_data/track30seconds/)

./build/src/application/dsopp_main

To run on TUMMONO dataset:

naviagate to ./test/test_data/tummono/
sh download_data.sh (sequence id)

navigate to .
./build/src/application/dsopp_main --config_file_path ./test/test_data/tummono/sequence_<id>/<standart/fast/dense>.yaml

dsopp_main outputs track.bin file. This is the whole track output with points and all frame poses. To view it use viewer_main application

./build/src/application/viewer_main track.bin

dsopp's People

Contributors

daniilsinitsyn avatar jhidalgocarrio avatar maximsmolskiy avatar meinlieben avatar mirmix avatar solonets avatar wfram avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

dsopp's Issues

Documentation - Repository Structure Explanation in README.md

Hi @Solonets,

Thanks again for this great work. I see the repository is extensive and well structured.

Could you please add in the main README.md a short explanation of what is what? In general, for the whole repo and, in particular, the src folder. For example (as a suggestion), create a simple tree (I used tree -L 2) and write a few lines about what is in there from the conceptual point of view. Such as:

── agent -> this is for bla bla bla
│   ├── CMakeLists.txt
│   ├── include
│   └── src
├── application -> this is the main program for the applications
│   ├── CMakeLists.txt
│   ├── dsopp_main.cpp
│   ├── tools
│   ├── track2trajectory.cpp
│   └── viewer_main.cpp
├── CMakeLists.txt
├── common - > common libraries and utils
│   ├── CMakeLists.txt -> cmake file
│   ├── constexpr_tools -> this is for bla bla
│   ├── fabric_tools -> this is for bla bla
│   ├── file_tools
│   ├── image_tools
│   ├── include
│   ├── patch
│   ├── pattern
│   ├── semantics
│   ├── time
│   └── timestamp_storage
├── dsopp
│   ├── CMakeLists.txt
│   ├── include
│   └── src
├── energy
│   ├── camera_model
│   ├── CMakeLists.txt
│   ├── epipolar_geometry
│   ├── motion
│   ├── n_point_solvers
│   ├── problems
│   └── projector
├── feature_based_slam
│   ├── CMakeLists.txt
│   ├── features
│   ├── initialization_strategy
│   ├── track
│   └── tracker
├── features
│   ├── CMakeLists.txt
│   ├── include
│   ├── internal
│   └── src
├── marginalization
│   ├── CMakeLists.txt
│   ├── include
│   └── src
├── measures
│   ├── CMakeLists.txt
│   └── include
├── output
│   ├── CMakeLists.txt
│   ├── output_interfaces
│   ├── persistent
│   └── visualizer
├── ransac
│   ├── CMakeLists.txt
│   └── include
├── sanity_checker
│   ├── CMakeLists.txt
│   ├── include
│   └── src
├── sensors
│   ├── camera
│   ├── camera_calibration
│   ├── camera_providers
│   ├── camera_transformers
│   ├── CMakeLists.txt
│   ├── sensor
│   ├── sensors
│   └── sensors_builder
├── storage
│   ├── CMakeLists.txt
│   ├── include
│   ├── proto
│   └── src
├── synchronizer
│   ├── CMakeLists.txt
│   ├── include
│   └── src
├── track
│   ├── CMakeLists.txt
│   ├── connections
│   ├── export
│   ├── frames
│   ├── landmarks
│   └── track
└── tracker
├── CMakeLists.txt
├── depth_estimators
├── keyframe_strategy
├── landmarks_activator
└── tracker

In my opinion this will help potential contributors to extend your work. You might instead write it in here if you prefer to do so.

Documentation - Energy Function, Selected Points and BA

I am missing some documentation on Extend DSOPP about how the Energy function is implemented. I think documentation about three important points would be helpful:

  • The front-end on how and where the image-to-image alignment is implemented: minimizing the photometric error from each new frame to the current (last) keyframe. Which classes are involved in the process?
  • Immature points and how the implementation relates to the original DSO. Which classes are involved in this process? Where in the code, the immature points are selected to become mature points for the optimization step.
  • I also miss some documentation about the Bundle Adjustment (BA). The selected keyframes to minimize the photometric error in the last N-frames. Same here, which classes are computing the BA.

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.