The calculation of timesteps for the backward flow computation in DAIN_slowmotion is incorrect if the timestep is not 1/N. Therefore the simple array reversal time_offsets[::-1] must be replaced by [1 - t for t in time_offsets]
Example:
If timestep=0.15:
time_offsets = [0.15, 0.3, 0.45, 0.6, 0.75]
And currently calculated offsets from the second keyframe are [0.75, 0.6, 0.45, 0.3, 0.15] while they should be [0.85, 0.7, 0.55, 0.4, 0.25] and are all off by 0.1 which lead to a slightly unaligned warp for the second image and worse quality of the output.
The calculation of timesteps for the backward flow computation in
DAIN_slowmotion
is incorrect if thetimestep
is not1/N
. Therefore the simple array reversaltime_offsets[::-1]
must be replaced by[1 - t for t in time_offsets]
Example: If
timestep=0.15
:time_offsets = [0.15, 0.3, 0.45, 0.6, 0.75]
And currently calculated offsets from the second keyframe are[0.75, 0.6, 0.45, 0.3, 0.15]
while they should be[0.85, 0.7, 0.55, 0.4, 0.25]
and are all off by0.1
which lead to a slightly unaligned warp for the second image and worse quality of the output.