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

About the developer

147 Stars 51 Forks GNU General Public License v3.0 15 Commits 2 Opened issues


Dockerfile and runscripts for FlowNet 2.0 (estimation of optical flow)

Services available


Need anything else?

Contributors list

# 55,729
15 commits

FlowNet 2.0 Docker Image


This repository contains a Dockerfile and scripts to build and run neural networks for optical flow estimation in Docker containers. We also provide some example data to test the networks.


If you use this project or parts of it in your research, please cite the original paper of Flownet 2.0:

  author       = "E. Ilg and N. Mayer and T. Saikia and M. Keuper and A. Dosovitskiy and T. Brox",
  title        = "FlowNet 2.0: Evolution of Optical Flow Estimation with Deep Networks",
  booktitle    = "IEEE Conference on Computer Vision and Pattern Recognition (CVPR)",
  month        = "Jul",
  year         = "2017",
  url          = ""

See the paper website for more details.

0. Requirements

We use nvidia-docker for reliable GPU support in the containers. This is an extension to Docker and can be easily installed with just two commands.

To run the FlowNet2 networks, you need an Nvidia GPU (at least Kepler). For the smaller networks (e.g. FlowNet2-s) 1GB of VRAM is sufficient, while for the largest networks (the full FlowNet2) at least 4GB must be available. A GTX 970 can handle all networks.

1. Building the FN2 Docker image

Simply run

. This will create two Docker images: The OS base (an Ubuntu 16.04 base extended by Nvidia, with CUDA 8.0), and the "flownet2" image on top. In total, about 8.5GB of space will be needed after building. Build times are a little slow.

2. Running FN2 containers

Make sure you have read/write rights for the current folder. Run the
script. It will print some help text, but here are two examples to start from:

2.1 Optical flow for two single images

  • we use the full FlowNet2 variant for maximum accuracy
  • we assume that we are on a single-GPU system
  • we want debug outputs, but not the whole network stdout

$ ./ -n FlowNet2 -v data/0000000-imgL.png data/0000001-imgL.png flow.flo

2.2 Optical flow for entire lists of images

  • we use the lean FlowNet2-s variant for maximum speed
  • we want to use GPU "1" on a multi-GPU system
  • we want to see the full network stdout printfest

$ ./ -n FlowNet2-s -g 1 -vv data/flow-first-images.txt data/flow-second-images.txt data/flow-outputs.txt

NOTE: All the network outputs will be files belonging to "root". As a regular user, you cannot change these files, but you can copy them to files that belong to you, and then delete the originals:

$ cp 0000000-flow.flo user-owned-0000000-flow.flo
$ rm 0000000-flow.flo

3. License

The files in this repository are under the GNU General Public License v3.0

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.