For example, assume the flow vector at location (i,j) of spatial size (256,256) is (2,4) .
If we downsample the flow to (128,128), the downsampled flow vector at location (i', j'), should be rescaled by 2, which is (1,2),
But with the code attached above, the flow vector would be (2,4), as F.interpolate just bilinear samples from nearby flow values and does not consider spatial change.
Hi Jarvisss,
The optical flows are Normalized to [-1, 1] before using interpolate.
Therefore, we can use interpolation methods such as bilinear sampling to resize the scale of the flow map.
https://github.com/RenYurui/Global-Flow-Local-Attention/blob/749bf70c834ea717aee7c1975d08aab31d1f0f43/model/networks/external_function.py#L254
For example, assume the flow vector at location (i,j) of spatial size (256,256) is (2,4) . If we downsample the flow to (128,128), the downsampled flow vector at location (i', j'), should be rescaled by 2, which is (1,2),
But with the code attached above, the flow vector would be (2,4), as
F.interpolate
just bilinear samples from nearby flow values and does not consider spatial change.