jbehley / point_labeler

My awesome point cloud labeling tool
MIT License
656 stars 161 forks source link

How to use this tool with only lidar data?And i can't open the .bin file.Thank you. #46

Closed aprilliuwei closed 8 months ago

aprilliuwei commented 3 years ago

Hello, first of all, thanks for you tool.I just want to make a lidar segmentation data set. Only lidar data is available. What should I do? And I can't open .bin files and other files, I can't use this tool, I really hope to get help. thanks. Screenshot from 2021-08-05 20-39-17

jbehley commented 3 years ago

The simplest way to get started with the tool is to bring your dataset in the format of the KITTI odometry data. As described in the Readme, the folder structure is as follows:

point cloud folder
├── velodyne/             -- directory containing ".bin" files with Velodyne point clouds.   
├── labels/   [optional]  -- label directory, will be generated if not present.  
├── image_2/  [optional]  -- directory containing ".png" files from the color   camera.  
├── calib.txt             -- calibration of velodyne vs. camera. needed for projection of point cloud into camera.  
└── poses.txt             -- file containing the poses of every scan.

Hope that gets you started.

aprilliuwei commented 3 years ago

Thank you very much for your reply. I did as you suggested. It seems that everything is ready, but when I prepare to label my dataset, it shows that the label file cannot be opened, as shown in Figure 1 (shouldn't the label file be generated automatically after labeling?), On the contrary, when I load the data of the label file, it displays as shown in Figure 2, and no point cloud is displayed. Thank you again. Screenshot from 2021-08-09 16-29-35 Screenshot from 2021-08-09 16-32-28

jbehley commented 3 years ago

You always open the based directory containing the velodyne folder. You have to ensure that the bin files contains exactly 4*number of points floats, since the number of points is inferred from the file size:

      std::ifstream in(velodyne_filenames_[i].c_str());
      in.seekg(0, std::ios::end);
      uint32_t num_points = in.tellg() / (4 * sizeof(float));
      in.close();

If there is no labels directory, then the program will first create a directory and create for each point cloud in the velodyne directory a corresponding .label file. This will then be later used.

If there is a mismatch between the number of points in the corresponding .bin file and the number of labels in the .label file, you will get the error in your second figure. (If you start just fresh, I would suggest to simply delete the labels folder.)

Ensure that you have enough disk space (such that the files are not truncated.), since the initialize of KittiReader will generate for each point cloud a corresponding label file if it does not exist.

aprilliuwei commented 3 years ago

Thank you for your help. It runs successfully. I'm trying to use this tool to label point cloud data. Thank you again.

aprilliuwei commented 3 years ago

When I used kitti's data set and strictly followed the format you suggested, the following problems appeared. What is the problem? Screenshot from 2021-08-23 09-15-22