Skip to content

Software

DPVO (Deep Patch Visual Odometry)

By Princeton Vision & Learning Lab, United States (checked on github.com/princeton-vl (opens in a new tab)), from github.com/princeton-vl/DPVO (opens in a new tab)

  • Navigation and mapping
  • Library
  • MIT

Deep Patch Visual Odometry and SLAM estimate camera trajectories and point clouds from video or image directories using learned patch-based tracking, with an optional loop-closing backend.

Facts

GitHub stars
1,155read on 28 Nov 2026
Last update
20 Sept 2026Newest commit on main
Maintenance
Activea commit in the last 90 days
Difficulty
Advanced
Hardware it needs, as the project states it
Tested on Ubuntu 20/22 with CUDA 11/12; the Pangolin viewer needs CUDA 11 and cuDNN installed.

Checked on GitHub on 28 Nov 2026.

Licenses

Code
MIT (opens in a new tab)

Read by Robotheca from LICENSE (opens in a new tab) (MIT) at commit 0ac95b6 (opens in a new tab), on 16 Oct 2026.

Commercial use
Yes

At a glance

What it is
  • Runs visual odometry on any video or image directory with a single demo command.
  • Can save trajectories in TUM format, point clouds as PLY, and reconstructions in COLMAP text format.
  • Includes a real-time viewer (DPViewer) for visualizing reconstructions while they run.
  • Adds a SLAM backend (DPV-SLAM) for loop closure, and an optional classical backend using DBoW2 for very large loops.
  • Ships evaluation scripts for TartanAir, EuRoC, TUM-RGBD, ICL-NUIM and KITTI, plus training code on TartanAir.
  • Provides example calibration files for iPhone, TartanAir and EuRoC data.

Robotheca's summary of the project's documents, not the creator's words.

Robots on Robotheca
No robot on Robotheca uses it yet.
Licence
MIT. Commercial use: Yes. Where it was read
Install
In the creator's words: The project's README (opens in a new tab)
Maintenance
Active, last commit on 20 Sept 2026.

Use it

How to install it, in the creator's words: The project's README (opens in a new tab)

Robotheca doesn't review code. Read it before running it.

Files and versions

Facts read at commit 0ac95b6

Robotheca never hosts the code: each link goes to the creator's own page.

The README

The creator's own README, copied as written: README.md by Princeton Vision & Learning Lab, at commit 0ac95b6, under MIT (opens in a new tab). The original on GitHub (opens in a new tab).

Read the README here

Deep Patch Visual Odometry/SLAM

This repository contains the source code for our papers:

Deep Patch Visual Odometry (opens in a new tab)

Zachary Teed*, Lahav Lipson*, Jia Deng

Deep Patch Visual SLAM (opens in a new tab)

Lahav Lipson, Zachary Teed, Jia Deng

Image: Open In Colab (opens in a new tab) (opens in a new tab) (opens in a new tab)

Image (opens in a new tab) (opens in a new tab)

@article{teed2023deep,
   title={Deep Patch Visual Odometry},
   author={Teed, Zachary and Lipson, Lahav and Deng, Jia},
   journal={Advances in Neural Information Processing Systems},
   year={2023}
 }
@inproceedings{lipson2024deep,
    author={Lipson, Lahav and Teed, Zachary and Deng, Jia},
    title={{Deep Patch Visual SLAM}},
    booktitle={European Conference on Computer Vision},
    year={2024}
}
Setup and Installation

The code was tested on Ubuntu 20/22 and Cuda 11/12.

Clone the repo

git clone https://github.com/princeton-vl/DPVO.git --recursive
cd DPVO

Create and activate the dpvo anaconda environment

conda env create -f environment.yml
conda activate dpvo

Next install the DPVO package

wget https://gitlab.com/libeigen/eigen/-/archive/3.4.0/eigen-3.4.0.zip
unzip eigen-3.4.0.zip -d thirdparty

# install DPVO
pip install .

# download models and data (~2GB)
./download_models_and_data.sh
Recommended - Install the Pangolin Viewer

