Overview
This research addresses text-guided object counting across multiple domains, a task where a model receives an image and a natural-language query to output an instance-grounded set of target points, with the cardinality of this set providing the count. This formulation aims to unify category-conditioned counting with spatial localization.
Research Context
Object counting typically involves models tailored to specific scenarios, such as crowds, vehicles, cells, crops, or remote-sensing objects. These domain-specific approaches frequently exhibit limitations in generalizing across different categories, visual domains, object scales, and density distributions. Despite advancements in generalist vision models, object counting has largely remained fragmented due to these domain-specific datasets and task formulations. The study notes that density-map-based methods commonly dominate existing counting models.
Approach
Dataset Construction: CLOC
To support text-guided object counting across domains, the researchers constructed CLOC (Cross-domain Large-scale Object Counting), a unified benchmark dataset. CLOC reorganizes diverse public data sources to provide a comprehensive resource. It encompasses six distinct visual domains:
- General Scene
- Remote Sensing
- Histopathology
- Cellular Microscopy
- Agriculture
- Microbiology
Model Development: Count Anything
Based on the CLOC dataset, the researchers proposed Count Anything, a generalist model for text-guided object counting. Unlike prevalent density-map-based methods, Count Anything utilizes discrete instance points and employs a dual-granularity instance enumeration strategy.
- Region-level Sparse Counter: This component is designed to provide object-level anchors, primarily for large and sparse targets.
- Pixel-level Dense Counter: This component handles small, crowded, and weakly bounded targets through dense point prediction.
Count Anything incorporates a point-centric supervision strategy, which facilitates learning from heterogeneous annotations. Additionally, it features Complementary Count Fusion, a parameter-free mechanism that combines the outputs of both the Region-level Sparse Counter and the Pixel-level Dense Counter.
Findings
Experiments demonstrated that Count Anything achieves strong accuracy. The model also exhibited multi-domain generalization capabilities, outperforming existing open-world counting methods. The code for Count Anything is available at https://github.com/Mengqi-Lei/count-anything.