## 1 Introduction
Various types of deep learning algorithms have been widely applied to the inspection tasks of infrastructure such as tunnels, roads, bridges, dams, and railways [29; 30; 31; 32; 33; 34; 35; 36]. Among these algorithms, the YOLO (You Only Look Once) family has gained significant popularity due to its fast detection speed and competitive accuracy. To cater to the demands of different application scenarios, many researchers have proposed modifications and optimizations to YOLO. [PERSON]. [37] introduced the YOLO-NL real-time object detection model, which incorporates improvements such as the enhanced CSPNet, the integration of the SSPP network, and an optimized PANet. By employing a global dynamic label assignment strategy, YOLO-NL achieves improved multi-scale object detection accuracy. In complex backgrounds, YOLO-NL demonstrates a robust performance, particularly in dense and occluded scenes, excelling in mask detection tasks with an accuracy of 98.8% and a frame rate of 130 FPS. [PERSON] et al. [38] proposed an improved YOLOv5-based model by integrating technologies like the efficient channel attention (ECA) module, Ghost Convolution, and BottleNeckCSP. These enhancements strengthen feature extraction and aggregation capabilities. The model was applied to drone imagery, achieving high-precision and efficient weed detection, thereby providing strong support for precision agriculture. [PERSON] et al. [39] developed an improved YOLO architecture centered on the maintaining the original information-deeply separable convolution (MODConv) and MODLayer modules. By mitigating dimensionality reduction losses, this approach preserves feature continuity. The architecture combines the global receptive field-space pooling pyramid-fast (GRF-SPPF) module to enhance the global receptive field, utilizes the DAF-CA mechanism to highlight key features, and introduces a lightweight prediction head, MODL-Head. These advancements significantly improve the accuracy and speed of crack detection. Experimental results indicate that the proposed method outperforms traditional YOLO models in crack detection tasks. Although YOLO has undergone multiple iterations and numerous task-specific optimized versions have been developed, there is currently little application-oriented research on the detection of corrosion in hydraulic metal structures. Moreover, there are no publicly available, well-annotated datasets specifically for corrosion in hydraulic metal structures. Addressing the practical inspection needs of hydraulic metal structures, this study proposes an improved corrosion detection method based on the state-of-the-art YOLOv10 algorithm. The proposed method employs a two-step approach: detection followed by classification. During training, the method does not require the annotation of complex multi-class datasets; instead, it only requires annotations from the initial detection step to accomplish both corrosion detection and corrosion grade classification. This approach significantly reduces the subjectivity of annotations and eliminates the need for extensive knowledge of corrosion grade classification. As a result, it enables the rapid annotation of corrosion datasets by a larger workforce within a short timeframe. Additionally, to improve the accuracy of corrosion target detection for hydraulic metal structures, a novel YOLOv10-vit architecture was developed. This model enhances the learning of corrosion features by integrating advanced feature extraction capabilities, further optimizing the detection performance. The main contributions of this study are as follows:  
(1) To enhance the accuracy of corrosion detection, the transformer-based MobileViTv3 architecture was integrated into YOLOv10, resulting in the proposed YOLOv10-vit model for corrosion detection. (2) To reduce the difficulty of annotating high-quality datasets, the YOLOv10-vit-cls algorithm was proposed, enabling the learning of features corresponding to different corrosion grades and facilitating corrosion severity classification.