English

中国农机化学报

中国农机化学报 ›› 2025, Vol. 46 ›› Issue (1): 198-203.DOI: 10.13733/j.jcam.issn.2095-5553.2025.01.030

• 农业智能化研究 • 上一篇    下一篇

基于深度学习的水果图像识别

李春雨,郭肖琴,杨晶晶,李忠华   

  1. 河北北方学院信息科学与工程学院,河北张家口,075000
  • 出版日期:2025-01-15 发布日期:2025-01-24
  • 基金资助:
    河北省自然基金项目(F2021405001)

Fruit image recognition based on deep learning

Li Chunyu, Guo Xiaoqin, Yang Jingjing, Li Zhonghua   

  1. School of Information Science and Engineering, Hebei North University, Zhangjiakou, 075000, China
  • Online:2025-01-15 Published:2025-01-24

摘要: 为有效辨别水果种类,提高水果产业商业化的深加工和线下水果销售渠道的效率,针对大多数线下超市在水果售卖过程中主要采用人工识别,其成本高、效率低的问题,提出一种基于语义分割模型(U2-Net)和ResNet-50模型结合的水果图像识别方法,实现水果图像自动识别。使用U2-Net分割出水果的二值图像,然后结合OpenCV算法将二值图中的白色像素值改为水果真实的颜色值,最后通过ResNet-50进行水果图像识别。结果表明,Alexent、VGG16、GoogLeNet和本模型在训练集上的准确率分别为99.66%、99.65%、99.9%、99.8%,在验证集上的准确率分别为96.5%、99.9%、99.6%、100%。提出的水果图像识别方法能够有效提取水果的颜色、形状、纹理等特征,从而实现对不同种类水果图像的准确识别。

关键词: 水果, 深度学习, 语义分割, 图像识别, 二值图像

Abstract: In order to effectively identify the types of fruits and improve the efficiency of commercial deep processing of fruit industry and offline fruit sales channels, this paper proposes a fruit image recognition method based on the combination of semantic segmentation model (U2-Net) and ResNet-50 model to realize automatic fruit image recognition. U2-Net is used to segment the binary image of fruit, and then the white pixel value in the binary image is changed into the real color value of fruit by OpenCV algorithm. Finally, the fruit image is recognized by ResNet-50. The results show that the accuracy of Alexent, VGG16, GoogLeNet and this model on the training set is 99.66%, 99.65%, 99.9% and 99.8%, and the accuracy of the verification set is 96.5%, 99.9%, 99.6% and 100%, respectively. The result showed that the fruit image recognition method proposed in this paper can effectively extract the color, shape, texture and other features of fruits, thus realizing accurate recognition of different kinds of fruit images.

Key words: fruit, deep learning, semantic segmentation, image recognition, binary image

中图分类号: