# DBCW-YOLO: A Modified YOLOv5 for the Detection of Steel Surface Defects
## 4 Experiment
### Experimental Result  
Contrast Experiment  
To prove the advantage of DBCW-YOLO, this paper uses several mainstream algorithms to compare NEU-DET datasets. In industrial applications, firstly, the detection accuracy must be guaranteed. Secondly, considering the production speed, the algorithm must have a decent detection speed. Therefore, an accuracy metric (mAP) and a FPS detection speed metric are selected to be shown in Table 2. The experimental results are displayed in Table 2.  
From the data in Table 2, we can conclude that the algorithm in this paper has the highest accuracy in the table, reaching 81.1%. The DBCW-YOLO algorithm has the highest detection effect of four kinds of defects. Among these algorithms, YOLOv7 has the fastest detection speed, but the accuracy of each class is not very high, and the overall ability is general. The detection accuracy for all types of defects is better than the newer YOLOv8. Although YOLOv3 and YOLOv5l have good detection results in some defects, the overall average accuracy still has a certain gap compared with our proposed methods. This is because the DBCW-YOLO proposed by us can better extract features and take into account the large variation of steel defect scales. In summary, our proposed DBCW-YOLO achieves high detection accuracy and good FPS. The result in Table 3 shows that our method surpassed the original method in most of the P and F1 in all the test items, and AP was superior in all of them, which verified the validity of our method. A comparison of the DBCW-YOLO and YOLOv5 under each type is given in Figure 9. The figure illustrates the improvement of the detection results of different types of defects in the original model and the DBCW-YOLO model. The accuracy improvement of the \begin{table}
\begin{tabular}{c c c c c c c c c} \hline \hline
**Types** & **YOLOv3** & **Faster** & **Retina Net** & **YOLOv5s** & **YOLOv5l** & **YOLOv7** & **YOLOv8** & **DBCW-YOLO** \\ \hline Cr & 40.9\% & 44.7\% & 45.9\% & 42.3\% & 43.2\% & 46.3\% & 42.7\% & **51.0\%** \\ In & 81.8\% & 79.2\% & 84.2\% & 79.8\% & 81.6\% & 78.1\% & 84.2\% & **87.1\%** \\ Pa & 91.8\% & 82.1\% & 91.1\% & 92.4\% & 92.5\% & 88.6\% & 90.8\% & **93.0\%** \\ PS & **94.9\%** & 89.4\% & 88.6\% & 92.5\% & 92.9\% & 90.5\% & 89.0\% & 92.8\% \\ RS & 64.2\% & 65.3\% & 58.6\% & 54.7\% & 61.8\% & 67.7\% & 65.4\% & **70.0\%** \\ Sc & 91.3\% & 89.3\% & 81.6\% & 87.2\% & **96.5\%** & 84.6\% & 87.2\% & 92.9\% \\ mAP 0.5 & 77.5\% & 74.6\% & 75.0\% & 74.8\% & 78.1\% & 76.0\% & 76.5\% & **81.1\%** \\ FPS & 55.2 & 17.4 & 41.2 & 97.1 & 48 & **125** & 57.6 & 33.8 \\ \hline \hline \end{tabular}  
* In Table 2, the best result for each detect are in bold.  
\end{table} 
Table 2: Detect result comparison. \begin{table}
\begin{tabular}{c c c c c c c} \hline \hline
**Methods** & **Type** & **P** & **R** & **F1-Score** & **AP** & **mAP** \\ \hline  & Cr & 56.1\% & 26.7\% & 0.362 & 39.8\% & \\  & In & 70.7\% & 89.3\% & 0.789 & 79.7\% & \\ YOLOv5m & Pa & 81.0\% & 89.7\% & 0.851 & 91.6\% & \\ (baseline) & PS & 85.9\% & 82.9\% & 0.844 & 90.5\% & \\  & RS & 51.9\% & 60.0\% & 0.581 & 58.6\% & \\  & Sc & 80.7\% & 85.5\% & 0.830 & 91.8\% & \\ \hline  & Cr & 56.8\% & 46.3\% & 0.510 & 51.0\% & \\  & In & 71.1\% & 87.4\% & 0.784 & 87.1\% & \\ DBCW-YOLO & Pa & 79.4\% & 93.0\% & 0.857 & 93.0\% & \\ (Improvement) & PS & 93.2\% & 80.5\% & 0.864 & 92.8\% & \\  & RS & 65.2\% & 77.4\% & 0.708 & 70.0\% & \\  & Sc & 88.9\% & 80.0\% & 0.842 & 92.9\% & \\ \hline \hline \end{tabular}  
* In Table 3, the best result for each detect are in bold.  
\end{table} 
Table 3: The comparison of detecting results on NEU-DET. two types of defects, Cr and RS, which are smaller targets that are more difficult to detect, and DBCW-YOLO greatly improves the AP values of these two defects. DBCW-YOLO greatly improves the AP values of these two defects.