电子测量技术ELECTRONICMEASUREMENTTECHNOLOGY第45卷第23期2022年12月DOI:10.19651/j.cnki.emt.2209991基于改进YOLOv4-tiny的印刷电路板缺陷检测研究马进王超(华北电力大学自动化系保定071003)摘要:印刷电路板是众多电子产品的核心和最基本的组成部分,其缺陷检测存在复杂度高和缺陷目标较小的特点,提出一种改进YOLOv4-tiny的印刷电路板缺陷检测方法,在满足检测速度的前提下,提高检测精度。首先,在主干网络的基础上添加空间金字塔池化模块,减少网络参数和提高网络预测速度的同时利用图像的局部和全局特征融合多重感受野;其次,在FPN部分增加卷积注意力模块,进一步增强不同阶段的特征融合效果,提升对小目标缺陷的目标检测准确度;最后,使用Adam优化器以提升回归过程的收敛速度与准确性,同时使用余弦退火衰减和标签平滑策略优化网络损失函数,以抑制网络训练过程中的过拟合问题。通过使用改进算法在印刷电路板缺陷数据集上进行对比实验验证表明,该文算法模型大小仅为22.85M,平均检测精度均值较原算法提升了13.38%,检测速度达到了149.03FPS(onGeForceRTX3060),具有较好的有效性和可行性。关键词:印刷电路板;缺陷检测;小目标;卷积注意力;Adam优化器中图分类号:TP391文献标识码:A国家标准学科分类代码:520.6040ResearchonprintedcircuitboarddefectdetectionbasedonimprovedYOLOv4-tinyalgorithmMaJinWangChao(DepartmentofAutomation,NorthChinaElectricPowerUniversity,Baoding071003,China)Abstract:Printedcircuitboardsarethecoreandmostbasiccomponentsofmanyelectronicproducts,andtheirdefectdetectionhasthecharacteristicsofhighcomplexityandsmalldefecttargets.AnimprovedYOLOv4-tinyprintedcircuitboarddefectdetectionmethodisproposedtomeetthedetectionspeed.Onthepremiseofimprovingthedetectionaccuracy.First,aspatialpyramidpoolingmoduleisaddedtothebackbonenetworktoreducenetworkparametersandimprovenetworkpredictionspeedwhileusingthelocalandglobalfeaturesoftheimagetofusemultiplereceptivefields;secondly,addaconvolutionalblockattentionmoduleintheFPNparttofurtherEnhancetheeffectoffeaturefusionatdifferentstagesandimprovetheaccuracyoftargetdetectionforsmalltargetdefects.Finally,Adamoptimizerisusedtoimprovetheconvergencespeedandaccuracyoftheregressionprocess,andthecosineannealingdecayandlabelsmooth...