|国家科技期刊平台
首页|期刊导航|现代电子技术|改进YOLOv8n的轻量级PCB缺陷检测算法

改进YOLOv8n的轻量级PCB缺陷检测算法OA北大核心CSTPCD

Lightweight PCB defect detection algorithm for improved YOLOv8n

中文摘要英文摘要

针对当前印刷电路板(PCB)小目标缺陷检测精度低,现有检测模型庞大,在边缘端设备部署难的问题,提出一种基于改进YOLOv8n的PCB缺陷轻量化检测模型YOLOv8-t.首先使用FasterNet Block和Slim-Neck结构对Bockbone和Neck进行结构优化,减少冗余计算和内存访问,解决特征冗余导致的检测精度低的问题;其次使用自研检测头Detect_G提高模型检测的速度和精度;最后引入基于跨空间多尺度的注意力(EMA)机制提高对小目标检测缺陷的关注度.利用北京大学实验室公开发布的PCB缺陷数据集进行实验.实验结果表明,提出的YOLOv8-t的平均精度均值为95.3%,模型权重大小为4.0 MB,参数量为1.8×106,计算量为3.8 GFLOPs.与原算法YOLOv8n相比,mAP@0.5上升了2.1%,模型权重大小减少了36.5%,参数量减少了36.7%,计算量减少了51.2%.改进算法提高了检测精度,在模型轻量化的方向上取得了好的效果,更适合边缘端部署.

In view of the low accuracy of small object defect detection in printed circuit boards(PCBs)and the fact that the existing detection models are large and difficult to be deployed in edge equipment,a lightweight PCB defect detection model YOLOv8-t is proposed based on the improved YOLOv8n.The structures of the FasterNet Block and the Slim-Neck are used to optimize the structures of the Bockbone and the Neck to reduce the redundant calculations and memory accesses,so as to cope with the low detection accuracy caused by feature redundancy.The self-developed detection head Detect_G is used to improve the speed and accuracy of model detection.The attention mechanism EMA(efficient mutli-scale attention)based on cross-space multi-scale is introduced to improve the attention to the defect detection of small objects.Experiments were conducted with the publicly released PCB defect dataset of a laboratory of Peking University.The experimental results show that the proposed YOLOv8-t has a mean average precision(mAP)of 95.3%,a model weight size of 4.0 MB,a parameter quantity of 1.8×106,and a calculation amount of 3.8 GFLOPs.In comparison with those of the original algorithm YOLOv8n,the mAP@0.5 of the YOLOv8-t rises by 2.1%,its model weight size is reduced by 36.5%,its parameter quantity is reduced by 36.7%,and its calculation amount is reduced by 51.2%.The improved algorithm improves the detection accuracy and achieves good results in the model lightweight,so it is more suitable for the deployment on the edge.

张淑卿;孟昊;葛超

华北理工大学 电气工程学院,河北 唐山 063210

电子信息工程

YOLOv8PCB轻量化缺陷检测注意力机制Detect_G

YOLOv8PCBlightweightdefect detectionattention mechanismDetect_G

《现代电子技术》 2024 (015)

115-121 / 7

河北省自然科学基金资助项目(F2021209006)

10.16652/j.issn.1004-373x.2024.15.019

评论