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

Smart Agriculture ›› 2026, Vol. 8 ›› Issue (5): 251-262.doi: 10.12133/j.smartag.SA202606016

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

基于协同语义增强YOLOv11的枸杞虫害轻量化检测方法

王梅1, 周元庆1, 王文慧1, 刘平1(), 朱美霖2   

  1. 1. 宁夏大学电子与电气工程学院,宁夏 银川 750021,中国
    2. 宁夏医科大学基础医学院,宁夏 银川 750004,中国
  • 收稿日期:2026-06-09 出版日期:2026-09-30
  • 基金项目:
    国家自然科学基金项目(61861037); 宁夏自然科学基金项目(2026AAC030133)
  • 作者简介:

    王 梅,硕士研究生,研究方向为图像处理。E-mail:

  • 通信作者:
    刘 平,博士,副教授,研究方向为物联网应用、机器视觉。E-mail:

Lightweight Pest Detection for Goji Berry Fields via Collaborative Semantic Enhancement of YOLOv11

WANG Mei1, ZHOU Yuanqing1, WANG Wenhui1, LIU Ping1(), ZHU Meilin2   

  1. 1. School of Electronics and Electrical Engineering, Ningxia University, Yinchuan 750021, China
    2. School of Basic Medical Sciences, Ningxia Medical University, Yinchuan 750004, China
  • Received:2026-06-09 Online:2026-09-30
  • Foundation items:National Natural Science Foundation of China(61861037); Natural Science Foundation of Ningxia Hui Autonomous Region(2026AAC030133)
  • About author:

    WANG Mei, E-mail:

  • Corresponding author:
    LIU Ping, E-mail:

摘要:

【目的/意义】 针对复杂田间场景下枸杞虫害目标尺度小、背景干扰强及遮挡严重,导致目标特征提取困难和检测性能下降的问题,本研究提出一种协同语义特征增强的枸杞虫害检测模型(Collaborative Semantic Feature Enhancement-YOLOv11, CSFE-YOLOv11)。 【方法】 模型从细粒度特征感知、跨尺度语义融合和轻量化预测三个层面进行协同优化。首先,在骨干网络中引入嵌入式注意特征增强模块(Attention-embedded Feature Enhancement, AFE),通过局部卷积与全局注意力协同建模,增强虫害局部纹理和细粒度特征表达;其次,在颈部网络中构建跨尺度语义融合模块(Cross-scale Semantic Fusion, CSF),通过多尺度特征交互与语义融合,实现浅层细节信息与深层语义信息的有效传递;最后,设计轻量化解耦预测头(Lightweight Decoupled Prediction Head, LDP Head),通过分类与定位任务解耦及轻量化结构降低预测阶段的计算开销,并提升复杂场景下弱显著虫害的预测能力。 【结果和讨论】 在17类枸杞虫害数据集上进行试验,CSFE-YOLOv11的精确率、召回率、交并比阈值0.5及阈值为0.5-0.95区间的平均精度均值(Mean Average Precision, mAP)分别达到85.27%、71.49%、75.29%和48.25%,较YOLOv11的mAP50和mAP50∶95分别提高4.47和2.36个百分点;模型参数量由2.59 M降至2.28 M,减少11.97%,计算量由6.3降至5.2 GFLOPs,降低17.46%。消融实验及不同尺度目标检测结果表明,AFE、CSF和LDP Head在细粒度特征增强、跨尺度语义传递和预测优化方面具有互补作用。IP102跨数据集验证中,CSFE-YOLOv11的mAP50达到0.631 7±0.002 9,相较基线模型保持性能优势;在宁夏本地田间数据集上mAP50较YOLOv11提高4个百分点,进一步验证了模型对复杂田间场景的适应能力。 【结论】 CSFE-YOLOv11通过细粒度特征增强、跨尺度语义融合与轻量化解耦预测的协同优化,在提高枸杞虫害检测精度的同时降低了模型计算复杂度,实现了检测性能与轻量化之间的有效平衡,可为复杂田间环境下枸杞虫害智能监测提供技术参考。

关键词: 枸杞虫害, 目标检测, YOLOv11, 协同语义特征增强, 轻量化

Abstract:

[Objective] Goji berry (Lycium barbarum L.) is an important medicinal and edible crop with considerable nutritional, health-care, and economic value. However, pest detection in complex field environments remains challenging because pests exhibit small target sizes, weak fine-grained features, partial occlusion, and strong background interference. These factors can cause incomplete target features and inaccurate localization and classification. Therefore, an object detection model that enhances fine-grained features, strengthens cross-scale semantic information transmission, and maintains low computational complexity is needed for accurate and efficient goji berry pest detection. [Methods] Based on the you only look once (YOLO) framework, a collaborative semantic feature enhancement YOLOv11 (CSFE-YOLOv11) model was proposed. The model performs collaborative optimization at three successive stages: fine-grained feature enhancement, cross-scale semantic fusion, and lightweight prediction optimization. First, an attention-embedded feature enhancement module (AFE) was introduced into the backbone to enhance local fine-grained pest features and suppress irrelevant background responses by combining local convolution-based feature extraction with global attention-based contextual modeling. Second, a cross-scale semantic fusion module (CSF) was constructed in the neck to strengthen nonlinear interactions and semantic information transmission among different scales through a depthwise convolution branch (DWB), a dual-branch nonlinear interaction structure (SC), and a channel mapping and reconstruction component (SSA). Finally, a lightweight decoupled prediction head (LDP head) was designed to separate classification and localization tasks and reduce redundant computation. A 17-class goji berry pest dataset was used for training and evaluation. Small, medium, and large targets accounted for 4.01%, 24.09%, and 71.90%, respectively, while targets with different degrees of occlusion accounted for 38.41%. Comparative experiments, ablation studies, multi-scale analysis, visualization, cross-dataset evaluation, and local field validation were conducted. [Results and Discussion] On the 17-class goji berry pest dataset, CSFE-YOLOv11 achieved a precision of 85.27%, recall of 71.49%, mean Average Precision at IoU=0.5 (mAP50) of 75.29%, and mAP50-95 of 48.25%. Compared with YOLOv11, mAP50 and mAP50:95 increased by 4.47 and 2.36 percentage points, respectively. The number of parameters decreased from 2.59 M to 2.28 M, while GFLOPs decreased from 6.3 to 5.2, corresponding to reductions of 11.97% and 17.46%, respectively. Ablation experiments showed complementary effects among AFE, CSF, and the LDP head. The average precision (AP) of small, medium, and large targets increased from 1.6%, 18.2%, and 50.4% to 5.4%, 32.5%, and 52.8%, respectively. Visualization results showed that the proposed model improved the detection of small, weakly salient, and partially occluded pests while reducing responses to complex background regions. On the IP102 dataset, three independent experiments with random seeds of 42 123, and 456 were conducted. CSFE-YOLOv11 achieved an mAP50 of 63.17%±0.29%, compared with 61.07%±0.68% for YOLOv11, demonstrating improved cross-dataset performance with relatively stable results. Local Ningxia field validation further showed a 4-percentage-point improvement in mAP50 over YOLOv11. [Conclusion] CSFE-YOLOv11 provides a collaborative detection framework integrating fine-grained feature enhancement, cross-scale semantic fusion, and lightweight decoupled prediction. By assigning complementary functions to AFE, CSF, and LDP head at different stages of the detection network, the proposed model improves the representation and prediction of difficult pest targets while reducing model parameters and computational complexity. The results indicate its potential for accurate and efficient goji berry pest monitoring in complex field environments and provide a feasible technical reference for subsequent lightweight deployment in smart agriculture.

Key words: goji berry pest detection, object detection, YOLOv11, collaborative semantic feature enhancement, lightweight

中图分类号: