# Two-Layer-Graph Clustering for Real-Time 3D LiDAR Point Cloud Segmentation
## 4 Result and Discussion
### Accuracy  
We use the Semantic KITTI data set to test the clustering results. The main test is the accuracy of the clustering of road participants such as vehicles, motorcycles, and pedestrians, i.e., to calculate how many point clouds belonging to the same category are classified into the same category. For a traffic object in the road, we assume that its real point cloud set is \(P_{object}=\{p_{1},p_{2},...,p_{n}\}\) after clustering. These points may be divided into different categories or belong to the same category. We count the largest number of categories in the set as \(N_{max}\), the accuracy calculation formula of this object is as follows:  
\[Acc_{single}=\frac{N_{max}}{n} \tag{9}\]  
The distance between the traffic object and the sensor is calculated as follows:  
\[Dis_{i}=\sqrt{(X_{i})^{2}+(Y_{i})^{2}} \tag{10}\]  
\[Dis_{single}=\frac{Dis_{1}+Dis_{2}+...+Dis_{n}}{n} \tag{11}\]  
We test the relationship between object distance and accuracy, and get the result in Figure 11. The accuracy of traffic objects decreases with the increase of distance, and the accuracy of most objects remains above 90%. The red line is the curve of accuracy change at different distances. We find that as the distance of the object increases, the accuracy will decrease. In this regard, we believe that this is because the point cloud data in the distance is very sparse and the loss of information occurs at a distance, considering the mechanism of returning to the effective point from the LiDAR. However, in the real vehicle test, we find that when the point cloud data exceeds 40 m away, the amount of data itself is very small, and the vehicle information may only have a dozen point clouds. What we really concentrate on is that on the road within 40 m, the accuracy of the method we proposed can meet the requirements. Figure 11: Thousands of objects have been tested, and the accuracy rate distribution is shown in the scatter plot. The trend is drawn and it is found that as the distance increases, the accuracy rate will decrease. After calculating the accuracy of a single object, we calculate the accuracy of the objects in the whole scene, and correspondingly the result is the accuracy of the traffic objects in the whole scene. If there are \(N\) objects, the accuracy in this scene is as follows:  
\[Acc_{scene}=\frac{n_{1}*Acc_{single1}+n_{2}*Acc_{single2}+...+n_{N}*Acc_{singleN}}{N} \tag{12}\]  
Calculate the average distance of all traffic objects in the whole scene:  
\[Dis_{scene}=\frac{n_{1}*Dis_{single1}+n_{2}*Dis_{single2}+...+n_{N}*Dis_{ singleN}}{N} \tag{13}\]  
We compare the accuracy results of our method and several effective methods in different distances (the average distance of a scene), and found that our method has better accuracy than other methods. The average accuracy of our results is 93.64%, and the accuracy performance at different distances is shown in Table 3.  
[PERSON]'s method only uses a range graph in the horizontal direction, calculates the angle between two adjacent points and the sensor position, and uses the angle change between continuous points in the vertical direction as the segmentation standard. If the angle is larger than the threshold, points are divided into different categories. Finally, he directly updates categories by using the breadth-first-search algorithm of four neighborhoods on the range graph. [PERSON] designed the loss function according to the spatial distribution of multiple continuous point clouds in the horizontal and vertical directions, giving different weights to different point clouds to get two segmented maps, which are horizontal and vertical. It also updates the category by combining the connection between the two maps. Compared with the above two methods, the main reason why our method performs well is as follows. It is more appropriate to judge whether two adjacent points belong to the same category through five critical positions. [PERSON] only considers two adjacent points and sensors. Peripheral points also play a decisive role.