# An Improved YOLOv8 Model for Strip Steel Surface Defect Detection
## 3 Experiment and Analysis
### Ablation Experiments  
In order to prove the effectiveness of the model, based on YOLOv8n, a comparative analysis of ablation experiments was designed on the NEU-DET public data set of Northeastern University, and all parameters were kept consistent during the experiment. As shown in Table 4, 1 is the yolov8 benchmark model, 2 is the SCRD module, 3 is the PSA module, 4 is the C2f-BAM module, 5 is the BiFPN module, and 6 is the WIoU loss function. 1 + 2 refers to the introduction of the SCRD module alone, 1 + 3 refers to \begin{table}
\begin{tabular}{c c c c c c} \hline \hline
**Model** & **P/\%** & **R/\%** & **mAP@50/\%** & **Params/M** & **GFLOPs/G** \\ \hline  & 76.4 & 76.0 & 82.9 & 2.86 & 8.1 \\ GAM & 70.5 & 72.8 & 78.0 & 8.68 & 13.0 \\ BoT3 & 68.3 & 69.4 & 75.4 & 2.64 & 7.9 \\ MHSA & 68.1 & 67.8 & 73.1 & 2.62 & 7.9 \\ CBAM & 69.7 & 69.9 & 75.7 & 2.43 & 7.8 \\ ShuffleAttention & 70.9 & 71.0 & 76.5 & 2.43 & 7.8 \\ MSDA & 73.6 & 74.7 & 82.1 & 4.41 & 9.4 \\ SENet & 66.9 & 71.6 & 75.9 & 2.56 & 7.9 \\ C2f\_BAM & 77.6 & 76.8 & 83.4 & 2.62 & 7.9 \\ \hline \hline \end{tabular}
\end{table} 
Table 2: Comparison of attention mechanisms. \begin{table}
\begin{tabular}{c c c c c c c c c c} \hline \hline \multirow{2}{*}{**Model**} & \multicolumn{8}{c}{**mAP@50/\%**} & \multirow{2}{*}{**P/\%**} & \multirow{2}{*}{**R/\%**} & \multirow{2}{*}{**mAP@50/\%**} \\ \cline{2-2} \cline{6-9}  & **RS** & **Sc** & **Cr** & **Ps** & **Pa** & **In** & \\ \hline Glou & 72.9 & 97.1 & 55.7 & 81.0 & 95.2 & 90.6 & 77.2 & 75.3 & 82.1 \\ Clou & 75.0 & 97.9 & 56.3 & 81.2 & 95.2 & 91.5 & 76.4 & 76.0 & 82.9 \\ Elou & 68.2 & 96.9 & 52.9 & 81.1 & 94.8 & 88.7 & 76.0 & 73.1 & 80.4 \\ Slou & 73.6 & 96.7 & 31.8 & 81.3 & 95.4 & 91.3 & 78.0 & 74.5 & 82.3 \\ DIou & 73.7 & 97.3 & 56.7 & 82.1 & 96.1 & 91.0 & 74.3 & 78.3 & 82.8 \\ WIou & 88.1 & 97.9 & 68.6 & 84.5 & 96.9 & 92.9 & 79.4 (\(\uparrow\)) & 79.2 & 85.5 (\(\uparrow\)) \\ \hline \hline \end{tabular}
\end{table} 
Table 3: Comparison of loss functions. the introduction of the PSA module alone, \(1+4\) refers to the introduction of the C2f-BAM module alone, \(1+5\) refers to the introduction of the BiFPN module alone, and \(1+6\) refers to the introduction of WIoU loss function alone. The results after the introduction of SCRD and PSA modules are represented by \(1+2+3\); the overall precision was increased by \(1.7\%\), the recall rate was increased by \(2.6\%\), and the mean average precision was increased by \(2.0\%\); \(1+...+4\) indicated the results after adding SCRD, PSA, and C2f-BAM, with an improvement of \(2.3\%\), \(4.3\%\), and \(2.9\%\) in precision, recall, and average precision, respectively; \(1+...+5\) represents the results after adding SCRD, PSA, C2f-BAM and BiFPN, accuracy and average precision compared to \(1+...+4\) improved by \(0.6\%\) and \(0.6\%\), but reduced recall by \(0.5\%\). \(1+...+6\) is for the introduction of \(1+\). The results after the \(+4\) module and WIoU had the highest overall accuracy, and the mean average precision of the six defects detection was higher than that of the baseline model. The mean average precision of RS, Sc, Cr, Ps, Pa, and In were increased by \(3.3\%\), \(1.8\%\), \(5.6\%\), \(34.3\%\), \(26.2\%\), and \(3.4\%\), respectively. To more effectively assess the performance of the YOLOv8-BSPB algorithm, a comparative analysis was conducted on the loss curves, as well as the precision and recall curves, of the YOLOv8 and YOLOv8-BSPB models during the training phase. As illustrated in Figure 13, the loss value for the YOLOv8-BSPB model decreases and stabilizes after \(200\) training epochs, demonstrating a superior convergence rate. In addition, we evaluated the detection ability of YOLOv8N-BSPB using the confusion matrix, as shown in Figure 14. The false positive FP and false negative FN of Yolov8n in