naurril / SUSTechPOINTS

3D Point Cloud Annotation Platform for Autonomous Driving
GNU General Public License v3.0
862 stars 221 forks source link

Custom Dataset Error #100

Closed hoangduyloc closed 2 years ago

hoangduyloc commented 2 years ago

Hello @naurril, thanks for your great work. I have my own custom dataset (Only Lidar, No Camera), and I tried to label via your tool, everything looks good in SUS environment, but when convert label Json file to Txt KITTI file:

So I do an simple exp: I used KITTI dataset (.bin - 0000099.bin); I converted it to (.pcd). After labeling, I converted the label to KITTI format, bellow is the result.

naurril commented 2 years ago

Can you try to add a -height/2 offset to z-axis of the position? in KITTI format the position is the bottom center of the box. see here for reference. in this tool the position is the center of the box.

By the way this tool supports KITTI bin format

hoangduyloc commented 2 years ago

Hi @naurril, thanks for your fast response.

naurril commented 2 years ago

How did you convert the position? Is it like this Tr_velo_cam * [x,y,z-h/2]^T

hoangduyloc commented 2 years ago

Hi @naurril, For each object in Json file; I convert it to KITTI format, like image bellow. My dataset has no Camera so there is no Tr_Velo_Cam matrix available. image

I saw the Z, and X-axis were shifted; the Z-axis seem correct now; only X-axis still wrong. Can you have a look at it? might be choose only random PC in KITTI dataset; and label it; then visualize the label again, you might see it more clearly. I'm curious too

naurril commented 2 years ago

visualize again with what tool?

On Wed, Sep 21, 2022, 19:58 Hoàng Duy Lộc @.***> wrote:

Hi @naurril https://github.com/naurril, For each object in Json file; I convert it to KITTI format, like image bellow. My dataset has no Camera so there is no Tr_Velo_Cam matrix available. [image: image] https://user-images.githubusercontent.com/38793688/191497296-6adb4770-b3e8-4b14-aa5b-c7c22a889a95.png

I saw the Z, and X-axis were shifted; can you try to check it? might be choose only random PC in KITTI dataset; and label it; then visualize the label again, you might see it more clearly. I'm curious too

— Reply to this email directly, view it on GitHub https://github.com/naurril/SUSTechPOINTS/issues/100#issuecomment-1253603512, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABZKCDXCGUPFCRY4DQ5NOITV7LZ4TANCNFSM6AAAAAAQQ44CI4 . You are receiving this because you were mentioned.Message ID: @.***>

hoangduyloc commented 2 years ago

Hi, @naurril you can try this tool - https://github.com/kuixu/kitti_object_vis

hoangduyloc commented 2 years ago

image I make the KITTI label like that; for the alpha angle, and 2D BBoxes I add the fake values

naurril commented 2 years ago

with this tool,how do you set the calib content?

On Wed, Sep 21, 2022, 21:08 Hoàng Duy Lộc @.***> wrote:

Hi, @naurril https://github.com/naurril you can try this tool - https://github.com/kuixu/kitti_object_vis

— Reply to this email directly, view it on GitHub https://github.com/naurril/SUSTechPOINTS/issues/100#issuecomment-1253686442, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABZKCDVGIQ7CTRVQUDMDM6DV7MCD5ANCNFSM6AAAAAAQQ44CI4 . You are receiving this because you were mentioned.Message ID: @.***>

hoangduyloc commented 2 years ago

I copy the fake calib file via KITTI to prevent the error; but I think you dont need the calib file for only Lidar visulization image

naurril commented 2 years ago

In kitti format, the label is represented in the camera coordinate system, the visualization tool you are using surely does the camera(fake)->lidar coordinate system conversion. if you use the fake calib, make use the Tr_velo_cam matrix is IDENTITY matrix

hoangduyloc commented 2 years ago

Hi @naurril, I think I figure out the problem, and thank you for clarification. It was shifted 0.27m as their setup :D ~ 0.3m I found image

naurril commented 2 years ago

This is what Tr_velo_cam does. you are hard coding this camera-lidar transform.

hoangduyloc commented 2 years ago

My bad; because I have my owndata set with VLP 16 Lidar, only Lidar information, no other information so I cant do anything. Then I tried to test KITTI dataset to see if it is wrong or not; also I didnt read clearly the center of your SUS tool is Lidar or Camera Coordinates, so that is ~~. Anyway, thanks for the help.