机电工程技术2024,Vol.53Issue(6):209-215,7.DOI:10.3969/j.issn.1009-9492.2024-00024
改进YOLOv7的玻璃表面缺陷检测方法研究
Research on Improved Detection Method of Glass Surface Defect of YOLOv7
摘要
Abstract
Aiming at the defects such as large scratches,small scratches,scratches and foreign bodies generated during the deep processing of electrode and non-electrode areas on the glass edge surface of electronic products,a small sample detection method for glass surface defects is proposed based on improved YOLOv7.First of all,convolutional block attention(CBAM)is added to the backbone network module to improve channel attention and spatial attention,solve the problem of small defect area on the glass surface,large distribution difference in the image,and improve the feature representation of the convolutional neural network learning robustness in the defect region.Secondly,considering the small number of defective samples and unbalanced sample size in the industrial production process,image enhancement methods such as random Gaussian noise,Mixup,random fill image and random splicing are adopted to expand and equalize the samples.Finally,a pre-detection head is added for thin and light scratch detection.Combined with the other three prediction heads,the four-prediction head structure can effectively alleviate the negative impact of scale variance caused by excessively different objects.The experimental results show that compared with the original algorithm,the average accuracy of the improved YOLOv7 algorithm is increased by 6.15%(mAP),and the detection effect is better than that of the current YOLOv7 network,which can improve the detection accuracy of small samples of glass surface defects in the industrial production process to a certain extent.关键词
YOLOv7/玻璃表面缺陷检测/卷积注意力模块/图像增强/四预测头结构Key words
YOLOv7/glass surface defect detection/convolutional attention module/image enhancement/four prediction head structure分类
信息技术与安全科学引用本文复制引用
宋吕明,刘明芹,李祥宾,朱雅,王家超..改进YOLOv7的玻璃表面缺陷检测方法研究[J].机电工程技术,2024,53(6):209-215,7.基金项目
江苏省海洋资源开发研究院开放课题(JSIMR201810) (JSIMR201810)