TasksSotADatasetsPapersMethodsSubmitAbout
Papers With Code 2

A community resource for machine learning research: papers, code, benchmarks, and state-of-the-art results.

Explore

Notable BenchmarksAll SotADatasetsPapersMethods

Community

Submit ResultsAbout

Data sourced from the PWC Archive (CC-BY-SA 4.0). Built by the community, for the community.

Papers/Revisiting Local Descriptor based Image-to-Class Measure f...

Revisiting Local Descriptor based Image-to-Class Measure for Few-shot Learning

Wenbin Li, Lei Wang, Jinglin Xu, Jing Huo, Yang Gao, Jiebo Luo

2019-03-28CVPR 2019 6Few-Shot LearningImage ClassificationFew-Shot Image ClassificationGeneral Classification
PaperPDFCode

Abstract

Few-shot learning in image classification aims to learn a classifier to classify images when only few training examples are available for each class. Recent work has achieved promising classification performance, where an image-level feature based measure is usually used. In this paper, we argue that a measure at such a level may not be effective enough in light of the scarcity of examples in few-shot learning. Instead, we think a local descriptor based image-to-class measure should be taken, inspired by its surprising success in the heydays of local invariant features. Specifically, building upon the recent episodic training mechanism, we propose a Deep Nearest Neighbor Neural Network (DN4 in short) and train it in an end-to-end manner. Its key difference from the literature is the replacement of the image-level feature based measure in the final layer by a local descriptor based image-to-class measure. This measure is conducted online via a $k$-nearest neighbor search over the deep local descriptors of convolutional feature maps. The proposed DN4 not only learns the optimal deep local descriptors for the image-to-class measure, but also utilizes the higher efficiency of such a measure in the case of example scarcity, thanks to the exchangeability of visual patterns across the images in the same class. Our work leads to a simple, effective, and computationally efficient framework for few-shot learning. Experimental study on benchmark datasets consistently shows its superiority over the related state-of-the-art, with the largest absolute improvement of $17\%$ over the next best. The source code can be available from \UrlFont{https://github.com/WenbinLee/DN4.git}.

Results

TaskDatasetMetricValueModel
Image ClassificationCUB 200 5-way 5-shotAccuracy81.9DN4-DA (k=1)
Image ClassificationStanford Dogs 5-way (1-shot)Accuracy45.73DN4-DA (k=1)
Image ClassificationCUB 200 5-way 1-shotAccuracy53.15DN4-DA (k=1)
Image ClassificationMini-Imagenet 5-way (5-shot)Accuracy71.02DN4 (k=3)
Image ClassificationMini-Imagenet 5-way (1-shot)Accuracy51.24DN4 (k=3)
Image ClassificationStanford Dogs 5-way (5-shot)Accuracy66.33DN4-DA (k=1)
Image ClassificationStanford Cars 5-way (5-shot)Accuracy89.6DN4-DA (k=1)
Image ClassificationStanford Cars 5-way (1-shot)Accuracy61.51DN4-DA (k=1)
Few-Shot Image ClassificationCUB 200 5-way 5-shotAccuracy81.9DN4-DA (k=1)
Few-Shot Image ClassificationStanford Dogs 5-way (1-shot)Accuracy45.73DN4-DA (k=1)
Few-Shot Image ClassificationCUB 200 5-way 1-shotAccuracy53.15DN4-DA (k=1)
Few-Shot Image ClassificationMini-Imagenet 5-way (5-shot)Accuracy71.02DN4 (k=3)
Few-Shot Image ClassificationMini-Imagenet 5-way (1-shot)Accuracy51.24DN4 (k=3)
Few-Shot Image ClassificationStanford Dogs 5-way (5-shot)Accuracy66.33DN4-DA (k=1)
Few-Shot Image ClassificationStanford Cars 5-way (5-shot)Accuracy89.6DN4-DA (k=1)
Few-Shot Image ClassificationStanford Cars 5-way (1-shot)Accuracy61.51DN4-DA (k=1)

Related Papers

Automatic Classification and Segmentation of Tunnel Cracks Based on Deep Learning and Visual Explanations2025-07-18GLAD: Generalizable Tuning for Vision-Language Models2025-07-17Adversarial attacks to image classification systems using evolutionary algorithms2025-07-17Efficient Adaptation of Pre-trained Vision Transformer underpinned by Approximately Orthogonal Fine-Tuning Strategy2025-07-17Federated Learning for Commercial Image Sources2025-07-17MUPAX: Multidimensional Problem Agnostic eXplainable AI2025-07-17Hashed Watermark as a Filter: Defeating Forging and Overwriting Attacks in Weight-based Neural Network Watermarking2025-07-15Transferring Styles for Reduced Texture Bias and Improved Robustness in Semantic Segmentation Networks2025-07-14