无线电工程2025,Vol.55Issue(2):271-280,10.DOI:10.3969/j.issn.1003-3106.2025.02.006
基于通道剪枝的YOLOv8n印刷电路板缺陷检测
PCB Defect Detection Using YOLOv8n Based on Channel Pruning
摘要
Abstract
Aiming at the problem of large model size and large number of parameters in the surface defect detection of Printed Circuit Board(PCB),a PCB defect detection algorithm using lightweight YOLOv8n network based on channel pruning is proposed.In order to effectively improve the feature extraction of small target defects of PCB,RepViT is used as the feature extraction network;in order to improve the network's attention to small targets and reduce the repetition of gradient information in the neural network reasoning process,the convolution module of the neck network is replaced by Rep-Net with Cross-Stage Partial CSP and ELAN(RepNCSPELAN4);in order to reduce the distortion of the detection frame when defects overlap,Focaler-MPDIoU is used to replace Complete Intersection over Union(CIoU)in the prediction part;the model of the fusion improvement method is pruned by the Layer Adaptive Magnitude based Pruning(LAMP)method to remove redundant gradient information and weights in the model,reduce the number of parameters and floating-point operations,and compress the model volume.Experimental results show that in the PCB public data set,after LAMP score based pruning,the algorithm has a 60.8%reduction in parameters,a 50.8%reduction in model size,a 48.8%reduction in computational complexity,and a 3.8%increase in mean Average Precision(mAP)compared to YOLOv8n.While improving the accuracy,the computational complexity,parameter quantity and model size are all lower than those of the original model,meeting the use requirements of some low-configuration devices.关键词
印刷电路板缺陷/小目标/模型剪枝/轻量化网络/损失函数Key words
PCB defects/small targets/model pruning/lightweight network/loss function分类
信息技术与安全科学引用本文复制引用
杨慧聪,陈慈发,张上..基于通道剪枝的YOLOv8n印刷电路板缺陷检测[J].无线电工程,2025,55(2):271-280,10.基金项目
湖北省大学生创新创业训练计划(202311075046) (202311075046)
国家级大学生创新创业训练计划(202111075012,202011075013)Hubei Province Innovation and Entrepreneurship Training Program for College Students(202311075046) (202111075012,202011075013)
National Innovation and Entre-preneurship Training Program for College Students(202111075012,202011075013) (202111075012,202011075013)