tsinghua-rll / VoxelNet-tensorflow

A 3D object detection system for autonomous driving.
MIT License
453 stars 123 forks source link

Bug in corner_to_center_box3d function in utils.py #31

Closed aseembehl closed 6 years ago

aseembehl commented 6 years ago

Follwing Line 230 in utils.py

x, y, z = np.sum(roi, axis=0) / 8 should be replaced with the follwoing

x = np.sum(roi[:, 0], axis=0)/ 8
y = np.sum(roi[0:4, 1], axis=0)/ 4
z = np.sum(roi[:, 2], axis=0)/ 8

This makes sure that the x,y, z is the location of the bottom center of the bounding box.

jeasinema commented 6 years ago

Thanks, fix in d24c3ee.

LinHungShi commented 6 years ago

Isn't (x,y,z) the center of the bounding box?

aseembehl commented 6 years ago

yes (x,y,z) is the bounding box center in the paper. The paper sets the anchor z to -1 m. However, in this implementation the __C.ANCHOR_Z = -1.0 - cfg.ANCHOR_H/2 which means the anchor is at bottom.

Hope that answers your question!

LinHungShi commented 6 years ago

Hello, thanks for your answer. But since z is the vertical axis, shouldn't we correct z axis rather than y ?

aseembehl commented 6 years ago

That is because the function `corner_to_center_box3d' operates in the camera coordinate system where the y axis is the up axis.

LinHungShi commented 6 years ago

It makes sense. Thanks for your swift reply.