[1]刘鸿瑜,袁国武.基于改进 YOLOv5s 的烟支外观缺陷检测方法[J].计算机技术与发展,2022,32(08):161-167.[doi:10. 3969 / j. issn. 1673-629X. 2022. 08. 026]
 LIU Hong-yu,YUAN Guo-wu.Detection of Cigarette Appearance Defects Based on Improved YOLOv5s[J].,2022,32(08):161-167.[doi:10. 3969 / j. issn. 1673-629X. 2022. 08. 026]
点击复制

基于改进 YOLOv5s 的烟支外观缺陷检测方法()
分享到:

《计算机技术与发展》[ISSN:1006-6977/CN:61-1281/TN]

卷:
32
期数:
2022年08期
页码:
161-167
栏目:
应用前沿与综合
出版日期:
2022-08-10

文章信息/Info

Title:
Detection of Cigarette Appearance Defects Based on Improved YOLOv5s
文章编号:
1673-629X(2022)08-0161-07
作者:
刘鸿瑜袁国武
云南大学 信息学院,云南 昆明 650504
Author(s):
LIU Hong-yuYUAN Guo-wu
School of Information Science and Engineering,Yunnan University,Kunming 650504,China
关键词:
烟支外观缺陷检测YOLOv5s数据增强注意力机制
Keywords:
cigaretteappearance defects detectionYOLOv5sdata enhancementattention mechanism
分类号:
TP391
DOI:
10. 3969 / j. issn. 1673-629X. 2022. 08. 026
摘要:
烟支外观缺陷自动检测是卷烟厂产品质量检测中的重要步骤, 它对提升卷烟质量有很大的作用。 针对烟支自动化生产过程中生产速度快、要求检测精度和分类精确率高等现状, 提出了一种基于改进 YOLOv5s 的烟支外观缺陷检测方法。 首先,使用 LabelImg 工具对原数据进行标记,并进行合适的数据增强;其次,在 YOLOv5s 网络的主干模块引入了通道注意力机制,增强模型的表达能力;然后, 优化激活函数, 采用 Swish, 提升网络分类效果;最后, 优化损失函数,采用 DIoU, 以更好地对小目标进行检测。 实验结果表明, 改进的 YOLOv5s 方法在烟支外观数据集上的精确率达到了? 90. 9%,召回率达到了 86. 8%,平均检测精度达到了 94. 0%。 与原始的 YOLOv5s 网络对比,精确率上升了 4. 1%,召回率上升了 4. 5%,平均检测精度上升了 3. 3%。 而在平均检测速度上面,改进的 YOLOv5s 和原始的 YOLOv5s 网络相比只增加了 0. 1 ms/ 支,也能满足目前烟支生产流水线的检测速度需要。 因此,改进后的 YOLOv5s 算法提升了传统烟支自动化生产过程中的检测精度和速度,能投入到烟支外观缺陷检测应用中。
Abstract:
Automatic detection of cigarette appearance defects is an important step in the product quality detection of cigarette factories,which plays a great role in improving the quality of cigarettes. Aiming at the present situation of fast production speed,high detection precision and classification precision in the automatic production process of cigarettes,a cigarette appearance defects detection method basedon improved YOLOv5s is proposed. Firstly,the LabelImg tool is used to mark the original data and perform appropriate data enhancement. Secondly,the channel attention mechanism is introduced in the backbone module of the YOLOv5s network to enhance the expression ability of the model. Thirdly,the activation function is changed to Swish to improve the network classification effect. Finally,theloss function is changed to DIoU to better detect small targets. Experiment shows that the precision of the improved YOLOv5s method oncigarette appearance data set is 90. 9%,the recall rate is 86. 8%,and the average detection precision is 94. 0%. Compared with the original YOLOv5s network,the precision rate has increased by 4. 1%,the recall rate has increased by 4. 5%,and the average detection precision has increased by 3. 3%. In terms of the average detection speed,the improved YOLOv5s? only increases 0. 1 ms per cigarette compared with the original YOLOv5s network,which can also meet the detection speed requirements of the current cigarette production line. Therefore, the improved YOLOv5s algorithm improves the detection precision and speed in the traditional automated production processof cigarettes,and can be used in the application of cigarette appearance defects detection.
更新日期/Last Update: 2022-08-10