CountGD: Multi-Modal Open-World Counting
Niki Amini-Naieni, Tengda Han, Andrew Zisserman
TL;DR
CountGD tackles open-world counting by enabling counts with text, visual exemplars, or both, extending the GroundingDINO foundation with exemplar embeddings and a counting head in a single-stage architecture. It fuses multi-modal prompts through a sequence of image, exemplar, and text encoders, a feature enhancer, and a cross-modality decoder to produce a count via a learned similarity matrix, with losses that emphasize localization and classification and Hungarian matching. Empirical results on FSC-147, CARPK, and CountBench show state-of-the-art performance when using both modalities, while text-only performance remains competitive with the best open-world text-based methods. The paper also explores interactions between text and exemplars, demonstrating that language can refine exemplar-based cues and that modality fusion yields interpretable improvements in counting accuracy and flexibility. Overall, CountGD significantly broadens open-world counting capabilities and demonstrates strong generalization across datasets in a multi-modal setting.
Abstract
The goal of this paper is to improve the generality and accuracy of open-vocabulary object counting in images. To improve the generality, we repurpose an open-vocabulary detection foundation model (GroundingDINO) for the counting task, and also extend its capabilities by introducing modules to enable specifying the target object to count by visual exemplars. In turn, these new capabilities - being able to specify the target object by multi-modalites (text and exemplars) - lead to an improvement in counting accuracy. We make three contributions: First, we introduce the first open-world counting model, CountGD, where the prompt can be specified by a text description or visual exemplars or both; Second, we show that the performance of the model significantly improves the state of the art on multiple counting benchmarks - when using text only, CountGD is comparable to or outperforms all previous text-only works, and when using both text and visual exemplars, we outperform all previous models; Third, we carry out a preliminary study into different interactions between the text and visual exemplar prompts, including the cases where they reinforce each other and where one restricts the other. The code and an app to test the model are available at https://www.robots.ox.ac.uk/~vgg/research/countgd/.
