浙江农业学报 ›› 2026, Vol. 38 ›› Issue (6): 1258-1270.DOI: 10.3969/j.issn.1004-1524.20250732
李功磊1(
), 黄可玥1, 刘英豪1, 张陈文1, 李梓桐1, 伍德林1,2,*(
)
收稿日期:2025-12-03
出版日期:2026-06-25
发布日期:2026-07-14
作者简介:李功磊,主要从事浆果机械采收研究。E-mail:3400134433@qq.com
通讯作者:
*伍德林,E-mail:wudelin@126.com
基金资助:
LI Gonglei1(
), HUANG Keyue1, LIU Yinghao1, ZHANG Chenwen1, LI Zitong1, WU Delin1,2,*(
)
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聚类算法将空间上彼此邻近的果实中心点自动归并为同一果簇,实现了在自然环境下对蓝莓果簇的识别与定位,为蓝莓自动化采收提供了有效的视觉检测方案。
中图分类号:
李功磊, 黄可玥, 刘英豪, 张陈文, 李梓桐, 伍德林. 基于YOLO-AIFI的蓝莓成熟度与果簇识别方法[J]. 浙江农业学报, 2026, 38(6): 1258-1270.
LI Gonglei, HUANG Keyue, LIU Yinghao, ZHANG Chenwen, LI Zitong, WU Delin. Recognition method for blueberry ripeness and fruit clusters based on YOLO-AIFI[J]. Acta Agriculturae Zhejiangensis, 2026, 38(6): 1258-1270.
| 成熟度 Maturity | 样本数量 Quantity of total samples | 训练集样本数量 Quantity of samples on training set | 验证集样本数量 Quantity of samples on validation set |
|---|---|---|---|
| 完全成熟 Fully mature | 1 470 | 1 029 | 441 |
| 不完全成熟 Under mature | 976 | 683 | 293 |
| 未成熟 Immature | 900 | 630 | 270 |
表1 样本数据分布数量
Table 1 Sample quantity distribution
| 成熟度 Maturity | 样本数量 Quantity of total samples | 训练集样本数量 Quantity of samples on training set | 验证集样本数量 Quantity of samples on validation set |
|---|---|---|---|
| 完全成熟 Fully mature | 1 470 | 1 029 | 441 |
| 不完全成熟 Under mature | 976 | 683 | 293 |
| 未成熟 Immature | 900 | 630 | 270 |
图2 YOLO-AIFI模型的网络架构示意图 Backbone,骨干网络;Neck,颈部网络;Head,头部网络;CBS,卷积模块;C3K2-GDC,动态幻影卷积模块;AIFI,基于注意力的尺度内特征交互;Contact,特征拼接层;C2PSA,C2特征提取与PSA(极化自注意力)注意力机制结合的模块;Dynamic Upsample,动态上采样模块。下同。
Fig.2 Schematic diagram of the architecture for the YOLO-AIFI model CBS, Convolutional module; C3K2-GDC, Dynamic ghost convolution module; AIFI, Attention-based intra-scale feature interaction; Contact, Feature concatenation layer; C2PSA, Module combining C2 feature extraction and PSA (polarized self-attention) attention mechanism. The same as below.
图3 AIFI模块的网络架构示意图 SiLU为激活函数。Efficient hybrid encoder,高效混合编码器;CCFF,跨尺度跨层特征融合;Fusion,特征融合模块;Conv,卷积层;BN,批归一化;IoU-aware query selection,交并比感知的查询选择;Decoder & head,解码器与预测头。
Fig.3 Schematic diagram of the network architecture of AIFI module SiLU is the activation function. CCFF, Cross-scale cross-layer feature fusion; Fusion, Feature fusion module; Conv, Convolution layer; BN, Batch normalization; IoU-aware query selection, Intersection-over-union-aware query selection; Decoder & head, Decoder and prediction head.
| 模型Model | P/% | R/% | mAP@0.5/% | FPS | FLOPs/109 |
|---|---|---|---|---|---|
| YOLOv5n | 78.0 | 70.2 | 75.8 | 420 | 4.2 |
| YOLOv8n | 80.0 | 73.5 | 77.9 | 430 | 8.0 |
| YOLOv7-tiny | 79.0 | 72.1 | 76.5 | 450 | 6.7 |
| YOLOv10n | 81.0 | 74.8 | 79.2 | 438 | 8.1 |
| YOLO11n | 82.0 | 75.5 | 79.7 | 442 | 7.9 |
| YOLOv12n | 83.0 | 76.0 | 80.3 | 440 | 7.4 |
| YOLO-AIFI | 85.0 | 78.9 | 82.5 | 410 | 8.7 |
表2 不同模型的检测结果对比
Table 2 Performance comparison of different models
| 模型Model | P/% | R/% | mAP@0.5/% | FPS | FLOPs/109 |
|---|---|---|---|---|---|
| YOLOv5n | 78.0 | 70.2 | 75.8 | 420 | 4.2 |
| YOLOv8n | 80.0 | 73.5 | 77.9 | 430 | 8.0 |
| YOLOv7-tiny | 79.0 | 72.1 | 76.5 | 450 | 6.7 |
| YOLOv10n | 81.0 | 74.8 | 79.2 | 438 | 8.1 |
| YOLO11n | 82.0 | 75.5 | 79.7 | 442 | 7.9 |
| YOLOv12n | 83.0 | 76.0 | 80.3 | 440 | 7.4 |
| YOLO-AIFI | 85.0 | 78.9 | 82.5 | 410 | 8.7 |
| GDC | DU | AIFI | P/% | R/% | mAP@0.5/% | FPS | FLOPs/109 |
|---|---|---|---|---|---|---|---|
| × | × | × | 76.0 | 72.8 | 73.1 | 450 | 6.5 |
| √ | × | × | 77.0 | 73.9 | 76.8 | 440 | 6.6 |
| × | √ | × | 79.0 | 74.5 | 77.2 | 430 | 7.4 |
| × | × | √ | 79.0 | 76.8 | 79.1 | 385 | 7.7 |
| √ | √ | × | 80.0 | 75.8 | 78.9 | 425 | 6.3 |
| √ | × | √ | 81.0 | 77.5 | 79.5 | 380 | 8.9 |
| × | √ | √ | 83.0 | 78.5 | 80.6 | 370 | 7.9 |
| √ | √ | √ | 85.0 | 78.9 | 82.5 | 410 | 8.7 |
表3 消融试验的结果
Table 3 Results of ablation experiments
| GDC | DU | AIFI | P/% | R/% | mAP@0.5/% | FPS | FLOPs/109 |
|---|---|---|---|---|---|---|---|
| × | × | × | 76.0 | 72.8 | 73.1 | 450 | 6.5 |
| √ | × | × | 77.0 | 73.9 | 76.8 | 440 | 6.6 |
| × | √ | × | 79.0 | 74.5 | 77.2 | 430 | 7.4 |
| × | × | √ | 79.0 | 76.8 | 79.1 | 385 | 7.7 |
| √ | √ | × | 80.0 | 75.8 | 78.9 | 425 | 6.3 |
| √ | × | √ | 81.0 | 77.5 | 79.5 | 380 | 8.9 |
| × | √ | √ | 83.0 | 78.5 | 80.6 | 370 | 7.9 |
| √ | √ | √ | 85.0 | 78.9 | 82.5 | 410 | 8.7 |
图6 不同天气条件不同场景的检测效果 第1~3行依次展示晴天、阴天、雨天条件下的检测效果。
Fig.6 Detection performance under different weather conditions and scenarios Rows 1 to 3 sequentially show the detection results under sunny, cloudy, and rainy conditions, respectively.
| [1] | 金永学, 冯建国, 郑淘, 等. 蓝莓的功能成分、保健作用及其开发利用[J]. 食品与机械, 2020, 36(5): 231-236. |
| JIN Y X, FENG J G, ZHENG T, et al. Functional components, health function and utilization of blueberry[J]. Food & Machinery, 2020, 36(5): 231-236. | |
| [2] | 王亚敏. 上海地区蓝莓限根基质栽培技术应用初探[J]. 上海农业科技, 2024(6): 110-111. |
| WANG Y M. Preliminary study on the application of blueberry root-limiting substrate cultivation techniques in Shanghai[J]. Shanghai Agricultural Science and Technology, 2024(6): 110-111. | |
| [3] | THOTA J, KIM E, FREIVALDS A, et al. Development and evaluation of attachable anti-vibration handle[J]. Applied Ergonomics, 2022, 98: 103571. |
| [4] | 鲍玉冬, 李志鹏, 郭艳玲, 等. 振动式蓝莓采摘机对果实收获的影响试验[J]. 湖南农业大学学报(自然科学版), 2014, 40(1): 96-100. |
| BAO Y D, LI Z P, GUO Y L, et al. Effects of vibrating based picking machine on blueberry fruit harvest[J]. Journal of Hunan Agricultural University(Natural Sciences), 2014, 40(1): 96-100. | |
| [5] | 王海滨, 沈钦星, 马鹏伟, 等. 基于改进YOLOv9的蓝莓果实成熟度检测方法[J]. 林业科学, 2026, 62(1): 144-155. |
| WANG H B, SHEN Q X, MA P W, et al. Fruit ripeness detection method of blueberry based on improved YOLOv9[J]. Scientia Silvae Sinicae, 2026, 62(1): 144-155. | |
| [6] | 汪天韵, 王吉平, 袁昕, 等. 智能蓝莓采摘机器人设计与应用[J]. 工程机械, 2025, 56(6): 150-153. |
| WANG T Y, WANG J P, YUAN X, et al. Design and application of intelligent blueberry picking robot[J]. Construction Machinery and Equipment, 2025, 56(6): 150-153. | |
| [7] | 李晴. 基于深度学习的蓝莓成熟度识别和产量估计研究[D]. 大理: 大理大学, 2025. |
| LI Q. Research on blueberry maturity recognition and yield estimation based on deep learning[D]. Dali: Dali University, 2025. | |
| [8] | REN S Q, HE K M, GIRSHICK R, et al. Faster R-CNN: towards real-time object detection with region proposal networks[J]. IEEE Transactions on Pattern Analysis and Machine Intelligence, 2017, 39(6): 1137-1149. |
| [9] | 王颖. 基于深度学习的巨峰葡萄果穗分割和成熟度评估研究[D]. 杭州: 浙江农林大学, 2024. |
| WANG Y. Research on Kyoho grape ear segmentation and maturity evaluation based on deep learning[D]. Hangzhou: Zhejiang A & F University, 2024. | |
| [10] | 刘玉耀, 彭琼尹. 基于改进Faster R-CNN模型的丁岙杨梅成熟度检测方法[J]. 湖北农业科学, 2025, 64(4): 7-13. |
| LIU Y Y, PENG Q Y. Improved Faster R-CNN model-based maturity detection method for Ding’ao bayberry[J]. Hubei Agricultural Sciences, 2025, 64(4): 7-13. | |
| [11] | 张文静, 赵性祥, 丁睿柔, 等. 基于Faster R-CNN算法的番茄识别检测方法[J]. 山东农业大学学报(自然科学版), 2021, 52(4): 624-630. |
| ZHANG W J, ZHAO X X, DING R R, et al. A detection and recognition method for tomato on faster R-CNN algorithm[J]. Journal of Shandong Agricultural University(Natural Science Edition), 2021, 52(4): 624-630. | |
| [12] | 朱铭敏, 张国平, 谭建军, 等. 基于YOLOv5s的轻量级茶叶嫩芽终端检测模型[J]. 浙江农业学报, 2024, 36(6): 1413-1424. |
| ZHU M M, ZHANG G P, TAN J J, et al. A lightweight tea buds terminal detection model based on YOLOv5s[J]. Acta Agriculturae Zhejiangensis, 2024, 36(6): 1413-1424. | |
| [13] | 刘睿, 王丽娟, 王秋皓, 等. 基于改进YOLOv8s的茶叶病虫害检测[J]. 浙江农业学报, 2025, 37(9): 1933-1942. |
| LIU R, WANG L J, WANG Q H, et al. Detection of pest and disease in tea based on improved YOLOv8s[J]. Acta Agriculturae Zhejiangensis, 2025, 37(9): 1933-1942. | |
| [14] | WANG C Y, WANG C F, WANG L L, et al. A lightweight cherry tomato maturity real-time detection algorithm based on improved YOLOV5n[J]. Agronomy, 2023, 13(8): 2106. |
| [15] | LV Q R, SUN F C, BIAN Y C, et al. A lightweight citrus object detection method in complex environments[J]. Agriculture, 2025, 15(10): 1046. |
| [16] | XU Y L, LI H X, ZHOU Y, et al. GLL-YOLO: a lightweight network for detecting the maturity of blueberry fruits[J]. Agriculture, 2025, 15(17): 1877. |
| [17] | 张海庆. 基于深度学习的小目标检测识别方法[J]. 光学与光电技术, 2025, 23(5): 50-57. |
| ZHANG H Q. A small object detection and recognition method based on deep learning[J]. Optics & Optoelectronic Technology, 2025, 23(5): 50-57. | |
| [18] | YANG W J, MA X X, AN H. Blueberry ripeness detection model based on enhanced detail feature and content-aware reassembly[J]. Agronomy, 2023, 13(6): 1613. |
| [19] | FENG W Z, LIU M D, SUN Y, et al. The use of a blueberry ripeness detection model in dense occlusion scenarios based on the improved YOLOv9[J]. Agronomy, 2024, 14(8): 1860. |
| [20] | LIU Y, ZHENG H T, ZHANG Y H, et al. “Is this blueberry ripe ”: a blueberry ripeness detection algorithm for use on picking robots[J]. Frontiers in Plant Science, 2023, 14: 1198650. |
| [21] | 朱灵龙, 王亚刚, 陈怡. 融合Transformer与卷积神经网络的图像分类算法[J]. 电子科技, 2025, 38(10): 96-105. |
| ZHU L L, WANG Y G, CHEN Y. Research on image classification algorithm combining transformer with CNN[J]. Electronic Science and Technology, 2025, 38(10): 96-105. | |
| [22] | 张仁冬, 叶树林, 胡宏升. 深度卷积神经网络中的共享特征层设计与优化[J]. 佛山科学技术学院学报(自然科学版), 2025, 43(5): 32-38. |
| ZHANG R D, YE S L, HU H S. Design and optimization of shared feature layer in deep convolutional neural networks[J]. Journal of Foshan University(Natural Science Edition), 2025, 43(5): 32-38. | |
| [23] | 周燕, 韦勤彬, 廖俊玮, 等. 基于增强多层次特征融合的自然场景文本检测[J]. 佛山科学技术学院学报(自然科学版), 2024, 42(3): 1-13. |
| ZHOU Y, WEI Q B, LIAO J W, et al. Natural scene text detection based on enhanced multi-level feature fusion[J]. Journal of Foshan University(Natural Science Edition), 2024, 42(3): 1-13. | |
| [24] | YOU H H, LI Z Y, WEI Z C, et al. A blueberry maturity detection method integrating attention-driven multi-scale feature interaction and dynamic upsampling[J]. Horticulturae, 2025, 11(6): 600. |
| [25] | XIAO F, WANG H B, XU Y Q, et al. A lightweight detection method for blueberry fruit maturity based on an improved YOLOv5 algorithm[J]. Agriculture, 2024, 14(1): 36. |
| [26] | YU B, CHAN Z, PAVLENKO P, et al. YOLo-blueberry: a lightweight and accurate multi-scale detection model for blueberry maturity recognition[EB/OL]. (2025-05-21) [2025-12-03]. https://www.preprints.org/manuscript/202505.1707. |
| [27] | DENG F Q, HE Z H, FU L H, et al. A new maturity recognition algorithm for Xinhui citrus based on improved YOLOv8[J]. Frontiers in Plant Science, 2025, 16: 1472230. |
| [28] | YE B F, XUE R Z, XU H Q. ASD-YOLO: a lightweight network for coffee fruit ripening detection in complex scenarios[J]. Frontiers in Plant Science, 2025, 16: 1484784. |
| [29] | NGUYEN H D, MCHENRY B, NGUYEN T, et al. Accurate crop yield estimation of blueberries using deep learning and smart drones[EB/OL]. (2025-01-04) [2025-12-03]. https://arxiv.org/abs/2501.02344. |
| [30] | 杨震宇, 汪小旵, 祁子涵, 等. 基于改进YOLOv8的草莓识别与果梗采摘关键点检测[J]. 农业工程学报, 2024, 40(18): 167-175. |
| YANG Z Y, WANG X C, QI Z H, et al. Recognizing strawberry to detect the key points for peduncle picking using improved YOLOv8 model[J]. Transactions of the Chinese Society of Agricultural Engineering, 2024, 40(18): 167-175. | |
| [31] | HUANG B Q, XIE Z Y, HOMANN H, et al. Research on blueberry maturity detection based on receptive field attention convolution and adaptive spatial feature fusion[J]. Applied Sciences, 2025, 15(11): 6356. |
| [1] | 张郭, 周庆辉, 何胜喜. 基于SOLOv2改进的苹果采摘机器人实例分割算法[J]. 浙江农业学报, 2026, 38(3): 588-599. |
| [2] | 汤奥冉, 金秀, 王坦, 饶元, 李佳佳, 张武. 基于弯曲大豆植株主茎骨架重构的生理株高测量方法[J]. 浙江农业学报, 2025, 37(2): 466-479. |
| [3] | 李萌民, 刘朔, 欧阳宇, 张鹏. 基于YOLOv8n的高效轻量化柑橘叶片病害检测模型[J]. 浙江农业学报, 2025, 37(10): 2198-2208. |
| [4] | 郭秀明, 王大伟, 刘升平, 诸叶平, 刘晓辉, 林克剑, 王佳宇, 李非. 基于深度学习的近地面草原鼠洞识别计数关键问题研究与应用[J]. 浙江农业学报, 2024, 36(9): 2146-2154. |
| [5] | 朱铭敏, 张国平, 谭建军, 孙玲姣, 朱黎, 焦洁. 基于YOLOv5s的轻量级茶叶嫩芽终端检测模型[J]. 浙江农业学报, 2024, 36(6): 1413-1424. |
| [6] | 李大华, 孔舒, 李栋, 于晓. 基于改进SSD模型的柑橘叶片病害轻量化检测模型[J]. 浙江农业学报, 2024, 36(3): 662-670. |
| [7] | 李颀, 李煜哲. 弱光条件下猪舍清洗目标检测[J]. 浙江农业学报, 2023, 35(9): 2240-2249. |
| [8] | 李荣鹏, 买买提·沙吾提, 盛艳芳, 何旭刚. 基于CA-MobileNet-V2的核桃病害识别与应用[J]. 浙江农业学报, 2023, 35(12): 2977-2987. |
| [9] | 王英允, 龙燕, 杨智优, 黄铝文. 基于改进U-Net网络的苹果叶部病害语义分割方法[J]. 浙江农业学报, 2023, 35(11): 2731-2741. |
| [10] | 周品志, 裴悦琨, 魏冉, 张永飞, 谷宇. 基于YOLOV4模型的果园樱桃实时检测研究[J]. 浙江农业学报, 2022, 34(11): 2522-2532. |
| [11] | 张宁, 吴华瑞, 韩笑, 缪祎晟. 基于多尺度和注意力机制的番茄病害识别方法[J]. 浙江农业学报, 2021, 33(7): 1329-1338. |
| 阅读次数 | ||||||
|
全文 |
|
|||||
|
摘要 |
|
|||||