首页 | 本学科首页   官方微博 | 高级检索  
     检索      

基于YOLO v5的农田杂草识别轻量化方法研究
引用本文:冀汶莉,刘洲,邢海花.基于YOLO v5的农田杂草识别轻量化方法研究[J].农业机械学报,2024,55(1):212-222,293.
作者姓名:冀汶莉  刘洲  邢海花
作者单位:西安科技大学;海南师范大学
基金项目:国家自然科学基金项目(62066013)、海南省自然科学基金项目(622RC674)和西安市科技局农业科技创新工程项目(20193054YF042NS042)
摘    要:针对已有杂草识别模型对复杂农田环境下多种目标杂草的识别率低、模型内存占用量大、参数多、识别速度慢等问题,提出了基于YOLO v5的轻量化杂草识别方法。利用带色彩恢复的多尺度视网膜(Multi-scale retinex with color restoration,MSRCR)增强算法对部分图像数据进行预处理,提高边缘细节模糊的图像清晰度,降低图像中的阴影干扰。使用轻量级网络PP-LCNet重置了识别模型中的特征提取网络,减少模型参数量。采用Ghost卷积模块轻量化特征融合网络,进一步降低计算量。为了弥补轻量化造成的模型性能损耗,在特征融合网络末端添加基于标准化的注意力模块(Normalization-based attention module,NAM),增强模型对杂草和玉米幼苗的特征提取能力。此外,通过优化主干网络注意力机制的激活函数来提高模型的非线性拟合能力。在自建数据集上进行实验,实验结果显示,与当前主流目标检测算法YOLO v5s以及成熟的轻量化目标检测算法MobileNet v3-YOLO v5s、ShuffleNet v2-YOLO v5s比较,轻量化后杂草识别模型内存占用量为6.23MB,分别缩小54.5%、12%和18%;平均精度均值(Mean average precision,mAP)为97.8%,分别提高1.3、5.1、4.4个百分点。单幅图像检测时间为118.1ms,达到了轻量化要求。在保持较高模型识别精度的同时大幅降低了模型复杂度,可为采用资源有限的移动端设备进行农田杂草识别提供技术支持。

关 键 词:杂草识别  目标检测  YOLO  v5s  轻量化特征提取网络  Ghost卷积模块  注意力机制
收稿时间:2023/6/20 0:00:00

Lightweight Method for Identifying Farmland Weeds Based on YOLO v5
JI Wenli,LIU Zhou,XING Haihua.Lightweight Method for Identifying Farmland Weeds Based on YOLO v5[J].Transactions of the Chinese Society of Agricultural Machinery,2024,55(1):212-222,293.
Authors:JI Wenli  LIU Zhou  XING Haihua
Institution:Xi''an University of Science and Technology; Hainan Normal University
Abstract:The disadvantage of the existing weed recognition models for a variety of small target weeds is that they are low recognition rate, large volume, many parameters and slow detection speed in complex farmland environment. In order to solve this problem, a lightweight weed recognition method was proposed based on YOLO v5 model. Firstly, the multi-scale retinex with color restoration (MSRCR) algorithm was used to preprocess part of the image data to improve the image definition with blurred edge details and reduce the shadow interference in the image. On this basis, the feature extraction network in the recognition model was reset by using the lightweight network PP-LCNet to reduce the amount of model parameters. Secondly, the Ghost convolution model lightweight feature fusion network was used to further reduce the amount of calculation. In order to make up for the loss of model performance caused by lightweight, a normalization-based attention module (NAM) was added at the end of the feature fusion network to enhance the feature extraction ability of the model for weeds and corn seedlings. Finally, the activation function of the attention mechanism of the backbone network was optimized to improve the nonlinear fitting ability of the model. Experiments were carried out on the self-built dataset. The experimental results showed that compared with the current mainstream target detection algorithm YOLO v5s and the mature lightweight target detection algorithms MobileNetv3-YOLO v5s and ShuffleNet v2-YOLO v5s, the volume of the lightweight weed recognition model was 6.23MB, which was reduced by 54.5%, 12% and 18%, respectively. The mean average precision (mAP) was 97.8%, which was increased by 1.3 percentage points, 5.1 percentage points, and 4.4 percentage points, respectively. The detection time of single image was 118.1ms, which achieved the requirement of lightweight. It could significantly reduce the complexity of the model while maintaining high model recognition accuracy. The proposed method could identify corn seedling and weed accurately and rapidly, which provided technical support for the use of mobile devices with limited resources for farmland weed recognition.
Keywords:weed recognition  target detection  YOLO v5s  lightweight feature extraction network  Ghost convolution module  attention mechanisms
点击此处可从《农业机械学报》浏览原始摘要信息
点击此处可从《农业机械学报》下载免费的PDF全文
设为首页 | 免责声明 | 关于勤云 | 加入收藏

Copyright©北京勤云科技发展有限公司  京ICP备09084417号