2023年2月25日第7卷第4期现代信息科技ModernInformationTechnologyFeb.2023Vol.7No.410102023.022023.02收稿日期:2022-10-20基金项目:国家自然科学基金(61805133)注意力机制与空洞残差网络的PCB缺陷检测牛振振,陈力荣,王震,牛雅丽,吕旭阳(山西大学物理电子工程学院,山西太原030006)摘要:针对印刷电路板缺陷检测技术,文章提出了基于YOLOv5s的一个轻量型的CNN模型YOLO_AD,用于PCB缺陷检测。该模型主要体现在将轻量型Ghostmodule作为骨干特征提取网络,融合注意力机制,对输入分配偏好进行通用池化和信息加权平均后,引入空洞残差网络,减少了网络模型与卷积运算,提高了网络处理效率。部署到嵌入式板卡中,采用MVC架构配合硬件优化及软件设计搭建了实时在线的PCB目标缺陷检测系统。实验结果表明,测试各类缺陷识别率为90.53%,检测速度为30FPS。关键词:缺陷检测;轻量型网络;注意力机制;空洞残差网络;嵌入式系统中图分类号:TP391.4;TP18文献标识码:A文章编号:2096-4706(2023)04-0010-05PCBdefectDetectionofAttentionMechanismandDilatedResidualNetworkNIUZhenzhen,CHENLirong,WANGZhen,NIUYali,LYUXuyang(CollegeofPhysicsandElectronicEngineering,ShanxiUniversity,Taiyuan030006,China)Abstract:Forprintedcircuitboarddefectdetectiontechnology,thispaperproposesalightweightCNNmodelYOLO_ADbasedonYOLOv5sforPCBdefectdetection.ThemodelmainlyembodiesthelightweightGhostmoduleasthebackbonefeatureextractionnetwork,incorporatestheattentionmechanism,introducesthenullresidualnetworkaftergeneralizedpoolingandinformationweightedaveragingofinputassignmentpreferences,reducesthenetworkmodelandconvolutionoperations,andimprovesthenetworkprocessingefficiency.Deployedintotheembeddedboard,theMVCarchitectureisusedwithhardwareoptimizationandsoftwaredesigntobuildareal-timeonlinePCBtargetdefectdetectionsystem.Theexperimentalresultsshowthatthetestrecognitionrateofvarioustypesofdefectsis90.53%andthedetectionspeedis30FPS.Keywords:defectdetection;lightweightnetwork;attentionmechanism;dilatedresidualnetwork;embeddedsystem0引言PCB线路板质量的好坏决定了设备运行的优良程度。随着线路板集成度越高越复杂,其制造、加工、运输等过程极易出现缺陷。然而电路板缺陷会引起严重的...