chaoyuaw / pytorch-vcii

Video Compression through Image Interpolation (ECCV'18) [PyTorch]
https://chaoyuaw.github.io/vcii/
GNU Lesser General Public License v2.1
209 stars 38 forks source link

Computing and storing the motion vectors #10

Open michaelshiyu opened 5 years ago

michaelshiyu commented 5 years ago

Hi Chao-Yuan,

First of all thanks for sharing this great work! I am trying to train on my own videos so I need to extract motion vectors (MVs) first, which I'm trying to do by calling your CoViAR's loadmethod (a big shout out for that work as well!). I have two questions:

1) The load method, by default, computes the MV w.r.t. the previous frame, correct? So to get the "after" flows as specified in the sample training/eval data, I can call load for a second time on the video with its frames reversed, correct?

2) By looking at read_bmv, it seems that to convert the int32 MV into uint8, you added 128 to all of its elements and possibly did another clamping to [0, 255]. I'm not very familiar with MV so could you please explain a little bit on why this will not cause loss of information?

Many thanks in advance.