ClementPinard / FlowNetPytorch

Pytorch implementation of FlowNet by Dosovitskiy et al.
MIT License
838 stars 205 forks source link

Support for FlowNet2 models #29

Open mathmanu opened 6 years ago

mathmanu commented 6 years ago

Do you have any thoughts about integrating FlowNet2 into this repository?

FlowNet2 models (including the custom operations such as correlation) have become available for PyTorch 0.3, Python 3.x. https://github.com/vt-vl-lab/pytorch_flownet2 https://github.com/hellock/flownet2-pytorch

I am asking this is because this repository is structured in a better way and is easier to use and modify.

ClementPinard commented 6 years ago

thanks ! I have issued a feature request for correlation module here some time ago : pytorch/pytorch/issues/4073

As for now, I don't have much time to spend on this personal project. If the feature is integrated in future version, I'll make up some time to use it for FlowNetC training If not, it may take some time, but I'll try to do the PR myself.

I prefer not to have personal modules as in NVIDIA's repo, because as you said the main goal here is to maintain the clearest code possible, which onyl requires to get the latest pytorch release and not build anything

mathmanu commented 6 years ago

Thanks. I did a +1 for your feature request :)

mathmanu commented 6 years ago

Alternately, the correlation can be implemented with PyTorch code like the CorrelationLayer here: https://github.com/onlytailei/pytorch-flownet2/blob/master/nets/flownetC.py

Not sure about its speed though.

ClementPinard commented 6 years ago

You can have a look a this implementation, I'm planning on using it for a FlowNetC version and then hopefully a full FlowNet2 architecture https://github.com/ClementPinard/Pytorch-Correlation-extension

mathmanu commented 6 years ago

Hi, I was wondering about the speedup compared to a pure PyTorch implementation (i.e. without C++/CUDA kernels). Do you have any idea? This is just out of curiosity - but I think it will me a good comparison point in your benchmark table.