CLIP-EBC: CLIP Can Count Accurately through Enhanced Blockwise Classification
CLIP was trained to match images and words, not to regress continuous values. Can counting be reformulated so that its recognition knowledge remains useful?

01 / Problem
What is this work trying to solve?
Standard blockwise classification first Gaussian-smooths point labels, turning integer counts into real values and forcing adjacent bins to share fragile boundaries. Such bins make poor text prompts for CLIP (for example, '3.14 people'), while classification loss alone is not aligned with MAE or RMSE on the reconstructed count map.
02 / Idea
What is the central technical intuition?
Enhanced Blockwise Classification replaces smoothed real-valued bins with integer bins, merges the noisy high-count tail into a shared bin, and combines classification with a density-map count loss. CLIP-EBC freezes the text encoder, adapts the image encoder with visual prompt tokens, and classifies each spatial feature by similarity to prompts such as 'There are 3 people.'
03 / Evidence
What does the current evidence show?
On UCF-QNRF, applying all three EBC changes to VGG16 reduces MAE from 140.6 to 77.9, a 44.5% improvement, and the framework also improves five other backbones. CLIP-EBC with ViT-L/14 reports 58.2 MAE and 268.5 RMSE on NWPU-Crowd test, while experiments cover four crowd-counting datasets.
04 / Limits
Where are the limits of this work?
Despite using language prompts, CLIP-EBC is a supervised, dataset-specific counter with tuned bins and visual prompt learning; it is not a zero-shot or open-vocabulary counting result. The paper does not test cross-dataset transfer or robustness under domain shift.