Enforce Aspect Ratio
cancan101 opened this issue · 1 comments
I assume that the aspect ratio here should be the same:
Lines 23 to 25 in 7bad240
i.e ori_video_shape[0] / ori_video_shape[1] ~= sensor_size [0] / sensor_size[1]
(within floating point tolerance)?
If that is the case, then the inputs can be checked with an assertion, etc
Hi,
thanks for the remark. I would recommend to not include any asserts here, since these aspect ratios do not necessarily have to be the same. There are scenarios where the CMOS sensor has a different ratio (e.g. 2:3), and the video gets resampled either at camera output (i.e. the stream received from camera already has ratio 4:3), or at preprocessing level (i.e. the stream received has ratio 2:3 as well, and needs to be resampled in software before feeding to the model). This differentiation was suggested by the paper from Swirski et al. (link to project page).