From 0cd000bf5b04057234d67af476118984bc29ed10 Mon Sep 17 00:00:00 2001 From: Tai-Wang Date: Sat, 13 Nov 2021 15:42:48 +0800 Subject: [PATCH] Fix incorrect velo indexing when formating boxes on nuScenes (#1049) --- mmdet3d/datasets/nuscenes_mono_dataset.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mmdet3d/datasets/nuscenes_mono_dataset.py b/mmdet3d/datasets/nuscenes_mono_dataset.py index e361b4ae7..181b7943b 100644 --- a/mmdet3d/datasets/nuscenes_mono_dataset.py +++ b/mmdet3d/datasets/nuscenes_mono_dataset.py @@ -776,7 +776,7 @@ def nusc_box_to_cam_box3d(boxes): dims = torch.Tensor([b.wlh for b in boxes]).view(-1, 3) rots = torch.Tensor([b.orientation.yaw_pitch_roll[0] for b in boxes]).view(-1, 1) - velocity = torch.Tensor([b.velocity[:2] for b in boxes]).view(-1, 2) + velocity = torch.Tensor([b.velocity[0::2] for b in boxes]).view(-1, 2) # convert nusbox to cambox convention dims[:, [0, 1, 2]] = dims[:, [1, 2, 0]]