Giter Site home page Giter Site logo

pwcnettensorflow's Introduction

PWC Net TensorFlow

Tensorflow implementation of Pyramid, Warping and Cost Volume (PWC) Networks based on the paper presented at CVPR 2018.
Currently, main.py simply downloads the FlyingChairs Dataset and starts training, following the outlined schedule.
This code could easily be adapted to train on other datasets though.

Tested Environment

Ubuntu 16.04
Python3
Tensorflow 1.8
Cuda 9.0

Acknowledgements

This repo uses 3 custom written tensorfow ops in c++

The correlation op was taken from this tensorflow implementation of UnFlow by Simon Meister
The ppm and flo decoding ops were taken from this collection of tf ops, from the Computer Vision Group, Albert-Ludwigs-Universität Freiburg

Usage

python3 main.py

A tensorboard session will automatically be started in a new tmux window (so that the visualisations are still available after the python session has ended).
This tensorboard session will log the training/validation losses, as well as giffs of the flow as it trains.

Some general hyperparameters regarding the logging of data can be changed through task.py
Other hyperparameters relating to the training schedule can be changed in the constructor of network.py
The default training/validation split is to have 90% training, with 10% left for validation.

Example visualisations following training

From left to right, the images below indicate rgb image, ground truth flow, predicted flow, flow error

Examples from the training set:

Example Training Flow Result 1
Example Training Flow Result 2
Example Training Flow Result 3
Example Training Flow Result 4

Examples from the validation set:

Example Validation Flow Result 1
Example Validation Flow Result 2
Example Validation Flow Result 3
Example Validation Flow Result 4

Example Training Loss

This is an example of the loss when training on the full flying chairs dataset (no validation was used on this occassion).

Example Loss

pwcnettensorflow's People

Contributors

djl11 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

pwcnettensorflow's Issues

Possible bug in optical flow estimator network

Hi @djl11,
Thanks for sharing your code.

The optical flow estimator network is a feed-forward network formed by stacking layers one over the other:
image

In the flow_estimator_forward_pass function, where the estimator network is defined, it says:

conv4 = tf.layers.conv2d(conv3,64,[3,3],(1,1),'same','channels_first',(1,1),tf.nn.leaky_relu)
ft = tf.layers.conv2d(conv4,32,[3,3],(1,1),'same','channels_first',(1,1),tf.nn.leaky_relu)
wt = tf.layers.conv2d(conv4,2,[3,3],(1,1),'same','channels_first',(1,1),tf.nn.leaky_relu)

That is, both ft and wt are stacked over conv4, instead of being stacked one over the other as in the figure from the paper. Was this intentional, or a bug?

Trained weight

Thank you for making TensorFlow Version of PWC_Net.
Can you share your trained weight?
Also got the error when running main.py

image
image

fine-tune on the Kitti dataset

hi @djl11
Thanks for your work. I want to know if I want to fine-tune on the Kitti Dataset, the ground truth flow are sparse. so how can I change the Loss Function.

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.