|
|
|
| Improved YOLOv5s based target detection algorithm for tobacco stem material |
Jiaming LV( ),Feng ZHANG*( ),Yabo LUO |
| School of Mechanical and Electronic Engineering, Wuhan University of Technology, Wuhan 430070, China |
|
|
|
Abstract There are problems such as background interference, multiple and irregularly shaped targets, target overlap, and rapid falling speeds during the transportation of tobacco stems in the tobacco production line. A tobacco stem material target detection algorithm based on improved YOLOv5s was proposed. The backbone and head of the YOLOv5s network were optimized, significantly improving the detection accuracy and substantially reducing the model size. Firstly, the network’s backbone was optimized into the RepViT-m1 structure, enhancing the information extraction efficiency. Secondly, reparameterization techniques were used to better capture the target features, thus improving the detection precision. Dynamic Head, a target detection head based on the attention mechanism, was introduced to make the model be focused on the potential target area to further improve the detection accuracy. Experimental results on self-constructed tobacco stem dataset demonstrated the effectiveness of the improved YOLOv5s model. Compared with the original YOLOv5s model, the improved model achieved an mAP@0.50 of 96.1%, which was improved by 5.8 percentage points; and achieved an mAP@0.50:0.95 of 94.7%, which was improved by 5.7 percentage points. Furthermore, the model size was 12.1 MB, which was decreased by 12.3%. The results provide reliable and accurate support for real-time monitoring systems.
|
|
Received: 14 November 2023
Published: 25 November 2024
|
|
|
| Fund: 国家自然科学基金资助项目(51875430). |
|
Corresponding Authors:
Feng ZHANG
E-mail: 345815526@qq.com;zhangfengie@whut.edu.cn
|
基于改进YOLOv5s的烟梗物料目标检测算法
在烟草生产线中烟梗输送下落过程中,存在背景信息干扰、目标数量多且形状不一、目标堆叠、下落速度过快等问题,传统图像处理算法难以解决. 提出基于改进YOLOv5s的烟梗物料目标检测算法. 对YOLOv5s网络的骨干和头部进行优化改进,显著提高检测精度,大幅缩小模型大小;将骨干网络优化为RepViT-m1结构,以提高信息提取的效率;采用重参数化技术,以更好地捕捉目标的特征,提高检测的精确性;引入基于注意力机制的目标检测头Dynamic Head,使模型更专注于潜在的目标区域,进一步提高检测精度. 实验结果表明:在自建的烟梗数据集上,相较于原YOLOv5s模型,改进YOLOv5s模型的mAP@0.50为96.1%,提高了5.8个百分点;mAP@0.50∶0.95为94.7%,提高了5.7个百分点;模型大小为12.1 MB,减少了12.3%. 模型可以为实时监控系统提供可靠且精确的支持.
关键词:
目标检测,
YOLOv5s,
烟梗检测,
RepViT,
重参数化,
注意力机制
|
|
| [1] |
高尊华, 鲍文华, 程红军, 等 梗丝结构对卷烟质量稳定性的影响[J]. 烟草科技, 2007, (2): 5- 7 GAO Zunhua, BAO Wenhua, CHENG Hongjun, et al Influence of cut stem structure on quality stability of cigarette[J]. Tobacco Science and Technology, 2007, (2): 5- 7
doi: 10.3969/j.issn.1002-0861.2007.02.001
|
|
|
| [2] |
崔云月, 管一弘, 孙娜, 等 BP神经网络在烟梗长短梗率检测中的应用[J]. 软件导刊, 2021, 20 (2): 63- 67 CUI Yunyue, GUAN Yihong, SUN Na, et al The application of BP neural network in the determination of the stalk length and stem rate[J]. Software Guide, 2021, 20 (2): 63- 67
doi: 10.11907/rjdk.202478
|
|
|
| [3] |
杨耀伟, 张月华, 崔廷, 等 基于机器视觉和深度学习的烟梗识别方法[J]. 计算机应用, 2022, 42 (Suppl.1): 118- 122 YANG Yaowei, ZHANG Yuehua, CUI Ting, et al Tobacco stem recognition method based on machine vision and deep learning[J]. Journal of Computer Applications, 2022, 42 (Suppl.1): 118- 122
|
|
|
| [4] |
肖雷雨, 王澍, 刘渊根, 等 基于深度学习技术的烟梗形态分类与识别[J]. 烟草科技, 2021, 54 (6): 65- 74 XIAO Leiyu, WANG Shu, LIU Yuangen, et al Classification and identification of tobacco stem morphology based on deep learning technology[J]. Tobacco Science and Technology, 2021, 54 (6): 65- 74
|
|
|
| [5] |
刘新宇, 郝同盟, 张红涛, 等 基于改进YOLOv3网络的烟梗识别定位方法[J]. 食品与机械, 2022, 38 (3): 103- 109 LIU Xinyu, HAO Tongmeng, ZHANG Hongtao, et al Cigarette stem identification and location method based on improved YOLOv3 network[J]. Food and Machinery, 2022, 38 (3): 103- 109
|
|
|
| [6] |
苗新法, 刘宝莲, 李晓琴, 等. 改进YOLOV5s的铁轨裂纹目标检测算法[EB/OL]. [2023-11-03]. http://kns.cnki.net/kcms/detail/11.2127.TP.20230825.1227.008.html.
|
|
|
| [7] |
崔丽群, 曹华维. 基于改进YOLOv5的遥感图像目标检测[EB/OL]. [2023-11-03]. https://doi.org/10.19678/j.issn.1000-3428.0067790.
|
|
|
| [8] |
金鑫, 庄建军, 徐子恒 轻量化YOLOv5s网络车底危险物识别算法[J]. 浙江大学学报: 工学版, 2023, 57 (8): 1516- 1526 JIN Xin, ZHUANG Jianjun, XU Ziheng Lightweight YOLOv5s network-based algorithm for identifying hazardous objects under vehicles[J]. Journal of Zhejiang University: Engineering Science, 2023, 57 (8): 1516- 1526
|
|
|
| [9] |
ZHANG Z H, ZUO Z Y, LI Z, et al Real-time wheat unsound kernel classification detection based on improved YOLOv5[J]. Journal of Advanced Computational Intelligence and Intelligent Informatics, 2023, 27 (3): 474- 480
doi: 10.20965/jaciii.2023.p0474
|
|
|
| [10] |
HONG W W, MA Z H, YE B L, et al Detection of green asparagus in complex environments based on the improved YOLOv5 algorithm[J]. Sensors, 2023, 23 (3): 1562
doi: 10.3390/s23031562
|
|
|
| [11] |
YUAN J X, ZHENG X Z, PENG L W, et al Identification method of typical defects in transmission lines based on YOLOv5 object detection algorithm[J]. Energy Reports, 2023, (9): 323- 332
|
|
|
| [12] |
ZHOU T, YANG J. An improved YOLOv5 algorithm for construction solid waste detection [C]// IEEE 3rd International Conference on Electronic Technology , Communication and Information . Changchun: IEEE, 2023: 473–477.
|
|
|
| [13] |
FU Z. Vision transformer: vit and its derivatives [EB/OL]. [2023-08-24]. https://arxiv.org/abs/2205.11239.
|
|
|
| [14] |
LI C H, ZHANG C N. CNN or vit? revisiting vision transformers through the lens of convolution [EB/OL]. [2023-11-03]. https://arxiv.org/abs/2309.05375.
|
|
|
| [15] |
WANG A, CHEN H, LIN Z J, et al. Repvit: revisiting mobile cnn from vit perspective [EB/OL]. [2023-11-03]. https://arxiv.org/abs/2307.09283.
|
|
|
| [16] |
DING X H, ZHANG X Y, MA N N, et al. Repvgg: making vgg-style convnets great again [C]// IEEE/CVF Conference on Computer Vision and Pattern Recognition . Nashville: IEEE, 2021: 13733–13742.
|
|
|
|
Viewed |
|
|
|
Full text
|
|
|
|
|
Abstract
|
|
|
|
|
Cited |
|
|
|
|
| |
Shared |
|
|
|
|
| |
Discussed |
|
|
|
|