# Transfer Learning Model for Crack Detection in Side SlopesBased on Crack-Net
## 4 Experiment
### Experimental Settings  
(1) Datasets  
The dataset employed in the present experiment comprises a pair of components. The primary component is the publicly accessible CrackVision12K dataset, which contains 12,000 images depicting a variety of crack-like structures, including but not limited to roads, bridges, and walls. This dataset is accompanied by masks that delineate the specific regions of interest. The resolution of this dataset was uniformly adjusted to 256 \(\times\) 256 and utilized for the purpose of pre-training the model. The second part of the dataset under investigation consists of the slope crack set. This set contains 400 original images collected through manual means, as well as via drone inspection, covering images of different types of cracks in sloped rock. The Labelme tool was used to label all collected images of slope cracks. The two datasets were divided into training, validation, and test sets in ratios of  
Figure 5: Schematic diagram of transfer learning for slope cracks.  
8:1:1, respectively, in order to ensure that each subset is representative of the crack type and image source, as demonstrated in Figure 6.  
To enhance the model's generalization capability, data augmentation techniques were implemented on the training set of the slope fracture dataset. The augmentation methods employed included clipping, flipping, and rotation. To circumvent the generation of duplicate images following rotation and flipping, rotation angles of 19\({}^{\circ}\), 23\({}^{\circ}\), and 90\({}^{\circ}\) were assigned, and rectangular clipping with internal orientation was executed. Furthermore, horizontal flipping and two-step gamma correction were implemented on the images to mitigate the impact of brightness changes on model training, as illustrated in Figure 7.  
The data augmentation strategy was specifically designed to address the unique challenges of slope crack detection, where cracks are typically slender and irregular and exhibit diverse orientations under complex lighting conditions. All augmentation operations were based on the original images to preserve the intrinsic characteristics of cracks in natural scenes. Rotation at non-standard angles (19\({}^{\circ}\), 23\({}^{\circ}\), and 90\({}^{\circ}\)) increased the directional diversity of the dataset, enabling the model to recognize cracks in arbitrary orientations and reducing directional bias. In addition, combining rotation with gamma correction simulated variations in brightness and contrast, thereby improving the model's robustness to illumination changes. Gamma correction, as a nonlinear brightness adjustment, is particularly effective for enhancing crack detection under low contrast, strong light, or shadowed conditions. Horizontal flipping further enriched the spatial distribution of cracks, preventing the model from overfitting to specific spatial patterns. The combination of flipping, rotation, and gamma correction comprehensively simulated the multi-faceted variations encountered in real-world scenarios, ensuring that the model maintains high detection accuracy across different orientation, lighting, and contrast conditions.  
(2) Evaluation Metrics  
In order to provide a comprehensive evaluation of the performance of the algorithm, this paper employs a variety of evaluation metrics, which include the following: Precision (P), Recall (R), Average Precision (AP), Optimal Dataset Size (ODS), Optimal Image Size (OIS), F1 score (F1), mean Intersection over Union (mIoU), convergence epochs, and training time (h). ODS indicates the highest performance obtained after optimization with a  
Figure 6: Dataset annotation.  
Figure 7: Data augmentation.  
single threshold over the entire dataset and is suitable for evaluating overall performance. Conversely, OIS signifies the mean precision obtained after optimizing the threshold independently on each image. Therefore, this metric reflects the model's adaptability to different images.