CDN4: A cross-view Deep Nearest Neighbor Neural Network for fine-grained few-shot classification
Xiaoxu Li, Shuo Ding, Jiyang Xie, Xiaochen Yang, Zhanyu Ma, Jing‐Hao Xue · Pattern Recognition · 2025
The fine-grained few-shot classification is a challenging task in computer vision, aiming to classify images with subtle and detailed differences given scarce labeled samples. A promising avenue to tackle this challenge is to use spatially local features to densely measure the similarity between query and support samples. Compared with image-level global features, local features contain more low-level information that is rich and transferable across categories. However, methods based on spatially localized features have difficulty distinguishing subtle category differences due to the lack of sample diversity. To address this issue, we propose a novel method called Cross-view Deep Nearest Neighbor Neural Network (CDN4). CDN4 applies a random geometric transformation to augment a different view of support and query samples and subsequently exploits four similarities between the original and transformed views of query local features and those views of support local features. The geometric augmentation increases the diversity between samples of the same class, and the cross-view measurement encourages the model to focus more on discriminative local features for classification through the cross-measurements between the two branches. Extensive experiments validate the superiority of CDN4, which achieves new state-of-the-art results in few-shot classification across various fine-grained benchmarks. Code is available at . • A novel fine-grained FSL method for improving local feature discriminativeness. • Construct the Episodic Dual-Branch Structure to enhance sample diversity. • Exploit four cross-view metric pairs to enforce learning of discriminative features. • CDN4 achieves state-of-the-art performance on three fine-grained benchmark datasets.