cadc_devkit icon indicating copy to clipboard operation
cadc_devkit copied to clipboard

Why 3D conversion to 2D with newer script results are not ideal?

Open Avalonooooo opened this issue 3 years ago • 3 comments

hello,I used the updated 3D to 2D script provided by you, but the performance seems to be not very ideal. The first picture below is the result obtained by the person who raised the question some time ago, and the second one is the result obtained by myself through the updated script provided by you. Is there any need for improvement in the code? one two

Avalonooooo avatar Feb 24 '22 01:02 Avalonooooo

In addition to the above problems, I have some confusion about the code in the run_demo_tracklets.py np.matmul(T_Lidar_Cuboid, front_right_bottom) VRLK}@ }{1~81HKO@E }Q

Avalonooooo avatar Feb 26 '22 06:02 Avalonooooo

The script was created by another user and not part of the official release. It seemed to work in that issue but I will close that issue if it is not implemented correctly.

As for the math, I was following literature on how to chain transformations and that is also how I would chain transformations for the vehicle.

You could read "6.3.1 Transformation Matrices" in http://asrl.utias.utoronto.ca/~tdb/bib/barfoot_ser17.pdf

I also found this youtube video https://www.youtube.com/watch?v=09I15RO49vg which derives the equation image

mpitropov avatar Feb 27 '22 23:02 mpitropov

Thank you very much for your reply @mpitropov , I think you may have misunderstood my second question due to my misrepresentation. I thought like this: when we rotate the eight points of the car in the point cloud coordinate system, first calculate the eight coordinates according to the point at the bottom center of the car plus the offset relative to the origin, and then multiply the coordinates by The rotation matrix, which is the (X+C)R I mentioned above. For the operation of the block matrix, I understand, I just don't understand the physical meaning of RC+X.

For the first question, I'm currently working on 2D object detection. Inside your updated script, I changed the code to bbox_3d = [x, y, z,length,width,height,yaw] bbox_3d_cam = [bbox_img[0][3], bbox_img[1][3]bbox_img[2][3], length, width, height, rotation_y] The results look good for vehicles, but not for pedestrians, which is confusing. image

Then I changed the original code run_demo_tracklets.py `

 x_min = np.min(
    [f_r_b_coord[0], f_r_t_coord[0], f_l_b_coord[0], f_l_t_coord[0], b_r_b_coord[0],
     b_r_t_coord[0], b_l_b_coord[0], b_l_t_coord[0]])
  y_min = np.min(
    [f_r_b_coord[1], f_r_t_coord[1], f_l_b_coord[1], f_l_t_coord[1], b_r_b_coord[1],
     b_r_t_coord[1], b_l_b_coord[1], b_l_t_coord[1]])

  x_max = np.max(
    [f_r_b_coord[0], f_r_t_coord[0], f_l_b_coord[0], f_l_t_coord[0], b_r_b_coord[0],
     b_r_t_coord[0], b_l_b_coord[0], b_l_t_coord[0]])

  y_max = np.max(
    [f_r_b_coord[1], f_r_t_coord[1], f_l_b_coord[1], f_l_t_coord[1], b_r_b_coord[1],
     b_r_t_coord[1], b_l_b_coord[1], b_l_t_coord[1]])

` but I found that there are a lot of vehicles marked, what should I do to improve it? image image

Avalonooooo avatar Feb 28 '22 03:02 Avalonooooo