CSG-YOLO: a model for detecting minor and irregular steel surface defects based on deformable convolution and cross-layer fusion
摘要
Steel surface defect detection is a critical aspect in ensuring the quality of steel production. However, due to the small size, irregular shapes, and complex backgrounds of defects, existing detection algorithms face significant challenges in feature extraction and recognition, struggling to balance high accuracy with real-time performance. To address these issues, this study proposes an improved YOLOv8 model–CSG-YOLO, which integrates deformable convolution, a Simplified Cross-stage Partial Spatial Pyramid Pooling Fusion (SimCSPSPPF) module, and a Global Feature Pyramid Network (GFPN). The model aims to efficiently extract robust features of minor and irregular defects while meeting the stringent demands of industrial environments for real-time high-performance computing. First, we replace the standard convolutions in the last three C2f modules of the original YOLOv8 backbone with deformable convolution, enabling the model to adapt to the geometric deformations of irregular defects and significantly enhancing the flexibility of feature extraction. Second, we introduce the SimCSPSPPF module to replace the original SPPF module, enhancing the diversity and effectiveness of features through cross-layer feature fusion and multiscale pooling. Finally, we adopt the GFPN structure in place of the original PAFPN, enabling cross-scale global feature interaction to integrate richer contextual information. Experiments on the Northeastern University (NEU-DET) dataset show that CSG-YOLO achieves an mAP@0.5 of 76.1% and an F1 score of 71.9%, representing improvements of 4.3% and 3.5%, respectively, over the original YOLOv8 model. While maintaining high accuracy, the model achieves an inference speed of 35.3 FPS. Its multiscale feature fusion and parallel computing-friendly architecture lay a solid foundation for efficient real-time distributed detection on high-performance computing platforms. This study provides a solution that combines high accuracy and high computational efficiency for detecting small and irregularly shaped defects in complex industrial scenarios, offering valuable reference and practical significance for advancing intelligent industrial inspection systems based on supercomputing.