This repo includes FlowNetC, S, CS, CSS, CSS-ft-sd, SD, and 2 for TensorFlow. Most part are from this repo, and we have made some modifications:
- It can deal with arbitrary size of input now.
- After installation, just copy the whole folder
FlowNet2_src
to your codebase to use. Seedemo.py
for details.
This code has been tested with Python3.6 and TensorFlow1.2.0, with a Tesla K80 GPU. The system is Ubuntu 14.04.
You must have CUDA installed: make all
Note: you might need to modify this line, according to the GPU you use.
To download the weights for all models (4.4GB), run the download.sh
script in the FlowNet2_src/checkpoints
directory. All test scripts rely on these checkpoints to work properly.
python demo.py
If installation is successful, you should see the following:
Notice that the model itself will handle the RGB to BGR operation for you. And please be care about your input scale and datatype.
Model | KITTI2012 Train EPE | KITTI2015 Train EPE | KITTI2015 Train F1 | Sintel Final Train EPE |
---|---|---|---|---|
FlowNetS | 7.2457 | 14.0753 | 0.5096 | 3.9140 |
FlowNetC | 5.9793 | 11.8957 | 0.4509 | 3.1001 |
FlowNet2 | 4.3167 | 10.9869 | 0.3241 | 2.1592 |
FlowNetS and FlowNetC are better than paper, but FlowNet2 is slightly worse.
- Add fine-tune mode
- Remove the
training_schedule
variable from inference mode.
[1] E. Ilg, N. Mayer, T. Saikia, M. Keuper, A. Dosovitskiy, T. Brox FlowNet 2.0: Evolution of Optical Flow Estimation with Deep Networks, IEEE Conference in Computer Vision and Pattern Recognition (CVPR), 2017.
As noted in the beginning, most part are from sampepose/flownet2-tf