• Stars
    star
    248
  • Rank 163,560 (Top 4 %)
  • Language
    Python
  • License
    Apache License 2.0
  • Created over 4 years ago
  • Updated over 2 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Self-Supervised Monocular Scene Flow Estimation (CVPR 2020)

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 / Arxiv

  • Contact: junhwa.hur[at]gmail.com

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:

conda install pytorch==1.2.0 torchvision==0.4.0 cudatoolkit=10.0 -c pytorch
pip install tensorboard
pip install pypng==0.0.18
pip install colorama
pip install scikit-image
pip install pytz
pip install tqdm==4.30.0
pip install future

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

./install_modules.sh

For PyTorch version > 1.3
Please put the align_corners=True flag in the grid_sample function in the following files:

augmentations.py
losses.py
models/modules_sceneflow.py
utils/sceneflow_util.py

Dataset

Please download the following to datasets for the experiment:

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 image_2 and image_3 into jpg and save them into the seperate folder image_2_jpg and image_3_jpg.

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.

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
./train_monosf_selfsup_kitti_raw.sh Self-supervised KITTI Split
./train_monosf_selfsup_eigen_train.sh 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
./train_monosf_kitti_finetune_1st_stage.sh Semi-supervised finetuning KITTI raw + KITTI 2015
./train_monosf_kitti_finetune_2st_stage.sh Semi-supervised finetuning KITTI raw + KITTI 2015

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

  • EXPERIMENTS_HOME : your own experiment directory where checkpoints and log files will be saved.
  • KITTI_RAW_HOME : the directory where KITTI raw data is located in your local system.
  • KITTI_HOME : the directory where KITTI Scene Flow 2015 is located in your local system.
  • KITTI_COMB_HOME : 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
./eval_monosf_selfsup_kitti_train.sh MonoSceneFlow Self-supervised KITTI 2015 Train
./eval_monosf_selfsup_kitti_test.sh MonoSceneFlow Self-supervised KITTI 2015 Test
./eval_monosf_finetune_kitti_test.sh MonoSceneFlow fine-tuned KITTI 2015 Test
./eval_monodepth_selfsup_kitti_train.sh MonoDepth Self-supervised KITTI test split
./eval_monodepth_selfsup_eigen_test.sh 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 --save_disp=True, --save_disp2=True, and --save_flow=True 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:

Acknowledgement

Please cite our paper if you use our source code.

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

More Repositories

1

1-stage-wseg

Single-Stage Semantic Segmentation from Image Labels (CVPR 2020)
Python
379
star
2

n3net

Neural Nearest Neighbors Networks (NIPS*2018)
Python
284
star
3

irr

Iterative Residual Refinement for Joint Optical Flow and Occlusion Estimation (CVPR 2019)
Python
192
star
4

dense-ulearn-vos

Dense Unsupervised Learning for Video Segmentation (NeurIPS*2021)
Python
181
star
5

da-sac

Self-supervised Augmentation Consistency for Adapting Semantic Segmentation (CVPR 2021)
Python
148
star
6

dpp

Detail-Preserving Pooling in Deep Networks (CVPR 2018)
Cuda
115
star
7

multi-mono-sf

Self-Supervised Multi-Frame Monocular Scene Flow (CVPR 2021)
Python
99
star
8

ppac_refinement

Probabilistic Pixel-Adaptive Refinement Networks (CVPR 2020)
Python
77
star
9

cos-cvae

Diverse Image Captioning with Context-Object Split Latent Spaces (NeurIPS 2020)
Jupyter Notebook
37
star
10

lnfmm

Latent Normalizing Flows for Many-to-Many Cross Domain Mappings (ICLR 2020)
Python
33
star
11

adapter_plus

[CVPR 2024] Official implementation of "Adapters Strike Back"
Python
29
star
12

cad

Content-Adaptive Downsampling in Convolutional Neural Networks (CVPR 2023 Workshop on Efficient Deep Learning for Computer Vision)
Python
23
star
13

veto

Vision Relation Transformer for Unbiased Scene Graph Generation (ICCV 2023)
Jupyter Notebook
21
star
14

funnybirds

FunnyBirds: A Synthetic Vision Dataset for a Part-Based Analysis of Explainable AI Methods (ICCV 2023)
JavaScript
19
star
15

acis

Actor-Critic Instance Segmentation (CVPR 2019)
Lua
19
star
16

deblur-devil

Deep Video Deblurring: The Devil is in the Details (ICCV Workshop 2019)
Python
17
star
17

self-adaptive

Semantic Self-adaptation: Enhancing Generalization with a Single Sample
Python
17
star
18

fast-axiomatic-attribution

Fast Axiomatic Attribution for Neural Networks (NeurIPS*2021)
Jupyter Notebook
15
star
19

mar-scf

Normalizing Flows with Multi-Scale Autoregressive Priors (CVPR 2020)
Python
15
star
20

funnybirds-framework

FunnyBirds: A Synthetic Vision Dataset for a Part-Based Analysis of Explainable AI Methods (ICCV 2023)
Python
13
star
21

fldr-vfi

Efficient Feature Extraction for High-resolution Video Frame Interpolation (BMVC 2022)
Python
11
star
22

primaps

11
star
23

pixelpyramids

PixelPyramids: Exact Inference Models from Lossless Image Pyramids (ICCV 2021)
Python
10
star
24

s2-flow

S2-Flow: Joint Semantic and Style Editing of Facial Images (BMVC 2022)
Python
7
star
25

style-seqcvae

Diverse Image Captioning with Grounded Style (GCPR 2021)
Python
6
star
26

semantic_lattice

Semantic Lattice (GCPR 2019)
Python
5
star
27

jwae

Joint Wasserstein Autoencoders for Aligning Multimodal Embeddings (ICCV 2019 Workshop on Cross-Modal Learning in Real World)
Python
5
star
28

probflow

ProbFlow: Joint Optical Flow and Uncertainty Estimation (ICCV 2017)
MATLAB
4
star
29

DIAGen

DIAGen: Semantically Diverse Image Augmentation with Generative Models for Few-Shot Learning (GCPR 2024)
Python
4
star
30

benchmarking-synthetic-clones

Is Synthetic Data all We Need? Benchmarking the Robustness of Models Trained with Synthetic Images (CVPRW 2024)
3
star
31

svigl

Stochastic Variational Inference with Gradient Linearization (CVPR 2018)
MATLAB
2
star
32

playing-for-data

Playing for data: Ground Truth from Computer Games (ECCV 2016)
C++
2
star
33

mirrorflow

MirrorFlow: Exploiting Symmetries in Joint Optical Flow and Occlusion Estimation (ICCV 2017)
C++
1
star
34

matryoshka

Matryoshka Networks: Predicting 3D Geometry via Nested Shape Layers
Python
1
star