# Segmentation of Stone Slab Cracks Based on an Improved YOLOv8 Algorithm
## 3 Experimental Results Analysis
### Comparison Experiment
#### 3.3.1 Comprehensive Training Effect on ST Dataset  
Table 5 presents the performance comparison of different models on the custom ST dataset. YOLOv8-Seg demonstrates clear advantages in both detection and segmentation tasks, showing strong overall performance.  
Compared to the baseline YOLOv8n model, YOLOv8-Seg demonstrates significant performance enhancements across detection, segmentation, speed, and output quality, attributed to key architectural innovations. Specifically, YOLOv8-Seg achieves a mean Average Precision ([EMAIL_ADDRESS]) of 0.856 (an improvement of +1.1%) and [EMAIL_ADDRESS]:0.95 of 0.479, indicating improved detection robustness. In segmentation, it attains a Mean Intersection over Union (MIoU) of 79.17%, representing a substantial +2.25% increase over YOLOv8n (75.19%); this gain is primarily driven by the dynamic snake convolution's superior ability to capture complex boundaries and the enhanced multi-scale fusion of the  
\begin{table}
\begin{tabular}{c c c c c c} \hline \hline
**Method** & **mAP0.5** & **mAP0.5–0.95** & **_p_** & **R** & **MIoU** \\ \hline YOLOv8 & 0.818 \(\pm\) 0.007 & 0.425 \(\pm\) 0.009 & 92.8 & 73.3 & 75.19 \(\pm\) 0.09 \\ U-Net & 0.821 \(\pm\) 0.011 & 0.441 \(\pm\) 0.011 & 90.6 & 74.5 & 72.76 \(\pm\) 0.11 \\ VNet & 0.782 \(\pm\) 0.009 & 0.413 \(\pm\) 0.005 & 89.2 & 72.1 & 68.74 \(\pm\) 0.16 \\ AttentionUNet & 0.847 \(\pm\) 0.006 & 0.464 \(\pm\) 0.009 & 95.0 & 79.4 & 76.92 \(\pm\) 0.05 \\ DeepLabV3 & 0.836 \(\pm\) 0.006 & 0.461 \(\pm\) 0.013 & 96 & 77.9 & 74.51 \(\pm\) 0.19 \\ SegNet & 0.654 \(\pm\) 0.013 & 0.278 \(\pm\) 0.017 & 83.4 & 59.2 & 69.24 \(\pm\) 0.15 \\ U2 NetP & 0.804 \(\pm\) 0.016 & 0.422 \(\pm\) 0.004 & 92.3 & 70.9 & 73.32 \(\pm\) 0.09 \\ YOLOv8-Seg & 0.856 \(\pm\) 0.013 & 0.479 \(\pm\) 0.011 & 95.4 & 78.3 & 79.17 \(\pm\) 0.07 \\ \hline \hline \end{tabular}
\end{table}
Table 5: Comparison of experimental results of different models.  
Figure 9: PR curves for the ablation study.  
UNetV2 backbone, leading to demonstrably superior segmentation consistency. Crucially for industrial deployment, YOLOv8-Seg delivers a 5.8\(\times\) faster inference speed (32 ms vs. 186 ms), readily meeting stringent real-time constraints. Furthermore, the integration of DySample for upsampling provides tangible quality improvements by effectively reducing boundary artifacts. While AttentionUNet achieves a marginally higher recall (79.4%), YOLOv8-Seg exhibits statistically significant advantages (\(p<\) 0.05) in key composite metrics (mAP and MIoU) while maintaining optimal operational efficiency, establishing it as a more balanced and practical industrial-grade solution.  
Compared with DeepLabV3, YOLOv8-Seg outperforms it in both [EMAIL_ADDRESS] 0.95 and MIoU. While DeepLabV3 has slightly higher precision, YOLOv8-Seg offers a better balance between recall and segmentation accuracy, showing stronger task adaptability. YOLOv8-Seg also surpasses AttentionUNet across all metrics, including [EMAIL_ADDRESS], [EMAIL_ADDRESS]-0.95, and MIoU. This indicates that its improved detection head and backbone are more effective in global feature representation than attention mechanisms. Although the recall rate is slightly lower than AttentionUNet, likely due to the latter's strength in capturing small targets, the integration of DySample helps to reduce segmentation bias. Overall, the higher mAP and MIoU validate the superior performance of YOLOv8-Seg.