All Projects → sniklaus → Pytorch Pwc

sniklaus / Pytorch Pwc

Licence: gpl-3.0
a reimplementation of PWC-Net in PyTorch that matches the official Caffe version

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Pytorch Pwc

Chainer
A flexible framework of neural networks for deep learning
Stars: ✭ 5,656 (+1306.97%)
Mutual labels:  cupy, cuda
3d Ken Burns
an implementation of 3D Ken Burns Effect from a Single Image using PyTorch
Stars: ✭ 1,073 (+166.92%)
Mutual labels:  cupy, cuda
Speedtorch
Library for faster pinned CPU <-> GPU transfer in Pytorch
Stars: ✭ 615 (+52.99%)
Mutual labels:  cupy, cuda
Cupy
NumPy & SciPy for GPU
Stars: ✭ 5,625 (+1299.25%)
Mutual labels:  cupy, cuda
Spanet
Spatial Attentive Single-Image Deraining with a High Quality Real Rain Dataset (CVPR'19)
Stars: ✭ 136 (-66.17%)
Mutual labels:  cupy, cuda
Pynvvl
A Python wrapper of NVIDIA Video Loader (NVVL) with CuPy for fast video loading with Python
Stars: ✭ 95 (-76.37%)
Mutual labels:  cupy, cuda
Sepconv Slomo
an implementation of Video Frame Interpolation via Adaptive Separable Convolution using PyTorch
Stars: ✭ 918 (+128.36%)
Mutual labels:  cupy, cuda
revisiting-sepconv
an implementation of Revisiting Adaptive Convolutions for Video Frame Interpolation using PyTorch
Stars: ✭ 43 (-89.3%)
Mutual labels:  cuda, cupy
Pytorch Unflow
a reimplementation of UnFlow in PyTorch that matches the official TensorFlow version
Stars: ✭ 113 (-71.89%)
Mutual labels:  cupy, cuda
Adacof Pytorch
Official source code for our paper "AdaCoF: Adaptive Collaboration of Flows for Video Frame Interpolation" (CVPR 2020)
Stars: ✭ 110 (-72.64%)
Mutual labels:  cupy, cuda
Softmax Splatting
an implementation of softmax splatting for differentiable forward warping using PyTorch
Stars: ✭ 218 (-45.77%)
Mutual labels:  cupy, cuda
Pytorch Liteflownet
a reimplementation of LiteFlowNet in PyTorch that matches the official Caffe version
Stars: ✭ 281 (-30.1%)
Mutual labels:  cupy, cuda
Darkpose
Distribution-Aware Coordinate Representation for Human Pose Estimation
Stars: ✭ 369 (-8.21%)
Mutual labels:  cuda
Music Translation
A UNIVERSAL MUSIC TRANSLATION NETWORK - a method for translating music across musical instruments and styles.
Stars: ✭ 385 (-4.23%)
Mutual labels:  cuda
Loopy
A code generator for array-based code on CPUs and GPUs
Stars: ✭ 367 (-8.71%)
Mutual labels:  cuda
Cuda Api Wrappers
Thin C++-flavored wrappers for the CUDA Runtime API
Stars: ✭ 362 (-9.95%)
Mutual labels:  cuda
Ganet
GA-Net: Guided Aggregation Net for End-to-end Stereo Matching
Stars: ✭ 393 (-2.24%)
Mutual labels:  cuda
Hipsycl
Implementation of SYCL for CPUs, AMD GPUs, NVIDIA GPUs
Stars: ✭ 377 (-6.22%)
Mutual labels:  cuda
Arrayfire Python
Python bindings for ArrayFire: A general purpose GPU library.
Stars: ✭ 358 (-10.95%)
Mutual labels:  cuda
K2
FSA/FST algorithms, differentiable, with PyTorch compatibility.
Stars: ✭ 354 (-11.94%)
Mutual labels:  cuda

pytorch-pwc

This is a personal reimplementation of PWC-Net [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 version of this work, please see: https://github.com/NVlabs/PWC-Net
Another optical flow implementation from me: https://github.com/sniklaus/pytorch-liteflownet
And another optical flow implementation from me: https://github.com/sniklaus/pytorch-unflow
Yet another optical flow implementation from me: https://github.com/sniklaus/pytorch-spynet

background

The authors of PWC-Net are thankfully already providing a reference implementation in PyTorch. However, its initial version did not reach the performance of the original Caffe version. This is why I created this repositroy, in which I replicated the performance of the official Caffe version by utilizing its weights.

The official PyTorch implementation has adopted my approach of using the Caffe weights since then, which is why they are all performing equally well now. Many people have reported issues with CUDA when trying to get the official PyTorch version to run though, while my reimplementaiton does not seem to be subject to such problems.

setup

The correlation layer is implemented in CUDA using CuPy, which is why CuPy is a required dependency. It can be installed using pip install cupy or alternatively using one of the provided binary packages as outlined in the CuPy repository.

usage

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

python run.py --model default --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 Caffe 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 share-alike purpose. Please make sure to further consult their licensing terms.

references

[1]  @inproceedings{Sun_CVPR_2018,
         author = {Deqing Sun and Xiaodong Yang and Ming-Yu Liu and Jan Kautz},
         title = {{PWC-Net}: {CNNs} for Optical Flow Using Pyramid, Warping, and Cost Volume},
         booktitle = {IEEE Conference on Computer Vision and Pattern Recognition},
         year = {2018}
     }
[2]  @misc{pytorch-pwc,
         author = {Simon Niklaus},
         title = {A Reimplementation of {PWC-Net} Using {PyTorch}},
         year = {2018},
         howpublished = {\url{https://github.com/sniklaus/pytorch-pwc}}
    }
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].