A lightweight YOLOv8n-based method for rail surface defect detection in complex railway environments

Rail surface defect detection faces significant challenges, including class imbalance, small-scale defect detection, and interference from complex backgrounds. To address these issues, this study proposes a lightweight rail surface defect detection method based on YOLOv8n. First, a K-means + + -based defect scale prior optimization strategy is introduced to better characterize the scale distribution of rail surface defects and improve the representation of small targets. Second, a local-global collaborative attention module, named CloAtt, is embedded into the C2f. structure to enhance fine-grained defect feature representation while suppressing complex background noise. Third, an Attention-Guided Bidirectional Feature Pyramid Network, named ABiFPN, is designed to improve multi-scale feature fusion and reduce redundant feature propagation. Furthermore, a Focal-Efficient Intersection over Union loss, named Focal-EIoU, is adopted to improve bounding box regression and enhance the learning of difficult samples. Experimental results on the ProRail dataset show that the proposed YOLOv8n-ours achieves an [email protected] of 85.7%, with only 2.13M parameters and 7.5 GFLOPs. Compared with the baseline YOLOv8n, the proposed method improves detection accuracy while reducing model complexity. These results demonstrate that the proposed model provides an effective lightweight solution for rail surface defect detection. Edge-device deployment and real-time inference validation will be investigated in future work.

Authors

Institutions

Publication Details

Journal
Scientific Reports
Published
2026-06-29
DOI
https://doi.org/10.1038/s41598-026-58883-3
Primary Topic
Railway Engineering and Dynamics
Type
article
Field-Weighted Citation Impact
0.00

Funders

Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

A lightweight YOLOv8n-based method for rail surface defect detection in complex railway environments

Weimeng Wang, Weifeng Shi, Weiqiao Zhu, Zhe Wang et al.
Scientific Reports
Railway Engineering and Dynamics
article

A lightweight YOLOv8n-based method for rail surface defect detection in complex railway environments

Weimeng Wang, Weifeng Shi, Weiqiao Zhu, Zhe Wang, Yang Yang
article en

Abstract

Rail surface defect detection faces significant challenges, including class imbalance, small-scale defect detection, and interference from complex backgrounds. To address these issues, this study proposes a lightweight rail surface defect detection method based on YOLOv8n. First, a K-means + + -based defect scale prior optimization strategy is introduced to better characterize the scale distribution of rail surface defects and improve the representation of small targets. Second, a local-global collaborative attention module, named CloAtt, is embedded into the C2f. structure to enhance fine-grained defect feature representation while suppressing complex background noise. Third, an Attention-Guided Bidirectional Feature Pyramid Network, named ABiFPN, is designed to improve multi-scale feature fusion and reduce redundant feature propagation. Furthermore, a Focal-Efficient Intersection over Union loss, named Focal-EIoU, is adopted to improve bounding box regression and enhance the learning of difficult samples. Experimental results on the ProRail dataset show that the proposed YOLOv8n-ours achieves an [email protected] of 85.7%, with only 2.13M parameters and 7.5 GFLOPs. Compared with the baseline YOLOv8n, the proposed method improves detection accuracy while reducing model complexity. These results demonstrate that the proposed model provides an effective lightweight solution for rail surface defect detection. Edge-device deployment and real-time inference validation will be investigated in future work.

Scientific Reports
China Academy of Railway Sciences (CN)
National Natural Science Foundation of China
Sustainable cities and communities
Openalex Percentile: Top 13%
Railway Engineering and Dynamics
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.