In computer vision, counting objects—from cells under a microscope to crowds in a stadium—is traditionally a "point-heavy" task. To train a model, a human must typically click on every single instance in an image. In a dense crowd of 2,000 people, this process can take hours for just one photo. As Qing Liu and Wei Ke note in Crowd Counting with Sparse Annotation, labeling a single large-scale dataset like UCF-QNRF can consume over 2,000 human hours.
To break this bottleneck, researchers are shifting toward methods that learn to count using far less information. The core intuition is that models don't necessarily need to be told where every object is; they can learn to count by understanding global context, relative density, and the statistical properties of repeating patterns.
Weak Supervision via Image-Level Counts
The most direct way to reduce labor is to replace point-level dots with a single number: the total count for the image. This is known as weak supervision.
The challenge is teaching a model to localize objects when it only knows the final sum. Dingkang Liang and colleagues addressed this in TransCrowd by reformulating counting as a "sequence-to-count" problem. By using the global receptive field of a Transformer, the model learns which patches of an image contribute most to the total count. Similarly, Fusen Wang and Nong Sang introduced JCTNet, which combines CNNs for local features with Transformers for global context, allowing the model to estimate density maps without ever seeing a manual dot-annotation.
Learning from Relative Density and Sorting
If we don't even have the exact counts, can we still learn to count? A powerful intuition is that humans can easily tell which of two images is "more crowded" even if they can't count the individuals.
In Weakly-Supervised Crowd Counting Learns from Sorting Rather Than Locations, Yifan Yang and Guorong Li proposed a ranking-based strategy. By training a network to sort groups of images by their density, the model is forced to identify the visual features that correlate with "more objects." This "learning-to-sort" approach allows the model to bootstrap its understanding of density from the relative relationships between images.
Semi-Supervised Consistency and Pseudo-labels
Semi-supervised methods bridge the gap by using a tiny fraction of labeled data (e.g., 5%) to guide the learning process on a much larger pool of unlabeled images.
The key mechanism here is consistency. If you perturb an unlabeled image (by cropping or changing the brightness), the model's predicted count should remain the same. Hui Lin and Zhiheng Ma implemented this in P³Net by treating pixel-wise density as a probability distribution. By enforcing consistency between different views of the same scene, the model refines its own "pseudo-labels," effectively teaching itself from its most confident guesses.
Other researchers, like Lingqiao Liu in IRAST, use "surrogate tasks"—like binary segmentation—to help the feature extractor understand what constitutes a "high density" region versus a "low density" one, even without explicit counts.
Class-Agnostic and Reference-less Counting
The ultimate goal is a model that can count anything without being specifically trained on that category. This is known as class-agnostic counting.
Viresh Ranjan and Minh Hoai pioneered this in Learning To Count Everything. Instead of looking for "heads" or "cars," the model looks for similarity. If a user provides three examples of a cell, the model searches the rest of the image for matching patterns.
Taking this a step further, AFreeCA by Adriano C. D'Alessandro and Ghassan Hamarneh leverages Latent Diffusion Models (LDMs) to generate synthetic training data. By creating "self-collages" where the count is known by design, models like UnCounTR can learn the fundamental logic of counting without a single human-provided label.
Why It Works: The Conservation of Features
These methods work because counting is fundamentally about identifying redundancy. Whether it is CrowdCLIP using vision-language alignment to match text like "a large crowd" to image features, or Antoni B. Chan using adaptive resolution to find objects at different scales, the underlying principle is the same: the visual signal of a "countable unit" is consistent enough that global statistics, temporal flow, or self-similarity can substitute for the expensive human click.