MHS-DETR: a railway frog detection model integrating multi-scale edge perception and adaptive structural optimization
Abstract
Abstract As a critical component of the railway track system, the structural integrity of railway frogs is vital to the safe operation of trains. However, detecting surface defects on frogs remains challenging due to their small size, blurred edges, and complex backgrounds, which often reduce the accuracy of existing algorithms. To address these issues, this paper proposes a novel object detection model named MHS-DETR, which integrates multi-scale edge perception with adaptive optimization strategies. Built upon the RT-DETR framework, MHS-DETR introduces three systematic improvements: First, a lightweight Multi-scale Edge Information Extraction Network (MEIENet) is developed to enhance the perception of small defect contours by integrating edge enhancement and dual-domain selection mechanisms. Second, a Hierarchical Attention Fusion Block (HAFB) is designed to improve the interaction and fusion of heterogeneous features through a dynamically weighted combination of local and global attention mechanisms, thereby strengthening the representation of multi-scale targets. Third, an adaptive loss function, SlideVarifocalLoss (SVL), is proposed to address the imbalance between positive and negative samples by dynamically adjusting the loss weights of samples with ambiguous boundaries. To validate the effectiveness of the model, a multi-scenario frog defect dataset named ForkDefect-2089—containing 2089 annotated images—was constructed. Experimental results show that MHS-DETR achieves an mAP50 of 70.3%, surpassing the baseline model by 4.2%, while reducing the number of parameters and computational cost by 15.6% and 5.4%, respectively. Moreover, it delivers a 2.3% improvement on the public NEU-DET dataset. Overall, MHS-DETR offers superior robustness and generalization, providing strong support for reliable, intelligent railway maintenance.
Fields of Study & Subjects
Advanced Neural Network Applications
Railway Engineering and Dynamics
Infrastructure Maintenance and Monitoring
Publication details
- Journal / source
- Engineering Research Express
- Publisher
- IOP Publishing
- Volume
- 8
- Issue
- 3
- Pages
- 035228–035228
- Publication date
- 29 January 2026