食品科学 ›› 2026, Vol. 47 ›› Issue (17): 302-313.doi: 10.7506/spkx1002-6630-20260302-014

• 安全检测 • 上一篇    下一篇

CP-ResNet50:基于特征聚合和注意力机制的茶叶多品类外观检测模型

李浩,宋彦,戴前颖,宁井铭   

  1. (1.安徽农业大学电子与电气工程学院,安徽?合肥 230036;2.茶树种质创新与资源利用全国重点实验室,安徽?合肥 230036)
  • 出版日期:2026-09-15 发布日期:2026-09-03
  • 基金资助:
    现代农业产业技术体系建设专项(CARS-18);安徽省自然科学基金项目(2308085MC84)

CP-ResNet50: An Appearance Detection Model for Multiple Types and Grades of Tea Based on Feature Aggregation and Attention Mechanism

LI Hao, SONG Yan, DAI Qianying, NING Jingming   

  1. (1. School of Electronics and Electrical Engineering, Anhui Agricultural University, Hefei 230036, China; 2. State Key Laboratory of Tea Plant Germplasm Innovation and Resource Utilization, Hefei 230036, China)
  • Online:2026-09-15 Published:2026-09-03

摘要: 为解决传统人工感官评价主观性强、效率低的局限,针对茶叶外观品质检测问题,本研究设计一种采用特征聚合和注意力机制优化残差网络的检测模型。采集祁门工夫红茶、黄山毛峰、皖西黄茶3 类茶样共22 个等级1 800 张茶样图像,数据集按8∶2划分训练集与测试集;以深度残差网络(residual network 50 layers,ResNet50)为基础,通过迁移学习保留通用视觉特征提取能力,替换顶层全连接层适配分类任务,嵌入卷积块注意力模块与路径聚合网络,设计多任务架构并结合联合损失函数优化,实现茶叶产品与等级识别。结果表明,产品类别分类准确率达到100%,等级识别准确率达到93%以上,识别效果良好。该模型有望为茶叶多品类外观识别问题提供技术支持,有助于推动茶叶智能化品控技术发展。

关键词: 深度学习;深度残差网络;茶叶;多品类;识别;卷积块注意力模块;路径聚合网络

Abstract: Considering that traditional sensory evaluation is highly subjective and inefficient, this study designed a model for the detection of tea appearance quality using a residual network optimized by feature aggregation and attention mechanism. A total of 1 800 tea sample images covering 22 grades of three types of tea (Keemun black tea, Huangshan Maofeng, and West Anhui yellow tea) were collected and divided into training and test sets at a ratio of 8:2. Based on the residual network with 50 layers (ResNet50), transfer learning was applied to retain general visual feature extraction capabilities, the top fully connected layer was replaced to adapt to the classification task, and a convolutional block attention module (CBAM) and a path aggregation network (PANet) were embedded. A multi-task architecture was designed and optimized using a joint loss function to achieve recognition of tea types and grades. The classification accuracy of the proposed model reached 100% for tea types and exceeded 93% for tea grades, demonstrating good classification performance. This model is expected to provide technical support for tea appearance recognition and contribute to the development of intelligent tea quality control technology.

Key words: deep learning; residual network with 50 layers; tea; multiple types; recognition; convolutional block attention module; path aggregation network

中图分类号: