sniklaus / pytorch-pwc

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

the final optical flow is multiply by 20,Why multiply by 20,not 40? #32

Closed l2009312042 closed 4 years ago

l2009312042 commented 4 years ago

tensorFlow = 20.0 * torch.nn.functional.interpolate(input=moduleNetwork(tensorPreprocessedFirst, tensorPreprocessedSecond), size=(intHeight, intWidth), mode='bilinear', align_corners=False)

in the paper ,the author say "We scale the ground truth flow by 20 and downsample it to obtain the supervision signals at different levels.",

and " our model outputs a quarter resolution optical flow and uses bilinear interpolation to obtain the full-resolution optical flow.",

the output flow interpolation to full-resolution optical flow ,why it not multiply by 2?

sniklaus commented 4 years ago

I ported the official Caffe model, which multiplies by 20 as follows.

https://github.com/NVlabs/PWC-Net/blob/864d2e9fb3f60f9af99f4ea72943b1ff5d472202/Caffe/model/pwc_net_test.prototxt#L2924

For additional questions, you might want to direct your question at the authors of PWC-Net.