Learning To Count Everything
Viresh Ranjan, Udbhav Sharma, Thu Nguyen, Minh Hoai
Abstract
Existing works on visual counting primarily focus on one specific category at a time, such as people, animals, and cells. In this paper, we are interested in counting everything, that is to count objects from any category given only a few annotated instances from that category. To this end, we pose counting as a few-shot regression task. To tackle this task, we present a novel method that takes a query image together with a few exemplar objects from the query image and predicts a density map for the presence of all objects of interest in the query image. We also present a novel adaptation strategy to adapt our network to any novel visual category at test time, using only a few exemplar objects from the novel category. We also introduce a dataset of 147 object categories containing over 6000 images that are suitable for the few-shot counting task. The images are annotated with two types of annotation, dots and bounding boxes, and they can be used for developing few-shot counting models. Experiments on this dataset shows that our method outperforms several state-of-the-art object detectors and few-shot counting approaches. Our code and dataset can be found at https://github.com/cvlab-stonybrook/ LearningToCountEverything.
Ask about this paper
Your agent reads all of it.
Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.
Your agent calls
Luneget_paper_fulltext
Free to start. No credit card required.
Terminal
Install the CLIlune papers fulltext 4864f3c8-3154-46c7-896e-c5e4b0a740fdCited by top-tier papers53
- SAM 3: Segment Anything with ConceptsNicolas Carion, Laura Gustafson, Yuan-Ting Hu, Shoubhik Debnath et al.ICLR 2026 · 1,103 citations
- Represent, Compare, and Learn: A Similarity-Aware Framework for Class-Agnostic CountingMin Shi, Hao Lu, Chen Feng, Chengxin Liu et al.CVPR 2022 · 99 citations
- CountGD: Multi-Modal Open-World CountingNiki Amini-Naieni, Tengda Han, Andrew ZissermanNeurIPS 2024 · 96 citations
- A Low-Shot Object Counting Network With Iterative Prototype AdaptationNikola Ðukic, Alan Lukezic, Vitjan Zavrtanik, Matej KristanICCV 2023 · 91 citations
- Detect Anything via Next Point PredictionQing Jiang, Junan Huo, Xingyu Chen, Yuda Xiong et al.CVPR 2026 · 79 citations
Builds on7
- Few-Shot Object Detection via Feature ReweightingBingyi Kang, Zhuang Liu, Xin Wang, Fisher Yu et al.ICCV 2019 · 835 citations
- Bayesian Loss for Crowd Count Estimation With Point SupervisionZhiheng Ma, Xing Wei, Xiaopeng Hong, Yihong GongICCV 2019 · 612 citations
- Distribution Matching for Crowd CountingBoyu Wang, Huidong Liu, Dimitris Samaras, Minh Hoai NguyenNeurIPS 2020 · 443 citations
- Adaptive Density Map Generation for Crowd CountingJia Wan, Antoni B. ChanICCV 2019 · 171 citations
- Localization in the Crowd with Topological ConstraintsShahira Abousamra, Minh Hoai, Dimitris Samaras, Chao ChenAAAI 2021 · 160 citations
Related papers
- DAVE - A Detect-and-Verify Paradigm for Low-Shot CountingJer Pelhan, Alan Lukezic, Vitjan Zavrtanik, Matej KristanCVPR 2024 · 14 citations
- Few-Shot Object Detection With Attention-RPN and Multi-Relation DetectorQi Fan, Wei Zhuo, Chi-Keung Tang, Yu-Wing TaiCVPR 2020
- CountSE: Soft Exemplar Open-Set Object CountingShuai Liu, Peng Zhang, Shiwei Zhang, Wei KeICCV 2025 · 1 citation
- Generalized-Scale Object Counting with Gradual Query AggregationJer Pelhan, Alan Lukezic, Matej KristanAAAI 2026
- Zero-Shot Object CountingJingyi Xu, Hieu Le, Vu Nguyen, Viresh Ranjan et al.CVPR 2023
