Unverified Commit dd74422e authored by twang's avatar twang Committed by GitHub
Browse files

[Fix] Minor adjustments (#241)

* Fix an old bug in box_np_ops, not used or influencing results

* Update a minor filter criterion in KITTI evaluation

* Update the fixed criterion, not influencing KITTI results
parent 068cae53
...@@ -347,7 +347,7 @@ def points_cam2img(points_3d, proj_mat): ...@@ -347,7 +347,7 @@ def points_cam2img(points_3d, proj_mat):
""" """
points_shape = list(points_3d.shape) points_shape = list(points_3d.shape)
points_shape[-1] = 1 points_shape[-1] = 1
points_4 = np.concatenate([points_3d, np.zeros(points_shape)], axis=-1) points_4 = np.concatenate([points_3d, np.ones(points_shape)], axis=-1)
point_2d = points_4 @ proj_mat.T point_2d = points_4 @ proj_mat.T
point_2d_res = point_2d[..., :2] / point_2d[..., 2:3] point_2d_res = point_2d[..., :2] / point_2d[..., 2:3]
return point_2d_res return point_2d_res
......
...@@ -642,10 +642,9 @@ class KittiDataset(Custom3DDataset): ...@@ -642,10 +642,9 @@ class KittiDataset(Custom3DDataset):
# Post-processing # Post-processing
# check box_preds_camera # check box_preds_camera
image_shape = box_preds.tensor.new_tensor(img_shape) image_shape = box_preds.tensor.new_tensor(img_shape)
valid_cam_inds = ((box_preds_camera.tensor[:, 0] < image_shape[1]) & valid_cam_inds = ((box_2d_preds[:, 0] < image_shape[1]) &
(box_preds_camera.tensor[:, 1] < image_shape[0]) & (box_2d_preds[:, 1] < image_shape[0]) &
(box_preds_camera.tensor[:, 2] > 0) & (box_2d_preds[:, 2] > 0) & (box_2d_preds[:, 3] > 0))
(box_preds_camera.tensor[:, 3] > 0))
# check box_preds # check box_preds
limit_range = box_preds.tensor.new_tensor(self.pcd_limit_range) limit_range = box_preds.tensor.new_tensor(self.pcd_limit_range)
valid_pcd_inds = ((box_preds.center > limit_range[:3]) & valid_pcd_inds = ((box_preds.center > limit_range[:3]) &
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment