河南农业科学 ›› 2023, Vol. 52 ›› Issue (7): 154-162.DOI: 10.15933/j.cnki.1004-3268.2023.07.016

• 农业信息与工程·农产品加工 • 上一篇    下一篇

基于对比学习的多肉植物分类识别方法研究

封雨欣,梁少华,童浩   

  1. (长江大学 计算机科学学院,湖北 荆州 434023)
  • 收稿日期:2023-03-30 出版日期:2023-07-15 发布日期:2023-08-10
  • 通讯作者: 梁少华(1965-),男,湖北荆州人,副教授,硕士,主要从事人工智能、石油软件开发等研究。E-mail:19985466@qq.com
  • 作者简介:封雨欣(1999-),女,湖北十堰人,在读硕士研究生,研究方向:计算机视觉。E-mail:862352924qq.com
  • 基金资助:
    国家自然科学基金项目(62006028)

Research on Succulent Plant Classification and Recognition Method Based on Contrastive Learning

FENG Yuxin,LIANG Shaohua,TONG Hao   

  1. (College of Computer Science and Technology,Yangtze University,Jingzhou 434023,China)
  • Received:2023-03-30 Published:2023-07-15 Online:2023-08-10

摘要: 针对多肉植物种类多,类内差异大、类间差异小,数据难收集,导致传统分类算法不能有效解决多肉植物图像分类的问题,提出一种基于对比学习的多肉植物图像分类网络CL_ConvNeXt。该网络以ConvNeXt为基础结构引入对比学习思想,在网络中间层添加非线性投影层(Projection head)作为辅助分类器来帮助模型对浅层网络进行特征提取;在一个批处理中通过数据增强来构造正样本,将剩余样本看作负样本;将交叉熵损失函数和对比损失函数进行加权计算,重新设计新的损失函数计算方法,实现单阶段模型训练。训练时采用迁移学习将预训练权重迁移到模型中来提高模型训练时的收敛速度,通过优化各种策略和参数来进一步提升模型的识别准确率。结果表明,在自制的190类多肉植物数据集中,在使用相同训练策略和环境配置的情况下,最终模型CL_ConvNeXt对多肉植物图像分类识别准确率达到了91.79%,较原ConvNeXt模型结构的识别准确率提升了12.24个百分点,对解决多肉植物图像分类识别问题有较好的效果。

关键词: 多肉植物, 图像分类, 对比学习, ConvNeXt, 投影层

Abstract: In view of the large variety of succulents,the large intra⁃class differences and the small inter⁃class differences,as well as the difficulty of data collection,traditional classification algorithms cannot effectively solve the problem of succulent plant image classification.This paper proposed a contrastive learning based succulent plant image classification network CL_ConvNeXt.The network was based on ConvNeXt structure and introduced the idea of contrastive learning.A non⁃linear projection layer(Projection head)was added in the middle layer of the network as an auxiliary classifier to help the model extract features from the shallow network.In a batch,positive samples were constructed through data augmentation,and the remaining samples were considered as negative samples.The cross entropy loss function and the contrastive loss function were weighted to newly design loss function calculation method,which could achieve one⁃stage model training.Transfer learning was used during training to transfer the pre⁃trained weights to the model to improve the convergence speed of the model,and various strategies and parameters were optimized to further improve the recognition accuracy of the model.The experimental results showed that on the self⁃made 190⁃class succulent plant dataset,under the same training strategy and environment configuration,the recognition accuracy of the final model CL_ConvNeXt for succulent plant image classification reached 91.79%,which was 12.24 percentage points higher than that of the original ConvNeXt model structure,showing good effect on solving the problem of succulent plant image classification and recognition.

Key words: Succulents, Image classification, Contrastive learning, ConvNeXt, Projection head

中图分类号: