PRBonn / lidar-bonnetal

Semantic and Instance Segmentation of LiDAR point clouds for autonomous driving
http://semantic-kitti.org
MIT License
960 stars 206 forks source link

Reading .label files #77

Closed jonathanslee4 closed 3 years ago

jonathanslee4 commented 4 years ago

Does anyone know what the .label files (created after running infer) consist of? I can't open them using any sort of text editor but I need to know how they're structured so I can convert them into a valid ROS message type for a project I'm working on. Thank you!

kosmastsk commented 3 years ago

According to the SemanticKITTI website:

The label is a 32-bit unsigned integer (aka uint32_t) for each point, where the lower 16 bits correspond to the label.

In case you are using python, you could get some help for the script for visualizing the inference results. Specifically, in visualize.py a LaserScan is created after reading the values from the .label file for each scan. So something similar is needed for you.

In C++, there is also something similar in the rangenet library here.

jbehley commented 3 years ago

Perfect answer, thanks.

If you still have problems, reopen the issue and let us know.

jonathanslee4 commented 3 years ago

Awesome, thank you for the help! And I suppose this is more of a ROS/KITTI dataset question, but do either of you know how to convert from the PointCloud2 type into the .bin format of the KITTI dataset?