hzwer / ECCV2022-RIFE

ECCV2022 - Real-Time Intermediate Flow Estimation for Video Frame Interpolation
MIT License
4.47k stars 444 forks source link

Is it possible to ouput optical flow instead of midpoint flow using latest version? #344

Open MichalTurek opened 11 months ago

MichalTurek commented 11 months ago

Hi, I saw the issue #278 , however In my opinion rife_m model provided in older version lacks the quality which is provided in latest versions. My question is how to do it using lets say version 4.12?

hzwer commented 11 months ago

The methods are similar. In Flownet.py, the first value returned by model inference is the optical flow list. Just take flow_list[-1][:, :2].

image

MichalTurek commented 11 months ago

okay, what about the timestamp parameter? shall I set it to 1.0 or 0.0?

hzwer commented 11 months ago

Set it to 1.0. Then flow[:, :2] will be F1->0 (Theoretically speaking)

MichalTurek commented 11 months ago

and if i set timestamp to 0 then i will get f0->1 ?

hzwer commented 11 months ago

flow[:, :2] is Ft->0, flow[:, 2:4] is Ft->1 Set timestep to 1.0. Then flow[:, :2] will be F1->0, flow[:, 2:4] will be F1->1 Set timestep to 0. Then flow[:, :2] will be F0->0, flow[:, 2:4] will be F0->1