摘要
针对PCB缺陷检测中存在的复杂背景干扰性强、模型参数量大和推理时间长等问题,在YOLOv8算法的基础上进行了改进。首先,在Backbone网络中,融合SE注意力机制,设计C2f_RepGhost模块,代替部分C2f,抑制不相关的背景信息并减少模型的参数量;改进空间金字塔池化网络,替换激活函数,使特征提取能力更加高效;其次,增加浅层特征融合的Block数目,去除深层网络,增加上采样,以提高小目标浅层特征预测能力;采用Shape-IoU loss边界框损失函数来提高小目标的检测精度,并加快模型的收敛速度;最后,将改进后的算法命名为RGS-YOLO。试验结果表明,RGS-YOLO算法应用在PKU-Market-PCB数据集上mAP@0.5值达到99.1%,参数量和计算量仅有1.62 M和6.9 GFLOPs,且对复杂背景具有一定的鲁棒性,满足嵌入式设备实时检测的应用需求。
In response to the problems of strong complex background interference,large model parameters,and long inference time in PCB defect detection,improvements have been made on the YOLOv8 algorithm.Firstly,in the Backbone network,the SE attention mechanism is integrated and a C2f_RepGhost module is designed to replace some C2f,suppress irrelevant background information and reduce the number of model parameters;Improve the spatial pyramid pooling network by replacing the activation function to make feature extraction more efficient;Secondly,increase the number of blocks for shallow feature fusion,remove deep networks,and increase upsampling to improve the shallow feature prediction ability of small targets;Using the Shape IoU loss bounding box loss function to improve the detection accuracy of small targets and accelerate the convergence speed of the model.Finally,name the improved algorithm RGS-YOLO.The experimental results indicate that the RGS-YOLO algorithm is applied to the PKU-Market-PCB dataset mAP@0.5 The value reaches 99.1%,with only 1.62 M parameters and 6.9 GFLOPs in computation,and it has certain robustness against complex backgrounds,meeting the application requirements of real-time detection of embedded devices.
作者
孙铁强
于洪健
宋超
肖鹏程
孙奥然
SUN Tieqiang;YU Hongjian;SONG Chao;XIAO Pengcheng;SUN Aoran(College of Artificial Intelligence,North China University of Science and Technology,Tangshan 063210,China;College of Metallurgy and Energy,North China University of Science and Technology,Tangshan 063210,China;Key Laboratory of Industrial Intelligent Perception of Hebei Province,North China University of Science and Technology,Tangshan 063210,China;School of Information and Control Engineering,China University of Mining and Technology,Xuzhou 221116,China)
出处
《组合机床与自动化加工技术》
北大核心
2025年第4期118-123,128,共7页
Modular Machine Tool & Automatic Manufacturing Technique
基金
河北省“三三三人才工程”资助项目(A202102002)
河北省创新能力提升计划项目(23561007D)
2023年唐山市重点研发项目(23140204A)。