Your new experience awaits. Try the new design now and help us make it even better

ORIGINAL RESEARCH article

Front. Artif. Intell.

Sec. Machine Learning and Artificial Intelligence

An Improved YOLOv8n with Multi Scale Feature Fusion for Real Time and High Precision Railway Track Defect Detection

Provisionally accepted
Zhihong  ZhangZhihong Zhang1,2*Liling  ZhangLiling Zhang1Xin  LuXin Lu1Tingting  MaTingting Ma1Feng  HuangFeng Huang1Sheng  ZhongSheng Zhong2
  • 1Guangzhou Institute of Metrology and Testing Technology, Guangzhou, China
  • 2Huazhong University of Science and Technology, Wuhan, China

The final, formatted version of the article will be published soon.

Railway transportation has become increasingly vital for modern urban and intercity mobility, yet the growing scale and operational intensity of rail networks have made defect detection in railway tracks a critical concern. Traditional inspection methods such as manual, ultrasonic, eddy current, and magnetic flux leakage testing suffer from limitations in accuracy, efficiency, or adaptability to complex environmental conditions. To address these challenges, this study proposes an enhanced defect detection framework based on an improved YOLOv8 algorithm, specifically designed for small targets and complex backgrounds. The improvements include: (1) an AVCStem module with variable convolution kernels to dynamically adapt to defects of different shapes and scales; (2) an ADSPPF module using multi-scale pooling and multi-branch attention mechanisms to retain fine features across scales; and (3) a MSF module for enhanced multi-scale feature fusion with partial convolution and hierarchical feature alignment. Experimental results on a real-world track defect dataset demonstrate that the proposed model achieves a significant increase in detection precision (90.2%), mAP@0.5 (90.2%), and mAP@0.5:0.95 (73.2%), while reducing model size to 5.2MB and parameters to 2.45M. Comparative and ablation studies further validate the complementary benefits of each module and the superior performance over existing lightweight detectors. The proposed model offers a robust, accurate, and efficient solution for real-time railway defect detection, with strong potential for deployment in edge AI devices and mobile inspection robots.

Keywords: Lightweight model, Multi-scale feature fusion, Rail defect detection, Real-time detection, YOLOv8

Received: 23 Sep 2025; Accepted: 11 Dec 2025.

Copyright: © 2025 Zhang, Zhang, Lu, Ma, Huang and Zhong. This is an open-access article distributed under the terms of the Creative Commons Attribution License (CC BY). The use, distribution or reproduction in other forums is permitted, provided the original author(s) or licensor are credited and that the original publication in this journal is cited, in accordance with accepted academic practice. No use, distribution or reproduction is permitted which does not comply with these terms.

* Correspondence: Zhihong Zhang

Disclaimer: All claims expressed in this article are solely those of the authors and do not necessarily represent those of their affiliated organizations, or those of the publisher, the editors and the reviewers. Any product that may be evaluated in this article or claim that may be made by its manufacturer is not guaranteed or endorsed by the publisher.