Count Anything
Abstract
Domain fit: AI-adjacent · Paper appears method- or tooling-adjacent to AI workflows with partial ecosystem coverage.
Object counting remains fragmented across domain-specific datasets and task formulations, despite rapid progress in generalist vision models. Existing counting models are often tailored to scenarios such as crowds, vehicles, cells, crops, or remote-sensing objects, and thus struggle to generalize across categories, visual domains, object scales, and density distributions. In this paper, we study text-guided object counting across domains, where a model takes an image and a natural-language query as input and returns an instance-grounded set of target points whose cardinality gives the count. This formulation unifies category-conditioned counting with interpretable spatial localization. To support this setting, we construct CLOC, a Cross-domain Large-scale Object Counting dataset that reorganizes diverse public data sources into a unified benchmark. CLOC covers six visual domains: General Scene, Remote Sensing, Histopathology, Cellular Microscopy, Agriculture, and Microbiology, with about 220K images, 619 categories, and 15M object instances. Based on CLOC, we propose Count Anything, a generalist model for text-guided object counting. Unlike density-map-based methods, which dominate counting models, Count Anything adopts discrete instance points and performs dual-granularity instance enumeration. A Region-level Sparse Counter provides object-level anchors for large and sparse targets, while a Pixel-level Dense Counter handles small, crowded, and weakly bounded targets via dense point prediction. A point-centric supervision strategy enables learning from heterogeneous annotations, and Complementary Count Fusion combines both counters in a parameter-free manner. Extensive experiments show that Count Anything achieves strong accuracy and multi-domain generalization, outperforming existing open-world counting methods. Code is available at: https://github.com/Mengqi-Lei/count-anything.
Results and benchmarks
Object counting remains fragmented across domain-specific datasets and task formulations, despite rapid progress in generalist vision models.
| Task | Dataset | Metric | Value | Source |
|---|---|---|---|---|
| Computer vision | CLIP-Count 39 | Full Test MAE. | 14.48 | paper-derived |
| Computer vision | 19.16 | Full Test MAE. | 7.24 | paper-derived |
| Computer vision | CountGD 3 | Full Test MAE. | 13.19 | paper-derived |
| Computer vision | 18.61 | Full Test MAE. | 4.81 | paper-derived |
Audit each benchmark finding before selecting an implementation path. Evidence refs map to the disclosure below.
Evidence graph: 4 refs, 4 links.
Utility signals: depth 90/100, grounding 95/100, status high.
Implementation
Best maintained implementation now
Code and implementation guidelines for the paper ✨Counting Anything. Project Page: https://mengqi-lei.github.io/count-anything-projectpage/
534 stars · 44 forks · Last push Aug 12, 2026 · Apache-2.0 license
- License
- CI
- Dependencies
- Docker
Matched via arXiv identifier search · Strong overlap with paper title keywords · Community adoption signal (534 stars)
Mengqi-Lei/count-anything is the best available implementation candidate based on ranking signals, but recommendation confidence is not yet high. CI workflows are present. License is declared (Apache-2.0).
Open Mengqi-Lei/count-anything- No repository-level red flags were detected, but paper-specific preprocessing and hyperparameter details may still be under-specified.
- Selected Mengqi-Lei/count-anything as the strongest maintained implementation for new work.
- Includes CI workflow signals.
- Includes dependency/environment manifest signals.
- Repository activity is within the last 24 months.
Reproduction readiness
Ready to run
Ready to reproduce
- Clone Mengqi-Lei/count-anything and install dependencies from requirements.txt.
- CI pipeline detected, so automated tests are in place.
- Last updated 13 days ago.
Quick start
git clone https://github.com/Mengqi-Lei/count-anything.git
pip install -r requirements.txt Hugging Face artifacts
No direct paper-linked artifacts were found. Showing strongest curated related artifacts for faster exploration.
Datasets
No trustworthy datasets matches right now.
Search datasets on Hugging FaceSpaces
No trustworthy spaces matches right now.
Search spaces on Hugging FaceResearch context
Tasks
Computer vision
Methods
None detected
Domains
Computer vision, Geospatial AI
Open this paper in HFEPX to review benchmark signals, evaluation modes, and human-feedback protocol context.
Open in HFEPXJump to Paper2Code search queries derived from this paper's research context.