sshaoshuai / PointRCNN

PointRCNN: 3D Object Proposal Generation and Detection from Point Cloud, CVPR 2019.
MIT License
1.7k stars 425 forks source link

Why bbox's the coordinate of y range from 0 to -h instead of -h/2 to h/2 as the practice in x/z? #199

Open VERY-NPU opened 2 years ago

VERY-NPU commented 2 years ago

My questions focus on the function of boxes3d_to_corners3d from lib\utils\kitti_utils as follow: boxes_num = boxes3d.shape[0] h, w, l = boxes3d[:, 3], boxes3d[:, 4], boxes3d[:, 5] x_corners = np.array([l / 2., l / 2., -l / 2., -l / 2., l / 2., l / 2., -l / 2., -l / 2.], dtype=np.float32).T # (N, 8) z_corners = np.array([w / 2., -w / 2., -w / 2., w / 2., w / 2., -w / 2., -w / 2., w / 2.], dtype=np.float32).T # (N, 8) y_corners = np.zeros((boxes_num, 8), dtype=np.float32) y_corners[:, 4:8] = -h.reshape(boxes_num, 1).repeat(4, axis=1) # (N, 8)

If these coordinates of corners add their according center coordinates, so the bounding box of object is equivalent to enhance abount h/2. Why are we doing this? The final object's position is wrong in my opinion. Can someone help me?