For the problems of low detection accuracy and large model size in PCB defect detection,a PCB defect detection algorithm based on YOLO-MCG was proposed.First,a multi scale weighted channel fusion network was presented to reduce the model volume and amplify small target data.Afterwards,the mixed space pyramid convolution was proposed to replace the SPP structure in the backbone network,which expanded the receptive field of deep feature maps and enhanced the performance of the model semantic information feature extraction.Eventually,a lightweight CG-CSP module was constructed to replace the deepest CSP structure in the backbone network,which reduced the network parameters and improved the network's ability to filter redun-dant background information.Experimental results show that the YOLO-MCG algorithm obtains an average mean precision of 97.72%with a model size of 8.13 MB.Compared with the pre-improved model,mAP is increased by 3.77%and the model size is reduced by 69.89%,which effectively reduces the model complexity and improves the defect detection effect.
PCB defect detectionsmall targethybrid spatial pyramid convolutionlightweightattention mechanismreceptive field