Zero-Shot Object Counting

Jingyi Xu, Hieu Le, Vu Nguyen, Viresh Ranjan, D. Samaras
2/14/2026

No official code found. Best implementation: songrise/CLIP-Count (121 stars, MIT, last commit 2024-03-20). 2 more below.

Abstract

Class-agnostic object counting aims to count object instances of an arbitrary class at test time. Current methods for this challenging problem require human-annotated exemplars as inputs, which are often unavailable for novel categories, especially for autonomous systems. Thus, we propose zero-shot object counting (ZSC), a new setting where only the class name is available during test time. Such a counting system does not require human annotators in the loop and can operate automatically. Starting from a class name, we propose a method that can accurately identify the optimal patches which can then be used as counting exemplars. Specifically, we first construct a class prototype to select the patches that are likely to contain the objects of interest, namely class-relevant patches. Furthermore, we introduce a model that can quantitatively measure how suitable an arbitrary patch is as a counting exemplar. By applying this model to all the candidate patches, we can select the most suitable patches as exemplars for counting. Experimental results on a recent class-agnostic counting dataset, FSC-147, validate the effectiveness of our method. Code is available at https://github.com/cvlabstonybrook/zero-shot-counting.

View on arXivView PDF

Code Implementations(3)

CVPR2023 Zero-shot Counting

604PythonFeb 28, 20231 years ago
class-agnostic-countingcountingcounting-objectsuncertainty-estimationvae+1 more
MIT

[ACM MM23] CLIP-Count: Towards Text-Guided Zero-Shot Object Counting

12110PythonMay 12, 20232 years agoMIT
MIT

[AAAI 2024] VLCounter: Text-aware Visual Representation for Zero-Shot Object Counting

442Shell, PythonDec 13, 20231 years agoMIT

Similar Papers

Cite this paper

@article{xu2026zeroshot,
  title  = {Zero-Shot Object Counting},
  author = {Jingyi Xu and Hieu Le and Vu Nguyen and Viresh Ranjan and D. Samaras},
  year   = {2026},
  eprint = {2303.02001},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/pdf/2303.02001},
  journal = {CVPR 2023 2023}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2303.02001.svg)](https://codeofpaper.com/paper/2303.02001)

Discussion