To address the limited detection accuracy of casting defects—including pores, inclusions, and looseness—in digital radiography (DR) images, which stems from their small scale, high morphological variability, and interference from complex background textures, we propose MTS-YOLOv11: an edge–discrepancy collaborative defect detection framework tailored for casting DR imagery. Built upon YOLOv11, MTS-YOLOv11 incorporates three key innovations: (1) a Multi-Scale Edge Information Enhancement System (MSEES), integrated into the C3K2 module of the backbone network, to strengthen discriminative feature extraction for minute defects; (2) a TripletAttention mechanism embedded in high-level backbone stages to jointly calibrate channel–spatial dependencies and suppress texture-induced spurious responses under complex backgrounds; (3) a Scale-Discrepancy-Aware Gated Fusion (SDAGFusion) module positioned immediately before the detection head, enabling scale-discrepancy-aware gated fusion of multi-scale features, emphasizing defect regions while suppressing background interference. Experimental results show that on the casting DR dataset, MTS-YOLOv11 achieves mAP@0.5 = 96.5% and mAP@0.5:0.95 = 68.5%—improvements of 1.3 and 1.2 percentage points over the baseline YOLOv11—across all three defect categories. Moreover, on the same platform, MTS-YOLOv11 achieves an inference speed of 359.07 FPS, compared with 346.86 FPS for the baseline. Meanwhile, the model has 2.72M parameters and 7.8G FLOPs. These results indicate a consistent improvement in detection accuracy while maintaining a practical balance between precision and computational efficiency. Moreover, cross-dataset generalization tests on newly acquired industrial DR data show that MTS-YOLOv11 consistently outperforms the baseline across evaluation metrics, suggesting improved robustness to unseen imaging conditions and supporting its potential for real-world foundry inspection.
He et al. (Fri,) studied this question.