simonmeister / UnFlow

UnFlow: Unsupervised Learning of Optical Flow with a Bidirectional Census Loss
MIT License
294 stars 57 forks source link

C++ files of the image_warp function needed to be compiled? #46

Closed huliyu1203 closed 6 years ago

huliyu1203 commented 6 years ago

In your folder,image_warp function has been designed using python and tensorflow . And you still have compiled the c++ files in src/e2eflow/ops.py to compute the gradients of image_warp.I think it is unnecessary because the back propogation will be calculated automatically if you use python statement and the c++ files used in Caffe should not be here anymore. Am i wrong?

simonmeister commented 6 years ago

Yes, you are right in that the custom c++ module for backward warping is currently not used (in favor of the native tensorflow implementation in image_warp.py). It is possible to remove it from compilation in ops.py, but it's not a big deal (as in should not be noticeable) as compilation is done only once upon setup and it should be very fast.

huliyu1203 commented 6 years ago

And can you offer me the help ?There is a little problem with me about the complilation of correlation function and i found there is no any python statement to complete the operation of correlation function.Could you give some suggestion?

simonmeister commented 6 years ago

The correlation function is only possible as a custom op right now (would likely be too slow otherwise). Which error are you getting? Are the other ops compiling?

huliyu1203 commented 6 years ago

I have little knowledge about the complilation,so i do not know how to do the complication.But still thank you very much, i have complete the correlation layer with python on the condition that stride_1=1 and stride_2=1.