Skip to content

a reimplementation of Optical Flow Estimation using a Spatial Pyramid Network in PyTorch

License

Notifications You must be signed in to change notification settings

hzhang57/pytorch-spynet

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pytorch-spynet

This is a personal reimplementation of SPyNet [1] using PyTorch. Should you be making use of this work, please cite the paper accordingly. Also, make sure to adhere to the licensing terms of the authors. Should you be making use of this particular implementation, please acknowledge it appropriately [2].

Paper

For the original Torch version of this work, please see: https://github.com/anuragranj/spynet
Another optical flow implementation from me: https://github.com/sniklaus/pytorch-pwc
And another optical flow implementation from me: https://github.com/sniklaus/pytorch-liteflownet
Yet another optical flow implementation from me: https://github.com/sniklaus/pytorch-unflow

setup

To download the pre-trained models, run bash download.bash. These originate from the original authors, I just converted them to PyTorch.

usage

To run it on your own pair of images, use the following command. You can choose between various models, please make sure to see their paper / the code for more details.

python run.py --model sintel-final --first ./images/first.png --second ./images/second.png --out ./out.flo

I am afraid that I cannot guarantee that this reimplementation is correct. However, it produced results identical to the implementation of the original authors in the examples that I tried. Please feel free to contribute to this repository by submitting issues and pull requests.

comparison

Comparison

license

As stated in the licensing terms of the authors of the paper, the models are free for non-commercial and scientific research purpose. Please make sure to further consult their licensing terms.

references

[1]  @inproceedings{Ranjan_CVPR_2017,
         author = {Ranjan, Anurag and Black, Michael J.},
         title = {Optical Flow Estimation Using a Spatial Pyramid Network},
         booktitle = {IEEE Conference on Computer Vision and Pattern Recognition},
         year = {2017}
     }
[2]  @misc{pytorch-spynet,
         author = {Simon Niklaus},
         title = {A Reimplementation of {SPyNet} Using {PyTorch}},
         year = {2018},
         howpublished = {\url{https://github.com/sniklaus/pytorch-spynet}}
    }

About

a reimplementation of Optical Flow Estimation using a Spatial Pyramid Network in PyTorch

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 94.6%
  • Shell 5.4%