lidar-labelling is a tool for automatic segmentation of dense lidar clouds based on image segmentation.
Our labelling algorithm consists of two stages.
The first stage is a initial segmentation - a naive transfer of segmentation from images (performed by the SAM algorithm) to the cloud. Then multi-stage processing of the cloud is performed, which allows us to make the cloud more compact before the final labelling without losing points that are significant for labelling. The preprocessing stages include removing points whose corresponding pixels were not marked on a sequence of images, selection of points close to the sensors, removal of noise, cloud voxelization.
The next stage is segmentation itself. The segmentation criterion in this work is the distance between points, which is calculated through the physical distance and the degree of similarity of the labelling of points on several images. Based on the distance matrix, the prepared cloud is segmented using the GraphCut algorithm.
This tool currently supports processing of KITTI dataset clouds. Support for other datasets involves writing an implementation of an abstract dataset class.
Please check example.ipynb
with a example of cloud segmentation from the KITTI dataset.
Files for reproducing experiments are in folder experiment
. You will need the KITTI dataset with its folder structure and pre-performed image segmentation using the SAM algorithm in npz format.
First run main_kitti_processing.py
to generate segmentation with our algorithm. Then run main_kitti_processing_metrics.py
to calculate the segmentation metrics of each run and write them to a csv file. Then run main_calc_metrics_by_csv.py
to calculate the average values of the metrics in the csv file.
This project is licensed under the Apache License — see the LICENSE file for details.