# PWC-Net_pytorch **Repository Path**: winday00/PWC-Net_pytorch ## Basic Information - **Project Name**: PWC-Net_pytorch - **Description**: pytorch implementation of "PWC-Net: CNNs for Optical Flow Using Pyramid, Warping, and Cost Volume" - **Primary Language**: Unknown - **License**: MIT - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2021-09-24 - **Last Updated**: 2021-09-24 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README Official version(Caffe & PyTorch) is at https://github.com/NVlabs/PWC-Net, thank you all for attention. # News - Fix my usage of Correlation Layer, I've been using 19*19 neighborhood for matching. > NVIDIA is so kind to use their wonderful CUDA to let my mistake seem to be less stupid, btw I don't intend to remove my freaking slow Cost Volume Layer for code diversity or something. # Acknowledgments - [NVIDIA/flownet2-pytorch](https://github.com/NVIDIA/flownet2-pytorch): framework, data transformers, loss functions, and many details about flow estimation. - [yunjey/pytorch-tutorial](https://github.com/yunjey/pytorch-tutorial/tree/master/tutorials/04-utils/tensorboard): Tensorboard logger - [sksq96/pytorch-summary](https://github.com/sksq96/pytorch-summary): model summary similar to `model.summary()` in Keras # PWC-Net This is an unofficial pytorch implementation of CVPR2018 paper: Deqing Sun *et al.* **"PWC-Net: CNNs for Optical Flow Using Pyramid, Warping, and Cost Volume"**. **Resources** [arXiv](https://arxiv.org/abs/1709.02371) | [Caffe](https://github.com/deqings/PWC-Net)(official) 
(flow outputs from top to bottom, the rightest is groundtruth)
It starts to output reasonable flows. However, both time and performance need to be improved. Hope you have fun with this code, and feel free to share your idea about network and its hyper parameters. # Usage - **Requirements** - Python 3.6+ - **PyTorch 0.4.0** - Tensorflow - **Get Started with Demo** Note that we only save weights of parameters instead of entire network, provided model file is for default configs, we may upload more advanced models in the future. ``` python3 main.py --input_norm --batch_norm --residual --corr Correlation --corr_activation pred --load example/SintelFinal-200K-noBN_SintelFinal-148K-BN.pkl -i example/1.png example/2.png -o example/output.flo ``` - **Prepare Datasets** - Download [FlyingChairs](https://lmb.informatik.uni-freiburg.de/data/FlyingChairs/FlyingChairs.zip) for training filetree when setting `--dataset FlyingChairs --dataset_dir