Enhancing Few-Shot Image Classification With Cosine Transformer

被引:7
|
作者
Nguyen, Quang-Huy [1 ,2 ]
Nguyen, Cuong Q. [1 ,3 ]
Le, Dung D. D. [2 ]
Pham, Hieu H. [1 ,2 ,4 ]
机构
[1] VinUniv, VinUni Illinois Smart Hlth Ctr, Hanoi 100000, Vietnam
[2] VinUniv, Coll Engn & Comp Sci, Hanoi 100000, Vietnam
[3] Vietnam Natl Univ Ho Chi Minh City, Univ Informat Technol, Comp Sci Dept, Ho Chi Minh City 700000, Vietnam
[4] Univ Illinois Urbana Champaign UIUC, Coordinated Sci Lab, Champaign, IL 61820 USA
关键词
Few-shot learning; image classification; transformer; cross-attention; cosine similarity;
D O I
10.1109/ACCESS.2023.3298299
中图分类号
TP [自动化技术、计算机技术];
学科分类号
0812 ;
摘要
This paper addresses the few-shot image classification problem, where the classification task is performed on unlabeled query samples given a small amount of labeled support samples only. One major challenge of the few-shot learning problem is the large variety of object visual appearances that prevents the support samples to represent that object comprehensively. This might result in a significant difference between support and query samples, therefore undermining the performance of few-shot algorithms. In this paper, we tackle the problem by proposing Few-shot Cosine Transformer (FS-CT), where the relational map between supports and queries is effectively obtained for the few-shot tasks. The FS-CT consists of two parts, a learnable prototypical embedding network to obtain categorical representations from support samples with hard cases, and a transformer encoder to effectively achieve the relational map from two different support and query samples. We introduce Cosine Attention, a more robust and stable attention module that enhances the transformer module significantly and therefore improves FS-CT performance from 5% to over 20% in accuracy compared to the default scaled dot-product mechanism. Our method performs competitive results in mini -ImageNet, CUB-200, and CIFAR-FS on 1-shot learning and 5-shot learning tasks across backbones and few-shot configurations. We also developed a custom few-shot dataset for Yoga pose recognition to demonstrate the potential of our algorithm for practical application. Our FS-CT with cosine attention is a lightweight, simple few-shot algorithm that can be applied for a wide range of applications, such as healthcare, medical, and security surveillance. The official implementation code of our Few-shot Cosine Transformer is available at https://github.com/vinuni-vishc/Few-Shot-Cosine-Transformer.
引用
收藏
页码:79659 / 79672
页数:14
相关论文
共 50 条
  • [31] Few-Shot Image Classification Along Sparse Graphs
    Comer, Joseph F.
    Jacobson, Philip L.
    Hoffmann, Heiko
    2022 IEEE/CVF CONFERENCE ON COMPUTER VISION AND PATTERN RECOGNITION WORKSHOPS, CVPRW 2022, 2022, : 4186 - 4194
  • [32] MTUNet: Few-shot Image Classification with Visual Explanations
    Wang, Bowen
    Li, Liangzhi
    Verma, Manisha
    Nakashima, Yuta
    Kawasaki, Ryo
    Nagahara, Hajime
    2021 IEEE/CVF CONFERENCE ON COMPUTER VISION AND PATTERN RECOGNITION WORKSHOPS, CVPRW 2021, 2021, : 2294 - 2298
  • [33] CONTRASTIVE REPRESENTATION FOR DERMOSCOPY IMAGE FEW-SHOT CLASSIFICATION
    Mo Xuan
    Yang Qiang
    Zhang Xiyi
    Chen Juan
    Wen Quan
    2020 17TH INTERNATIONAL COMPUTER CONFERENCE ON WAVELET ACTIVE MEDIA TECHNOLOGY AND INFORMATION PROCESSING (ICCWAMTIP), 2020, : 134 - 137
  • [34] Channel Importance Matters in Few-Shot Image Classification
    Luo, Xu
    Xu, Jing
    Xu, Zenglin
    INTERNATIONAL CONFERENCE ON MACHINE LEARNING, VOL 162, 2022,
  • [35] Powerful embedding networks for few-shot image classification
    Luo, Laigan
    Zhou, Anan
    Yi, Benshun
    JOURNAL OF ELECTRONIC IMAGING, 2021, 30 (06)
  • [36] Few-shot learning for skin lesion image classification
    Xue-Jun Liu
    Kai-li Li
    Hai-ying Luan
    Wen-hui Wang
    Zhao-yu Chen
    Multimedia Tools and Applications, 2022, 81 : 4979 - 4990
  • [37] Deep Few-Shot Learning for Hyperspectral Image Classification
    Liu, Bing
    Yu, Xuchu
    Yu, Anzhu
    Zhang, Pengqiang
    Wan, Gang
    Wang, Ruirui
    IEEE TRANSACTIONS ON GEOSCIENCE AND REMOTE SENSING, 2019, 57 (04): : 2290 - 2304
  • [38] Uncertainty-Aware Few-Shot Image Classification
    Zhang, Zhizheng
    Lan, Cuiling
    Zeng, Wenjun
    Chen, Zhibo
    Chang, Shih-Fu
    PROCEEDINGS OF THE THIRTIETH INTERNATIONAL JOINT CONFERENCE ON ARTIFICIAL INTELLIGENCE, IJCAI 2021, 2021, : 3420 - 3426
  • [39] Dataset Bias Prediction for Few-Shot Image Classification
    Kim, Jang Wook
    Kim, So Yeon
    Sohn, Kyung-Ah
    ELECTRONICS, 2023, 12 (11)
  • [40] Matching Feature Sets for Few-Shot Image Classification
    Afrasiyabi, Arman
    Larochelle, Hugo
    Lalonde, Jean-Francois
    Gagne, Christian
    2022 IEEE/CVF CONFERENCE ON COMPUTER VISION AND PATTERN RECOGNITION (CVPR), 2022, : 9004 - 9014