nav emailalert searchbtn searchbox tablepage yinyongbenwen piczone journalimg journalInfo searchdiv qikanlogo popupnotification paper paperNew
2023, 06, v.53 1342-1350
改进YOLOv5的轻量级PCB缺陷检测算法
基金项目(Foundation): 国家自然科学基金(61701202)~~
邮箱(Email):
DOI:
摘要:

针对目前印刷电路板(PCB)工业缺陷检测方法存在准确率低和模型较大的问题,提出了一种基于YOLOv5改进的PCB——YOLOv5-L。该方法采用轻量化网络GhostNet作为模型的特征提取网络,解决YOLOv5模型参数过多从而难以部署在工业缺陷检测设备的问题。通过改进Neck结构,融合深层语义信息与浅层的细粒度信息,提高模型对PCB这种小目标缺陷的检测效果。在YOLOv5-L主干网络输出端引入一种混合注意力机制H_ECA,帮助模型抵抗混淆信息的影响,并专注于有用的缺陷信息。将Transformer应用于预测头部,提高模型捕获不同局部信息的能力。利用北京大学实验室公开发布的PCB缺陷数据集进行实验,实验结果表明,该方法相较于YOLOv5,在IoU设置为0.5时mAP提升了0.6%,速度提升了7.5帧/秒,模型大小为34 MB,约为YOLOv5的1/5。

Abstract:

YOLOv5-L, an improved PCB defect detection algorithm based on YOLOv5, is proposed to address the low accuracy and large model size of current PCB industrial defect detection methods. The lightweight network GhostNet is used as the feature extraction network of the model to solve the problem that the YOLOv5 model has too many parameters and thus is difficult to deploy in industrial defect detection equipment. By improving the Neck structure and integrating the deep semantic information with the shallow fine-grained information, the detection effect of the model on small object defects such as PCB is improved. Then a hybrid attention mechanism, H_ECA, is introduced at the output of the YOLOv5-L backbone network to help the model resist the influence of confusing information and focus on useful defect information. In addition, Transformer is applied to the prediction header to improve the ability of the model to capture different local information. The result of experiments on the PCB defect data set publicly released by the Peking University laboratory show that the method improves mAP by 0.6% and speed by 7.5 frame/s when the IoU is set to 0.5, as compared to YOLOv5, and the model size is 34 MB, which is about 1/5 of YOLOv5.

参考文献

[1] DAI W,MUJEEB A,ERDT M,et al.Soldering Defect Detection in Automatic Optical Inspection[J].Advanced Engineering Informatics,2020,43:101004.

[2] EBAYYEH A A R M A,MOUSAVI A.A Review and Analysis of Automatic Optical Inspection and Quality Monitoring Methods in Electronics Industry[J].IEEE Access,2020,8:183192-183271.

[3] WANG W C,CHEN S L,CHEN L B,et al.A Machine Vision Based Automatic Optical Inspection System for Measuring Drilling Quality of Printed Circuit Boards[J].IEEE Access,2016,5:10817-10833.

[4] GAIDHANE V H,HOTE Y V,SINGH V.An Efficient Similarity Measure Approach for PCB Surface Defect Detection[J].Pattern Analysis and Applications,2018,21(1):277-289.

[5] 温悦欣.基于机器视觉的PCB表面缺陷检测方法研究与系统实现[D].成都:电子科技大学,2020.

[6] 王栋,马纯永,陈戈.一种新型的PCB图像快速配准算法[J].计算机科学,2016,43(S1):152-155.

[7] 何国忠,梁宇.基于卷积神经网络的PCB缺陷检测[J].图学学报,2022,43(1):21-27.

[8] 伍济钢,成远,邵俊,等.基于改进YOLOv4算法的PCB缺陷检测研究[J].仪器仪表学报,2021,42(10):171-178.

[9] 李闻,李小春,闫昊雷.基于改进YOLOv3的PCB缺陷检测[J].电光与控制,2022(4):106-111.

[10] 苏佳,贾欣雨,侯卫民.基于YOLO-J的PCB缺陷检测算法[J/OL].(2022-06-24)[2022-11-01].https://kns.cnki.net/kcms2/article/abstract?v=Emm5A0E9Hv0sQsvL3Dkf0-hRv7aa6t0Be_VnaudvO83Pq3eRzbNRg4AsoN3PWpz_m-qQ8KrE8Eck8m99J2UkJV9Is-v4t5iyi-nUdaHkmnmDhEX4LOUL5Q==&uniplatform=NZKPT.

[11] 李澄非,蔡嘉伦,邱世汉,等.基于改进YOLOv4算法的PCB缺陷检测[J].电子测量技术,2021,44(17):146-153.

[12] DING R,DAI L,LI G,et al.TDD-Net:A Tiny Defect Detection Network for Printed Circuit Boards[J].CAAI Transactions on Intelligence Technology,2019,4(2):110-116.

[13] BOCHKOVSKIY A,WANG C Y,LIAO H Y M.YOLOv4:Optimal Speed and Accuracy of Object Detection[J/OL].(2020-04-23)[2022-11-01].https://arxiv.org/abs/2004.10934.

[14] 王玲敏,段军,辛立伟.引入注意力机制的YOLOv5安全帽佩戴检测方法[J].计算机工程与应用,2022,58(9):303-312.

[15] LIU S,QI L,QIN H,et al.Path Aggregation Network for Instance Segmentation[C]//2018 IEEE/CVF Conference on Computer Vision and Pattern Recognition.Salt Lake City:IEEE,2018:8759-8768.

[16] REZATOFIGHI S H,TSOI N,GWAK J Y,et al.Generalized Intersection over Union:A Metric and a Loss for Bounding Box Regression[C]//2019 IEEE/CVF Conference on Computer Vision and Pattern Recognition.Long Beach:IEEE,2019:658-666.

[17] HAN K,WANG Y H,TIAN Q,et al.GhostNet:More Features from Cheap Operations[C]//2020 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR).Seattle:IEEE,2020:1580-1589.

[18] HE K,ZHANG X,REN S,et al.Deep Residual Learning for Image Recognition[C]//2016 IEEE Conference on Computer Vision and Pattern Recognition (CVPR).Las Vegas:IEEE,2016:770-778.

[19] YU F,KOLTUN V.Multi-scale Context Aggregation by Dilated Convolutions[J/OL].(2015-11-23)[2022-11-01].https://arxiv.org/abs/1511.07122.

[20] DOSOVITSKIY A,BEYER L,KOLESNIKOV A,et al.An Image is Worth 16×16 Words:Transformers for Image Recognition at Scale[J/OL].(2020-10-22)[2022-11-01].https://arxiv.org/abs/2010.11929.

基本信息:

DOI:

中图分类号:TP391.41;TN41

引用信息:

[1]李振华,张雷.改进YOLOv5的轻量级PCB缺陷检测算法[J].无线电工程,2023,53(06):1342-1350.

基金信息:

国家自然科学基金(61701202)~~

检 索 高级检索

引用

GB/T 7714-2015 格式引文
MLA格式引文
APA格式引文