摘要
目标检测模型在电子元件生产环境中的实时检测能力不佳,为此采用GhostNet替换YOLOv5的主干网络.针对电子元件表面缺陷存在小目标及尺度变化较大的目标的情况,在YOLOv5主干网络中加入坐标注意力机制,在避免大量计算资源消耗的前提下增强感受野,将坐标信息嵌入通道注意力中以提升模型对目标的定位.使用加权双向特征金字塔网络结构替换YOLOv5特征融合模块中的特征金字塔网络(FPN)结构,提升多尺度加权特征的融合能力.在自制缺陷电子元件数据集上的实验结果表明,改进的GCB-YOLOv5模型平均精度达到93%,平均检测时间为33.2 ms,相比于原始YOLOv5模型,平均精度提高了15.0%,平均时间提升了7 ms,可以同时满足电子元件表面缺陷检测精度与速度的需求.
For the poor real-time detection capability of the current object detection model in the production environment of electronic components,GhostNet was used to replace the backbone network of YOLOv5.And for the existence of small objects and objects with large scale changes on the surface defects of electronic components,a coordinate attention module was added to the YOLOv5 backbone network,which enhanced the sensory field while avoiding the consumption of large computational resources.The coordinate information was embedded into the channel attention to improve the object localization of the model.The feature pyramid networks(FPN)structure in the YOLOv5 feature fusion module was replaced with a weighted bi-directional feature pyramid network structure,to enhance the fusion capability of multi-scale weighted features.Experimental results on the self-made defective electronic component dataset showed that the improved GCB-YOLOv5 model achieved an average accuracy of 93%and an average detection time of 33.2 ms,which improved the average accuracy by 15.0%and the average time by 7 ms compared with the original YOLOv5 model.And the improved model can meet the requirements of both accuracy and speed of electronic component surface defect detection.
作者
曾耀
高法钦
ZENG Yao;GAO Fa-qin(School of Information Science and Engineering,Zhejiang Sci-Tech University,Hangzhou 310018,China)
出处
《浙江大学学报(工学版)》
EI
CAS
CSCD
北大核心
2023年第3期455-465,共11页
Journal of Zhejiang University:Engineering Science
基金
浙江省教育厅一般科研项目(专业学位专项)(Y202147956).