基于YOLOv8的水果外观检测与分类方法
CSTR:
作者:
作者单位:

(1. 云南农业大学食品科学技术学院,云南 昆明 650201;2. 云南农业大学茶学院,云南 昆明 650201;3. 云南农业大学大数据学院,云南 昆明 650201)

作者简介:

唐兴萍,女,云南农业大学在读硕士研究生。

通讯作者:

吴文斗(1974—),男,云南农业大学教授,博士。E-mail:wuwd2004@126.com

中图分类号:

基金项目:

云南省重大科技专项计划项目(编号:A303202324600101);科技创新项目(编号:S9032023111)


Research on fruit appearance detection and classification method based on YOLOv8
Author:
Affiliation:

(1. College of Food Science and Technology, Yunnan Agricultural University, Kunming, Yunnan 650201, China; 2. College of Tea Science, Yunnan Agricultural University, Kunming, Yunnan 650201, China; 3. College of Big Data, Yunnan Agricultural University, Kunming, Yunnan 650201, China)

Fund Project:

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

    [目的]建立一种水果外观无损检测方法。[方法]以油桃为研究对象,使用IQQU3手机相机采集图像数据,并进行图像预处理。使用LabelImg图像标注软件标注数据。采用镜像翻转、左右翻转、平移等方法对数据进行扩充。将扩充后的图像按照8∶2划分为训练集和测试集。最后使用YOLOv8 (n, s, m, l, x) 5个模型对数据进行训练,训练150轮,比较分析5个模型的训练结果,选出最优的检测模型。[结果]构建了油桃数据集,共4 205张图像;YOLOv8 (n, s, m, l, x) 训练集总损失值分别为2.275,1.778,1.482,1.880,1.401,测试集的总损失值分别为2.724,2.253,2.057,2.105,2.004;YOLOv8 (n, s, m, l, x) 的精确率分别为94.0%,98.0%,97.4%,97.3%,97.9%,召回率分别为95.4%,95.5%,95.9%,96.9%,96.9%。综合比较,YOLOv8s为较优的模型,其平均检测精确率达97.8%,正常、损伤、疤痕的平均精确率分别为96.2%,98.8%,98.4%,其推理时间、计算量(GFLOPs)分别为179.4 ms、28.4。[结论]YOLOv8能够有效地检测水果外观品质,可用于水果外观的无损检测。

    Abstract:

    [Objective] To establish a nondestructive detection method for fruit appearance. [Methods] Nectarines were used as the research subject. The IQQU3 smart phone camera was used to capture the picture data, which was then preprocessed. The image annotation program Labelimg was used to label the data. Panning, left-right flipping, and mirror flipping were used to enlarge the data. Using an ratio of 8∶2, the enlarged photos were split into training and test sets. Lastly, the data was trained for 150 epochs using five YOLOv8 models (n, s, m, l, x). The training results of the five models were compared and analyzed in order to determine which detection model was the best. [Results] The nectarine dataset was constructed, there were 4,205 total photos; YOLOv8 (n, s, m, l, x) the total loss values in the training set were 2.275, 1.778, 1.482, 1.880, and 1.401, respectively, The total loss values of the test set were 2.724, 2.253, 2.057, 2.105, and 2.004, respectively; YOLOv8 (n, s, m, l, x) precision were 94.0%, 98.0%, 97.4%, 97.3%, 97.9%, respectively, The recall were 95.4%, 95.5%, 95.9%, 96.9%, and 96.9%, respectively. In a comprehensive comparison YOLOv8s was the better model, and the average detection accuracy mAP_0.5 was 97.8%. The average precision of fresh, bruise and scar were 96.2%, 98.8% and 98.4%, respectively. The inference time and calculation amount (GFLOPs) were 179.4 ms and 28.4 respectively. [Conclusion] YOLOv8 can effectively detect the quality of fruit appearance, which can be used for non-destructive testing of fruit appearance, and this study can provide new ideas for non-destructive testing of fruits.

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

唐兴萍,王白娟,杨红欣,等.基于YOLOv8的水果外观检测与分类方法[J].食品与机械,2024,(7):103-110.
TANG Xingping, WANG Baijuan, YANG Hongxin, et al. Research on fruit appearance detection and classification method based on YOLOv8[J]. Food & Machinery,2024,(7):103-110.

复制
分享
文章指标
  • 点击次数:
  • 下载次数:
  • HTML阅读次数:
  • 引用次数:
历史
  • 收稿日期:2023-08-29
  • 最后修改日期:
  • 录用日期:
  • 在线发布日期: 2024-09-12
  • 出版日期:
文章二维码
×
《食品与机械》
友情提示
友情提示 一、 近日有不少作者反应我刊官网无法打开,是因为我刊网站正在升级,旧网站仍在百度搜索排名前列。请认准《食品与机械》唯一官方网址:http://www.ifoodmm.com/spyjx/home 唯一官方邮箱:foodmm@ifoodmm.com; 联系电话:0731-85258200,希望广大读者和作者仔细甄别。