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

Smart Agriculture ›› 2025, Vol. 7 ›› Issue (1): 146-155.doi: 10.12133/j.smartag.SA202410023

• 专题--农业知识智能服务和智慧无人农场(下) • 上一篇    下一篇

基于改进YOLOv10n的轻量化番茄叶片病虫害检测方法

吴六爱, 许雪珂()   

  1. 兰州交通大学 电子与信息工程学院,甘肃 兰州 730070,中国
  • 收稿日期:2024-10-20 出版日期:2025-01-30
  • 基金项目:
    国家自然科学基金项目(51567014); 甘肃省科技计划项目(22JR5RA797)
  • 作者简介:
    吴六爱,硕士,副教授,研究方向为大数据与人工智能等。E-mail:
  • 通信作者:
    许雪珂,硕士研究生,研究方向为基于深度学习的目标检测算法。E-mail:

Lightweight Tomato Leaf Disease and Pest Detection Method Based on Improved YOLOv10n

WU Liuai, XU Xueke()   

  1. School of Electronic and Information Engineering, Lanzhou Jiaotong University, Lanzhou 730070, China
  • Received:2024-10-20 Online:2025-01-30
  • Foundation items:National Natural Science Foundation of China(51567014); Gansu Science and Technology Plan Project(22JR5RA797)
  • About author:

    WU Liuai, E-mail:

  • Corresponding author:
    XU Xueke, E-mail:

摘要:

【目的/意义】 为解决番茄叶片病虫害检测中面临的环境复杂、目标小、精度低、参数冗余及计算复杂度高等问题,提出了一种新型轻量化、高精度、实时的检测模型——YOLOv10n-YS(You Only Look Once Version 10-YS)。 【方法】 首先,采用C2f_RepViTBlock模块替换主干网络的C2f,减少了模型的计算量和参数量。其次,加入带切片操作的注意力机制SimAM,结合原有卷积形成Conv_SWS模块,提升了小目标的特征提取能力。另外,在颈部网络中使用DySample轻量动态上采样模块,使采样点集中在目标区域而不会关注背景部分,实现病虫害的有效识别。最后,将跨通道交互的高效率通道注意力(Efficient Channel Attention with Cross-Channel Interaction, EMCA)替换主干网络的金字塔空间注意力机制(Pyramid Spatial Attention, PSA),进一步提高了主干网络的特征提取能力。 【结果与讨论】 实验结果显示,YOLOv10n-YS模型在番茄病虫害数据集上展现出了卓越的性能。其平均识别精度、检测准确率和召回率分别达到了92.1%、89.2%和82.1%,相较于原模型,这些指标分别提升了3.8、3.3和4.2个百分点。同时,模型在参数量和计算量上也实现了显著的优化,分别减少了13.8%和8.5%。 【结论】 这些改进不仅提升了模型的性能,还保持了其轻量化特性,对番茄叶片病虫害的检测具有重要参考价值。

关键词: 番茄叶片, 病虫害检测, YOLOv10n, 注意力机制, 轻量化

Abstract:

[Objective] To address the challenges in detecting tomato leaf diseases and pests, such as complex environments, small goals, low precision, redundant parameters, and high computational complexity, a novel lightweight, high-precision, real-time detection model was proposed called YOLOv10n-YS. This model aims to accurately identify diseases and pests, thereby providing a solid scientific basis for their prevention and management strategies. Methods] The dataset was collected using mobile phones to capture images from multiple angles under natural conditions, ensuring complete and clear leaf images. It included various weather conditions and covered nine types: Early blight, leaf mold, mosaic virus, septoria, spider mites damage, yellow leaf curl virus, late blight, leaf miner disease, and healthy leaves, with all images having a resolution of 640×640 pixels. In the proposed YOLOv10n-YS model, firstly, the C2f in the backbone network was replaced with C2f_RepViTBlock, thereby reducing the computational load and parameter volume and achieving a lightweight design. Secondly, through the introduction of a sliced operation SimAM attention mechanism, the Conv_SWS module was formed, which enhanced the extraction of small target features. Additionally, the DySample lightweight dynamic up sampling module was used to replace the up sampling module in the neck network, concentrating sampling points on target areas and ignoring backgrounds, thereby effectively identifying defects. Finally, the efficient channel attention (ECA) was improved by performing average pooling and max pooling on the input layer to aggregate features and then adding them together, which further enhanced global perspective information and features of different scales. The improved module, known as efficient channel attention with cross-channel interaction (EMCA) attention, was introduced, and the pyramid spatial attention (PSA) in the backbone network was replaced with the EMCA attention mechanism, thereby enhancing the feature extraction capability of the backbone network. [Results and Discussions] After introducing the C2f_RepViTBlock, the model's parameter volume and computational load were reduced by 12.3% and 9.7%, respectively, with mAP@0.5 and F1-Score each increased by 0.2% and 0.3%. Following the addition of the Conv_SWS and the replacement of the original convolution, mAP@0.5 and F1-Score were increased by 1.2% and 2%, respectively, indicating that the Conv_SWS module significantly enhanced the model's ability to extract small target features. After the introduction of DySample, mAP@0.5 and F1-Score were increased by 1.8% and 2.6%, respectively, but with a slight increase in parameter volume and computational load. Finally, the addition of the EMCA attention mechanism further enhanced the feature extraction capability of the backbone network. Through these four improvements, the YOLOv10n-YS model was formed. Compared with the YOLOv10n algorithm, YOLOv10n-YS reduced parameter volume and computational load by 13.8% and 8.5%, respectively, with both mAP@0.5 and F1-Score increased. These improvements not only reduced algorithm complexity but also enhanced detection accuracy, making it more suitable for industrial real-time detection. The detection accuracy of tomato diseases and pests using the YOLOv10n-YS algorithm was significantly better than that of comparative algorithms, and it had the lowest model parameter volume and computational load. The visualization results of detection by different models showed that the YOLOv10n-YS network could provide technical support for the detection and identification of tomato leaf diseases and pests. To verify the performance and robustness of the YOLOv10n-YS algorithm, comparative experiments were conducted on the public Plant-Village-9 dataset with different algorithms. The results showed that the average detection accuracy of YOLOv10n-YS on the Plant-Village dataset reached 91.1%, significantly higher than other algorithms. [Conclusions] The YOLOv10n-YS algorithm is not only characterized by occupying a small amount of space but also by possessing high recognition accuracy. On the tomato leaf dataset, excellent performance was demonstrated by this algorithm, thereby verifying its broad applicability and showcasing its potential to play an important role in large-scale crop pest and disease detection applications. Deploying the model on drone platforms and utilizing multispectral imaging technology can achieve real-time detection and precise localization of pests and diseases in complex field environments.

Key words: tomato leaves, pest detection, YOLOv10n, attention mechanism, lightweight

中图分类号: