首页|基于改进YOLOv5的轻量化PCB缺陷检测

基于改进YOLOv5的轻量化PCB缺陷检测

扫码查看
针对现有PCB缺陷检测方法的精确率较低且模型较大的问题,提出了一种基于EfficientFormer V2-YOLOv5的轻量化PCB缺陷检测改进算法.首先采用EfficientFormer V2算法替换YOLOv5中的骨干网络(backbone)来实现YOLOv5算法的轻量化;其次在Neak网络中引入四头检测机制的同时使用Kmeans++算法自适应锚框计算得到适合的锚框来提高对小目标的检测精度;然后在骨干网络中引入EMA注意力机制和在Neak网络中引入CoordConv网络替换Conv网络来进一步提高网络对小目标的检测精度;最后使用SIoU损失函数来加快网络模型的收敛速度.试验结果表明,改进后的YOLOv5算法模型的计算量降至8.9 GFLOPs(简称G),检测的平均精度值(mAP)达到96.1%,模型大小减少了3.006 M,计算量减少了6.9 G.满足工业上对PCB缺陷检测的实时要求.
Lightweight PCB Defect Detection Based on Improved YOLOv5
A lightweight PCB defect detection improvement algorithm based on EfficientFormerV2-YOLOv5 is proposed to address the issues of low accuracy and large model size in existing PCB defect de-tection methods.The algorithm first uses the EfficientFormerV2 algorithm to replace the backbone net-work in YOLOv5 to achieve the lightweight of the YOLOv5 algorithm.Secondly,while introducing a four head detection mechanism in the Neak network,the Kmeans++algorithm is used to adaptively calculate suitable anchor boxes to improve the detection accuracy of small targets.Then,the EMA attention mecha-nism is introduced into the backbone network and the CoordConv network is introduced to replace the Conv network in the Neak networ to further improve the detection accuracy of the network for small targets.Fi-nally,the SIoU loss function is used to accelerate the convergence speed of the network model.The experi-mental results show that the improved YOLOv5 algorithm model reduces the computational complexity to 8.9 GFLOPs,achieves an average precision value(mAP)of 96.1%,reduces the model size is reduced by 3.006 M,and reduces the computational complexity by 6.9 G.It meets the real-time requirements for PCB defect detection in industry.

EfficientFormerV2YOLOv5detectionPCBlightweight

李振飞、郑国勋、邓肯

展开 >

吉林化工学院 信息与控制工程学院,吉林 吉林 132022

长春工程学院 计算机技术与工程学院,长春 130012

吉林大学 计算机科学与技术学院,长春 130012

EfficientFormer V2 YOLOv5 缺陷检测 PCB 轻量化

2024

长春工程学院学报(自然科学版)
长春工程学院

长春工程学院学报(自然科学版)

影响因子:0.328
ISSN:1009-8984
年,卷(期):2024.25(4)