Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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 this issue Aug 9, 2021 · 0 comments

Comments

@VERY-NPU
Copy link

VERY-NPU commented Aug 9, 2021

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant