## 4 Synthetic Data Generation
### Three-Dimensional Mesh Library of Actual Ballast Particles  
The first step is to obtain several 3D digital models of actual ballast particles for synthetic scene generation. A 3D laser scanner (Figure 2, manufactured by Roland, Hamamatsu, Japan) was used to measure, calculate, and export the 3D meshes of actual ballast particles collected from the same sources as those used for the acquisition of laboratory ballast images. As a result, a 3D ballast library containing 120 high-fidelity models for ballast particles collected from different sources was obtained. \begin{table}
\begin{tabular}{c c c c c c} \hline \hline
**Fouling Index** & **Number of** & **Number of 2D RGB** & **Total Number of 2D** & **Average Number of** & **Total Number of 3D** \\
**(FI)** & **Scenes** & **Images** & **Ballast Instances** & **3D Points** & **Ballast Instances** \\ \hline
7 & 32 & 120 & 73,954 & 3,045,332 & 21,123 \\
14 & 30 & 103 & 52,625 & 3,045,153 & 19,075 \\
23 & 22 & 103 & 28,990 & 2,970,323 & 14,347 \\
30 & 20 & 111 & 31,552 & 2,968,787 & 12,773 \\
39 & 16 & 109 & 24,415 & 1,882,340 & 7496 \\ \hline
**Total** & **120** & **546** & **211,536** & **2,863,712** & **74,814** \\ \hline \hline \end{tabular}
\end{table} 
Table 2: Overview of the generated synthetic ballast image dataset [23]. Figure 1: Components in synthetic ballast dataset. **Left:** Architecture of the synthetic ballast dataset. **Right:** Examples of various data categories within the synthetic ballast dataset [23]. (**a–c**) 2D synthetic ballast images under different lighting conditions. (**d**) 3D heightmap. (**e**) Masks of ballast particles for 2D synthetic ballast images. (**f**) 3D point cloud of ballast particles. (**g**) Labels of ballast particles for 3D ballast point clouds, each 3D point is rendered in a specific color that indicate the ballast particle it belongs to. (**h**) 3D completed mesh of a ballast particles. (i) Ballast particle size distribution curve. Ballast particle shape, texture, and angularity significantly impact the railroad track mechanical behavior. Since the synthetic ballast dataset is used to train models with computer vision tasks including ballast particle segmentation and completion, the obtained 3D ballast library should contain various morphological characteristics to resemble the different shapes of actual ballast particles. To validate the shape diversity of the scanned meshes, three morphological indicators were introduced: 3D flat and elongated ratio (\(FER\)) [15], 3D sphericity [15], and 3D angularity index (\(AI\)) [28]. The 3D FER, defined in Equation (1), is the ratio of the longest Feret dimension to the shortest Feret dimension of the 3D ballast particle:  
\[FER_{3D}=\frac{c}{s},\ (c\geq b\geq a) \tag{1}\]  
where \(a,b,\) and \(c\) are the lengths of three Feret dimensions for the particle. The 3D sphericity, as expressed in Equation (2), is defined as the ratio of \(S_{sphere}\), the surface area of an equivalent sphere with the same volume, \(V\), as the particle, to \(S_{3D}\), the measured surface area of the particle. It can indicate whether the ballast is close to a perfect sphere. \[Sphericity=\frac{S_{sphere}}{S_{3D}}=\frac{\left(36\pi V^{2}\right)^{\frac{1}{3 }}}{S_{3D}} \tag{2}\]  
The 3D AI, as expressed in Equation (3), is defined as the ratio of \(S_{3D}\), the measured surface area of the particle, to \(S_{ellipoid}\), the surface area of an equivalent ellipsoid with the same volume, \(V\), as the particle and the same proportion of long, middle, and short axes. \[Angularity\ Index=\frac{S_{3D}}{S_{ellipoid}} \tag{3}\]  
Figure 3 illustrates the dispersion of scanned ballast models based on three morphological indicators. The distribution of these scanned particles encompasses a wide variety of shapes, effectively mitigating any shape-related biases. Each figure displays particle shapes alongside their respective minimum, intermediate, and maximum indicator values. Figure 3: Morphological characteristics of the scanned meshes of individual ballast particles.