# Steel Surface Defect Detection Algorithm Based on Improved YOLOv8n
## 3 Results
### Analysis of Experimental Results
#### 3.4.2 Comparative Experiments  
To confirm that our suggested DDI-YOLO modeling algorithm is effective, in this paper, we used the original YOLOv8n as the baseline and tested YOLOv8n and DDI-YOLO using the NEU-DET dataset. Table 2 provides a summary of the findings. The indicator \"\(\uparrow\)1.8\" indicates that for the defect type In, the mAP of DDI-YOLO was 1.8% greater than the value associated with the baseline model YOLOv8n, as well as the other models. As shown in Table 2, the accuracy was improved for the remaining four defect types, except for Cr defects and Ps defects for which the map values experienced a slight decrease. In addition, the AP values of In defects and Rs defects for the original YOLOv8n were only 84.7 and 74.6, respectively, and our model improved the mAP values of these two defects by 1.8% and 10.6%, respectively. Our introduction of the C2f_DWR_DRB module in place of the C2f module enhanced the extraction of features from the scalable receptive fields at the higher level of the network. In addition to this, our method improved the accuracy of Cr defects from 35.1% to 49.7% and of Rs defects from 52.1% to 67.4%, that is, an increase of 14.6% and 15.3%, respectively. Our approach offers a notable enhancement of the detection accuracy and precision of these defects, thus demonstrating the efficacy of our approach. To further learn about the detection capability of our proposed DDI-YOLO and baseline model YOLOv8n, the P-R curves of the two methods are shown in Figure 6a,b. The region enclosed by our proposed DDI-YOLO was to be greater than the region enclosed by YOLOv8. The NEU-DET dataset's overall mAP was 78.3%, which was a significant improvement of 2.4 percentage points over YOLOv8n. To confirm the efficacy of the network improvement proposed in this work, the improved YOLOv8n algorithmic model was contrasted with other algorithmic models for experimentation purposes. In this paper, the classical SSD, YOLOv3-tiny, YOLOv5n, YOLOv6, YOLOv7-tiny [33], YOLOv8n (baseline), and the newer RT-DETR [34] were selected for comparative studies. These experiments were carried out utilizing an identical environment, dataset, and equipment, as shown in the graphs for the outcomes of the studies conducted to compare various algorithms. Table 3 shows that, compared to several other algorithms, this paper's algorithm achieved the best performance (78.3% and 158 frames/s) in terms of mAP and FPS values, and was only second to YOLOv8n and YOLOv5n in terms of recall, but performed better than YOLOv8n with respect to all other metrics. This demonstrates that our improved model is superior to other algorithmic models in terms of detection accuracy and detection speed. Regarding the quantity of model parameters, compared to other algorithms, it was only a little higher than that characterizing YOLOv5, which is much smaller than most other algorithmic models. Figure 7 displays the experimental detection outcomes of several different algorithms, and it can be observed from the figure that the other algorithmic models were associated with wrong detections, missed detections, etc., while \begin{table}
\begin{tabular}{c c c c c c} \hline \hline
**Dataset** & **Methods** & **Defect Type** & **P\%** & **R\%** & **mAP\%** \\ \hline \multirow{8}{*}{NEU-DET} & & Cr & 35.1 & 54.7 & 38.8 \\  & & In & 78.9 & 86.2 & 84.7 \\  & & Pa & 83.7 & 85.7 & 88.9 \\  & & Ps & 82.9 & 81.2 & 83.9 \\  & & Rs & 52.1 & 64.0 & 64.0 \\  & & Sc & 82.5 & 92.7 & 95.1 \\ \hline \multirow{8}{*}{NEU-DET} & & Cr & 49.7 & 31.2 & 38.7 (\(\downarrow\)0.1) \\  & & In & 78.6 & 78.4 & 86.5 (\(\uparrow\)1.8) \\ \cline{1-1}  & & Pa & 81.1 & 86.7 & 90.5 (\(\uparrow\)1.6) \\ \cline{1-1}  & & Ps & 76.9 & 75.0 & 83.7 (\(\downarrow\)0.2) \\ \cline{1-1}  & & Rs & 67.4 & 64.7 & 74.6 (\(\uparrow\)10.6) \\ \cline{1-1}  & & Sc & 81.4 & 92.4 & 95.6 (\(\uparrow\)0.5) \\ \hline \hline \end{tabular}
\end{table} 
Table 2: The detection performance of DDI-YOLO using the NEU-DET datasets. this paper's proposed algorithmic model had the best detection effect.