4.1 KB

Slow Flow: Generating Optical Flow Reference Data

This code is based on the paper Slow Flow: Exploiting High-Speed Cameras for Accurate and Diverse Optical Flow Reference Data.

The high speed flow code (slow_flow) is based on EpicFlow v1.00. We extended it to reason over multiple frames and occlusions. The extended code is included and for details on the orginal code we refer to the paper by Revaud et al. EpicFlow: Edge-Preserving Interpolation of Correspondences for Optical Flow and the project webpage

We provide [two teaser sequences]() to run our code. We are working on publishing the complete high speed datasets used in the project.


The following libraries are necessary to compile and use our code:

Eigen3, Boost, Atlas, Blas, Lapack, Flann, GSL, PNG and JPEG
sudo apt-get install libeigen3-dev libboost-all-dev libatlas-base-dev libblas-dev liblapack-dev libflann-dev libgsl-dev libpng-dev libjpeg-dev

Download and install opencv2.4

Download SED for edges

Download Piotr Dollar's toolbox

Download Deep Matching 
(Optional: using course-to-fine by setting ‘deep_matching’ to 0 and ‘slow_flow_layers’  larger than 1)

Download flow-code from Middlebury OF dataset and compile ImageLib

Download gco-v3.0 library

(Optional) Download Gunturk-Altunbasak-Mersereau Alternating Projections Image Demosaicking 
By setting ‘raw_demosaicing’ to 1 in the configuration file and uncommenting line 17 and 38 in configuration.h

The paths to libraries need to be specified in the following files:


Run cmake and make to compile the code.

Run Pipeline

0. Run epic flow on low resolution to use adaptive frame rates for slow flow

./adaptiveFR -path [path] -folder [folder]

Examples for our teaser_sequences:
./adaptiveFR -path '[path to teaser]/sequence/' -folder 'sheeps' -raw
./adaptiveFR -path '[path to teaser]/sequence/' -folder 'ambush_2' -format 'out_%i_%03i.png' -start 491 -sintel

1. Run slow_flow for flow estimations of all consecutive high speed frames

./slow_flow [slow flow cfg file]

An example configuration file is provided in "cfgs".

    -jet        compute the flow for one specified high speed pair
    -fr     using adaptive frame rate compute flow for 0: high frame rate, 1: low frame rate 
    -resume     resume processing configuration file
    -deep_settings  specify settings for deep matching

2. Run dense_tracking using the output of slow flow

./dense_tracking [dense tracking cfg file]

    -select     compute the flow for one specific final image pair
    -resume     resume processing configuration file

An example configuration file is provided in "cfgs".


If you use our code, please cite our paper: @INPROCEEDINGS{Janai2017CVPR,
  author = {Joel Janai and Fatma Güney and Jonas Wulff and Michael Black and Andreas Geiger},
  title = {Slow Flow: Exploiting High-Speed Cameras for Accurate and Diverse Optical Flow Reference Data},
  booktitle = {Conference on Computer Vision and Pattern Recognition (CVPR)},
  year = {2017}