摘要
针对传统PCB缺陷检测算法检测准确度低、实时性差等问题,提出一种改进的YOLOv5s网络PCB缺陷检测方法。针对缺陷特性,去除大目标的检测尺度,保留中小目标检测尺度;在网络模型末端用Transformer替代BottleneckCSP模块,提升了网络模型捕获目标特征的能力;结合坐标注意力模块,提升模型的性能并减少参数。以某PCB数据集为测试对象,结果表明,改进后的算法平均精度均值(mAP)达到99.04%,平均检测速度为19ms/帧,改进后的算法能够更加快速有效的检测出PCB缺陷。
Aiming at the problems of low detection accuracy and poor real-time performance of traditional PCB defect detection algorithms,an improved PCB defect detection method based on YOLOv5s network is proposed.Firstly,for the defect characteristics,the detection scale of large targets is removed,and the detection scale of small and medium targets is retained.Secondly,the Transformer module is used to replace the BottleneckCSP module at the end of the network model,which improves the ability of the network model to capture target features.Finally,combined with the coordinate attention module,model performance is improved and parameters are reduced.Taking the PCB dataset released by Peking University as the test object,the results show that the mean average precision(mAP)of the improved algorithm reaches 99.04%,and the average detection speed is 19ms/frame.The improved algorithm can detect PCB defects more quickly and effectively.
作者
张开生
李昊晨
关凯凯
彭朋
ZHANG Kaisheng;LI Haochen;GUAN Kaikai;PENG Peng(School of Electrical and Control Engineering,Shaanxi University of Science and Technology,Xi’an 710021,China)
出处
《实验室研究与探索》
CAS
北大核心
2023年第2期108-114,共7页
Research and Exploration In Laboratory
基金
陕西省自然科学基础研究计划项目(2022JQ-601)。