欢迎您访问《智慧农业(中英文)》官方网站! English

Smart Agriculture ›› 2024, Vol. 6 ›› Issue (1): 147-157.doi: 10.12133/j.smartag.SA202309010

• 信息处理与决策 • 上一篇    

基于改进YOLOv8的小麦叶片病虫害检测轻量化模型

杨锋(), 姚晓通()   

  1. 兰州交通大学 电子与信息工程学院,甘肃 兰州 730070,中国
  • 收稿日期:2023-09-09 出版日期:2024-01-30
  • 作者简介:
    杨 锋,研究方向为基于深度学习的目标检测算法。E-mail:

    YANG Feng, E-mail:

  • 通信作者:
    姚晓通,博士,副教授,研究方向为物联网与智能测控、机器人与视觉控制、大数据与人工智能等。E-mail:

Lightweighted Wheat Leaf Diseases and Pests Detection Model Based on Improved YOLOv8

YANG Feng(), YAO Xiaotong()   

  1. School of Electronic and Information Engineering, Lanzhou Jiaotong University, Lanzhou 730070, China
  • Received:2023-09-09 Online:2024-01-30
  • corresponding author:
    YAO Xiaotong, E-mail:
  • Supported by:
    National Natural Science Foundation of China(51567014); Gansu Provincial Science and Technology Plan Project(18CX6JA022)

摘要:

目的/意义 针对小麦叶片病虫害在自然环境下形态和颜色特征较为复杂、区分度较低等特点,提出一种高质量高效的病虫害检测模型,即YOLOv8⁃SS(You Only Look Once Version 8-SS),为病虫害的预防与科学化治理提供准确的依据。 方法 基于YOLOv8算法,采用改进的轻量级卷积神经网络ShuffleNet V2作为主干网络提取图像特征即YOLOv8-S,在保持检测精度的同时,减少模型的参数数量和计算负载;在此基础上增加小目标检测层和注意力机制SEnet(Squeeze and Excitation Network),对YOLOv8-S进行改进,在不降低检测速度和不损失模型轻量化程度的情况下提高检测精度,提出YOLOv8-SS小麦叶片病虫害检测模型。[结果与讨论] YOLOv8-SS模型在实验数据集上的平均识别精度和检测准确率分别达89.41%和91.00%,对比原模型分别提高10.11%和7.42%。因此,本研究所提出的方法可显著提高农作物病虫害的检测鲁棒性,并增强模型对小目标图像特征的提取能力,从而高效准确地进行病虫害的检测和识别。 结论 本研究使用的方法具有广泛适用性,可应用于大规模农作物病虫害检测的实际场景中。

关键词: 小麦叶片, 病虫害检测, ShuffleNet V2, YOLOv8, 轻量化模型

Abstract:

