input image0, estimated flow at each 5 scale, ground truth flow, input image1
- NVlabs/PWC-Net: original implementation (by Caffe / PyTorch).
- NVIDIA/flownet2-pytorch: framework, data transformers, loss functions, and many details about flow estimation.
- nameloss-Chatoyant/PWC-Net_pytorch: Referenced implementation.
Working confirmed. I hope this helps you.
Adding PWCDCNet: advanced model! I'm going to make the trained parameters avaliable ASAP! :)
Unofficial implementation of CVPR2018 paper: Deqing Sun et al. "PWC-Net: CNNs for Optical Flow Using Pyramid, Warping, and Cost Volume". arXiv
- Requirements
- Python 3.6+
- PyTorch 0.4.0 (mainly in in data handling)
- TensorFlow 1.8+
# Training from scratch
python train.py --dataset SintelClean --dataset_dir /path/to/MPI-Sintel-complete
# Start with learned checkpoint
python train.py --dataset SintelClean --dataset_dir /path/to/MPI-Sintel-complete --resume /path/to/model.ckpt
After running above script, utilize GPU-id is asked, (-1:CPU). You can use other learning configs (like --n_epoch
or --batch_size
) see all arguments in train.py
, regards.
python test.py --input_images /path/to/image_0 /path/to/image_1 --resume /path/to/model.ckpt
# for multiple images (using wild-card for 001.png, 002.png, 003.png, ...)
python test_continuous.py -i /path/to/images* -r /path/to/model.ckpt