SCNet: Few-shot image classification via self-correlational and cross spatial-correlation attention
Congqing He, Xu Ding, Ke Gong, Fusen Guo, Dapeng Wei
Abstract
Recently, few-shot learning has gained significant attention across various industries due to its ability to rapidly adapt and learn new tasks with few labeled training data. However, existing methods often struggle with capturing feature diversity within classes and aligning features between support and query images, leading to sub-optimal performance. To tackle these challenges, we propose SCNet, a novel few-shot image classification framework that leverages self-correlational and cross spatial-correlation attention mechanisms to enhance feature extraction and alignment. Specifically, we introduce a Self-Correlational Attention module that focuses on critical local features by locating target regions within basic image features, enhancing the extraction of discriminative features from each image independently. Additionally, we design a Cross Spatial-Correlation Attention module to capture shared features between support and query images, generating an informative co-attention map that improves feature alignment across different images. Furthermore, we introduce a novel loss function that combines label-based classification loss and metric-based loss, which mitigates overfitting during meta-testing and enhances alignment of query embeddings with category prototypes. Experiments on three few-shot benchmark datasets show that the proposed SCNet model significantly outperforms state-of-the-art few-shot image classification models.