English

中国农机化学报

中国农机化学报 ›› 2025, Vol. 46 ›› Issue (6): 77-84.DOI: 10.13733/j.jcam.issn.2095-5553.2025.06.012

• 农业信息化工程 • 上一篇    下一篇

基于改进DenseNet与迁移学习的食品图像分类技术

邹小波,高文健,石吉勇,史永强,申婷婷   

  1. (江苏大学食品与生物工程学院,江苏镇江,212013)
  • 出版日期:2025-06-15 发布日期:2025-05-21
  • 基金资助:
    江苏省自然科学基金 (BK20220058)

Food image classification technology based on improved DenseNet and transfer learning

Zou Xiaobo, Gao Wenjian, Shi Jiyong, Shi Yongqiang, Shen Tingting   

  1. (School of Food and Biological Engineering, Jiangsu University, Zhenjiang, 212013, China)
  • Online:2025-06-15 Published:2025-05-21

摘要:

为提高实际场景下食品分类的准确率,提出一种新型食品数据集构建及网络改进方法。通过实际数据构建、数据增强、模型改进、模型验证等,构建一套食品图像分类技术;模型改进上,在DenseNet264中添加CBAM并保留其在ImageNet上的特征以提高模型对关键特征的注意力及泛化性。对比标准数据集与实际数据增强的数据集,改进后模型准确率分别达到88.43%、91.8%,较DenseNet264提高5.28%、4.74%;精确度达到87.5%、90.98%;召回率达到88.01%、90.65%;F1值达到87.75%、90.81%。在实际数据增强的数据集上,各网络相比于标准数据集准确率平均提升3.11%。CBAM与迁移学习能显著提升模型的特征提取能力与准确率,且实际数据集分类任务上各网络均表现出更好的性能,实际应用中具有一定的价值。该技术将应用于餐饮系统中,以提供更好的用户服务。

关键词: 深度学习, 注意力机制, 食品图像识别, 迁移学习, 数据增强

Abstract:

In order to improve the accuracy of food classification in practical scenarios, a new food data set construction and network improvement method was proposed. Through the construction of practical dataset, data augmentation, model enhancement and model validation, a set of food image classification technology was established. In terms of model enhancement, the CBAM was added to DenseNet264 while retaining the features learned from ImageNet to improve the model's attention to key features and its generalization ability. A comparison between the standard dataset and the augmented dataset showed that the improved model achieved accuracy rates of 88.43% and 91.8%, representing a 5.28% and 4.74% increase over DenseNet264, respectively. The precision rates were 87.5% and 90.98%, the recall rates were 88.01% and 90.65%, and the F1 scores were 87.75% and 90.81%. On the augmented dataset, the accuracy of each network was improved by an average of 3.11% compared to the standard dataset, with DenseNet264 showing the best improvement. CBAM and transfer learning significantly enhanced the feature extraction capability and accuracy of the model, leading to better performance in the task of classifying practical datasets and having certain value in practical application. This technology will be applied in practical catering systems to provide a better user service.

Key words: deep learning, attention mechanism, food image recognition, transfer learning, data enhancement

中图分类号: