argoverse-api
argoverse-api copied to clipboard
determine_valid_cam_coords() in calibration.py bug
The following code still considers a uv point that rounds up to the img width/height as valid.
x_valid = np.logical_and(0 <= uv[:, 0], uv[:, 0] < camera_config.img_width)
y_valid = np.logical_and(0 <= uv[:, 1], uv[:, 1] < camera_config.img_height)
It might be necessary to change it to this
x_valid = np.logical_and(0 <= np.round(uv[:, 0]), np.round(uv[:, 0]) < camera_config.img_width)
y_valid = np.logical_and(0 <= np.round(uv[:, 1]), np.round(uv[:, 1]) < camera_config.img_height)
Hi @tom-bu,
Good suggestion. Would you mind putting in a PR?
Sure, no problem. Here is the PR https://github.com/argoai/argoverse-api/pull/262