Skip to content
3DC-VO: 3D Convolutional Monocular Visual Odometry
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.


This is the source code used for the paper "Estimating Metric Scale VO from Videos". It includes code to train rotation and translation models, and a script to evaluate the models against the validation dataset.

Paper result reproduction

There are several steps involved in reproducing the paper results.

  1. Download dataset
  2. Run script to generate trajectories used for evaluation
  3. View trajectories using some third party tool

Getting the dataset

First, download the resized (160x90) KITTI odometry dataset in the releases section of this repo, and unzip it here: $THIS_REPO/data/images/

Running trajectory generation script

./src/ --reproduce

This will evaluate the pretrained models (at $THIS_REPO/data/models/model_pretrained_(yaw|y).h5) on validation sequences 11-21 (the ones to submit to KITTI's leaderboard). It will create files 11.txt, 12.txt, and so on, under $THIS_REPO/output/.

View trajectories

You can either plot the trajectories in the .txt files yourself or use another tool that has this functionality built in, such as Michael Grupp's evo. For example, using evo, you can view the generated trajectory with the following command:

evo_traj kitti $THIS_REPO/output/13.txt --plot_mode=xz -p

This will show a plot like this, which is one of the trajectories used in the paper:

Sequence 13

Training your own model

You can either use your own images or use the dataset used in the paper. To use the dataset in the paper, download the dataset and place it in the correct directory as described above in "Getting the dataset". To use your own dataset, make sure it has the same folder structure as the one included in this release.

Training step

You must train two separate models (rotational and translational). To train the rotational model, run the training script as follows:

mkdir -p $THIS_REPO/data/models/yaw
./src/ $DATA_DIR $MODEL_FILE yaw

Then, train the translational model as follows:

mkdir -p $THIS_REPO/data/models/y

Evaluation step

To evaluate your generated models, you must compile the official KITTI odometry evaluation tool, included in this repo under $THIS_REPO/src/third_party/kitty_eval:

cd $THIS_REPO/src/third_party/kitty_eval
g++ -std=c++11 -O3 -DNDEBUG -o evaluate_odometry_quiet ./evaluate_odometry_quiet.cpp ./matrix.cpp

This is a slightly modified version of the official tool, which is much less verbose and only evaluates validation sequences instead of train and validation sequences.

Then, run the included evaluation script, which will run the compiled evalution tool on your trained models, and display them in a sorted order based on how accurate they were:


This will look for the highest performing rotation model, using the pretrained y network to estimate forward offsets. To find the highest performing trainslation model, run the script with the following arguments:



Feel free to email me at

You can’t perform that action at this time.