in video_processing/modules/optical_flow.py [0:0]
def _downscale_maps(flow_maps, downscale_size: int = 16):
return [
cv2.resize(
flow,
(downscale_size, int(flow.shape[0] * (downscale_size / flow.shape[1]))),
interpolation=cv2.INTER_AREA,
)
for flow in flow_maps
]