基于改进YOLOv5的金属工件表面缺陷检测

王一, 龚肖杰, 程佳, 苏皓

包装工程(技术栏目) ›› 2022 ›› Issue (15) : 54-60.

PDF(1751 KB)
PDF(1751 KB)
包装工程(技术栏目) ›› 2022 ›› Issue (15) : 54-60. DOI: 10.19554/j.cnki.1001-3563.2022.15.006

基于改进YOLOv5的金属工件表面缺陷检测

  • 王一1, 龚肖杰2, 程佳2, 苏皓3
作者信息 +

Surface Defect Detection of Metal Workpiece Based on Improved YOLOv5

  • WANG Yi1, GONG Xiao-jie2, CHENG Jia2, SU Hao3
Author information +
文章历史 +

摘要

目的 针对金属工件表面小尺寸缺陷检测精度低的问题,提出以YOLOv5网络为基础,结合注意力机制与Ghost卷积的表面缺陷检测算法。方法 首先,在原网络中增加SE通道注意力模块,增加缺陷有关信息的权重,减少无用特征的干扰,从而提高目标的检测精度。然后,将网络中空间金字塔池化模块的池化方式由最大池化替换为软池化,使得在下采样激活映射中保留更多的特征信息,获得更好的检测精度。最后,采用Ghost卷积块替换主干网络中的常规卷积模块,提取丰富特征及冗余特征,以此提高模型效率。结果 改进后网络平均精度均值达到0.997 8,相比原网络提高了7.07个百分点。结论 该网络显著提高了金属工件表面缺陷检测的精度。

Abstract

The work aims to propose a surface defect detection method based on YOLOv5 network by combining attention mechanism and Ghost convolution to solve problem of low detection accuracy of small size defects on metal workpiece surface. First, the SE channel attention module was added to the original network. The weight of the defect-related information was increased and the interference of useless features was reduced to improve the detection accuracy of the target. Then, the maxpool module of the spatial pyramid pooling module in the network was replaced with Softpool so as to retain more feature information in the down sampling activation map and obtain a better classification accuracy. Finally, Ghost convolutional blocks were used to replace the conventional convolutional modules in the backbone network to extract rich and redundant features and improve the efficiency of the model. The mean average accuracy of the improved network reached 0.997 8, increased by 7.07% over the original network. The proposed network significantly improves the accuracy of surface defect detection in metal workpieces.

引用本文

导出引用
王一, 龚肖杰, 程佳, 苏皓. 基于改进YOLOv5的金属工件表面缺陷检测[J]. 包装工程(技术栏目). 2022(15): 54-60 https://doi.org/10.19554/j.cnki.1001-3563.2022.15.006
WANG Yi, GONG Xiao-jie, CHENG Jia, SU Hao. Surface Defect Detection of Metal Workpiece Based on Improved YOLOv5[J]. Packaging Engineering. 2022(15): 54-60 https://doi.org/10.19554/j.cnki.1001-3563.2022.15.006

基金

河北省高等学校科学技术研究项目(ZD2022114);唐山市科技计划项目(21130212C)

PDF(1751 KB)

Accesses

Citation

Detail

段落导航
相关文章

/