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 Lune
Know this paper in minutes, not an afternoon.
Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.
53 top-tier papers have cited it since. Know what they found before your reviewers do.
Lune can draw on
the full paper · the top-tier papers that cite it · related work
Free to start. No credit card required.
Lineage
- CountGD: Multi-Modal Open-World Counting cites Few-Shot Object Detection via Feature Reweighting
- CountGD: Multi-Modal Open-World Counting cites A Low-Shot Object Counting Network With Iterative Prototype Adaptation
- CountGD: Multi-Modal Open-World Counting cites Represent, Compare, and Learn: A Similarity-Aware Framework for Class-Agnostic Counting
- Localization in the Crowd with Topological Constraints cites Distribution Matching for Crowd Counting
- Localization in the Crowd with Topological Constraints cites Bayesian Loss for Crowd Count Estimation With Point Supervision
- A Low-Shot Object Counting Network With Iterative Prototype Adaptation cites Represent, Compare, and Learn: A Similarity-Aware Framework for Class-Agnostic Counting
- Distribution Matching for Crowd Counting cites Bayesian Loss for Crowd Count Estimation With Point Supervision
- Distribution Matching for Crowd Counting cites Adaptive Density Map Generation for Crowd Counting
- Detect Anything via Next Point Prediction cites Represent, Compare, and Learn: A Similarity-Aware Framework for Class-Agnostic Counting
- Represent, Compare, and Learn: A Similarity-Aware Framework for Class-Agnostic Counting cites Localization in the Crowd with Topological Constraints
- Represent, Compare, and Learn: A Similarity-Aware Framework for Class-Agnostic Counting cites Distribution Matching for Crowd Counting
- Represent, Compare, and Learn: A Similarity-Aware Framework for Class-Agnostic Counting cites Bayesian Loss for Crowd Count Estimation With Point Supervision
Cited 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
