• 《中国科学引文数据库(CSCD)》来源期刊
  • 中国科技期刊引证报告(核心版)期刊
  • 《中文核心期刊要目总览》核心期刊
  • RCCSE中国核心学术期刊

基于改进YOLOv5l的田间水稻稻穗识别

蔡竹轩, 蔡雨霖, 曾凡国, 岳学军

蔡竹轩, 蔡雨霖, 曾凡国, 等. 基于改进YOLOv5l的田间水稻稻穗识别[J]. 华南农业大学学报, 2024, 45(1): 108-115. DOI: 10.7671/j.issn.1001-411X.202209029
引用本文: 蔡竹轩, 蔡雨霖, 曾凡国, 等. 基于改进YOLOv5l的田间水稻稻穗识别[J]. 华南农业大学学报, 2024, 45(1): 108-115. DOI: 10.7671/j.issn.1001-411X.202209029
CAI Zhuxuan, CAI Yulin, ZENG Fanguo, et al. Rice panicle recognition in field based on improved YOLOv5l model[J]. Journal of South China Agricultural University, 2024, 45(1): 108-115. DOI: 10.7671/j.issn.1001-411X.202209029
Citation: CAI Zhuxuan, CAI Yulin, ZENG Fanguo, et al. Rice panicle recognition in field based on improved YOLOv5l model[J]. Journal of South China Agricultural University, 2024, 45(1): 108-115. DOI: 10.7671/j.issn.1001-411X.202209029

基于改进YOLOv5l的田间水稻稻穗识别

基金项目: 广州市科技计划(202206010088);省级大学生创新创业训练计划(S202210564011)
详细信息
    作者简介:

    蔡竹轩,硕士研究生,主要从事农业计算机应用技术研究,E-mail: czlanzhu@163.com

    通讯作者:

    岳学军,教授,博士,主要从事农业物联网、农业计算机应用技术研究,E-mail: yuexuejun@scau.edu.cn

  • 中图分类号: S511;TP391.4

Rice panicle recognition in field based on improved YOLOv5l model

  • 摘要:
    目的 

    引入YOLOv5l算法模型并对其进行改进,以实现大田环境下水稻稻穗的精准、高效、无损检测。

    方法 

    以田间水稻为研究对象,通过数码单镜反光相机采集水稻图像样本,人工标注后对原始图像进行离线数据增强扩充,构建田间水稻图像数据集;对YOLOv5l算法进行适应性改进,在空间金字塔池化(Spatial pyramid pooling,SPP)层前以及Cross-stage-sartial-connections (CSP) 层中置入有效通道注意力(Efficient channel attention,ECA)机制,并进行对比试验。选取最优算法作为基准模型进行注意力机制和数据增强消融试验,并测试得到性能最优模型。将改进YOLOv5l与YOLOv5l、YOLOv5x、SSD和Faster R-CNN进行对比试验。

    结果 

    在改进YOLOv5l的水稻识别框架中,将ECA置入网络SPP层前有更出色的性能。利用测试集图像检验模型,识别结果的平均精确率为93.63%,平均召回率为90.94%,总体平均精度可达95.05%。与未融合YOLOv5l算法相比,改进的YOLOv5l算法平均精度高3.03个百分点,图像的检测速率快8.20帧/ms;与YOLOv5x算法相比,改进的YOLOv5l算法平均精度提高0.62个百分点,图像的检测速率快5.41帧/ms,内存占用减少74.1MB,在田间水稻稻穗检测方面,改进YOLOv5l算法的综合性能优于其他算法。

    结论 

    将改进后的YOLOv5l算法引入大田环境下的水稻稻穗检测是可行的,具有较高的精确率、较快的检测速度和较小的内存占用,能够避免传统人工检测的主观性,对稻穗检测和水稻的无损估产具有重要意义。

    Abstract:
    Objective 

    YOLOv5l algorithm model was introduced and improved to realize accurate, efficient and nondestructive detection of rice panicles in field environment.

    Method 

    Taking rice in the field as the research object, rice image samples were collected by digital single-mirror reflex camera. The original image data were augmented and expanded offline after manual labeling, so as to construct an image data set for field rice. The YOLOv5l algorithm was improved adaptively, the effective channel attention (ECA) mechanism was put in front of the spatial pyramid pooling (SPP) layer and in the cross-stage-partial-connections (CSP) layer, and a comparative experiment was conducted. The optimal algorithm was selected as the benchmark model to carry out attention mechanism and data-enhanced ablation experiments, and the optimal performance model was obtained by testing. The improved YOLOv5l was compared with YOLOv5l, YOLOv5x, SSD and Faster R-CNN.

    Result 

    In the improved rice recognition framework of YOLOv5l, placing ECA before the network SPP layer resulted in better performance. Using test set images to verify the model, the average accuracy of recognition results was 93.63%, the average recall rate was 90.94%, and the overall average accuracy reached 95.05%. Compared with the non-fused YOLOv5l algorithm, the average accuracy of the improved YOLOv5l algorithm was 3.03 percent higher and the detection rate was 8.20 frames per ms faster. Compared with the YOLOv5x algorithm, the average precision of the improved YOLOv5l algorithm was improved by 0.62 percent, the detection rate was faster by 5.41 frames per ms, and the memory occupation was reduced by 74.1 MB. The results showed that the comprehensive performance of the improved YOLOv5l algorithm was better than other algorithms in rice panicle detection in the field.

    Conclusion 

    It is feasible to introduce the improved YOLOv5l algorithm into rice panicle detection in field environment. The algorithm has high accuracy, fast detection speed and small memory occupation, which can avoid the subjectivity of traditional manual detection and is of great significance for rice panicle detection and non-destructive yield estimation.

  • 图  1   原图像和数据增强后的图像

    Figure  1.   Original image and images after data augmentation

    图  2   ECA 流程图

    CHW分别表示特征的长、高、宽

    Figure  2.   Flow diagram of ECA

    C, H and W represents length, height and width of features, respectively

    图  3   改进YOLOv51网络总体框图

    Figure  3.   Overall block diagram of the improved YOLOv51 network

    图  4   3种融合ECA模块的YOLOv51模型

    Figure  4.   Three YOLOv5l models incorporating ECA modules

    图  5   不同网络模型平均精度曲线(a)和P-R曲线(b)

    Figure  5.   The average precision curves (a) and precision-recall curves (b) of different network models

    图  6   不同网络模型的损失值随迭代次数的变化曲线

    Figure  6.   Changes in the loss values of different network models with epoches

    图  7   识别结果示例

    白色框为未能准确识别的数据

    Figure  7.   Example of recognition results

    The white box is the data that cannot be accurately identified

    表  1   ECA模块融合结果对比

    Table  1   Comparison of ECA module fusion results %

    网络模型
    Network model
    精确率
    Precision
    召回率
    Recall
    平均精度
    Average precision
    YOLOv5l90.1988.9992.02
    ECA-YOLOv5l-Backbone93.5889.5694.47
    ECA-YOLOv5l-SPP93.6390.9495.05
    ECA-YOLOv5l-Neck92.6490.4694.33
    下载: 导出CSV

    表  2   YOLOv5l消融试验1)

    Table  2   YOLOv51 ablation experiment %

    注意力
    机制
    ECA
    数据增强
    Data
    augmentation
    精确率
    Precision
    召回率
    Recall
    平均精度
    Average
    precision
    ××88.3284.2188.18
    ×90.1988.9992.02
    93.6390.9495.05
     1) “√”和“×”分别表示使用和未使用
     1) “√” and “×” indicates used and unused respectively
    下载: 导出CSV

    表  3   不同网络模型检测性能对比

    Table  3   Comparison of different networks

    网络模型
    Network
    model
    平均精度/%
    Average
    precision
    检测速率/
    (帧·ms−1)
    Detection rate
    内存/MB
    Memory
    size
    Faster R-CNN86.6511.72109.0
    SSD88.4310.83100.0
    YOLOv5l92.0215.3089.3
    YOLOv5x94.4318.09166.0
    改进 YOLOv51
    Improved YOLOv51
    95.0523.5091.9
    下载: 导出CSV
  • [1] 郭雷风. 面向农业领域的大数据关键技术研究[D]. 北京: 中国农业科学院, 2016.
    [2] 章元, 许庆, 邬璟璟. 一个农业人口大国的工业化之路: 中国降低农村贫困的经验[J]. 经济研究, 2012, 47(11): 76-87.
    [3] 辛良杰, 李鹏辉. 中国居民口粮消费特征变化及安全耕地数量[J]. 农业工程学报, 2017, 33(13): 1-7.
    [4] 杨仕华, 廖琴. 中国水稻品种试验与审定[M]. 北京: 中国农业科学技术出版社, 2005.
    [5]

    IKEDA M, HIROSE Y, TAKASHI T, et al. Analysis of rice panicle traits and detection of QTLs using an image analyzing method[J]. Breeding Science, 2010, 60(1): 55-64. doi: 10.1270/jsbbs.60.55

    [6]

    ZHOU X G. First report of bacterial panicle blight of rice caused by Burkholderia glumae in South Africa[J]. Plant Disease, 2014, 98(4): 566.

    [7]

    ZHANG Y, LIU M, DANNENMANN M, et al. Benefit of using biodegradable film on rice grain yield and N use efficiency in ground cover rice production system[J]. Field Crops Research, 2017, 201: 52-59. doi: 10.1016/j.fcr.2016.10.022

    [8]

    BOIL K, KANG S K, SANG W G, et al. Variation of panicle differentiation stage by leaf growth according to rice cultivars and transplanting time[J]. Korean Journal of Crop Science, 2013, 58(4): 353-361. doi: 10.7740/kjcs.2013.58.4.353

    [9] 赵锋, 王克俭, 苑迎春. 基于颜色特征和AdaBoost算法的麦穗识别的研究[J]. 作物杂志, 2014(1): 141-144. doi: 10.3969/j.issn.1001-7283.2014.01.033
    [10] 范梦扬, 马钦, 刘峻明, 等. 基于机器视觉的大田环境小麦麦穗计数方法[J]. 农业机械学报, 2015, 46(S1): 234-239. doi: 10.6041/j.issn.1000-1298.2015.S0.038
    [11]

    ZHOU C Q, LIANG D, YANG X D, et al. Wheat ears counting in field conditions based on multi-feature optimization and TWSVM[J]. Frontiers in Plant Science, 2018, 9: 1024. doi: 10.3389/fpls.2018.01024.

    [12]

    DUAN L F, HUANG C L, CHEN G X, et al. Determination of rice panicle numbers during heading by mufti-angle imaging[J]. The Crop Journal, 2015, 3(3): 211-219. doi: 10.1016/j.cj.2015.03.002

    [13]

    LI Q Y, CAI J H, BERGER B, et al. Detecting spikes of wheat plants using neural networks with laws texture energy[J]. Plant methods, 2017, 13(1): 1-13. doi: 10.1186/s13007-016-0152-4

    [14]

    OLSEN P A, RAMAMURTHY K N, RIBERA J, et al. Detecting and counting panicles in sorghum images[C]//2018 IEEE 5th International Conference on Data Science and Advanced Analytics (DSAA). Turin, Italy: IEEE, 2019: 400-409.

    [15] 李静, 陈桂芬, 安宇. 基于优化卷积神经网络的玉米螟虫害图像识别[J]. 华南农业大学学报, 2020, 41(3): 110-116.
    [16] 顾伟, 王巧华, 李庆旭, 等. 基于改进SSD的棉种破损检测[J]. 华中农业大学学报, 2021, 40(3): 278-285.
    [17] 周云成, 许童羽, 邓寒冰, 等. 基于面向通道分组卷积网络的番茄主要器官实时识别[J]. 农业工程学报, 2018, 34(10): 153-162.
    [18]

    KOIRALA A, WALSH K B, WANG Z, et al. Deep learning for real-time fruit detection and orchard fruit load estimation: Benchmarking of ‘MangoYOLO’[J]. Precision Agriculture, 2019, 20(6): 1107-1135. doi: 10.1007/s11119-019-09642-0

    [19]

    TIAN Y N, YANG G D, WANG Z, et al. Apple detection during different growth stages in orchards using the improved YOLO-V3 model[J]. Computers and Electronics in Agriculture, 2019, 157: 417-426. doi: 10.1016/j.compag.2019.01.012

    [20] 张领先, 陈运强, 李云霞, 等. 基于卷积神经网络的冬小麦麦穗检测计数系统[J]. 农业机械学报, 2019, 50(3): 144-150. doi: 10.6041/j.issn.1000-1298.2019.03.015
    [21] 彭文, 兰玉彬, 岳学军, 等. 基于深度卷积神经网络的水稻田杂草识别研究[J]. 华南农业大学学报, 2020, 41(6): 75-81.
    [22] 黄小杭, 梁智豪, 何子俊, 等. 基于YOLOv2的莲蓬快速识别研究[J]. 现代农业科技, 2018(13): 164-167.
    [23] 彭红星, 黄博, 邵园园, 等. 自然环境下多类水果采摘目标识别的通用改进SSD模型[J]. 农业工程学报, 2018, 34(16): 155-162. doi: 10.11975/j.issn.1002-6819.2018.16.020
    [24] 张洋. 基于深度学习的水稻种粒缺陷识别及重叠分布千粒重测量研究[D]. 扬州: 扬州大学, 2021.
    [25] 马志宏, 贡亮, 林可, 等. 基于稻穗几何形态模式识别的在穗籽粒数估测[J]. 上海交通大学学报, 2019, 53(2): 239-246.
    [26]

    WANG Q L, WU B G, ZHU P F, et al. ECA-Net: Efficient channel attention for deep convolutional neural networks[C]//2020 IEEE/CVF Conference on Computer Vision and Pattern Recognition. Seattle, USA: IEEE, 2020: 11531-11539.

    [27]

    HU J, SHEN L, ALBANIE S, et al. Squeeze-and-excitation networks[J]. IEEE Transactions on Pattern Analysis and Machine Intelligence, 2020, 42(8): 2011-2023. doi: 10.1109/TPAMI.2019.2913372

图(7)  /  表(3)
计量
  • 文章访问数:  233
  • HTML全文浏览量:  25
  • PDF下载量:  37
  • 被引次数: 0
出版历程
  • 收稿日期:  2022-09-21
  • 网络出版日期:  2023-11-22
  • 发布日期:  2023-07-09
  • 刊出日期:  2024-01-09

目录

    /

    返回文章
    返回