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

Code to convert files in kitti tracking to kitti detection #58

Closed
wants to merge 4 commits into from
Closed

Code to convert files in kitti tracking to kitti detection #58

wants to merge 4 commits into from

Conversation

sarimmehdi
Copy link

This is useful if one has to use neural nets, designed for kitti object detection, for the kitti tracking dataset. The kitti tracking dataset has slight changes in the label files and the calib files. The label files in kitti detection have the following format and there is a separate label file for each image:

[name truncated occluded alpha 2dbbox_x1 2d_bbox_y1 2d_bbox_x2 2d_bbox_y2 3d_bbox_height 3d_bbox_width 3d_bbox_length 3d_bbox_x 3d_bbox_y 3d_bbox_z rot_y]

On the other hand, the kitti tracking dataset has only one label file for each folder and the format is:

[frame_num obj_id name truncated occluded alpha 2dbbox_x1 2d_bbox_y1 2d_bbox_x2 2d_bbox_y2 3d_bbox_height 3d_bbox_width 3d_bbox_length 3d_bbox_x 3d_bbox_y 3d_bbox_z rot_y]

Also, there is a difference in the calibration files as well. In the kitti object detection dataset, the calibration files have Tr_velo_to_cam:, Tr_velo_to_imu: and R0_rect: while the kitti tracking dataset has Tr_velo_cam, Tr_velo_imu and R_rect. Furthermore, there is one calib file for each folder of images instead of having a separate calib file for each image as is the case in the kitti detection dataset.

My code takes the files in each image folder in the kitti tracking dataset and converts them to the kitti object detection dataset. So, for example, for training image folder 0000 with 153 images, I take the label file and break it down into 153 label files (one for each image) and I create 153 copies of the calib file (with the necessary changes as well).

This can be useful if you wish to use neural nets, specifically designed for the kitti object detection format, for the kitti tracking dataset
@sarimmehdi sarimmehdi closed this Aug 18, 2020
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

Successfully merging this pull request may close these issues.

1 participant