Objective To effectively tackle the unique attributes of wheat leaf pests and diseases in their native environment, a high-caliber and efficient pest detection model named YOLOv8-SS (You Only Look Once Version 8-SS) was proposed. This innovative model is engineered to accurately identify pests, thereby providing a solid scientific foundation for their prevention and management strategies. Methods A total of 3 639 raw datasets of images of wheat leaf pests and diseases were collected from 6 different wheat pests and diseases in various farmlands in the Yuchong County area of Gansu Province, at different periods of time, using mobile phones. This collection demonstrated the team's proficiency and commitment to advancing agricultural research. The dataset was meticulously constructed using the LabelImg software to accurately label the images with targeted pest species. To guarantee the model's superior generalization capabilities, the dataset was strategically divided into a training set and a test set in an 8:2 ratio. The dataset includes thorough observations and recordings of the wheat leaf blade's appearance, texture, color, as well as other variables that could influence these characteristics. The compiled dataset proved to be an invaluable asset for both training and validation activities. Leveraging the YOLOv8 algorithm, an enhanced lightweight convolutional neural network, ShuffleNetv2, was selected as the basis network for feature extraction from images. This was accomplished by integrating a 3×3 Depthwise Convolution (DWConv) kernel, the h-swish activation function, and a Squeeze-and-Excitation Network (SENet) attention mechanism. These enhancements streamlined the model by diminishing the parameter count and computational demands, all while sustaining high detection precision. The deployment of these sophisticated methodologies exemplified the researchers' commitment and passion for innovation. The YOLOv8 model employs the SEnet attention mechanism module within both its Backbone and Neck components, significantly reducing computational load while bolstering accuracy. This method exemplifies the model's exceptional performance, distinguishing it from other models in the domain. By integrating a dedicated small target detection layer, the model's capabilities have been augmented, enabling more efficient and precise pest and disease detection. The introduction of a new detection feature map, sized 160×160 pixels, enables the network to concentrate on identifying small-targeted pests and diseases, thereby enhancing the accuracy of pest and disease recognition. Results and Discussion The YOLOv8-SS wheat leaf pests and diseases detection model has been significantly improved to accurately detect wheat leaf pests and diseases in their natural environment. By employing the refined ShuffleNet V2 within the DarkNet-53 framework, as opposed to the conventional YOLOv8, under identical experimental settings, the model exhibited a 4.53% increase in recognition accuracy and a 4.91% improvement in F1-Score, compared to the initial model. Furthermore, the incorporation of a dedicated small target detection layer led to a subsequent rise in accuracy and F1-Scores of 2.31% and 2.16%, respectively, despite a minimal upsurge in the number of parameters and computational requirements. The integration of the SEnet attention mechanism module into the YOLOv8 model resulted in a detection accuracy rate increase of 1.85% and an F1-Score enhancement of 2.72%. Furthermore, by swapping the original neural network architecture with an enhanced ShuffleNet V2 and appending a compact object detection sublayer (namely YOLOv8-SS), the resulting model exhibited a heightened recognition accuracy of 89.41% and an F1-Score of 88.12%. The YOLOv8-SS variant substantially outperformed the standard YOLOv8, showing a remarkable enhancement of 10.11% and 9.92% in accuracy, respectively. This outcome strikingly illustrates the YOLOv8-SS's prowess in balancing speed with precision. Moreover, it achieves convergence at a more rapid pace, requiring approximately 40 training epochs, to surpass other renowned models such as Faster R-CNN, MobileNetV2, SSD, YOLOv5, YOLOX, and the original YOLOv8 in accuracy. Specifically, the YOLOv8-SS boasted an average accuracy 23.01%, 15.13%, 11%, 25.21%, 27.52%, and 10.11% greater than that of the competing models, respectively. In a head-to-head trial involving a public dataset (LWDCD 2020) and a custom-built dataset, the LWDCD 2020 dataset yielded a striking accuracy of 91.30%, outperforming the custom-built dataset by a margin of 1.89% when utilizing the same network architecture, YOLOv8-SS. The AI Challenger 2018-6 and Plant-Village-5 datasets did not perform as robustly, achieving accuracy rates of 86.90% and 86.78% respectively. The YOLOv8-SS model has shown substantial improvements in both feature extraction and learning capabilities over the original YOLOv8, particularly excelling in natural environments with intricate, unstructured backdrops. Conclusion The YOLOv8-SS model is meticulously designed to deliver unmatched recognition accuracy while consuming a minimal amount of storage space. In contrast to conventional detection models, this groundbreaking model exhibits superior detection accuracy and speed, rendering it exceedingly valuable across various applications. This breakthrough serves as an invaluable resource for cutting-edge research on crop pest and disease detection within natural environments featuring complex, unstructured backgrounds. Our method is versatile and yields significantly enhanced detection performance, all while maintaining a lean model architecture. This renders it highly appropriate for real-world scenarios involving large-scale crop pest and disease detection.

Key words: wheat leaf, pests and diseases detection, ShuffleNet V2, YOLOv8, lightweight model