# Road Segmentation and Environment Labeling for Autonomous Vehicles
## 3 System Design
### Clustering--Block B
The external coordinate system is the car's frame of reference. The ego vehicle contains a 'view' object describing the sensor's pose for the car's frame of reference. It also contains an 'ego-dimension' object, which specifies the vehicle's extension in the car's frame of reference. The configuration files are stored in a 'JSON' file and LiDAR data in the 'npz' format. Table 1 describes the LiDAR parameters recorded by the sensors. The dataset contains semantic, instance segmentation labels, and 3D bounding boxes for 38 categories. A total of 41,277 camera images are semantically labeled, with each pixel representing a semantic category, of which 12,497 are annotated with 3D bounding boxes within the front-center camera field of view. In addition, 3D bounding boxes are estimated by human annotators, including various vehicles, pedestrians, and other relevant objects. \begin{table}
\begin{tabular}{c c} \hline \hline
**Parameters** & **Description** \\ \hline X & X location in the world coordinate system \\ Y & Y location in the world coordinate system \\ Z & Z (elevation) location in the world coordinate system \\ Azimuth & The angle between the reference plane and the point \\ Distance & Distance of the point from the car’s frame of reference \\ Row & Pixel height location of the point in RGB camera image \\ Col & Pixel width location of the point in RGB camera image \\ Depth & Depth of the corresponding camera image \\ Reflectance & Reflection of the object \\ Timestamp & The time is taken by the reflected light \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Point cloud features. ### Model Feature Selection

The silhouette value is used to measure the clustering quality [52]. The silhouette score reaches its global maximum at the optimal value of K = 10. We used a correlation matrix to investigate the dependencies between the multiple variables. Based on the correlation matrix plot shown in Figure 5, the features' distance and depth are highly correlated with the coefficient of 1.0, and reflectance and length are medially correlated with 0.49. Hence, we selected the five features X, Y, Z, reflectance, and distance as the input to the autoencoders. The point cloud data are filtered using the height and reflectance as proposed in the literature [18]. LiDAR point data are filtered with a Z value greater than or equal to \(-1.0\) m (\(Z\geq-1.0\)). The unfiltered points are clustered as road points from the procedure. This filtering procedure also downsamples the data points into a much lower dimension. ### Autoencoder Training Process

The AE is trained for 50 epochs with the Adam optimizer [21] and implemented binary cross-entropy as a loss function in the network. The parameter batch size was set to 128 during training and 1 during prediction. The training process was computed on NVIDIA GTX 1080 ti GPU with l6 Gb of RAM. The necessary python modules, such as tensor flow [51], Keras [53], Pandas, OpenCV, and cv2, are imported. The point cloud dataset is converted to Pandas data frame for the analysis and normalized all values between 0 and 1. The dataset is split into 65% for training and 35% for testing. After 30 epochs, the AE seems to reach a stable train and test loss value of about 0.02, as shown in Figure 6.

Figure 5: Correlation matrix of 3D point cloud data features. Figure 6: Train and test losses vs. epochs. ### BPN Model Training

The proposed BPN model is implemented using MATLAB R2020b. The simulations are performed on an Intel (R) Core (TM) i7-8700K CPU at a 3.70 GHz clock speed with 16 GB RAM. The model learning cycle ranged from 200 to 500 epochs. The learning rate is adaptable with the gradient boosting method for the mean square error loss function, and the momentum(mu) is set at 0.9. Figure 7a,b show the performance of the BPN two-layer and three-layer networks. The two-layer and three-layer networks became stable at 47 epochs with the best loss values of 0.58 and 0.846, respectively.