sniklaus / pytorch-pwc

a reimplementation of PWC-Net in PyTorch that matches the official Caffe version
GNU General Public License v3.0
608 stars 122 forks source link

An error regarding the. flo file #20

Closed huaxiaojian1997 closed 5 years ago

huaxiaojian1997 commented 5 years ago

Hello,@sniklaus I installed pytorch-pwc according to your instructions. I successfully generated the. flo file, but I encountered a problem. After I visualized the. flo file and converted it to png file, I found the lower part of the picture was covered. I am not sure what this is. Can you help me? myplot_first second myplot_frame1 frame2

sniklaus commented 5 years ago

Looks like a bug when reading the .flo file. Have you tried using cv2.optflow.readOpticalFlow?

huaxiaojian1997 commented 5 years ago

May I ask if the cv2.optflow.readOpticalFlow you mentioned is the file in OpenCV 3.4?

sniklaus commented 5 years ago

Seems like it: https://docs.opencv.org/3.4.0/d7/df9/namespacecv_1_1optflow.html

It might be part of opencv_contrib though, so your mileage may vary.

huaxiaojian1997 commented 5 years ago

I used the program of OPTICAL FLOW TOOLKIT v0.1 on GitHub to convert. flo files into png files. I will try OpenCV to convert, thank you