CountZES: Counting via Zero-Shot Exemplar Discovery and Selection
arXiv:2512.16415
Abstract
Zero-shot object counting (ZOC) aims to count instances of unseen categories using only a class name. Existing exemplar-based methods discover candidate exemplars through random image patches or open-vocabulary detector proposals. However, random patch sampling often yields poorly delineated instances, while detector-based discovery may produce multi-instance regions and, in dense scenes, provide only a few or even no suitable single-instance candidates. Thus, exemplar selection is constrained by candidate quality and coverage, while counting itself remains highly sensitive to exemplar choice. To this end, we propose CountZES, an inference-only framework that jointly addresses candidate discovery and exemplar selection through density-guided candidate generation and complementary exemplar-selection mechanisms. Starting from a text-grounded anchor, CountZES progressively discovers and refines visual exemplars through three stages: Detection-Anchored Exemplar (DAE), Density-Guided Exemplar (DGE), and Feature-Consensus Exemplar (FCE). DAE establishes a reliable single-instance anchor, DGE leverages density responses to expand candidate discovery beyond the detector-constrained pool and select a statistically consistent exemplar, and FCE promotes representativeness through feature-level consensus. Together, they yield complementary exemplars balancing semantic grounding, count consistency, and feature representativeness. CountZES requires no ZOC-specific optimization and adopts a modular design that supports different pretrained components. Extensive evaluations across natural, aerial, and medical domains demonstrate strong cross-domain generalization and superior performance among inference-only ZOC methods.