Application of the Improved YOLOv8 Algorithm for Small Object Detection in X-ray Weld Inspection Images
摘要
The adoption of machine vision to replace manual inspection in X-ray non-destructive testing (NDT) for image defect detection has emerged as a significant trend in the advancement of welding defect detection. In this paper, an enhanced strategy is proposed to address the issue of low detection accuracy of YOLOv8 in X-ray weld defect detection. An extra tiny object detection head is added to the detection head, which enables more accurate capture of extremely small defect features, effectively expanding the lower detection limit and significantly enhancing the detection capability for extremely small weld defects. By employing serpentine deformable convolution, the model dynamically adjusts its receptive field, enabling it to flexibly adapt to variations in crack morphology, thereby improving the detection capability for small objects with special shapes. The integration of an advanced BiFPN structure enables three-level feature fusion, optimizing the detection performance for medium and large objects across multiple scales, and expanding the upper detection range. The results show that the proposed improvement strategy achieves the maximum detection scale while also significantly improving detection accuracy, with the overall mAP@50% reaching 97.2%, an increase of 17.1%. The proposed strategy in this study significantly improves the accuracy of weld defect detection. It also enhances the detection performance for small targets with specific shapes, extremely small defects, and expands the model’s scale adaptability. Validation experiments conducted on the GDXray weld dataset further demonstrate its effectiveness.