This is a personal reimplementation of LiteFlowNet3 [1] using PyTorch, which is based on the pytorch-liteflownet3 implementation of LiteFlowNet3 by lhao0301
.
I have trouble in setuping the correlation layer in the original codes by lhao0301
.So I rewrote a code about correlation layer.
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.
For the original Caffe version of this work, please see: https://github.com/twhui/LiteFlowNet3
The correlation layer is basen on spatial-correlation-sampler.
pip install spatial-correlation-sampler
To run it on your demo pair of images, use the following command.
python run.py
network-sintel.pytorch
is from lhao0301's Google-Drive .Only sintel-model is supported now
.
It's tested with pytorch 1.10.0 and cuda-11.3.
PS:
As sniklaus
said:
I am afraid that I cannot guarantee that this reimplementation is correct. However, it produced results pretty much identical to the implementation of the original authors in the examples that I tried. There are some numerical deviations that stem from differences in the DownsampleLayer
of Caffe and the torch.nn.functional.interpolate
function of PyTorch.
Please feel free to contribute to this repository by submitting issues and pull requests.
As stated in the licensing terms of the authors of the paper, their material is provided for research purposes only. Please make sure to further consult their licensing terms.
[1] @inproceedings{hui2020liteflownet3,
title={LiteFlowNet3: Resolving Correspondence Ambiguity for More Accurate Optical Flow Estimation},
author={Hui, Tak-Wai and Loy, Chen Change},
booktitle={European Conference on Computer Vision},
pages={169--184},
year={2020},
organization={Springer}
}
Many code of this repo are borrowed from pytorch-liteflownet3 and pytorch-liteflownet.