Yan Zhang, Yung-Nien Sun, Qingqing Huang, Yan Han
Abstract The detection of surface defects in industry is of great importance in ensuring the quality of industrial products. There are low-quality examples in defect detection that are commonly found in small-sized and extreme aspect ratio targets. How to improve the performance of algorithms for industrial surface defect detection, especially in enhancing the detection ability of small-sized and extreme aspect ratio targets while ensuring inference speed, has not been deeply studied at present. Firstly, in response to the challenge of difficulty in detecting multiscale objects in industrial surface defects, this paper proposes the cross-level multiscale feature fusion (CMFF) module that integrates cross-level features from both the backbone and neck. Secondly, to alleviate the issue of low-quality examples leading to difficult localization, this paper proposes a novel regression loss function, by re-weighting low-quality examples to guide the model towards better localization. Finally, the CMFF enhanced You Only Look Once (YOLO) with focused-Complete Intersection over Union (CIoU) loss, named CMFF-YOLO network is proposed. By integrating the CMFF module and the focused-CIOU loss function, the proposed network is used for defect detection. The CMFF-YOLO model achieved mean average precision (mAP) values of 84.2%, 76.6%, and 94.8% on the NEU-DET, GC10-DET, and PCB-DET datasets, respectively, outperforming the baseline YOLOv8s by 3.4%, 6.6%, and 3.0%. Among the 12 models evaluated, this method ranked among the top three for inference speed.