Abstract
Crowd counting has achieved significant progress by training regressors to predict instance positions. In heavily crowded scenarios, however, regressors are challenged by uncontrollable annotation variance, which causes density map bias and context information inaccuracy. In this study, we propose mutual prompt learning (mPrompt), which leverages a regressor and a segmenter as guidance for each other, solving bias and inaccuracy caused by annotation variance while distinguishing foreground from background. Specifically, mPrompt leverages point annotations to tune the segmenter and predict pseudo head masks via point prompt learning. It then uses the predicted segmentation masks as spatial constraints to rectify biased point annotations via context prompt learning. mPrompt defines a way of mutual information maximization from prompt learning, mitigating the impact of annotation variance while improving model accuracy. Experiments show that mPrompt significantly reduces the Mean Average Error (MAE), demonstrating its potential as a general framework for downstream vision tasks.
Introduction
Crowd counting typically relies on point annotations, where human annotators click the center of every head in an image. However, human performance is inconsistent; labelers may click the forehead, chin, or hair center. This inherent label variance creates a "blurry" target for machine learning models, leading to biased density maps and difficulty in distinguishing foreground objects from cluttered backgrounds. Existing methods often attempt to relax loss functions to account for this noise, but this frequently introduces background interference. Segmentation-based methods also struggle because their training targets, derived from the same noisy points, are often inaccurate.
Methodology
The proposed mPrompt (Mutual Prompt Learning) framework utilizes a two-branch architecture consisting of a Regressor and a Segmenter sharing a common backbone. The core innovation is the bidirectional communication between these branches to maximize mutual information and correct individual errors.
Mutual Prompt Learning Cycle
The framework operates through two distinct prompting mechanisms:
- Point Prompt (Regressor → Segmenter): The regressor provides its predicted density map to the segmenter. By combining these predictions with ground-truth points and applying a K-Nearest Neighbor (K-NN) algorithm to filter outliers, the model generates a "Pseudo Mask." This mask is significantly more precise than a simple circle around a dot, helping the segmenter learn accurate head morphology.
- Context Prompt (Segmenter → Regressor): The segmenter provides a spatial mask that acts as a constraint ($L_{con}$). This constraint forces the regressor to predict density only within identified boundaries, effectively rectifying the impact of biased point annotations by ignoring background noise.
Integration with Foundation Models
mPrompt is designed for efficiency and can be used to fine-tune large-scale foundation models like the Segment Anything Model (SAM). By using lightweight adapters, the system leverages massive pre-existing visual knowledge while requiring only 1/4 of the trainable parameters and 1/5 of the FLOPs compared to standard fine-tuning methods.
Experimental Results
The model was evaluated on four gold-standard benchmarks: ShanghaiTech (Part A & B), UCF-QNRF, and NWPU-Crowd.
- State-of-the-Art Performance: mPrompt achieved the lowest Mean Absolute Error (MAE) on several benchmarks. Notably, on the massive NWPU(V) dataset, it reached an MAE of 50.2, significantly outperforming previous leaders like PET (58.5) and STEERER (54.3).
- Robustness to Noise: In stress tests where annotations were intentionally shifted by up to 50% of a head's height, mPrompt’s performance remained stable, while competing models saw significant error rate increases.
- Efficiency: The "Context Prompt" mechanism accelerates convergence by providing clear spatial boundaries, preventing the regressor from wasting training epochs on background textures.
Conclusion
mPrompt effectively addresses the "noisy label" problem in crowd counting through mutual prompt learning. By linking regression and segmentation, the model allows both tasks to correct each other's mistakes in real-time. While the current implementation benefits from initial box annotations for optimal performance, the underlying logic of mutual information maximization offers a promising path for other vision tasks plagued by annotation variance, such as cell counting or satellite imagery analysis.
Summary updated