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

Smart Agriculture

• •    

基于YOLOv11n-A3的油菜角果检测与计数方法

周霖1,2, 王妍1,2, 黎海欣3, 郑吉澍1,2, 李脉1,2, 曹中华1,2, 吴兆娟1,2()   

  1. 1. 重庆市农业科学院农业工程研究所,重庆 401329,中国
    2. 农业农村部西南山地智慧农业重点实验室(部省共建),重庆 401329,中国
    3. 慕尼黑工业大学计算、信息与技术学院,慕尼黑 80333,德国
  • 收稿日期:2026-03-05 出版日期:2026-05-22
  • 基金项目:
    重庆市级财政科技创新类项目(KYLX20240500073); 重庆市级财政科技创新类项目(KYLX20260200049); 国家重点研发计划项目(2022YFD2001700); 成渝地区双城经济圈农业科技创新联盟(共建国家现代农业产业科技创新中心)子项目(KYLX20250600465)
  • 作者简介:

    周 霖,硕士,工程师,研究方向为农业人工智能。Email:

  • 通信作者:
    吴兆娟,博士,副研究员,研究方向为农业人工智能。Email:

Rapeseed Silique Detection and Counting Based on YOLOv11n-A3

ZHOU Lin1,2, WANG Yan1,2, LI Haixin3, ZHENG Jishu1,2, LI Mai1,2, CAO Zhonghua1,2, WU Zhaojuan1,2()   

  1. 1. Institute of Agricultural Engineering, Chongqing Academy of Agricultural Sciences, Chongqing 401329, China
    2. Key Laboratory of Smart Agriculture in Southwest Mountainous Areas, Ministry of Agriculture and Rural Affairs (Co-constructed by Ministry and Province), Chongqing 401329, China
    3. TUM School of Computation, Information and Technology, Munich 80333, Germany
  • Received:2026-03-05 Online:2026-05-22
  • Foundation items:Chongqing Municipal Financial Science and Technology Innovation Projects(KYLX20240500073); Sub-project of the Chengdu-Chongqing Economic Circle Agricultural Science and Technology Innovation Alliance (Jointly Building the National Modern Agricultural Industry Science and Technology Innovation Center)(KYLX20250600465)
  • About author:

    ZHOU Lin, E-mail:

  • Corresponding author:
    WU Zhaojuan, E-mail:

摘要:

【目的/意义】 快速精准地检测油菜角果数量,对油菜高产优质品种选育具有重要意义。针对油菜离体考种场景下,分枝角果普遍存在密集簇生、局部重叠及果喙目标微小所导致的精准计数难题,提出一种基于YOLOv11n-A3(YOLOv11n with Area Attention and Aligned Fusion)的油菜角果检测与计数方法。 【方法】 在主干网络集成跨阶段局部空间注意力模块与快速空间金字塔池化模块以强化特征的多维联合表达,并在颈部构建融合区域注意力模块的对齐路径聚合特征金字塔网络架构,从而协同缓解空间信息错位并提升区域上下文交互能力。 【结果和讨论】 YOLOv11n-A3在精确率、召回率、平均精度均值分别达到了92.6%、85.1%、47.1%,较基线模型分别提高了1.8、2.5、12.5个百分点。模型的计算量、参数量、检测速度分别达6.39 GFLOPs、2.58 M、625.3帧/s。在角果计数任务中,决定系数达0.937,平均绝对误差仅为2.61个。 【结论】 YOLOv11n-A3模型在保持轻量化的同时提高了计数精度,能够有效检测密集分布场景下的小目标,基于模型开发的油菜育种人工智能工具,可实现对油菜角果的检测与计数,为油菜考种与高产优质品种选育提供技术支撑。

关键词: YOLO, 注意力机制, 特征融合, 油菜角果计数, 小目标检测

Abstract:

[Objective] Rapeseed is the largest oilseed crop in China, and increasing its yield is the core objective of breeding efforts. As a central component of rapeseed yield, the number of effective siliques per plant is an indispensable phenotypic trait in the phenotyping process. Its rapid and accurate counting is crucial for the breeding of high-yield and superior varieties. Although object detection and counting research has made significant progress in the agricultural field, it still faces some challenges in actual detached phenotyping scenarios. Therefore, aiming at the accurate counting difficulties caused by the widespread dense clustering, local overlapping of branches, and tiny silique beak targets in detached rapeseed phenotyping scenarios, a rapeseed silique detection and counting method is proposed based on YOLO11n-A3 (YOLO11n with Area Attention and Aligned Fusion). This method improves detection accuracy and feature extraction efficiency while maintaining a lightweight design, providing edge-side technical support for rapeseed phenotyping and the breeding of high-yield, high-quality varieties. [Methods] The proposed method adopted the lightweight convolutional structure of YOLOv11n as its backbone. To further enhance the global representation capability of silique features, the cross stage partial with spatial attention (C2PSA) module was embedded in the high-level layers of the backbone for joint channel-spatial modeling. This approach significantly improved the representation of multi-scale features while retaining the receptive-field-expansion advantage of the spatial pyramid pooling fast (SPPF) module, without substantially increasing computational costs. Secondly, the Area Attention module was introduced to locally enhance the neck feature fusion network. By replacing specific convolutions with the Area Attention module, the network leverages local region perception to improve feature extraction and anti-interference capabilities for densely overlapping small targets, while keeping training and deployment risks controllable. Finally, a bidirectional feature alignment and fusion architecture consisting of aligned feature pyramid network (Align-FPN) and aligned path aggregation network (Align-PAN) were constructed to replace the standard feature fusion path. In the Align-FPN stage, high-level semantic features were effectively transmitted to lower levels via the area-attention enhanced cross-feature (A2C2f) module and tiny multi-scale context (TMC) block (P3), the soft nearest neighbor interpolation (SNI) module were introduced to alleviate spatial inconsistencies among multi-scale features. In the Align-PAN stage, the extended spatial-window down-sampling (ESD) module was further combined for feature separation and enhancement, highlighting key scale features through an adaptive weighted fusion mechanism to significantly enhance the interaction and consistency of multi-scale features. [Results and Discussions] The precision, recall, and mAP0.5-0.95 of YOLOv11n-A3 reached 92.6%, 85.1%, and 47.1%, respectively, showing increases of 1.8, 2.5, and 12.5 percentage points over the baseline model. The computational load, parameter count, and detection speed of the model reached 6.39 GFLOPs, 2.58 M, and 625.3 f/s, respectively. In the silique counting task, the coefficient of determination (R2) reached 0.937; the mean absolute error (MAE) was only 2.61; the root mean square error (RMSE) was 3.7; and the mean absolute percentage error (MAPE) was 11.37%. Furthermore, to meet the application requirements of real-time field phenotyping, the lightweight model was encapsulated and deployed in a custom-developed artificial intelligence (AI) tool to achieve fast and accurate counting of rapeseed siliques. This effectively verified the engineering application potential of the proposed lightweight algorithm on edge devices. [Conclusions] The YOLOv11n-A3 model successfully improves counting accuracy while maintaining a lightweight design, effectively detecting small targets in densely distributed scenarios. The rapeseed breeding AI tool developed based on this model achieves the rapid and accurate detection and counting of rapeseed siliques, providing reliable technical support for rapeseed phenotyping and the breeding of high-yield, high-quality varieties. In summary, YOLO11n-A3 achieved an excellent balance among detection accuracy, counting precision, and computational overhead, fully demonstrating its lightweight and highly efficient superiority.

Key words: YOLO, attention mechanism, feature fusion, rapeseed silique counting, small object detection

中图分类号: