## 4 Example Verification
### Experimental Results and Analysis  
#### 4.3.1 Ablation Experiment  
To further validate the effectiveness of the proposed improvements in terms of the number and placement of different enhancement modules, ablation experiments and quantitative and qualitative analyses were performed using the generated dataset in the same experimental environment to evaluate the benefits of key components in the model. Among them, \"MBCA\" refers to the addition of MBCA attention after the last layer of the backbone network SPPF; \"DCNv2\" refers to the replacement of the Bottleneck in the C2F module of the eighth layer of the backbone network with deformable convolution DCNv2; \"Proposed method\" refers to replacing the C2F module of the sixth and the eighth layer of the backbone network with the MBCADC2F module proposed in this paper. The experimental results are presented in Table 3.  
A comparison of the data in the table shows that the MBCA attention mechanism proposed in this study did not significantly increase the number of network parameters or model complexity, but improved the model's mAP0.5 value by 0.5%. The deformable convolution DCNv2 was able to reduce the model complexity and improve the model mAP0.5 without significantly increasing the model parameter count. The method proposed in this paper achieved the best experimental results, with only a 0.2 M increase in model parameters compared to the baseline model. Furthermore, floating-point operations were reduced by 1.2G, precision increased by 1.8%, recall improved by 3.4%, and mAP0.5 and mAP0.5:0.95 increased by 2.0% and 4.4%, respectively. In addition, the model's speed of detection increased by 3.5/f\(\cdot\)s\({}^{-1}\). Figure 11 shows a comparison between the test results and the heatmap analysis of the baseline model and the proposed method for well-lit images. The heatmaps were generated using the Grad-CAM method. They show that both models achieved good detection results for all seven types of surface defects in images with good lighting conditions. The proposed method detected all defects, while the baseline model missed a small piece of exposed rebar (fourth-row image). Furthermore, the accuracy of the detection results obtained by the proposed method was consistently higher than that of the baseline model. A comparison of the heatmaps shows that the proposed method provided a better representation, with \begin{table}
\begin{tabular}{c c c c c c c} \hline \hline
**Model** & **Parameters/M** & **FLOPs/G** & **FPS/f\(\cdot\)s\({}^{-1}\)** & **P/\%** & **R/\%** & **mAP\({}_{0.5}\)/\%** & **mAP\({}_{0.50}\).95\%** \\ \hline YOLOv8s & 11.1 & 28.7 & 70.9 & 89.1 & 82.0 & 87.4 & 68.9 \\ +MBCA & 11.2 & 28.7 & 68.9 & 90.2 & 82.7 & 87.9 & 68.9 \\ +DCNv2 & 11.2 & 27.5 & 73.8 & 90.0 & 82.5 & 88.1 & 70.2 \\ proposed method & 11.3 & 27.5 & 74.4 & 91.3 & 85.4 & 89.4 & 73.3 \\ \hline \hline \end{tabular}
\end{table} 
Table 3: Results of ablation experiments. the heatmaps better conforming to the shape of the target. These results indicate that the proposed method was effective in improving the accuracy of detecting images with good lighting conditions. Figure 12 shows a comparison between the test results and the heatmap analysis of the baseline model and the proposed method for images with partial shadows or occlusions. It can be seen that the proposed method achieved better detection results than the baseline model for images with partial shadows or occlusions. In images with partial shadows or occlusions, there were areas of varying brightness due to significant changes in illumination and uneven reflections on the target surface. The baseline model with fixed geometric structures of convolutional kernels was not effective in capturing the spatial information of the target in these regions. The proposed method used deformable convolution based on multi-branch coordinate attention, which allowed the model to dynamically adjust the sampling positions of the convolutional kernels according to the actual shape and position information of the target.