[Paper Review] CountGD: Multi-Modal Open-World Counting
CountGD is a single-stage open-world object counting model that accepts text, visual exemplars, or both to specify the target object, achieving state-of-the-art accuracy when using both modalities.
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/.
Motivation & Objective
- Motivate open-world counting with flexible target specification at inference time without retraining.
- Extend a vision-language foundation model to support counting rather than detection.
- Enable multi-modal prompting (text, visual exemplars, or both) to improve counting accuracy.
- Investigate interactions between text and exemplar prompts and their effect on counting sub-sets.
Proposed method
- Build CountGD on top of GroundingDINO, adding modules to embed visual exemplars as text-like tokens and to enable counting in a single stage.
- Encode the image with Swin Transformer to produce multi-scale feature maps.
- Encode text with a BERT-based text encoder and fuse with visual exemplar tokens via a feature enhancer using self-attention and cross-attention.
- Represent visual exemplars as RoIAlign-pooled tokens and fuse them with text tokens in the feature enhancer.
- Select a set of image patch tokens most aligned with fused visual-exemplar-text tokens to form cross-modality queries.
- Use a cross-modality decoder to compute similarity scores between queries and fused features, yielding final counts after thresholding.
- Train only the added projection layers (visual exemplar token extraction, feature enhancer, cross-modality decoder) while freezing the image and text encoders, with a loss combining localization and classification terms.
Experimental results
Research questions
- RQ1Can open-world counting be effectively performed with either text prompts, visual exemplars, or a combination of both?
- RQ2Does integrating visual exemplars with text within a single-stage architecture improve counting accuracy over uni-modal approaches?
- RQ3How do text and exemplar prompts interact to refine or constrain counting (e.g., color or location filtering)?
- RQ4What is the transferability of CountGD across datasets without fine-tuning (e.g., zero-shot CARPK and CountBench generalization)?
Key findings
- CountGD with both visual exemplars and text establishes state-of-the-art counting accuracy on FSC-147 across open-world benchmarks.
- CountGD with text alone achieves competitive performance with recent text-only open-world counting methods.
- Zero-shot evaluation on CARPK shows CountGD achieving top performance without CARPK finetuning.
- Ablations show multi-modal training and inference outperform uni-modal variants, and visual exemplars often provide stronger signals than text alone on FSC-147.
- Qualitative analyses demonstrate interactive effects where text can refine or reinforce exemplar-based targets (e.g., color or position constraints).
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.