Note: You will need to have CUDA 11 and CuDNN installed on your system.

  1. Step 1: Install Pangolin (need the custom version included with the repo)
./Pangolin/scripts/install_prerequisites.sh recommended
mkdir Pangolin/build && cd Pangolin/build
cmake ..
make -j8
sudo make install
cd ../..
  1. Step 2: Install the viewer
pip install ./DPViewer

For installation issues, our Docker Image (opens in a new tab) supports the visualizer.

Classical Backend (optional)

We provide a classical backend for closing very large loops, which requires extra installation.

Step 1. Install the OpenCV C++ API. On Ubuntu, you can use

sudo apt-get install -y libopencv-dev

Step 2. Install DBoW2

cd DBoW2
mkdir -p build && cd build
cmake .. # tested with cmake 3.22.1 and gcc/cc 11.4.0 on Ubuntu
make # tested with GNU Make 4.3
sudo make install
cd ../..

Step 3. Install the image retrieval

pip install ./DPRetrieval
Demos

DPVO can be run on any video or image directory with a single command. Note you will need to have installed DPViewer to visualize the reconstructions in real-time. You can also save the completed reconstructions and view them in COLMAP. The pretrained models can be downloaded from google drive models.zip (opens in a new tab) if you have not already run the download script.

python demo.py \
    --imagedir=<path to image directory or video> \
    --calib=<path to calibration file> \
    --viz # enable visualization
    --plot # save trajectory plot
    --save_ply # save point cloud as a .ply file
    --save_trajectory # save the predicted trajectory as .txt in TUM format
    --save_colmap # save point cloud + trajectory in the standard COLMAP text format
iPhone
python demo.py --imagedir=movies/IMG_0492.MOV --calib=calib/iphone.txt --stride=5 --plot --viz
TartanAir

Download a sequence from TartanAir (opens in a new tab) (several samples are availabe from download directly from the webpage)

python demo.py --imagedir=<path to image_left> --calib=calib/tartan.txt --stride=1 --plot --viz
EuRoC

Download a sequence from EuRoC (opens in a new tab) (download ASL format)

python demo.py --imagedir=<path to mav0/cam0/data/> --calib=calib/euroc.txt --stride=2 --plot --viz
SLAM Backends

To run DPVO with a SLAM backend (i.e., DPV-SLAM), add

--opts LOOP_CLOSURE True

to any evaluate_X.py script or to demo.py

If installed, the classical backend can also be enabled using

--opts CLASSIC_LOOP_CLOSURE True
Evaluation

We provide evaluation scripts for TartanAir, EuRoC, TUM-RGBD and ICL-NUIM. Up to date result logs on these datasets can be found in the logs directory.

TartanAir:

Results on the validation split and test set can be obtained with the command:

python evaluate_tartan.py --trials=5 --split=validation --plot --save_trajectory
EuRoC:
python evaluate_euroc.py --trials=5 --plot --save_trajectory
TUM-RGBD:
python evaluate_tum.py --trials=5 --plot --save_trajectory
ICL-NUIM:
python evaluate_icl_nuim.py --trials=5 --plot --save_trajectory
KITTI:
python evaluate_kitti.py --trials=5 --plot --save_trajectory
Training

Make sure you have run ./download_models_and_data.sh. Your directory structure should look as follows

├── datasets
    ├── TartanAir.pickle
    ├── TartanAir
        ├── abandonedfactory
        ├── abandonedfactory_night
        ├── ...
        ├── westerndesert
    ...

To train (log files will be written to runs/<your name>). Model will be run on the validation split every 10k iterations

python train.py --steps=240000 --lr=0.00008 --name=<your name>
Change Log
  • Aug 2022: Initial release
  • Sep 2022: Add link to docker
  • Mar 2023: Google Colab, TUM + ICL-NUIM evaluation code, flags for saving output
  • July 2024: Add DPV-SLAM. Update output-saving utilities.
Acknowledgements
  • Our Viewer is adapted from DSO.

Robotheca lists software as a reference: nothing is hosted or run here, and every fact links to where it was read.