## 4 Experiments and Results
### Corrosion Detection Network Experiment Comparison and Analysis  
To validate the performance of the proposed YOLOv10-vit for corrosion detection in hydraulic metal structures, we conducted experiments on the validation set of the corrosion  
Figure 5: Example of corrosion level classification for hydraulic metal structures. \begin{table}
\begin{tabular}{c c} \hline \hline
**Evaluation Metrics** & **Formula** \\ \hline Accuracy (_Acc_) & \(Acc=\frac{TP+TN}{TP+TN+FP+FN}\) \\ Precision (_P_) & \(P=\frac{TP}{TP+FP}\) \\ Recall (_R_) & \(R=\frac{TP}{TP+FN}\) \\ F1-score (_F1_) & \(F1=\frac{2\times PR}{P+R}\) \\ Average Precision (_AP_) & \(AP=\int_{0}^{1}P\ dR\) \\ \hline \hline \end{tabular}  
* IP (True Positive): Represents corrosion targets that are correctly identified. FP (False Positive): Represents non-corrosive areas that are incorrectly identified as corrosion. TN (True Negative): Represents non-corrosive targets that are correctly identified. FN (False Negative): Represents corrosion targets that are incorrectly identified.  
\end{table} 
Table 3: Calculation formulas for evaluation metrics. detection dataset. We also compared multiple classic versions of YOLO algorithms. For a fair comparison, we selected the least complex versions of each algorithm: YOLOv3-tiny, YOLOv5n, YOLOv8n, YOLOv9t, and YOLOv10n. Lightweight versions of SSD and RT-DETR-L were also included. During training, the Batch Size was set to four and the Epoch to 100, with all other hyperparameters set to the default configuration provided by the algorithm's official settings. Table 4 presents a comparison of the evaluation metrics on the test set for each model. The proposed YOLOv10-vit outperforms YOLOv10n by 1.3% in Precision (P), and the overall performance metrics, mAP50 and F1-score (F1), improve by 0.4% and 1%, respectively. YOLOv10-vit achieves the highest accuracy among all models. On our experimental platform, YOLOv10-vit achieves a frame rate (FPS) of 37, which meets the real-time detection requirements for corrosion. While SSD has a very high FPS, its accuracy is relatively low. RT-DETR-L, in comparison to the YOLO series algorithms, has poorer real-time performance. The mAP50 curves of each network on the validation set during training are shown in Figure 6. These curves represent the mAP values computed after each training epoch, totaling 100 calculations. As seen in the figure, the curves are primarily divided into two parts: The upper section represents the mAP curves of YOLOv10n and YOLOv10-vit, while the lower section mainly includes the maps curves of RT-DETR-L, YOLOv3-tiny, YOLOv5n, YOLOv8n, and YOLOv9t networks, with SSD performing the worst. Before epoch 80, the YOLOv10-vit curve closely follows that of YOLOv10n, but after epoch 80, YOLOv10-vit outperforms YOLOv10n in terms of mAP performance. Figure 7 presents the prediction results of each model, where four images (a), (b), (c), and (d) are randomly selected for comparative analysis. \begin{table}
\begin{tabular}{c c c c c c c} \hline  & **FLOPs(G)** & **FPS** & \(P\) & \(R\) & _mAP50_ & **F1** \\ \hline SSD & 31.4 & 120.00 & 0.661 & 0.531 & 0.516 & 0.589 \\ RT-DETR-L & 108.0 & 13.25 & 0.647 & 0.589 & 0.633 & 0.617 \\ YOLOv3-tiny & 19.0 & 39.70 & 0.632 & 0.641 & 0.655 & 0.636 \\ YOLOv5n & 7.2 & 48.10 & 0.685 & 0.583 & 0.66 & 0.630 \\ YOLOv8n & 8.2 & 36.60 & 0.667 & 0.62 & 0.673 & 0.643 \\ YOLOv9t & 7.8 & 33.67 & 0.709 & 0.577 & 0.654 & 0.636 \\ YOLOv10n & 8.4 & 43.10 & 0.703 & 0.654 & 0.696 & 0.677 \\ YOLOv10-vit & 10.1 & 37.31 & 0.716 & 0.651 & 0.7 & 0.682 \\ \hline \end{tabular}
\end{table} 
Table 4: Evaluation Metrics for Each Model. Figure 6: The mAP50 curves of each network on the validation set during training. Figure 7: Detection performance of each network on the test set. In image (a), YOLOv10-vit fully covers the corrosion areas, whereas YOLOv10n's detection boxes fail to completely cover the corrosion parts.