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

Smart Agriculture

• •    

基于改进YOLOv10n的轻量化荔枝虫害小目标检测模型

黎祖胜1,2(), 唐吉深2, 匡迎春1()   

  1. 1. 湖南农业大学 信息与智能科学技术学院,湖南 长沙 410128,中国
    2. 河池学院 大数据与计算机学院,广西 河池 546300,中国
  • 收稿日期:2024-12-02 出版日期:2025-01-24
  • 基金项目:
    国家自然科学基金(61972147)
  • 作者简介:

    黎祖胜,研究方向为农业信息化、目标检测。E-mail:

  • 通信作者:
    匡迎春,博士,教授,研究方向为智能农业、人工智能。E-mail:

A Lightweight Model for Detecting Small Targets of Litchi Pests Based on Improved YOLOv10n

LI Zusheng1,2(), TANG Jishen2, KUANG Yingchun1()   

  1. 1. College of Information and Intelligence, Hunan Agricultural University, Changsha 410128, China
    2. School of Big Data and Computer, Hechi University, Hechi 546300, China
  • Received:2024-12-02 Online:2025-01-24
  • Foundation items:The National Natural Science Foundation of China(61972147)
  • About author:

    LI Zusheng, E-mail:

  • Corresponding author:
    KUANG Yingchun, E-mail:

摘要:

[目的/意义] 荔枝虫害的精准识别有助于实施有效的防治策略,推动农业的可持续发展。为提高荔枝虫害的识别效率,本研究提出一种基于改进YOLOv10n的轻量化目标检测模型YOLO-LP(YOLO-Litchi Pests)。 [方法] 首先,优化主干网络(Backbone)的C2f模块,使用全局到局部空间聚合模块(Global-to-Local Spatial Aggregation, GLSA)构建C2f_GLSA模块,实现对小目标的高效聚焦,增强目标与背景的区分能力,同时减少参数量和计算量。其次,在颈部网络(Neck)引入频率感知特征融合模块(Frequency-Aware Feature Fusion, FreqFusion),设计频域感知路径聚合网络(Frequency-Aware Path Aggregation Network, FreqPANet),有效解决目标边界模糊和偏移的问题,并进一步轻量化模型。最后,使用SCYLLA-IoU(SIoU)损失函数替代Complete-IoU(CIoU)损失函数,优化目标定位精度并加速模型训练收敛过程。为了评估模型性能,本研究在自然环境和实验室环境的四种场景中,构建自建的荔枝虫害小目标数据集并进行测试。 [结果和讨论] YOLO-LP在AP50、AP50:95、AP-Small50:95分别达到了90.9%、62.2%和59.5%,较基线模型分别提高了1.9个百分点、1.0个百分点和1.2个百分点。同时,模型的参数量和计算量分别减少13%和17%。 [结论] YOLO-LP在精度和轻量化方面表现优越,为荔枝虫害检测的实际应用提供了有效的参考。

关键词: 荔枝, 虫害检测, 多场景, 小目标, YOLOv10n, 特征融合, 注意力机制

Abstract:

[Objective] The accuracy of identifying litchi pests is crucial for implementing effective control strategies and promoting sustainable agricultural development. However, the current detection of litchi pests is characterized by a high percentage of small targets, which makes target detection models challenging in terms of accuracy and parameter count, thus limiting their application in real-world production environments. To improve the identification efficiency of litchi pests, this study proposed a lightweight target detection model, YOLO-LP (YOLO-Litchi Pests), based on YOLOv10n. The model aimed to enhance the detection accuracy of small litchi pest targets in multiple scenarios by optimizing the network structure and loss function, while also reducing the number of parameters and computational costs. [Methods] Two classes of litchi insect pests (cocoon and gall) images were collected as datasets for modeling in natural scenarios (sunny, cloudy, post-rain) and laboratory environments. The original data were expanded through random scaling, random panning, random brightness adjustments, random contrast variations, and Gaussian blurring to balance the category samples and enhance the robustness of the model, generating a richer dataset named the CG dataset (cocoon and gall dataset). The YOLO-LP model was constructed after the following three improvements. Specifically, (1) the C2f module of the backbone network (Backbone) in YOLOv10n was optimized and the C2f_GLSA module was constructed using the Global-to-Local Spatial Aggregation (GLSA) module to focus on small targets and enhance the differentiation between the targets and the backgrounds, while simultaneously reducing the number of parameters and computation. (2) A frequency-aware feature fusion module (FreqFusion) was introduced into the neck network (Neck) of YOLOv10n and a frequency-aware path aggregation network (FreqPANet) was designed to reduce the complexity of the model and address the problem of fuzzy and shifted target boundaries. (3) The SCYLLA-IoU (SIoU) loss function replaced the Complete-IoU (CIoU) loss function from the baseline model to optimize the target localization accuracy and accelerate the convergence of the training process. [Results and Discussions] YOLO-LP achieved 90.9%, 62.2%, and 59.5% for AP50, AP50:95, and AP-Small50:95 in the CG dataset, respectively, and 1.9%, 1.0%, and 1.2% higher than the baseline model. The number of parameters and the computational costs were reduced by 13% and 17%, respectively. These results suggested that YOLO-LP had a high accuracy and lightweight design. Comparison experiments with different attention mechanisms validated the effectiveness of the GLSA module. After the GLSA module was added to the baseline model, AP50, AP50:95, and AP-Small50:95 achieved the highest performance in the CG dataset, reaching 90.4%, 62.0%, and 59.5%, respectively. Experiment results comparing different loss functions showed that the SIoU loss function provided better fitting and convergence speed in the CG dataset. Ablation test results revealed that the validity of each model improvement and the detection performance of any combination of the three improvements was significantly better than the baseline model in the YOLO-LP model. The performance of the models was optimal when all three improvements were applied simultaneously. Compared to several mainstream models, YOLO-LP exhibited the best overall performance, with a model size of only 5.1 MB, 1.97 million parameters (Params), and a computational volume of 5.4 GFLOPs. Compared to the baseline model, the detection of the YOLO-LP performance was significantly improved across four multiple scenarios. In the sunny day scenario, AP50, AP50:95, and AP-Small50:95 increased by 1.9%, 1.0 %, and 2.0 %, respectively. In the cloudy day scenario, AP50, AP50:95, and AP-Small50:95 increased by 2.5%, 1.3%, and 1.3%, respectively. In the post-rain scenario, AP50, AP50:95, and AP-Small50:95 increased by 2.0%, 2.4%, and 2.4%, respectively. In the laboratory scenario, only AP50 increased by 0.7% over the baseline model. These findings indicated that YOLO-LP achieved higher accuracy and robustness in multi-scenario small target detection of litchi pests. [Conclusions] The proposed YOLO-LP model could improve detection accuracy and effectively reduce the number of parameters and computational costs. It performed well in small target detection of litchi pests and diseases and demonstrated strong robustness across different scenarios. These improvements made the model more suitable for deployment on resource-constrained mobile and edge devices. The model provided a valuable technical reference for small target detection of litchi pests in various scenarios.

Key words: litchi, pests detection, multi-scenario, small targets, YOLOv10n, feature fusion, attention mechanism

中图分类号: