# A Transfer Residual Neural Network Based on ResNet-50 for Detection of Steel Surface Defects
## 3 Results
### The Model Performance Comparative Analysis  
To accurately evaluate the performance of the TL-ResNet50 model, this article compared it with three classic network models. The ResNet50 and TL-ResNet50 were used as control groups to assess the impact of TL on the model's performance. It is worth noting that the VGG19 model has a more complex structure with the largest capacity, resulting in a greater demand for computing resources and time during training. Table 5 provides detailed parameters for all the models compared in this study.  
Figure 4: The TL-ResNet50 loss and accuracy change: (**a**) training phase; (**b**) testing phase. The blue line in the figure represents the change in the accuracy of the model, while the orange line represents the change in the loss value of the model. The x-axis represents the epoch of training, and the y-axis represents the values of accuracy and loss.  
Figure 5: The model test set training results: (**a**) ROC curves of different categories; (**b**) bar chart of accuracy assessment indicators; the macro avg is the weighted average of each defect’s precision, recall, and F1-Score.  
Furthermore, this paper comprehensively assesses the model's quality using various evaluation indicators, including accuracy (ACC), precision (P), recall (R), and F1-Score (F1). The formula for the evaluation indicators is defined as follows:  
\[ACC=\frac{TP+TN}{TP+FP+FN+TN} \tag{4}\]  
\[P=\frac{TP}{TP+FP} \tag{5}\]  
\[R=\frac{TP}{TP+FN} \tag{6}\]  
\[F1=2\cdot\frac{P\cdot R}{P+R} \tag{7}\]  
The symbols in the formula represent the number of true positive (TP), false positive (FP), false negative (FN), and true negative (TN) cases in a binary classification problem.  
In Figure 6, we present a comprehensive evaluation of several models using Formulas (4)-(7). The results show that TL-ResNet50 outperforms the other  
In Table 6, the AUC (area under curve) value represents the area between the ROC curve presented in Figure 7 and the coordinate axes, with a range of values from 0.5 to 1 indicating the ability of the model in distinguishing between positive and negative instances. Notably, numerous TL-ResNet50 AUC values are 1, indicating the model's potential for practical applications. The average accuracy of TL-ResNet50, ResNet50, VGG19, and AlexNet, were 99.44, 98.06, 96.67, and 92.50%, respectively.  
All four models exhibit high recognition performance in identifying crazing, patch, rolled-in scale, and scratch defects, with the TL-ResNet50 model exhibiting the best evaluation metrics among them. This indicates that these defects have significant feature  
\begin{table}
\begin{tabular}{c c c c c c c} \hline \hline
**Class** & **Models** & **P** & **R** & **F1** & **ACC** & **AUC** \\ \hline \multirow{4}{*}{Crazing} & TL-Restnet50 & 100\% & 100\% & 100\% & 100\% & 1 \\  & Restnet50 & 100\% & 100\% & 100\% & 100\% & 1 \\  & VGG19 & 100\% & 100\% & 100  
information. However, there are significant evaluation metric differences among the four models in identifying inclusion and pitted surface defects. In particular, the AlexNet model exhibits poor recognition performance, with a recall rate and ACC index of only 66.77% for identifying pitted surface defects, while the VGG19 model also shows large fluctuations in its recognition performance for this defect. We will employ interpretable analysis methods in the following section to further investigate the reasons behind the poor recognition performance of these models.