# Surface Defect Detection of Rolled Steel Based on Lightweight Model
## 4 Experiment and Results
### Ablation Studies  
To verify the feasibility of the network improvement in this paper, five groups of control experiments were set up, and the effects of each improvement point on the model performance were compared and analyzed. The results are shown in Table 1.  
Figure 6: Pictures of different defect types.  
YOLOv5s is the original model, YOLOv5s-G is a network with the Ghost module added, YOLOv5s-C is a network with attention mechanism CA added, YOLOv5s-E is a network using EloU loss, YOLOv5s-GCE is a network that incorporates the above three improvement points. It can be known from the table that compared with YOLOv5s, the parameters and computation of YOLOv5s-G are reduced by 47.5% and 48.7%, respectively, the model volume is reduced by 45.7%, and the accuracy is improved by 1.8%, which shows that the use of the Ghost module can be used without affecting the model. Under the premise of high accuracy and speed, the amount and volume of model parameters are significantly reduced. The parameters and model volume of YOLOv5s-C are slightly larger than the original model. However, the accuracy has increased by 1.4%, and the amount of calculation remains unchanged, which shows that the introduction of the CA attention mechanism can enable the model to extract features effectively. Compared with the original model, YOLOv5s-E has almost no change, and the accuracy is slightly increased, but the model detection speed is increased by 23%, which proves that the addition of EloU can make the model more accurate in localization and classification. Compared with the original model, the improved YOLOv5s-GCE model reduces the number of parameters by 47.1%, the amount of calculation by 48.7%, the model volume by 44.9%, and the accuracy increased by 3.5%, and the fps decreased by only 5.9%.  
The comparison of the accuracy of YOLOv5s and the improved model YOLOv5s-GCE on the detection results of various defects is shown in Figure 7. The comparison analysis shows that the improved model specifically affects detecting patches, scratches, inclusion, and pitted_surface. The average detection accuracy is increased by 1.2%, 0.4%, 3.3%, and 12.5%, respectively, and the detection accuracy of the two types of defects, inclusion, and pitted_surface, is improved the most. For the defect type of rolled-in_scale, the detection accuracy of the improved model is the same as that of the original YOLOv5s model.  
The YOLOv5s and algorithm models in this paper are used to detect the defect pictures, respectively, as shown in Figure 8. From the two detection results, it can be found that YOLOv5s-GCE detects the targets that were not detected in the original YOLOv5s, reducing the missed detection rate of the model. Moreover, from the detection results of such defects  
\begin{table}
\begin{tabular}{l l l l l l} \hline \hline
**Model** & **Parameters** & **GFLOPs** & **Weight/MB** & **[EMAIL_ADDRESS]/\%** & **fps** \\ \hline YOLOv5s & 7,033,114 & 15.8 & 13.8 & 82.2 & 62.5 \\ YOLOv5s-G & 3,695,330 & 8.1 & 7.5 & 84.0 & 62.5 \\ YOLOv5s-C & 7,057,274 & 15.8 & 13.9 & 83.6 & 58.8 \\ YOLOv5s-E & 7,033,114 & 15.8 & 13.8 & 82.7 & 76.9 \\ YOLOv5s-GCE & 3,719,490 & 8.1 & 7.6 & 85.7 & 58.8 \\ \hline \hline \end{tabular}
\end{table}
Table 1: Comparison of each model.  
Figure 7: The detection results of various defects.  
as rolled-in_scale, it can be seen that the improved model can locate the defect position more accurately. Hence, the improved YOLOv5s-GCE model has a better detection effect on each defect than the original YOLOv5s model.