《计算机应用》唯一官方网站 ›› 2025, Vol. 45 ›› Issue (7): 2269-2277.DOI: 10.11772/j.issn.1001-9081.2024071008

• 数据科学与技术 • 上一篇    下一篇

基于粒球原型网络的小样本图像分类方法

白瑞峰, 苟光磊(), 文浪, 缪宛谕   

  1. 重庆理工大学 计算机科学与工程学院,重庆 400054
  • 收稿日期:2024-07-17 修回日期:2024-09-26 接受日期:2024-10-09 发布日期:2025-07-10 出版日期:2025-07-10
  • 通讯作者: 苟光磊
  • 作者简介:白瑞峰(1999—),男,河南商丘人,硕士研究生,CCF会员,主要研究方向:粒计算、小样本学习
    苟光磊(1980—),男,重庆人,讲师,博士,CCF会员,主要研究方向:粒计算、粗糙集、计算机视觉 ggl@cqut.edu.cn
    文浪(1999—),男,重庆人,硕士研究生,CCF会员,主要研究方向:小样本学习、细粒度图像分类
    缪宛谕(1999—),女,重庆人,硕士研究生,CCF会员,主要研究方向:小样本图像分类。
  • 基金资助:
    国家自然科学基金资助项目(62141201);重庆理工大学2024年研究生创新项目(gzlcx20243212)

Granular-ball prototypical network for few-shot image classification

Ruifeng BAI, Guanglei GOU(), Lang WEN, Wanyu MIAO   

  1. College of Computer Science and Engineering,Chongqing University of Technology,Chongqing 400054,China
  • Received:2024-07-17 Revised:2024-09-26 Accepted:2024-10-09 Online:2025-07-10 Published:2025-07-10
  • Contact: Guanglei GOU
  • About author:BAI Ruifeng, born in 1999, M. S. candidate. His research interests include granular computing, few-shot learning.
    GOU Guanglei, born in 1980, Ph. D., lecturer. His research interests include granular computing, rough set, computer vision.
    WEN Lang, born in 1999, M. S. candidate. His research interests include few-shot learning, fine-grained image classification.
    MIAO Wanyu, born in 1999, M. S. candidate. Her research interests include few-shot image classification.
  • Supported by:
    National Natural Science Foundation of China(62141201);Chongqing University of Technology 2024 Graduate Innovation Program(gzlcx20243212)

摘要:

针对小样本学习中训练数据稀少以及单一距离度量无法全面衡量样本之间关系的问题,提出一种基于粒球原型网络(GBProtoNet)的小样本图像分类方法。首先,将粒球算法(Ball k-means)应用于查询集,并通过自适应更新迭代得到查询集类别信息,之后将这些信息与原型网络(ProtoNet)结合,构造具有查询集与支持集信息的粒球原型,从而缓解训练数据量少的问题;其次,在GBProtoNet特征提取后,设计一个特征筛选模块用于提取样本的重要信息,利用Ball k-means算法得到查询集各类的簇心,并把它们与初始原型进行加权融合,以构造更具代表性的粒球原型;再次,计算初始查询集样本与粒球原型的欧氏距离与余弦距离,并将二者相乘得到综合考量的距离,从而使样本间距离的度量更全面;最后,按照最邻近分配原则,将查询集样本分配给所属类别。实验结果表明,在MiniImageNet和TieredImageNet数据集的5-way 1-shot和5-way 5-shot的图像分类任务中,相较于基线模型ProtoNet,所提方法在MiniImageNet数据集上分类准确率分别提升了6.18%和3.85%,而在TieredImageNet数据集上分别提升了6.89%和3.57%。并且,所提方法在MiniImageNet数据集5-shot图像分类任务上所需时间成本比SSL-ProtoNet (Self-Supervised Learning Prototypical Network)减少了72.6%。可见,所提方法在有效提高小样本图像分类准确度的同时具有高效性。

关键词: Ball k-means算法, 粒球原型, 综合度量, 小样本学习, 自适应, 迭代更新

Abstract:

To address the issues of sparse training data and the inadequacy of a single distance metric in measuring relationships among samples comprehensively in few-shot learning, a few-shot image classification method based on Granular-Ball Prototypical Network (GBProtoNet) was proposed. Firstly, the Ball k-means algorithm was applied to the query set, and category information was obtained by adaptively updating iteratively, after the above, this information was combined with ProtoNet to construct granular-ball prototypes with information from both the query set and the support set, thereby mitigating the problem of limited training data. Secondly, after GBProtoNet feature extraction, a feature selection module was designed to extract important information from samples, and Ball k-means algorithm was used to obtain the cluster centers for categories in the query set, which were then weighted and fused with the original prototypes to construct more representative granular-ball prototypes. Thirdly, the Euclidean distance and cosine distance between the original query set samples and the granular-ball prototypes were computed and multiplied to achieve a comprehensive distance, thereby making distance metric between samples more comprehensive. Finally, according to the nearest neighbor assignment principle, the query set samples were assigned to their categories. Experimental results in 5-way 1-shot and 5-way 5-shot image classification tasks using MiniImageNet and TieredImageNet datasets show that the proposed method improves the classification accuracy by 6.18% and 3.85% on MiniImageNet dataset, and by 6.89% and 3.57% on TieredImageNet dataset, compared to the baseline ProtoNet. Additionally, the time cost required of the proposed method for 5-shot image classification tasks on MiniImageNet dataset is reduced by 72.6% compared to SSL-ProtoNet (Self-Supervised Learning ProtoNet). These results demonstrate that the proposed method enhances classification accuracy for few-shot learning effectively and has high efficiency.

Key words: Ball k-means algorithm, granular-ball prototype, comprehensive metric, few-shot learning, adaptability, iterative update

中图分类号: