浙江农业学报 ›› 2026, Vol. 38 ›› Issue (6): 1258-1270.DOI: 10.3969/j.issn.1004-1524.20250732

• 生物系统工程 • 上一篇    下一篇

基于YOLO-AIFI的蓝莓成熟度与果簇识别方法

李功磊1(), 黄可玥1, 刘英豪1, 张陈文1, 李梓桐1, 伍德林1,2,*()   

  1. 1 安徽农业大学 工学院, 安徽 合肥 230036
    2 安徽省智能农机装备工程研究中心, 安徽 合肥 230036
  • 收稿日期:2025-12-03 出版日期:2026-06-25 发布日期:2026-07-14
  • 作者简介:李功磊,主要从事浆果机械采收研究。E-mail:3400134433@qq.com
  • 通讯作者: *伍德林,E-mail:wudelin@126.com
  • 基金资助:
    安徽省高校协同创新项目(GXXT-2023-111)

Recognition method for blueberry ripeness and fruit clusters based on YOLO-AIFI

LI Gonglei1(), HUANG Keyue1, LIU Yinghao1, ZHANG Chenwen1, LI Zitong1, WU Delin1,2,*()   

  1. 1 School of Engineering, Anhui Agricultural University, Hefei 230036, China
    2 Anhui Provincial Engineering Research Center of Intelligent Agricultural Machinery, Hefei 230036, China
  • Received:2025-12-03 Published:2026-06-25 Online:2026-07-14

摘要:

针对蓝莓串果成熟度不一致、采收果实混杂导致品质下降的问题,为实现蓝莓果簇的自动化识别,本文提出一种基于YOLO11n改进的蓝莓成熟度识别方法YOLO-AIFI。该方法在YOLO11n的基础上引入3项关键改进:采用动态幻影卷积模块减少特征冗余,引入动态上采样模块增强特征分辨率,并集成AIFI(基于注意力的尺度内特征交互)注意力机制以强化全局特征交互能力。以YOLO-AIFI检测的蓝莓果实空间位置作为基础,将检测到的蓝莓果实位置坐标作为空间点集,利用k-means聚类算法无监督地识别出完整的蓝莓果簇结构。在自行采集的3 346张蓝莓图像数据集上进行试验验证,结果表明,YOLO-AIFI在测试集上的精度高达85.0%,召回率达到了78.9%,交并比(IoU)阈值为0.5时的平均精度(mAP@0.5)达到82.5%,比YOLO11n模型分别提升3.0、3.4、2.8百分点。该方法在复杂光照、遮挡及密集小目标场景下仍保持较高检测精度,性能显著优于YOLOv5n等主流轻量模型。同产地跨天气、跨场景的非数据集验证及嵌入式设备实际部署验证结果表明,模型对成熟度的检测具有良好的泛化能力与实际应用适配性。在YOLO-AIFI模型输出高精度离散果实检测集合的基础上,k-means聚类算法将空间上彼此邻近的果实中心点自动归并为同一果簇,实现了在自然环境下对蓝莓果簇的识别与定位,为蓝莓自动化采收提供了有效的视觉检测方案。

关键词: 蓝莓果实, 成熟度识别, 注意力机制, 目标检测, 动态卷积, k-means聚类

Abstract:

Aiming at the problem of reduced fruit quality caused by inconsistent ripeness of blueberry fruit clusters and mixed harvested fruits, we propose an improved model of YOLO-AIFI based on YOLO11n, to realize the automatic recognition of blueberry fruit clusters. Three core improvements are introduced into the original YOLO11n framework: a dynamic phantom convolution module is adopted to reduce feature redundancy, a dynamic upsampling module is integrated to enhance feature resolution, and the AIFI (attention-based intra-scale feature interaction) attention mechanism is embedded to strengthen global feature interaction capability. Taking the spatial coordinates of blueberry fruits detected by YOLO-AIFI as a point set, the unsupervised k-means clustering algorithm was applied to identify complete blueberry fruit cluster structures. Experimental validation was conducted on a self-collected dataset containing 3 346 blueberry images. The results demonstrated that the precision of YOLO-AIFI reached 85.0%, the recall rate was 78.9%, and the mAP@0.5 (mean average precision at an intersection over union threshold of 0.5) achieved 82.5% on the test set, which were 3.0, 3.4, and 2.8 percentage points higher than those of the original YOLO11n, respectively. The proposed method maintains superior detection accuracy under complex conditions such as variable illumination, fruit occlusion and dense small-target scenarios, and its overall performance is significantly better than mainstream lightweight models including YOLOv5n. Cross-weather and cross-scene verification on fruits from the same producing area, as well as practical deployment tests on embedded devices, further verifies that the optimized model possesses excellent generalization ability and practical application adaptability for blueberry ripeness detection. On the basis of high-precision discrete fruit detection results output by YOLO-AIFI, the k-means clustering algorithm automatically aggregates spatially adjacent fruit center points into independent clusters, thereby achieving effective recognition and localization of blueberry fruit clusters in natural environments. This study provides a reliable visual detection solution for the automatic harvesting of blueberries.

Key words: blueberry fruit, ripeness detection, attention mechanism, object detection, dynamic convolution, k-means clusterering

中图分类号: