Improved MobileViT Algorithm for Rail-Defect Recognition Incorporating Image-Quality Pre-Assessment
Yangyang Jiao, Zhifei Wang, Fan Li, Yongxin Tong, Qi Wei, Yihan TianUAV-based rail inspection is hampered by minute-defect detection, background clutter, and edge-computing constraints. To address these issues, this paper proposes a lightweight rail-defect recognition model based on improved MobileViT. First, deformable convolution and an adaptive scale downsampling (ASD) module were introduced to preserve the textural details of slender and irregular defects in aerial imaging. Second, a convolutional block attention module (CBAM) was embedded to suppress background clutter in complex outdoor scenes. Finally, a closed-loop module integrating image-quality pre-assessment and active reshooting decision-making was constructed to cope with image degradation caused by flight vibrations and environmental interference, achieving high-precision interception of severely degraded images with an extremely low false-positive rate. With only 4.93 M parameters and 19.36 MB, the model can achieve 967.67 FPS and a weighted F1-score of 98.7% ± 0.5%. Compared to VGG16-RF, it improves the F1-score by 5.5 percentage points, reduces parameters by two-thirds, and accelerates inference by 33.6×. It maintained over 95% recognition accuracy in four typical image degradation scenarios, and the front-end quality gate can effectively reduce invalid inference, providing technical support for reliable deployment on UAV edge platforms for intelligent railway inspection.