AI
CLIP-EBC brings accurate crowd counting to vision-language models via blockwise classification
A new framework adapts CLIP's image recognition capabilities to solve the challenging problem of estimating crowd density from photographs.
Researchers have developed a novel approach that brings CLIP's powerful image understanding abilities to bear on crowd counting—a task that has historically required separate specialized models. The new method, called CLIP-EBC, reformulates crowd density estimation as a classification problem, allowing the popular vision-language model to count people in images with surprising accuracy.
The core challenge#
Converting counting into a recognition task presents inherent difficulties. Earlier classification-based approaches tried to quantize crowd sizes into overlapping ranges, which created ambiguity at bin boundaries and led to poor count predictions. Applying CLIP directly within these flawed frameworks would preserve these weaknesses.
How CLIP-EBC works#
The team introduced the Enhanced Blockwise Classification (EBC) framework, which addresses prior limitations through two key improvements:
- Integer-valued bins instead of overlapping ranges, eliminating boundary ambiguity
- Regression loss based on density maps to refine the actual count values, not just classify which bin a crowd falls into
Within this backbone-agnostic EBC framework, the researchers built CLIP-EBC to fully harness CLIP's recognition capabilities for counting scenarios. The architecture bridges the conceptual gap between classification and regression, letting a recognition-trained model succeed at a counting task.
Results and benchmarks#
Testing on standard crowd-counting datasets showed substantial improvements. The EBC framework alone enhanced existing classification methods by up to 44.5% on the UCF-QNRF benchmark. CLIP-EBC itself achieved state-of-the-art results on the NWPU-Crowd test set:
- MAE (Mean Absolute Error): 58.2
- RMSE (Root Mean Square Error): 268.5
These metrics represent an 8.6% and 13.3% improvement respectively over the prior best method, STEERER. Code and model weights have been released publicly, enabling further research and practical deployment.

