食品科学 ›› 2025, Vol. 46 ›› Issue (4): 268-277.doi: 10.7506/spkx1002-6630-20240729-279

• 安全检测 • 上一篇    

基于轻量化YOLOv8-FasterBlock模型的云南小粒咖啡生豆分级方法

杨红欣,陈越,裴国权,钱雪英,李沛瑶,朱才英,夏迁,刘自高,吴文斗   

  1. (1.云南农业大学食品科学技术学院,云南 昆明 650201;2.云南省农业机械化干部学校,云南 昆明 650011;3.云南农业大学大数据学院,云南 昆明 650201;4.云南追溯科技有限公司,云南 昆明 650000)
  • 发布日期:2025-02-07
  • 基金资助:
    云南省重大科技专项计划项目(202302AE090020);云南省基础研究专项(202401AS070006)

Grading Method Based on Lightweight YOLOv8-FasterBlock Model for Green Arabica Coffee Bean Produced in Yunnan

YANG Hongxin, CHEN Yue, PEI Guoquan, QIAN Xueying, LI Peiyao, ZHU Caiying, XIA Qian, LIU Zigao, WU Wendou   

  1. (1. College of Food Science and Technology, Yunnan Agricultural University, Kunming 650201, China; 2. Yunnan Agricultural Mechanization Cadre School, Kunming 650011, China; 3. College of Big Data, Yunnan Agricultural University, Kunming 650201, China; 4. Yunnan Traceability Technology Co. Ltd., Kunming 650000, China)
  • Published:2025-02-07

摘要: 建立基于轻量化YOLOv8-FasterBlock模型的小粒咖啡生豆分级方法。实验主要收集来自云南的一级、二级、三级以及缺陷小粒咖啡生豆共500 g作为研究对象,混合后采集相应RGB图像作为咖啡生豆分级的数据集。随后对YOLOv8n模型进行改进,重点将YOLOv8n模型中C2f模块的BottleneckBlock替换为FasterNet中的FasterBlock模块,改进后形成新的轻量化YOLOv8-FasterBlock模型。将该模型应用于实验中不同等级咖啡豆分级检测,结果显示,提出的YOLOv8-FasterBlock模型精确率、召回率和平均精度均值分别达到了98.4%、94.3%、97.4%,其检测平均时间为2.4 ms。在后续进行的一系列对比实验、消融实验、轻量化实验以及粘连豆实验,证明了YOLOv8-FasterBlock模型的优越性和结构有效性。YOLOv8-FasterBlock模型在降低模型复杂度的同时,提升了对小粒咖啡生豆的特征提取能力和推理速度,可实现咖啡豆分级快速检测。研究结果可为后续小粒咖啡生豆分级设备的视觉模块部署提供参考,也可以为其他农产品的分级提供理论支持。

关键词: 小粒咖啡;生豆;YOLOv8-FasterBlock模型;目标检测;分级

Abstract: To establish a grading method for green Arabica coffee bean based on the lightweight YOLOv8-FasterBlock model, a total of 500 g of first-grade, second-grade, third-grade and defective green Arabica coffee bean from Yunnan were collected and mixed for acquirement of RGB images as the dataset for coffee bean grading. The YOLOv8n model was improved by replacing the BottleneckBlock in the C2f module with the FasterBlock module in FasterNet, resulting in a new lightweight YOLOv8-FasterBlock model. The improved model took 2.4 ms, on average, to discriminate different grades of coffee beans with accuracy, recall, and average precision of 98.4%, 94.3%, and 97.4%, respectively. Comparison, ablation, lightweighting, and adherent bean tests proved the superiority and structural validity of the YOLOv8-FasterBlock model. The YOLOv8-FasterBlock model improved the feature extraction capacity and inference speed for green Arabica coffee bean while having reduced complexity, enabling rapid grading of coffee bean. The results of the study provide a reference for the deployment of vision module in green Arabica coffee bean grading equipment, and also provide theoretical support for the grading of other agricultural products.

Key words: Arabica coffee; green coffee beans; YOLOv8-FasterBlock model; target detection; grading

中图分类号: