Skip to content

Commit

Permalink
[Fix] Fix visualization in KITTI dataset (#956)
Browse files Browse the repository at this point in the history
* fix bug to support kitti vis

* fix
  • Loading branch information
ZCMax authored and Tai-Wang committed Sep 24, 2021
1 parent 1bc1a1e commit e93a77f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion mmdet3d/core/visualizer/image_vis.py
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,10 @@ def draw_camera_bbox3d_on_img(bboxes3d,
points_3d = corners_3d.reshape(-1, 3)
if not isinstance(cam2img, torch.Tensor):
cam2img = torch.from_numpy(np.array(cam2img))
cam2img = cam2img.reshape(3, 3).float().cpu()

assert (cam2img.shape == torch.Size([3, 3])
or cam2img.shape == torch.Size([4, 4]))
cam2img = cam2img.float().cpu()

# project to 2d to get image coords (uv)
uv_origin = points_cam2img(points_3d, cam2img)
Expand Down

0 comments on commit e93a77f

Please sign in to comment.