Count Anything
Listen
Radio episode about this paper
Transcript
Introduction to the show: ident: AI Radio. Generated commentary on the latest Artificial Intelligence papers.
Tom: I'm Tom.
Jane: And I'm Jane, here with Lu, Meng and our in-house large language model, Lalam.
Tom: We're looking at the paper: "Count Anything".
Title and authors: Tom: So we're talking about "Count Anything," and what it’s trying to do is fix the problem where object counting models only work for one specific thing, like counting cars or cells but failing when you ask them to count something totally different.
Tom: That's right. It’s about moving from just predicting a density map to actually outputting instance-grounded sets of target points whose total count gives you the final answer, which is pretty interpretable for us as engineers.
Jane: And it does this by first training on a massive dataset called CLOC, which they built to unify data across six very different visual domains: General Scene, Remote Sensing, Histopathology, Cellular Microscopy, Agriculture, and Microbiology.
The paper's summary: Tom: That CLOC dataset is huge—it has about two hundred twenty thousand images and fifteen million object instances spread across six hundred nineteen categories. It’s designed specifically to expose the weaknesses of current models by having a long-tailed distribution where some object counts can be over one thousand.
Jane: And that scale is key because it forces the model to learn how to handle both very sparse, rare objects and incredibly dense, crowded ones all at once in a single system.
Lu: The paper introduces Count Anything as the generalist model that uses a text-conditioned encoder based on SAM three with LoRA adapters for counting tasks, which is a smart way to adapt the base vision model to this new task without retraining everything from scratch.
Meng: What’s interesting about the architecture is that it doesn't rely on just one counting strategy; it uses two complementary counters: a Region-level Sparse Counter and a Pixel-level Dense Counter.
Lalam: The sparse counter, the RSC, acts like an anchor for larger targets by predicting compact sets of regions and using their centers as counting points, while the dense counter, the PDC, handles those small or crowded targets by doing point-level enumeration on high-resolution features.
The paper's improvements: Tom: And they combine those two branches using something called Complementary Count Fusion. This is a parameter-free way to merge the predictions, which suppresses duplicate counts while making sure they stay complementary by comparing the confidence scores between the RSC regions and PDC points.
Jane: So, you get this final set of predicted points, and the actual count is just that set's total cardinality, meaning it’s instance-grounded rather than a fuzzy density map.
Lu: They supervise this whole system using point-centric methods during training, which means the model learns to look at annotations that aren't just boxes but also points and polygons, which helps it learn from heterogeneous point and box annotations.
Meng: From an engineering standpoint, that fusion step is crucial because if you just add the sparse and dense predictions together without filtering duplicates, you’re going to get a massive overcount, so CCF is necessary for stability.
Lalam: They also showed that scaling up the training data actually helps performance; they found that as the training data ratio goes from ten percent up to one hundred percent, both the mean absolute error and root mean square error consistently decrease.
Conclusion: Tom: So, to wrap up, "Count Anything" is a generalist model for text-guided object counting that uses this dual-granularity approach of combining region anchors with dense pixel enumeration via Complementary Count Fusion.
Jane: It proves that achieving good cross-domain counting across such diverse visual settings requires this combination of learning from large, unified datasets like CLOC and using both sparse and dense prediction mechanisms simultaneously.
Lu: The real implication here is establishing a useful data foundation for future research because it shows that generalist text-guided counting needs this dual-granularity instance enumeration to really work across different densities and scales.
Meng: For deployment, the main thing I see is that the inference process with Complementary Count Fusion keeps the final count stable, which means we can deploy it in production without worrying about massive counting errors due to overlapping predictions.
Lalam: The paper concludes that this model establishes a useful data foundation and method reference for future research in open-world, text-guided, and instance-interpretable object counting.
Tsinghua University · China University of Geosciences · State Key Laboratory of Human-Machine Hybrid Augmented Intelligence, National Engineering Research Center for Visual Information and Applications, and Institute of Artificial Intelligence and Robotics, Xi’an Jiaotong University
cs.CV
Submitted: 2026-05-29
Updated: 2026-12-02
License: http://arxiv.org/licenses/nonexclusive-distrib/1.0/
Importance score: 100/100
The gist: Object counting remains fragmented across domain-specific datasets and task formulations, with existing models lacking generalization across categories, visual domains, object scales…
Key concepts
- Count Anything
- A generalist model that takes an image and a natural language query as input. It outputs a specific set of coordinates (instance points) for the target objects, whose total number determines the final count, making the output directly interpretable.
- CLOC Dataset
- A large-scale cross-domain dataset unifying images from six distinct visual fields: General Scene, Remote Sensing, Histopathology, Cellular Microscopy, Agriculture, and Microbiology. It contains over 220K images and 15M object instances across 619 categories to test the model's broad applicability.
- Dual-Granularity Counting
- A counting strategy that uses two complementary methods: a Region-level Sparse Counter (RSC) for finding large, sparse objects, and a Pixel-level Dense Counter (PDC) for accurately finding small or crowded objects. This combination ensures robust counting regardless of the object's size or how densely packed it is in the image.
- Complementary Count Fusion (CCF)
- A parameter-free method used during inference to merge predictions from the RSC and PDC. It compares confidence scores between region predictions and pixel points, suppressing duplicate counts while keeping the most reliable instances, resulting in a final count based on the union of kept predictions.
Terminology
Summary
Object counting remains fragmented across domain-specific datasets and task formulations, with existing models lacking generalization across categories, visual domains, object scales, and density distributions. p. 0 This paper addresses this by introducing Count Anything, a generalist model designed for text-guided object counting that takes an image and a natural language query as input to return an instance-grounded set of target points whose cardinality yields the count. p. 0
To enable this generalist setting, the authors construct CLOC, a large-scale Cross-domain Object Counting dataset. p. 0 CLOC unifies diverse public data sources into a single benchmark covering six visual domains: General Scene, Remote Sensing, Histopathology, Cellular Microscopy, Agriculture, and Microbiology. p. 0 This dataset comprises approximately 220K images and 15M object instances across 619 categories. p. 1 The distribution within CLOC exhibits a long-tailed category distribution and diverse target-count ranges spanning from 1 to over 1001+. p. 2
Count Anything adopts a dual-granularity counting approach, moving beyond traditional density maps to output discrete instance points. p. 0 It utilizes two complementary counters:
-
Region-level Sparse Counter (RSC): This component employs a DETR-like architecture to predict compact sets of target regions, providing geometric anchors for large and sparse targets.
-
Pixel-level Dense Counter (PDC): This component performs dense point-level enumeration on high-resolution features to effectively capture small, crowded, and weakly bounded targets.
These two counters are integrated using Complementary Count Fusion (CCF), a parameter-free method that suppresses duplicate counts while preserving complementarity by comparing confidence scores between the RSC regions and PDC points. p. 2 The final prediction is the union of kept predictions: P hat T = P r keep P d keep, and the final count is c T hat = P hat T. p. 6
The model leverages a Text-Conditioned Encoder based on SAM3, adapted via LoRA adapters for counting tasks. p. 6 Supervision is applied through point-centric methods: point localization supervision for RSC, and classification/point regression losses based on point-set matching for PDC. p. 3 The overall training objective involves multiple loss terms (L = lambda r cls L r cls + lambda r point L r point +), where the final count is determined by the cardinality of the predicted point set. p. 6
Extensive experiments on CLOC demonstrate that Count Anything achieves strong counting accuracy and superior multi-domain generalization, substantially outperforming existing open-world counting methods. p. 2 Specifically, Count Anything achieved a Mean Absolute Error (MAE) of 9. p. 734 on the CLOC test split, attributed to its dual-granularity design and the large scale of CLOC. p. 7 Performance is further enhanced by data scaling; MAE and RMSE consistently decrease as the training data ratio increases from 10% to 100%. p. 9 The model's ability to maintain stable cross-domain counting performance across diverse visual domains and density conditions validates its generalist capability.
The paper concludes that Count Anything establishes a useful data foundation and method reference for future research in open-world, text-guided, and instance-interpretable object counting. p. 9 The key finding is that achieving generalist text-guided counting necessitates dual-granularity instance enumeration, combining region-level object anchoring with pixel-level dense recall. p. 1
Green — the paper says it, and the page is printed. Red — no passage carries it, so treat that sentence as unverified. The same check runs on your own text: check a summary against its source, $5.
Improvements for AI systems
-
Better generalization across visual domains: The system can perform counting tasks reliably across General Scene, Remote Sensing, Histopathology, Cellular Microscopy, Agriculture, and Microbiology because it is trained on a unified benchmark (CLOC) that includes these diverse sources.
-
Instance-grounded and interpretable output: Instead of density maps, the model outputs a set of instance points with confidence scores; this provides
instance-level spatial evidence for counting and supports localization.
-
Handling varied object scales and densities: The dual-granularity design, combining the Region-level Sparse Counter (RSC) for large/sparse targets and the Pixel-level Dense Counter (PDC) for small/crowded targets, ensures robust counting across different density distributions.
-
Learning from heterogeneous annotations: The model employs
point-centric supervision,
allowing it tolearn from heterogeneous annotations
such as boxes, points, polygons, masks, and rotated boxes through a unified category-conditioned counting formulation. -
Superior performance on open-world tasks: The Count Anything model achieves
superior counting accuracy and multi-domain generalization,
substantially outperforming existing open-world counting methods on the CLOC test split. -
Robust inference via Complementary Count Fusion: During inference, Complementary Count Fusion (CCF) resolves conflicts between RSC and PDC predictions by suppressing lower-confidence predictions while preserving complementary information, resulting in the final count being
the cardinality of this set.
-
Scalability through data scaling: Training with larger CLOC training data ratios (up to 100%) leads to a decrease in MAE and RMSE, showing that the model benefits from
larger-scale cross-domain counting data
for improved stability.
Sources
- Florence: A New Foundation Model for Computer Vision
- CCTrans: Simplifying and Improving Crowd Counting with Transformer
- xView: Objects in Context in Overhead Imagery
- Enhancing people localisation in drone imagery for better crowd management by utilising every pixel in high-resolution images
- BriFiSeg: a deep learning-based method for semantic and instance segmentation of nuclei in brightfield images
Related papers
- Lightweight Adaptation of General-Purpose VLMs for Multispectral and SAR Image Understanding
- Systematic Evaluation of Underwater Image Reconstruction
- InteracVid: Building a Real Interactive Audio-Visual Response Dataset from Live-Chat Videos
- Shot-Aware Frame Sampling for Video Understanding
- Reduce Tokens, Refine Semantics: Training-Free Acceleration of Vision-Language Models
- VersusQ: Pairwise Margin Reasoning for Generalizable Video Quality Assessment