3d bbox
Closed this issue · 9 comments
Hello,
There are many 3d bboxes in the figures of this paper. Could you tell me how to draw the 3d bbox with output of this network(R and T)?
thanks for help !
@j96w
First, generate 8 corner points of the bbox from the mesh. The distance between the two points with the minimum and maximum coordinates is the longest possible diagonal for the box, and the points can be thought of as the upper right corner in the front of the box, and the lower left corner in the back. Then, rotate and translate the 8 points with R,T and do projection to get the 3d bbox in 2d frame.
ok, thanks for your help ! I will have a try
@hamza-04 I figured it out as what j96w said on linemod data. But several weeks passed, I maybe forget something.
First, you need to find the 8 corner points of the model such as the yellow duck or something.
and rotate this 8 points as the author did when rotating the model. (perhaps you could read the code carefully to find out how to rotate and translate the model, same as rotating 8 corner points)
project these 8 points into 2d image, and then connect the points into lines. so you could get the final bbox.
Hope I could help you.
hi @j96w, i have draw the 3d boxes accurately on the linemod datasets, but when i use the same way on ycb datasets, the box is not such accurately (as show below), can you give me some suggest ? thank you for you reply!
@towardthesea thank you for you reply! but sorry,i dont understand the transformation you say mean. My process is as follows:
- get the my_r , my_t after refine network and the object corners
- by
quaternion_matrix(my_r)[0:3, 0:3]
transform my_r to get Rotation matrix my_mat - by
np.dot(corners, my_mat.T)+my_t
to get the 3d bbox - projecting into 2D
Which step went wrong?
@lzrrr33 your process is what I mean for transformation
. Steps look fine for me. Maybe you should check some other preprocessing steps like segmentation or intrinsic parameters of the camera (if you use a different one than the Asus used for the dataset)
@lzrrr33 your process is what I mean for
transformation
. Steps look fine for me. Maybe you should check some other preprocessing steps like segmentation or intrinsic parameters of the camera (if you use a different one than the Asus used for the dataset)
Sorry to disturb you, I use your script to test my self-made model, but the bounding box is not the same as expected. At the same time, It said "Not pass! Lost detection!" when i eval. Can you give me some suggestions