基于轻量级YOLO v8改进模型的苹果入库高密度计数方法
CSTR:
作者:
作者单位:

作者简介:

通讯作者:

中图分类号:

基金项目:

国家自然科学基金项目(52075090)和黑龙江省自然科学基金项目(PL2024C003)


High-density Apple Counting Method Based on Lightweight Improved YOLO v8
Author:
Affiliation:

Fund Project:

  • 摘要
  • |
  • 图/表
  • |
  • 访问统计
  • |
  • 参考文献
  • |
  • 相似文献
  • |
  • 引证文献
  • |
  • 资源附件
  • |
  • 文章评论
    摘要:

    在规模化苹果自动入库场景中,基于计算机视觉的计数模型需兼顾轻量化与检测精度,传统模型参数量大、计算成本高,难以实时运行;同时在苹果密集、遮挡严重的复杂环境下,存在边界模糊、误检率高等问题。为此,本文提出一种改进的CGW-YOLO v8模型。首先,通过将主干网络中的C2f模块替换为GhostNet轻量化模块,结合特征通道重加权机制,显著减少了模型的参数量。其次,采用CSPHet模块,通过异构多分支卷积与双路径特征融合策略,在降低参数量的同时增强密集苹果目标的边界区分能力。最后,采用基于Wasserstein distance loss的损失函数替代传统的IoU度量,有效降低了密集堆叠场景中的误检率。实验表明,本模型平均精度均值mAP@0.5提升至95.8%,较原模型提升1个百分点,精确率和召回率较原模型分别提升1.1、1.3个百分点,参数量与运算量较基准模型分别减少24.4%和23.2%。针对入库生产环节中对计数实时性与准确性双重要求,本文集成DeepSORT追踪算法实现苹果在视频帧间的持续跟踪与准确计数。设计了基于轨迹管理的计数策略,通过虚拟计数线仅在目标首次越过时进行计数,有效避免了重复统计与漏计问题。实验结果表明,所提出的改进方法在复杂背景下,尤其是苹果密集排列与部分遮挡的场景中,展现了较强的鲁棒性和较高的计数准确性。

    Abstract:

    In the scenario of large-scale automatic apple warehousing, the counting model based on computer vision must balance lightweight design with detection accuracy. Traditional models involve large parameters and high computational costs, making real-time operation challenging;moreover, in complex environments characterized by dense apples and severe occlusion, issues such as boundary blurriness and high false detection rates arise. To address these challenges, an improved CGW-YOLO v8 model was proposed. Firstly, by replacing the C2f module in the backbone network with the lightweight GhostNet module and incorporating a feature channel reweighting mechanism, the model's parameter count was significantly reduced. Secondly, the CSPHet module was employed, which utilized heterogeneous multibranch convolution and a dual-path feature fusion strategy to enhance the boundary distinguishing capability of densely packed apples while decreasing the number of parameters. Lastly, a loss function based on Wasserstein distance loss was adopted to replace the traditional IoU metric, effectively reducing the false detection rate in densely stacked scenarios. Experimental results indicated that the model's mean average precision (mAP@0.5) was improved to 95.8%, representing a 1 percentage points increase compared with that of the original model, with precision and recall increased by 1.1 percentage points and 1.3 percentage points, respectively, compared with that of the original model. Both parameter count and computational volume were decreased by 24.4% and 23.2% relative to that of the baseline model. To meet the dual requirements of real-time counting and accuracy in the inventory production process, the DeepSORT tracking algorithm was integrated to achieve continuous tracking and accurate counting of apples across video frames. A counting strategy based on trajectory management was designed, which counted only when the target first crossed a virtual counting line, effectively avoiding issues of duplicate statistics and missed counts. Experimental results demonstrated that the proposed improved method exhibited strong robustness and high counting accuracy, particularly in complex backgrounds, such as densely arranged apples and partially obscured scenes.

    参考文献
    相似文献
    引证文献
引用本文

郭成波,姜文文,郭艳玲,孙术发.基于轻量级YOLO v8改进模型的苹果入库高密度计数方法[J].农业机械学报,2026,57(5):342-352. GUO Chengbo, JIANG Wenwen, GUO Yanling, SUN Shufa. High-density Apple Counting Method Based on Lightweight Improved YOLO v8[J]. Transactions of the Chinese Society for Agricultural Machinery,2026,57(5):342-352.

复制
分享
相关视频

文章指标
  • 点击次数:
  • 下载次数:
  • HTML阅读次数:
  • 引用次数:
历史
  • 收稿日期:2025-07-14
  • 最后修改日期:
  • 录用日期:
  • 在线发布日期: 2026-03-01
  • 出版日期:
文章二维码