浙江农业学报 ›› 2025, Vol. 37 ›› Issue (9): 1933-1942.DOI: 10.3969/j.issn.1004-1524.20240836
刘睿1(
), 王丽娟2,*(
), 王秋皓1, 林旭东1, 郭启航1, 许多霖1, 李文妍1
收稿日期:2024-09-13
出版日期:2025-09-25
发布日期:2025-10-15
作者简介:王丽娟,E-mail:1jwang@gdut.edu.cn通讯作者:
王丽娟
基金资助:
LIU Rui1(
), WANG Lijuan2,*(
), WANG Qiuhao1, LIN Xudong1, GUO Qihang1, XU Duolin1, LI Wenyan1
Received:2024-09-13
Online:2025-09-25
Published:2025-10-15
Contact:
WANG Lijuan
摘要:
茶叶种植中病虫害检测主要依靠传统的人工方法,存在效率低、准确性差的问题,本文提出一种改进的YOLOv8s模型,旨在实现茶叶病虫害的实时、高效检测。该模型构建了一个包含5类常见病虫害的数据集,通过引入卷积块注意力模块(CBAM),增强模型的表征能力,提升重要特征提取能力,提高了模型的识别精度;将FasterNet作为骨干网络,在保持高精度的同时缩短检测时间,降低模型复杂度;采用WIoU损失函数,有效解决了在图像处理过程中物体重叠的问题,提高了模型在实际情境下的检测性能。研究结果表明,与传统的YOLOv8s模型相比,改进后的YOLOv8s-CFW模型平均精度均值达到98.2%,提升3.7百分点,每秒浮点运算数(FLOPS)和参数量分别减少43.0%和45.2%,检测时间缩短了34.8%。改进模型在精度与轻量化方面均有显著提升,能满足实时检测需求,为茶叶病虫害的自动化检测提供了可靠的理论支持。
中图分类号:
刘睿, 王丽娟, 王秋皓, 林旭东, 郭启航, 许多霖, 李文妍. 基于改进YOLOv8s的茶叶病虫害检测[J]. 浙江农业学报, 2025, 37(9): 1933-1942.
LIU Rui, WANG Lijuan, WANG Qiuhao, LIN Xudong, GUO Qihang, XU Duolin, LI Wenyan. Detection of pest and disease in tea based on improved YOLOv8s[J]. Acta Agriculturae Zhejiangensis, 2025, 37(9): 1933-1942.
图2 改进前的模型结构图 Detect,检测头;Concat,特征图拼接操作;Upsample,上采样操作;C2f,特征提取模块;Conv,卷积操作;SPPF,快速空间金字塔池化层。
Fig.2 Structure diagram of model before improvement Detect, Detection head; Concat, Stitching operation of feature map; Upsample, Upsampling operation; C2f, Feature extraction module; Conv, Convolution operation; SPPF, Spatial pyramid pooling-fast layer.
图4 FasterNet结构图 h,输入特征图的高度;w,输入特征图的宽度;c1~c4,第1至第4阶段输出的通道数;l1~l4,第1至第4阶段堆叠的块数。
Fig.4 Structure of FasterNet h,Height of the input feature map;w,Width of the input feature map;c1-c4,Number of channels output in stages 1 to 4;l1-l4,Number of blocks stacked in stages 1 to 4.
图6 改进后的模型结构图 Backbone,骨干网络;Neck,特征融合层;Head,输出检测头;Concat,特征图拼接操作;Upsample,上采样操作;C2f,特征提取模块;Conv,卷积操作;SPPF,快速空间金字塔池化层。
Fig.6 Structure diagram of model after improvement Backbone,Backbone network;Neck,Feature fusion layer;Head,Output detection head;Concat,Stitching operation of feature map; Upsample, Upsampling operation;C2f,Feature extraction module;Conv,Convolution operation;SPPF,Spatial pyramid pooling-fast layer.
| 模型 Model | mAP/% | Params/M | FLOPS/109 | 检测时间 Detection time/ms | 模型大小 Model size/MB |
|---|---|---|---|---|---|
| YOLOv8s | 94.4 | 11.13 | 28.4 | 4.6 | 22.5 |
| YOLOv8s-CBAM | 96.2 | 11.39 | 28.7 | 4.5 | 23.1 |
| YOLOv8s-FasterNet | 96.5 | 6.08 | 16.1 | 2.9 | 12.4 |
| YOLOv8s-WIoU | 95.4 | 11.13 | 28.4 | 4.5 | 22.5 |
| YOLOv8s-CBAM-FasterNet | 96.8 | 6.10 | 16.2 | 3.0 | 12.4 |
| YOLOv8s-FasterNet-WIoU | 96.5 | 6.08 | 16.1 | 3.0 | 12.4 |
| YOLOv8s-CBAM-WIoU | 96.8 | 11.39 | 28.7 | 4.5 | 23.1 |
| YOLOv8s-CFW | 98.2 | 6.10 | 16.2 | 3.0 | 12.4 |
表1 消融试验结果对比
Table 1 Comparison of ablation experiment results
| 模型 Model | mAP/% | Params/M | FLOPS/109 | 检测时间 Detection time/ms | 模型大小 Model size/MB |
|---|---|---|---|---|---|
| YOLOv8s | 94.4 | 11.13 | 28.4 | 4.6 | 22.5 |
| YOLOv8s-CBAM | 96.2 | 11.39 | 28.7 | 4.5 | 23.1 |
| YOLOv8s-FasterNet | 96.5 | 6.08 | 16.1 | 2.9 | 12.4 |
| YOLOv8s-WIoU | 95.4 | 11.13 | 28.4 | 4.5 | 22.5 |
| YOLOv8s-CBAM-FasterNet | 96.8 | 6.10 | 16.2 | 3.0 | 12.4 |
| YOLOv8s-FasterNet-WIoU | 96.5 | 6.08 | 16.1 | 3.0 | 12.4 |
| YOLOv8s-CBAM-WIoU | 96.8 | 11.39 | 28.7 | 4.5 | 23.1 |
| YOLOv8s-CFW | 98.2 | 6.10 | 16.2 | 3.0 | 12.4 |
| 模型 Model | 平均精度Average precision | 平均精度 均值 mAP | |||||
|---|---|---|---|---|---|---|---|
| 藻斑病 Algal spot | 茶轮斑病 Brown blight | 云纹叶枯病 Gray blight | 健康叶片 Healthy leaf | 茶角盲蝽病 Helopeltis | 红斑病 Red spot | ||
| YOLOv8s | 95.5 | 93.7 | 95.8 | 95.1 | 95.2 | 91.4 | 94.5 |
| YOLOv8s-CFW | 99.1 | 97.4 | 99.5 | 98.9 | 98.9 | 95.4 | 98.2 |
表2 模型改进前后对茶叶病虫害的检测精度对比
Table 2 Comparison of detection precision of pests and diseases in tea before and after improving the model %
| 模型 Model | 平均精度Average precision | 平均精度 均值 mAP | |||||
|---|---|---|---|---|---|---|---|
| 藻斑病 Algal spot | 茶轮斑病 Brown blight | 云纹叶枯病 Gray blight | 健康叶片 Healthy leaf | 茶角盲蝽病 Helopeltis | 红斑病 Red spot | ||
| YOLOv8s | 95.5 | 93.7 | 95.8 | 95.1 | 95.2 | 91.4 | 94.5 |
| YOLOv8s-CFW | 99.1 | 97.4 | 99.5 | 98.9 | 98.9 | 95.4 | 98.2 |
图7 改进模型前后对茶叶病虫害的检测效果 图中数值为置信度。
Fig.7 Detection effect of pests and diseases in tea before and after improving the model The numbers in the figure represent confidence levels.
| 模型 Model | mAP/% | Params/106 | FLOPS/109 | 检测时间 Detection time/ms | 模型大小 Model size/MB |
|---|---|---|---|---|---|
| YOLOV3-tiny | 94.0 | 8.68 | 12.9 | 2.7 | 17.4 |
| YOLOv5s | 94.2 | 7.03 | 15.8 | 5.9 | 14.5 |
| YOLOv7 | 92.9 | 36.51 | 103.2 | 12.5 | 74.8 |
| YOLOv8s | 94.5 | 11.13 | 28.4 | 4.6 | 22.5 |
| YOLOv9s | 93.7 | 9.60 | 38.7 | 4.7 | 20.3 |
| YOLOv8s-CFW | 98.2 | 6.10 | 16.2 | 3.0 | 12.4 |
表3 不同模型的参数
Table 3 Parameters of different models
| 模型 Model | mAP/% | Params/106 | FLOPS/109 | 检测时间 Detection time/ms | 模型大小 Model size/MB |
|---|---|---|---|---|---|
| YOLOV3-tiny | 94.0 | 8.68 | 12.9 | 2.7 | 17.4 |
| YOLOv5s | 94.2 | 7.03 | 15.8 | 5.9 | 14.5 |
| YOLOv7 | 92.9 | 36.51 | 103.2 | 12.5 | 74.8 |
| YOLOv8s | 94.5 | 11.13 | 28.4 | 4.6 | 22.5 |
| YOLOv9s | 93.7 | 9.60 | 38.7 | 4.7 | 20.3 |
| YOLOv8s-CFW | 98.2 | 6.10 | 16.2 | 3.0 | 12.4 |
| [1] | 陈禹, 吴雪梅, 张珍, 等. 基于改进YOLOv5s的自然环境下茶叶病害识别方法[J]. 农业工程学报, 2023, 39(24): 185-194. |
| CHEN Y, WU X M, ZHANG Z, et al. Method for identifying tea diseases in natural environment using improved YOLOv5s[J]. Transactions of the Chinese Society of Agricultural Engineering, 2023, 39(24): 185-194. (in Chinese with English abstract) | |
| [2] | 叶荣, 马自飞, 高泉, 等. 基于改进YOLOv5s-ECA-ASFF算法的茶叶病害目标检测[J]. 中国农机化学报, 2024, 45(1): 244-251. |
| YE R, MA Z F, GAO Q, et al. Target detection of tea disease based on improved YOLOv5s-ECA-ASFF algorithm[J]. Journal of Chinese Agricultural Mechanization, 2024, 45(1): 244-251. (in Chinese with English abstract) | |
| [3] | 杨佳昊, 左昊轩, 黄祺成, 等. 基于YOLO v5s的作物叶片病害检测模型轻量化方法[J]. 农业机械学报, 2023, 54(S1): 222-229. |
| YANG J H, ZUO H X, HUANG Q C, et al. Lightweight method for crop leaf disease detection model based on YOLO v5s[J]. Transactions of the Chinese Society for Agricultural Machinery, 2023, 54(S1): 222-229. (in Chinese with English abstract) | |
| [4] | 时雷, 杨程凯, 雷镜楷, 等. 基于改进YOLO v8s的小麦小穗赤霉病检测研究[J]. 农业机械学报, 2024, 55(7): 280-289. |
| SHI L, YANG C K, LEI J K, et al. Wheat spikelet detection of Fusarium head blight based on improved YOLO v8s[J]. Transactions of the Chinese Society for Agricultural Machinery, 2024, 55(7): 280-289. (in Chinese with English abstract) | |
| [5] | 李小祥, 张洁, 秦柯贝, 等. 基于改进YOLOv8的轻量级复杂环境苹果叶片病害检测方法[J]. 南京农业大学学报, 2025, 48(3): 734-743. |
| LI X X, ZHANG J, QIN K B, et al. A lightweight method for apple leaf disease detection in complex environments based on improved YOLOv8[J]. Journal of Nanjing Agricultural University, 2025, 48(3): 734-743. (in Chinese with English abstract) | |
| [6] | 廖娟, 刘凯旋, 杨玉青, 等. 基于RDN-YOLO的自然环境下水稻病害识别模型研究[J]. 农业机械学报, 2024, 55(8): 233-242. |
| LIAO J, LIU K X, YANG Y Q, et al. Rice disease recognition in natural environment based on RDN-YOLO[J]. Transactions of the Chinese Society for Agricultural Machinery, 2024, 55(8): 233-242. (in Chinese with English abstract) | |
| [7] | 赵兴, 岳喜申, 邬欢欢. 基于改进YOLO v5的苹果叶部病害检测[J]. 江苏农业科学, 2024, 52(8): 183-192. |
| ZHAO X, YUE X S, WU H H. Detection of apple leaf disease based on improved YOLOv5[J]. Jiangsu Agricultural Sciences, 2024, 52(8): 183-192. (in Chinese with English abstract) | |
| [8] | 左昊轩, 黄祺成, 杨佳昊, 等. 基于改进YOLO v5s的作物黄化曲叶病检测方法[J]. 农业机械学报, 2023, 54(S1): 230-238. |
| ZUO H X, HUANG Q C, YANG J H, et al. Improved YOLO v5s-based detection method for crop yellow leaf curl virus disease[J]. Transactions of the Chinese Society for Agricultural Machinery, 2023, 54(S1): 230-238. (in Chinese with English abstract) | |
| [9] | 晁晓菲, 池敬柯, 张继伟, 等. 基于PSA-YOLO网络的苹果叶片病斑检测[J]. 农业机械学报, 2022, 53(8): 329-336. |
| CHAO X F, CHI J K, ZHANG J W, et al. Apple leaf lesion detection based on PSA-YOLO network[J]. Transactions of the Chinese Society for Agricultural Machinery, 2022, 53(8): 329-336. (in Chinese with English abstract) | |
| [10] | 韩鑫, 徐衍向, 封润泽, 等. 基于红外热成像和改进YOLO v5的作物病害早期识别[J]. 农业机械学报, 2023, 54(12): 300-307. |
| HAN X, XU Y X, FENG R Z, et al. Early identification of crop diseases based on infrared thermography and improved YOLOv5[J]. Transactions of the Chinese Society for Agricultural Machinery, 2023, 54(12): 300-307. (in Chinese with English abstract) | |
| [11] | 张林鍹, 巴音塔娜, 曾庆松. 基于StyleGAN2-ADA和改进YOLO v7的葡萄病害检测方法[J]. 农业机械学报, 2024, 55(1):241-252. |
| ZHANG L X, BA Y, ZENG Q S. Grape disease detection algorithm based on StyleGAN2-ADA and improved YOLO v7[J]. Transactions of the Chinese Society for Agricultural Machinery, 2024, 55(1):241-252. (in Chinese with English abstract) | |
| [12] | 孙道宗, 刘欢, 刘锦源, 等. 基于改进YOLOv4模型的茶叶病害识别[J]. 西北农林科技大学学报(自然科学版), 2023, 51(9): 145-154. |
| SUN D Z, LIU H, LIU J Y, et al. Recognition of tea diseases based on improved YOLOv4 model[J]. Journal of Northwest A & F University(Natural Science Edition), 2023, 51(9): 145-154. (in Chinese with English abstract) | |
| [13] | 范阳旭. 基于不可分小波和改进YOLOv8的交通标志检测算法[J]. 图像与信号处理, 2024, 13(2): 179-189. |
| FAN Y X. Traffic sign detection algorithm based on non-separable wavelets and improved YOLOv8[J]. Journal of Image and Signal Processing, 2024, 13(2): 179-189. (in Chinese with English abstract) | |
| [14] | 王美华, 吴振鑫, 周祖光. 基于注意力改进CBAM的农作物病虫害细粒度识别研究[J]. 农业机械学报, 2021, 52(4): 239-247. |
| WANG M H, WU Z X, ZHOU Z G. Fine-grained identification research of crop pests and diseases based on improved CBAM via attention[J]. Transactions of the Chinese Society for Agricultural Machinery, 2021, 52(4): 239-247. (in Chinese with English abstract) | |
| [15] | CHEN J Q, MA A Q, HUANG L X, et al. Efficient and lightweight grape and picking point synchronous detection model based on key point detection[J]. Computers and Electronics in Agriculture, 2024, 217: 108612. |
| [16] | FU Y Y, RAN T, XIAO W D, et al. GD-YOLO: an improved convolutional neural network architecture for real-time detection of smoking and phone use behaviors[J]. Digital Signal Processing, 2024, 151: 104554. |
| [17] | 张学立, 贾新春, 王美刚, 等. 安全帽与反光衣的轻量化检测: 改进YOLOv5s的算法[J]. 计算机工程与应用, 2024, 60(1): 104-109. |
| ZHANG X L, JIA X C, WANG M G, et al. Lightweight detection of helmets and reflective clothings: improved YOLOv5s algorithm[J]. Computer Engineering and Applications, 2024, 60(1): 104-109. (in Chinese with English abstract) |
| [1] | 朱铭敏, 张国平, 谭建军, 孙玲姣, 朱黎, 焦洁. 基于YOLOv5s的轻量级茶叶嫩芽终端检测模型[J]. 浙江农业学报, 2024, 36(6): 1413-1424. |
| [2] | 李大华, 孔舒, 李栋, 于晓. 基于改进SSD模型的柑橘叶片病害轻量化检测模型[J]. 浙江农业学报, 2024, 36(3): 662-670. |
| [3] | 范为培, 于晓明, 沈凤龙, 王亮, 王星. 基于改进GhostNet V2的轻量化熊蜂图像分类模型[J]. 浙江农业学报, 2024, 36(12): 2832-2845. |
| [4] | 俞国红, 郑航, 叶云翔, 薛向磊, 傅童. 轻便自走式采茶机的设计与试验[J]. 浙江农业学报, 2023, 35(9): 2233-2239. |
| [5] | 张宁, 陶荣浩, 刘佩诗, 胡含秀, 高琳琳, 郭龙, 祝尊友, 马友华. 不同种类有机肥配施化肥对茶叶生长、品质和土壤肥力的影响[J]. 浙江农业学报, 2023, 35(8): 1844-1852. |
| [6] | 邓美华, 高娜, 吴林土, 徐火忠, 洪海清, 朱有为. 浙江省铅污染源解析与茶叶铅污染风险评价[J]. 浙江农业学报, 2023, 35(5): 1123-1131. |
| [7] | 王金凤, 周琦, 吕玉龙, 陈卓梅. 间作景观树种对茶园生态系统与茶叶生产的影响[J]. 浙江农业学报, 2023, 35(3): 523-533. |
| [8] | 张棚, 杨雪妍, 洪晶, 张娅俐, 田晓静, 张福梅, 曹竑, 陈士恩, 马忠仁, 丁功涛, 宋礼, 罗丽. 贵州湄潭茶区土壤-茶叶系统中微量元素富集规律与产地溯源[J]. 浙江农业学报, 2022, 34(2): 378-390. |
| [9] | 王丽芳, 叶良, 谢忠稳, 党向利. 茶叶抗菌肽粗提物的抑菌活性及其对冷却肉保鲜的影响[J]. 浙江农业学报, 2022, 34(10): 2268-2276. |
| [10] | 李为宁, 柏宣丙, 李兵. 滚筒式茶叶提香机结构参数优化[J]. 浙江农业学报, 2020, 32(2): 348-358. |
| [11] | 杨梅, 罗逢健, 周利, 楼正云, 张新忠, 孙荷芝, 王新茹, 陈宗懋. 国内外茶叶农药最大残留限量标准比较分析与建议[J]. 浙江农业学报, 2020, 32(1): 168-175. |
| [12] | 王彦翔, 张艳, 杨成娅, 孟庆龙, 尚静. 基于深度学习的农作物病害图像识别技术进展[J]. 浙江农业学报, 2019, 31(4): 669-676. |
| [13] | 裴伟,王晓林. 基于图像信息的茶叶二维采摘坐标的提取[J]. 浙江农业学报, 2016, 28(3): 522-. |
| [14] | 余澍琼,张吉红,崔俊霞,张慧丽,倪健波. 利用环介导等温扩增技术检测茶叶中掺杂的大豆成分[J]. 浙江农业学报, 2015, 27(8): 1479-. |
| [15] | 闫建伟;牛素贞;尹杰;宋勤飞;何林;*. 茶叶介电特性的研究[J]. , 2012, 24(3): 0-516. |
| 阅读次数 | ||||||
|
全文 |
|
|||||
|
摘要 |
|
|||||