FCM-YOLO:A PCB defect detection method based on feature enhancement and multi-scale fusion
In response to the challenges in PCB(printed circuit board)defect detection tasks,such as confusion between targets and backgrounds and difficulty in identifying small defective targets,a PCB defect detection method using feature context enhancement and multi-scale fusion YOLO(FCM-YOLO)is proposed.Firstly,based on the YOLOv5s,the method introduces a feature re-extraction module in the feature extraction network,incorporating a combination of spatial-to-depth layers and non-stride convolution layers to reduce information loss and retain features of small targets.Then,a context self attention module is introduced at the deepest layer of the feature extraction network,leveraging deformable convolution to extract features of small targets by learning contextual information,thereby enhancing the discriminative ability between targets and backgrounds and reducing false negatives.Finally,a multi-scale receptive field enhancement block is introduced in the feature fusion network,strengthening the correlation between feature information through a multi-branch structure and enhancing the semantic representation of features.Experimental results comparisons on PCB defect datasets and GC10-DET dataset demonstrate the FCM-YOLO can more accurately identify defective targets.In comparison with the improved YOLOv5s algorithm,the proposed method achieves a detection accuracy improvement of 4.7%and 3.7%on these two datasets,respectively.