A novel method for subway wheelset tread defect detection with improved self-attention and loss function
摘要
Wheelsets are crucial components of subway locomotives, and defects on their tread surfaces pose significant safety risks. This study presents an enhanced defect detection algorithm based on the YOLOv5 model, specifically designed to identify tread defects in subway wheelsets to meet the demands of intelligent maintenance. To improve the detection of small targets, we incorporate a multi-head self-attention module, which enhances the model’s ability to capture long-range dependencies within global feature maps. Additionally, a weighted bidirectional feature pyramid network is adopted to achieve balanced multi-scale feature fusion, enabling efficient cross-scale integration. To overcome limited labeled data and annotation inaccuracies, we propose a novel loss function (W-MPDIoU) to accelerate model convergence. Experimental results demonstrate that our enhanced model achieves 99.1% average precision—a 4.29% improvement over the original YOLOv5. With reduced parameters and a detection speed of 15 ms per image, the proposed solution enables real-time tread defect detection in subway systems, significantly improving safety and operational efficiency.