DF-YOLOv7: steel surface defect detection based on focal module and deformable convolution
摘要
Steel is a fundamental material in the manufacturing process, and the quality of the steel used directly affects the quality of the final product. During the manufacturing process, a variety of complex and irregular defects may form on the surface of the steel. In order to detect these defects, this paper proposes the DF-YOLOv7 model. The model employs the K-means + + algorithm to adjust the anchor box sizes across datasets, thereby enhancing the extraction of features for different defects. Furthermore, the D-SPPCSPC module is employed to enhance defect detection and reduce model parameters. Additionally, the CIoU Loss with Focal module addresses positive–negative sample imbalance by focusing on high-quality anchor boxes. Experimental results demonstrate that the proposed model achieves an mAP of 0.771 on the NEU-DET dataset, representing a 3.6% improvement over the original model. It outperforms some state-of-the-art detectors and meets the real-time industrial detection requirements.