"...git@developer.sourcefind.cn:renzhc/diffusers_dcu.git" did not exist on "4088e8a85158f2dbcad2e23214ee4ad3dca11865"
Commit e93a77f0 authored by ChaimZhu's avatar ChaimZhu Committed by Tai-Wang
Browse files

[Fix] Fix visualization in KITTI dataset (#956)

* fix bug to support kitti vis

* fix
parent 1bc1a1ef
...@@ -192,7 +192,10 @@ def draw_camera_bbox3d_on_img(bboxes3d, ...@@ -192,7 +192,10 @@ def draw_camera_bbox3d_on_img(bboxes3d,
points_3d = corners_3d.reshape(-1, 3) points_3d = corners_3d.reshape(-1, 3)
if not isinstance(cam2img, torch.Tensor): if not isinstance(cam2img, torch.Tensor):
cam2img = torch.from_numpy(np.array(cam2img)) 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) # project to 2d to get image coords (uv)
uv_origin = points_cam2img(points_3d, cam2img) uv_origin = points_cam2img(points_3d, cam2img)
......
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