首页 | 本学科首页   官方微博 | 高级检索  
     

基于改进YOLOv5的PCB小目标缺陷检测研究
引用本文:伍济钢,梁谋,曹鸿,张源,杨康.基于改进YOLOv5的PCB小目标缺陷检测研究[J].光电子.激光,2024,35(2):155-163.
作者姓名:伍济钢  梁谋  曹鸿  张源  杨康
作者单位:湖南科技大学 机械设备健康维护湖南省重点实验室,湖南 湘潭 411201,湖南科技大学 机械设备健康维护湖南省重点实验室,湖南 湘潭 411201,湖南科技大学 机械设备健康维护湖南省重点实验室,湖南 湘潭 411201,湖南科技大学 机械设备健康维护湖南省重点实验室,湖南 湘潭 411201,湖南科技大学 机械设备健康维护湖南省重点实验室,湖南 湘潭 411201
基金项目:国家自然科学基金(51775181)资助项目
摘    要:面对印刷电路板(print circuit board,PCB)小型化、多层化、高集成化的趋势,针对目前PCB缺陷检测方法存在漏检、特征提取困难、误检率高以及检测性能差等问题,本文提出了基于改进YOLOv5算法的PCB小目标缺陷检测方法。该方法先针对PCB小目标缺陷特点采用DBSCAN(density-based spatial clustering of applications with noise) +二分K-means聚类算法以找到更适合的锚框;然后对YOLOv5的特征提取层、特征融合层以及特征检测层进行改进,增强关键信息的提取,加强深层信息与浅层信息的融合;从而减少PCB缺陷的误检率、漏检率,以提高网络的检测性能;最后在公开PCB数据集上进行相关对比实验。结果表明,改进后模型的平均精度(mAP)为99.5%,检测速度为0.016 s。相比于Faster R-CNN、YOLOv3、YOLOv4网络模型,检测精度分别提升了17.8%、9.7%、5.3%,检测速度分别提升了0.846 s、0.120 s、0.011 s,满足PCB缺陷在实际工业生产现场的高精度、高速度检测要求。

关 键 词:PCB缺陷检测    YOLOv5    聚类算法    注意力机制    解耦头
收稿时间:2022/8/27 0:00:00
修稿时间:2022/10/25 0:00:00

Research on PCB small target defect detection based on improved YOLOv5
WU Jigang,LIANG Mou,CAO Hong,ZHANG Yuan and YANG Kang.Research on PCB small target defect detection based on improved YOLOv5[J].Journal of Optoelectronics·laser,2024,35(2):155-163.
Authors:WU Jigang  LIANG Mou  CAO Hong  ZHANG Yuan and YANG Kang
Affiliation:Hunan Provincial Key Laboratory of Health Maintenance for Mechanical Equipment, Hunan University of Science and Technology, Xiangtan, Hunan 411201, China,Hunan Provincial Key Laboratory of Health Maintenance for Mechanical Equipment, Hunan University of Science and Technology, Xiangtan, Hunan 411201, China,Hunan Provincial Key Laboratory of Health Maintenance for Mechanical Equipment, Hunan University of Science and Technology, Xiangtan, Hunan 411201, China,Hunan Provincial Key Laboratory of Health Maintenance for Mechanical Equipment, Hunan University of Science and Technology, Xiangtan, Hunan 411201, China and Hunan Provincial Key Laboratory of Health Maintenance for Mechanical Equipment, Hunan University of Science and Technology, Xiangtan, Hunan 411201, China
Abstract:Facing the trend of miniaturization, multilayer,and high integration of print circuit board (PCB),to address the problems of missed detection,difficult feature extraction,high false detection rate,and poor detection performance of current PCB defect detection methods,this paper proposes a PCB small target defect detection method based on the improved YOLOv5 algorithm.It first uses the density-based spatial clustering of applications with noise (DBSCAN)+dichotomous K-means clustering algorithm for PCB small target defect characteristics to find a more suitable anchor frame.It then improves the feature extraction layer,feature fusion layer,and feature detection layer of the YOLOv5 network to enhance the extraction of key information and strengthen the fusion of deep and shallow information.This reduces the false and missed detection rate of PCB defects to improve the detection performance of the network.Finally,relevant comparative experiments are conducted on the publicly available PCB dataset.The results show that the improved model has an average accuracy () of 99.5% and a detection speed of 0.016 s.Compared with the Faster R-CNN, YOLOv3,and YOLOv4 network models,the detection accuracy is improved by 17.8%,9.7% and 5.3%,respectively,and the detection speed is improved by 0.846 s,0.120 s and 0.011 s,respectively,which satisfies the requirements of high precision and high-speed detection of PCB defects in actual industrial production sites.
Keywords:PCB defect detection  YOLOv5  clustering algorithm  attention mechanism  decoupled-head
点击此处可从《光电子.激光》浏览原始摘要信息
点击此处可从《光电子.激光》下载全文
设为首页 | 免责声明 | 关于勤云 | 加入收藏

Copyright©北京勤云科技发展有限公司  京ICP备09084417号