摘要
随着工业制造业的发展,印刷电路板(PCB)在电子产品制造中愈发重要。在PCB生产过程中,存在着各种各样的不良缺陷,因此急需一种高效的PCB缺陷检测方法。针对传统的YOLOv5目标检测算法中对于PCB图像检测中存在小目标缺陷检测准确率低的问题,提出了一种基于改进的YOLOv5的PCB缺陷检测方法。首先,针对小目标缺陷存在漏检的问题,在YOLOv5的特征提取网络中加入了高效通道注意力机制(SE)模块,提高对小目标缺陷的特征提取能力,从而提高小目标缺陷的检测精度;其次,为了优化和改进原YOLOv5算法,采用加权损失函数代替原来的损失函数,以充分学习图像的各种特征。在北京大学机器人实验室公开的PCB瑕疵数据集上进行测试,实验结果显示,改进后的模型提高了小目标缺陷检测效果,其mAP值为94.54%,比原算法模型提高了2.1%。可以准确地完成工业生产的印制电路板的缺陷检测任务。
With the development of industrial manufacturing,printed circuit board(PCB)is becoming more and more important in the manufacture of electronic products.In the process of PCB production,there are many kinds of bad defects,so an efficient PCB defect detection method is urgently needed.A PCB defect detection method based on improved YOLOv5 is proposed to solve the problem of low accuracy of small target defect detection in PCB image detection in traditional YOLOv5 target detection algorithm.Firstly,in order to solve the problem of missing detection of small target defects,an efficient channel attention mechanism(SE)module is added to the feature extraction network of YOLOv5 to improve the feature extraction ability of small target defects,thus improving the detection accuracy of small target defects.Secondly,in order to optimize and improve the original YOLOv5 algorithm,a weighted loss function is used to replace the original loss function,so as to fully learn various features of the image.The test is carried out on the PCB defect data set published by Peking University Robotics Laboratory.The experimental results show that the improved model improves the small target defect detection effect,and its mAP value is 9454%,which is 21%higher than the original algorithm model.It can accurately complete the defect detection task of printed circuit boards in industrial production.
作者
黄熙
朱兆优
叶海鹏
刘达
Huang Xi;Zhu Zhaoyou;Ye Haipeng;Liu Da(School of Mechanical and Electronic Engineering,East China University of Technology,Nanchang 330013,China)
出处
《机电工程技术》
2024年第2期225-229,共5页
Mechanical & Electrical Engineering Technology