Learning Optical Flow from a Few Matches
This repository contains the source code for our paper:
Learning Optical Flow from a Few Matches
CVPR 2021
Shihao Jiang, Yao Lu, Hongdong Li, Richard Hartley
ANU
Requirements
The code has been tested with PyTorch 1.6 and Cuda 10.1.
conda create --name scv
conda activate scv
conda install pytorch=1.6.0 torchvision=0.7.0 cudatoolkit=10.1 matplotlib tensorboard scipy opencv -c pytorch
pip install faiss-gpu
Required Data
To evaluate/train SCV, you will need to download the required datasets.
- FlyingChairs
- FlyingThings3D
- Sintel
- KITTI
- HD1K (optional)
By default datasets.py
will search for the datasets in these locations. You can create symbolic links to wherever the datasets were downloaded in the datasets
folder
βββ datasets
βββ Sintel
βββ test
βββ training
βββ KITTI
βββ testing
βββ training
βββ devkit
βββ FlyingChairs_release
βββ data
βββ FlyingThings3D
βββ frames_cleanpass
βββ frames_finalpass
βββ optical_flow
Evaluation
You can evaluate a trained model using evaluate.py
python evaluate.py --model=checkpoints/quarter/scv-chairs.pth --dataset=chairs
Training
We used the following training schedule in our paper (2 GPUs).
./train.sh
License
WTFPL. See LICENSE file.
Acknowledgement
The overall code framework is adapted from RAFT. We thank the authors for the contribution.