{"about":{"site":"https://codewithpapers.app","non_affiliation":"Code with Papers and Syntology are not affiliated with, endorsed by, or sponsored by Papers with Code, Meta, or the pwc-archive mirror.","licence":"CC BY-SA 4.0","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","attribution":"https://codewithpapers.app/attribution","modified":"archive material modified by Syntology; see the attribution page"},"url":"/paper/revisiting-local-descriptor-based-image-to","title":"Revisiting Local Descriptor based Image-to-Class Measure for Few-shot Learning","arxiv_id":"1903.12290","date":"2019-03-28","proceeding":"CVPR 2019 6","authors":["Wenbin Li","Lei Wang","Jinglin Xu","Jing Huo","Yang Gao","Jiebo Luo"],"abstract":"Few-shot learning in image classification aims to learn a classifier to\nclassify images when only few training examples are available for each class.\nRecent work has achieved promising classification performance, where an\nimage-level feature based measure is usually used. In this paper, we argue that\na measure at such a level may not be effective enough in light of the scarcity\nof examples in few-shot learning. Instead, we think a local descriptor based\nimage-to-class measure should be taken, inspired by its surprising success in\nthe heydays of local invariant features. Specifically, building upon the recent\nepisodic training mechanism, we propose a Deep Nearest Neighbor Neural Network\n(DN4 in short) and train it in an end-to-end manner. Its key difference from\nthe literature is the replacement of the image-level feature based measure in\nthe final layer by a local descriptor based image-to-class measure. This\nmeasure is conducted online via a $k$-nearest neighbor search over the deep\nlocal descriptors of convolutional feature maps. The proposed DN4 not only\nlearns the optimal deep local descriptors for the image-to-class measure, but\nalso utilizes the higher efficiency of such a measure in the case of example\nscarcity, thanks to the exchangeability of visual patterns across the images in\nthe same class. Our work leads to a simple, effective, and computationally\nefficient framework for few-shot learning. Experimental study on benchmark\ndatasets consistently shows its superiority over the related state-of-the-art,\nwith the largest absolute improvement of $17\\%$ over the next best. The source\ncode can be available from \\UrlFont{https://github.com/WenbinLee/DN4.git}.","url_abs":"http://arxiv.org/abs/1903.12290v2","url_pdf":"http://arxiv.org/pdf/1903.12290v2.pdf","source":{"archive":"pwc-archive (Hugging Face), CC BY-SA 4.0","snapshot":"2025-07-28","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","row_kind":"abstracts"},"code_links":[{"paper_slug":"revisiting-local-descriptor-based-image-to","repo_url":"https://github.com/WenbinLee/DN4","is_official":0,"mentioned_in_paper":1,"mentioned_in_github":0,"framework":"pytorch","reach":{"status":"ok","spdx":"NOASSERTION"}}],"tasks":[{"task_slug":"few-shot-image-classification","task_name":"Few-Shot Image Classification"},{"task_slug":"few-shot-learning","task_name":"Few-Shot Learning"},{"task_slug":"classification","task_name":"General Classification"},{"task_slug":"image-classification","task_name":"Image Classification"},{"task_slug":"image-classification","task_name":"image-classification"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[{"leaderboard":"/sota/few-shot-image-classification-on-cub-200-5-1","task":"Few-Shot Image Classification","dataset":"CUB 200 5-way 1-shot","model":"DN4-DA (k=1)","rank_in_archive_order":35,"of":36,"metrics":{"Accuracy":"53.15"},"uses_additional_data":false},{"leaderboard":"/sota/few-shot-image-classification-on-cub-200-5","task":"Few-Shot Image Classification","dataset":"CUB 200 5-way 5-shot","model":"DN4-DA (k=1)","rank_in_archive_order":29,"of":32,"metrics":{"Accuracy":"81.9"},"uses_additional_data":false},{"leaderboard":"/sota/few-shot-image-classification-on-mini-2","task":"Few-Shot Image Classification","dataset":"Mini-Imagenet 5-way (1-shot)","model":"DN4 (k=3)","rank_in_archive_order":96,"of":105,"metrics":{"Accuracy":"51.24"},"uses_additional_data":false},{"leaderboard":"/sota/few-shot-image-classification-on-mini-3","task":"Few-Shot Image Classification","dataset":"Mini-Imagenet 5-way (5-shot)","model":"DN4 (k=3)","rank_in_archive_order":80,"of":95,"metrics":{"Accuracy":"71.02"},"uses_additional_data":false},{"leaderboard":"/sota/few-shot-image-classification-on-stanford-2","task":"Few-Shot Image Classification","dataset":"Stanford Cars 5-way (1-shot)","model":"DN4-DA (k=1)","rank_in_archive_order":3,"of":6,"metrics":{"Accuracy":"61.51"},"uses_additional_data":false},{"leaderboard":"/sota/few-shot-image-classification-on-stanford-3","task":"Few-Shot Image Classification","dataset":"Stanford Cars 5-way (5-shot)","model":"DN4-DA (k=1)","rank_in_archive_order":3,"of":6,"metrics":{"Accuracy":"89.6"},"uses_additional_data":false},{"leaderboard":"/sota/few-shot-image-classification-on-stanford","task":"Few-Shot Image Classification","dataset":"Stanford Dogs 5-way (1-shot)","model":"DN4-DA (k=1)","rank_in_archive_order":3,"of":3,"metrics":{"Accuracy":"45.73"},"uses_additional_data":false},{"leaderboard":"/sota/few-shot-image-classification-on-stanford-1","task":"Few-Shot Image Classification","dataset":"Stanford Dogs 5-way (5-shot)","model":"DN4-DA (k=1)","rank_in_archive_order":3,"of":6,"metrics":{"Accuracy":"66.33"},"uses_additional_data":false}],"syntology":{"syntology_url":"https://syntology.ai/paper/1903.12290","atlas_url":"https://app.syntology.ai/?focus=1903.12290","mcp":null,"developers":"https://syntology.ai/developers"},"arxiv_metadata":null,"syntology_extracted_results":null}