NVIDIA / flownet2-pytorch

Pytorch implementation of FlowNet 2.0: Evolution of Optical Flow Estimation with Deep Networks
Other
3.09k stars 739 forks source link

Why is my .flo image only 128*128?How can i modify to get the same size as the input image? #234

Open WangZhen1175701153 opened 3 years ago

WangZhen1175701153 commented 3 years ago

3

This image was obtained from the pre-training model-----FlowNet2C.The input size is 521256,but the output size is 128128.I don't know how can i modify it...................................

WangZhen1175701153 commented 3 years ago

Why is my optical flow image size only 128*128?I want it to be the same size as my input image.Where should I modify it?

Gauravv97 commented 3 years ago

Hi @WangZhen1175701153, the output of the flownet will always be in power of 2. The best approach would be to modify your input image as such it is divisible by 2.

if that is not feasible resize the generated flow. I did it using tensorflow. tf.image.resize(read_flow(flos[1]),input_img.shape[1:3],method='bilinear')