Need help with self-mono-sf?
Click the “chat” button below for chat support from the developer who created it, or find similar developers for support.

About the developer

144 Stars 27 Forks Apache License 2.0 8 Commits 1 Opened issues


Self-Supervised Monocular Scene Flow Estimation (CVPR 2020)

Services available


Need anything else?

Contributors list

Self-Supervised Monocular Scene Flow Estimation

3D visualization of estimated depth and scene flow from two temporally consecutive images.
Intermediate frames are interpolated using the estimated scene flow. (fine-tuned model, tested on KITTI Benchmark)

This repository is the official PyTorch implementation of the paper:

   Self-Supervised Monocular Scene Flow Estimation
   Junhwa Hur and Stefan Roth
   CVPR, 2020 (Oral Presentation)
   Paper / Supplemental

  • Contact: junhwa.hur[at]

Getting started

This code has been developed with Anaconda (Python 3.7), PyTorch 1.2.0 and CUDA 10.0 on Ubuntu 16.04.
Based on a fresh Anaconda distribution and PyTorch installation, following packages need to be installed:

  pip install tensorboard
  pip install pypng==0.0.18

Then, please excute the following to install the Correlation and Forward Warping layer:


For PyTorch version > 1.3
Please put the

flag in the

function in the following files:


Please download the following to datasets for the experiment: - KITTI Raw Data (synced+rectified data, please refer MonoDepth2 for downloading all data more easily) - KITTI Scene Flow 2015

To save space, we also convert the KITTI Raw png images to jpeg, following the convention from MonoDepth:

  find (data_folder)/ -name '*.png' | parallel 'convert {.}.png {.}.jpg && rm {}'

We also converted images in KITTI Scene Flow 2015 as well. Please convert the png images in
into jpg and save them into the seperate folder

To save space further, you can delete the velodyne point data in KITTI raw data and optionally download the Eigen Split Projected Depth for the monocular depth evaluation on the Eigen Split. We converted the velodyne point data of the Eigen Test images in the numpy array format using code from MonoDepth. After downloading and unzipping it, you can merge with the KITTI raw data folder.
- Eigen Split Projected Depth

Training and Inference

The scripts folder contains training\/inference scripts of all experiments demonstrated in the paper (including ablation study).

For training, you can simply run the following script files:

| Script | Training | Dataset | |----------------------------------------------|----------------------------|------------------------| |

| Self-supervised | KITTI Split | |
| Self-supervised | Eigen Split |

Fine-tuning is done in two stages: (i) first finding the stopping point using train\/valid split, and then (ii) fune-tuning using all data with the found iteration steps.
| Script | Training | Dataset | |----------------------------------------------|----------------------------|------------------------| |

| Semi-supervised finetuning | KITTI raw + KITTI 2015 | |
| Semi-supervised finetuning | KITTI raw + KITTI 2015 |

In the script files, please configure these following PATHs for experiments: -

: your own experiment directory where checkpoints and log files will be saved. -
: the directory where KITTI raw data is located in your local system. -
: the directory where KITTI Scene Flow 2015 is located in your local system. -
: the directory where both KITTI Scene Flow 2015 and KITTI raw data are located.

For testing the pretrained models, you can simply run the following script files:

| Script | Task | Training | Dataset | |-------------------------------------------|---------------|-----------------|------------------| |

| MonoSceneFlow | Self-supervised | KITTI 2015 Train | |
| MonoSceneFlow | Self-supervised | KITTI 2015 Test | |
| MonoSceneFlow | fine-tuned | KITTI 2015 Test | |
| MonoDepth | Self-supervised | KITTI test split | |
| MonoDepth | Self-supervised | Eigen test split |
  • Testing on KITTI 2015 Test gives output images for uploading on the KITTI Scene Flow 2015 Benchmark.
  • To save output image, please turn on
    , and
    in the script.

Pretrained Models

The checkpoints folder contains the checkpoints of the pretrained models.
Pretrained models from the ablation study can be downloaded here: download link

Outputs and Visualization

Ouput images and visualization of the main experiments can be downloaded here: - Self-supervised, tested on KITTI 2015 Train - Self-supervised, tested on Eigen Test - Fined-tuned, tested on KITTI 2015 Train


Please cite our paper if you use our source code.

  Author = {Junhwa Hur and Stefan Roth},  
  Booktitle = {CVPR},  
  Title = {Self-Supervised Monocular Scene Flow Estimation},  
  Year = {2020}  

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.