Semi-supervised Counting via Pixel-by-pixel Density Distribution Modelling
Hui Lin, Zhiheng Ma, Rongrong Ji, Yaowei Wang, Zhou Su, Xiaopeng Hong, Deyu Meng
TL;DR
This work tackles semi-supervised crowd counting by reframing pixel density as a probability distribution over density intervals, enabling robust learning with limited labels. It introduces P$^3$Net, which combines a Pixel-wise Distribution Matching (PDM) loss, density-token–augmented Transformer decoding, and a dual-branch interleaving with inter-branch Expectation Consistency Regularization (ECR) to exploit unlabeled data. The method yields state-of-the-art results across multiple benchmarks in semi-supervised settings and remains competitive in fully-supervised scenarios, demonstrating effective use of density distributions and attention-guided density tokens. The approach offers practical benefits for real-world deployment where labeling is expensive, and shows resilience to adverse conditions and varying crowd distributions.
Abstract
This paper focuses on semi-supervised crowd counting, where only a small portion of the training data are labeled. We formulate the pixel-wise density value to regress as a probability distribution, instead of a single deterministic value. On this basis, we propose a semi-supervised crowd-counting model. Firstly, we design a pixel-wise distribution matching loss to measure the differences in the pixel-wise density distributions between the prediction and the ground truth; Secondly, we enhance the transformer decoder by using density tokens to specialize the forwards of decoders w.r.t. different density intervals; Thirdly, we design the interleaving consistency self-supervised learning mechanism to learn from unlabeled data efficiently. Extensive experiments on four datasets are performed to show that our method clearly outperforms the competitors by a large margin under various labeled ratio settings. Code will be released at https://github.com/LoraLinH/Semi-supervised-Counting-via-Pixel-by-pixel-Density-Distribution-Modelling.
