MaGNet
MaGNet copied to clipboard
"_compute_cost_CW" function in homography.py
I'm confused why the normalized pixel coordinates need do the following operation:
src_coords[src_coords > 10.0] = 10.0 src_coords[src_coords < -10.0] = -10.0
The "F.grid_sample" function requires the coordinates in the range of -1 to 1 rather than -10 to 10. The coordinates out of [-1, 1] will be invalid thus produce 0 at the corresponding position of output.