Count Anything

summary

The gist

Object counting remains fragmented across domain-specific datasets and task formulations, with existing models lacking generalization across categories, visual domains, object scales…

In short

Count Anything is a generalist model designed to count objects from images based on text descriptions across many visual domains. It uses a dual-granularity approach, combining region-level sparse counting with pixel-level dense counting, to output an instance-grounded set of points rather than just a density map. This allows it to generalize well to diverse object scales and densities.

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 used across episodes

This episode discusses

The paper

Count Anything · Read on arXiv

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

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.

More episodes

← Home