sniklaus / pytorch-spynet

a reimplementation of Optical Flow Estimation using a Spatial Pyramid Network in PyTorch
GNU General Public License v3.0
317 stars 47 forks source link

From first image to the second #15

Closed yitong91 closed 4 years ago

yitong91 commented 4 years ago

Hi, this code is really helpful. I'm wondering how can I predict the second image from the first one + flow.

I tried

second_image_pred = backwarp(first_image, flow). But the result has strange color shift and the motion is not modeled well.

Looking forward to your reply. Thanks!

sniklaus commented 4 years ago

I am afraid that, given the estimated flow from the first to the second image, you would have to use forward and not backward warping to reconstruct the second image from the first one. For more details, see: https://github.com/sniklaus/softmax-splatting