# Can SAM Count Anything? An Empirical Study on SAM Counting

arXiv: https://arxiv.org/abs/2304.10817 · HTML: https://mlsanity.com/paper/2304.10817/

## Key facts

- Cited by 18 papers in the map (data through 14 Oct 2026).
- Builds on 14 of its 16 references that are in the map.
- First posted on arXiv 21 Apr 2023.

## Builds on (most cited first, 14 of 14)

- [Learning Transferable Visual Models From Natural Language Supervision](https://mlsanity.com/paper/2103.00020/) (2021)
- [Language Models are Few-Shot Learners](https://mlsanity.com/paper/2005.14165/) (2020)
- [GPT-4 Technical Report](https://mlsanity.com/paper/2303.08774/) (2023)
- [Microsoft COCO: Common Objects in Context](https://mlsanity.com/paper/1405.0312/) (2014)
- [Segment Anything](https://mlsanity.com/paper/2304.02643/) (2023)
- [Model-Agnostic Meta-Learning for Fast Adaptation of Deep Networks](https://mlsanity.com/paper/1703.03400/) (2017)
- [Grounding DINO: Marrying DINO with Grounded Pre-Training for Open-Set Object Detection](https://mlsanity.com/paper/2303.05499/) (2023)
- [Few-shot Object Detection via Feature Reweighting](https://mlsanity.com/paper/1812.01866/) (2018)
- [Few-Shot Object Detection with Attention-RPN and Multi-Relation Detector](https://mlsanity.com/paper/1908.01998/) (2019)
- [Learning To Count Everything](https://mlsanity.com/paper/2104.08391/) (2021)
- [Represent, Compare, and Learn: A Similarity-Aware Framework for Class-Agnostic Counting](https://mlsanity.com/paper/2203.08354/) (2022)
- [Few-shot Object Counting with Similarity-Aware Feature Enhancement](https://mlsanity.com/paper/2201.08959/) (2022)
- [One-Shot Instance Segmentation](https://mlsanity.com/paper/1811.11507/) (2018)
- [Object Counting: You Only Need to Look at One](https://mlsanity.com/paper/2112.05993/) (2021)

## Built on by (most cited first, 18 of 18)

- [Multimodal Foundation Models: From Specialists to General-Purpose Assistants](https://mlsanity.com/paper/2309.10020/) (2023)
- [SAM on Medical Images: A Comprehensive Study on Three Prompt Modes](https://mlsanity.com/paper/2305.00035/) (2023)
- [Review of Large Vision Models and Visual Prompt Engineering](https://mlsanity.com/paper/2307.00855/) (2023)
- [A Comprehensive Survey on Segment Anything Model for Vision and Beyond](https://mlsanity.com/paper/2305.08196/) (2023)
- [A Survey on Segment Anything Model (SAM): Vision Foundation Model Meets Prompt Engineering](https://mlsanity.com/paper/2306.06211/) (2023)
- [Point, Segment and Count: A Generalized Framework for Object Counting](https://mlsanity.com/paper/2311.12386/) (2023)
- [RobustSAM: Segment Anything Robustly on Degraded Images](https://mlsanity.com/paper/2406.09627/) (2024)
- [On the Robustness of Segment Anything](https://mlsanity.com/paper/2305.16220/) (2023)
- [ABC Easy as 123: A Blind Counter for Exemplar-Free Multi-Class Class-agnostic Counting](https://mlsanity.com/paper/2309.04820/) (2023)
- [Open-NeRF: Towards Open Vocabulary NeRF Decomposition](https://mlsanity.com/paper/2310.16383/) (2023)
- [Generalized-Scale Object Counting with Gradual Query Aggregation](https://mlsanity.com/paper/2511.08048/) (2025)
- [Industrial Segment Anything -- a Case Study in Aircraft Manufacturing, Intralogistics, Maintenance, Repair, and Overhaul](https://mlsanity.com/paper/2307.12674/) (2023)
- [A Simple-but-effective Baseline for Training-free Class-Agnostic Counting](https://mlsanity.com/paper/2403.01418/) (2024)
- [Few-Shot Pattern Detection via Template Matching and Regression](https://mlsanity.com/paper/2508.17636/) (2025)
- [CoDi -- an exemplar-conditioned diffusion model for low-shot counting](https://mlsanity.com/paper/2512.20153/) (2025)
- [OCCAM: Class-Agnostic, Training-Free, Prior-Free and Multi-Class Object Counting](https://mlsanity.com/paper/2601.13871/) (2026)
- [AdaCount: Training-Free Similarity-Guided Spatial and Feature Adaptation for Zero-Shot Object Counting](https://mlsanity.com/paper/2607.02139/) (2026)
- [CountZES: Counting via Zero-Shot Exemplar Selection](https://mlsanity.com/paper/2512.16415/) (2025)

## Abstract (arXiv)

Meta AI recently released the Segment Anything model (SAM), which has garnered attention due to its impressive performance in class-agnostic segmenting. In this study, we explore the use of SAM for the challenging task of few-shot object counting, which involves counting objects of an unseen category by providing a few bounding boxes of examples. We compare SAM's performance with other few-shot counting methods and find that it is currently unsatisfactory without further fine-tuning, particularly for small and crowded objects. Code can be found at urlhttps://github.com/Vision-Intelligence-and-Robots-Group/count-anything.
