Giter Site home page Giter Site logo

devjaynemorais / flownet2-tf Goto Github PK

View Code? Open in Web Editor NEW

This project forked from sampepose/flownet2-tf

0.0 1.0 0.0 40.93 MB

FlowNet 2.0: Evolution of Optical Flow Estimation with Deep Networks

License: MIT License

Makefile 1.54% Python 51.35% Shell 0.57% C++ 46.54%

flownet2-tf's Introduction

FlowNet2 (TensorFlow)

This repo contains FlowNet2[1] for TensorFlow. It includes FlowNetC, S, CS, CSS, CSS-ft-sd, SD, and 2.

Installation

pip install enum
pip install pypng
pip install matplotlib
pip install image
pip install scipy
pip install numpy
pip install tensorflow

Linux: sudo apt-get install python-tk

You must have CUDA installed: make all

Download weights

To download the weights for all models (4.4GB), run the download.sh script in the checkpoints directory. All test scripts rely on these checkpoints to work properly.

Flow Generation (1 image pair)

python -m src.flownet2.test --input_a data/samples/0img0.ppm --input_b data/samples/0img1.ppm --out ./

Available models:

  • flownet2
  • flownet_s
  • flownet_c
  • flownet_cs
  • flownet_css (can edit test.py to use css-ft-sd weights)
  • flownet_sd

If installation is successful, you should predict the following flow from samples/0img0.ppm: FlowNet2 Sample Prediction

Training

If you would like to train any of the networks from scratch (replace flownet2 with the appropriate model):

python -m src.flownet2.train

For stacked networks, previous network weights will be loaded and fixed. For example, if training CS, the C weights are loaded and fixed and the S weights are randomly initialized.

Fine-tuning

TODO

Benchmarks

Benchmarks are for a forward pass with each model of two 512x384 images. All benchmarks were tested with a K80 GPU and Intel Xeon CPU E5-2682 v4 @ 2.30GHz. Code was executed with TensorFlow-1.2.1 and python 2.7.12 on Ubuntu 16.04. Resulting times were averaged over 10 runs. The first run is always slower as it sets up the Tensorflow Session.

S C CS CSS SD 2
First Run 681.039ms 898.792ms 998.584ms 1063.357ms 933.806ms 1882.003ms
Subsequent Runs 38.067ms 78.789ms 123.300ms 161.186ms 62.061ms 276.641ms

Sources

[1] E. Ilg, N. Mayer, T. Saikia, M. Keuper, A. Dosovitskiy, T. Brox FlowNet 2.0: Evolution of Optical Flow Estimation with Deep Networks, IEEE Conference in Computer Vision and Pattern Recognition (CVPR), 2017.

flownet2-tf's People

Contributors

sampepose avatar devjaynemorais avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.