Skip to content

PyTorch implementation of the classical optical flow visualization by Baker et al. [ICCV 2007].

License

Notifications You must be signed in to change notification settings

ChristophReich1996/Optical-Flow-Visualization-PyTorch

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Optical Flow Visualization for PyTorch

License: MIT

This repository is a PyTorch fork of the OpticalFlow_Visualization (flow_vis) repository, originally published under the MIT license. The optical flow visualization follows the color encoding proposed in the paper "A database and evaluation methodology for optical flow" by Baker et al. published at ICCV 2007 [1].

Installation

Simply run the following command to install flow_vis_torch.

pip install git+https://github.com/ChristophReich1996/Optical-Flow-Visualization-PyTorch

Usage

Convert a given flow of the shape [batch size (optional), 2, height, width] to an RGB image of the shape [batch size (optional), 3, height, width] by calling flow_vis_torch.flow_to_color.

import flow_vis_torch
flow_rgb = flow_vis_torch.flow_to_color(flow)

For a detailed example have a look at the example script.

Visualizations

Flow maps taken from the MPI Sintel Flow Dataset [2].

Output flow_vis_torch Output flow_vis
1 2
3 4
5 6

References

[1] @inproceedings{Baker2007,
        title={{A Database and Evaluation Methodology for Optical Flow}},
        author={Baker, Simon and Roth, Stefan and Scharstein, Daniel and Black, Michael J and Lewis, JP and Szeliski, Richard},
        booktitle={{International Conference on Computer Vision (ICCV)}},
        pages={1--8},
        year={2007},
        organization={IEEE}
}
[2] @inproceedings{Butler2012,
        title={{A Naturalistic Open Source Movie for Optical Flow Evaluation}},
        author={Butler, Daniel J and Wulff, Jonas and Stanley, Garrett B and Black, Michael J},
        booktitle={{European Conference on Computer Vision (ECCV)}},
        pages = {611--625},
        year = {2012},
        publisher={Springer}
}

About

PyTorch implementation of the classical optical flow visualization by Baker et al. [ICCV 2007].

Topics

Resources

License

Stars

Watchers

Forks

Languages