argoverse / argoverse-api

Official GitHub repository for Argoverse dataset
https://www.argoverse.org
Other
833 stars 239 forks source link

determine_valid_cam_coords() in calibration.py bug #251

Open tom-bu opened 3 years ago

tom-bu commented 3 years ago

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)
benjaminrwilson commented 2 years ago

Hi @tom-bu,

Good suggestion. Would you mind putting in a PR?

tom-bu commented 2 years ago

Sure, no problem. Here is the PR https://github.com/argoai/argoverse-api/pull/262