S4-Crowd: Semi-Supervised Learning with Self-Supervised Regularisation for Crowd Counting

Haoran Duan, Yu Guan · OpenReview

TL;DR

This paper introduces S4-Crowd, a novel semi-supervised learning framework for crowd counting that significantly reduces reliance on expensive manual annotations. By leveraging both labeled and unlabeled data, S4-Crowd employs self-supervised regularization techniques to model crowd variations and a specialized recurrent unit (GCRU) to generate high-quality pseudo-labels, ultimately achieving state-of-the-art performance.

What Problem Does This Paper Address?

Accurate crowd counting is crucial for smart city applications like traffic management and urban planning. However, existing high-performing methods heavily depend on supervised learning, which requires extensive and costly manual annotation of crowd data (e.g., pinpointing every individual's head). This annotation bottleneck limits scalability and real-world applicability. The paper aims to bridge this gap by developing a semi-supervised approach that effectively utilizes readily available unlabeled data to improve crowd counting accuracy while minimizing annotation costs.

Methods

The core of S4-Crowd lies in its unsupervised pathway, which generates pseudo-labels for unlabeled data. This pathway incorporates two novel self-supervised regularization losses:

  • Crowd Scale Equivariance (CSE): This loss ensures that the crowd density estimation remains consistent regardless of variations in head or image scale, achieved through unsupervised re-scaling transformations.
  • Crowd Entropy Consistency (CEC): This loss enforces consistency in crowd representations across different image augmentations, aiming to make the model invariant to variations like illumination and quality.

These regularization terms are used to train a Gated-Crowd-Recurrent-Unit (GCRU). Unlike standard recurrent units, GCRU is designed to process high-order tensor sequences and specifically extracts second-order crowd statistics, leading to more discriminative features and improved pseudo-label quality.

The framework then combines a standard supervised loss with the unsupervised losses (CSE, CEC, and a pseudo-supervised loss derived from the generated pseudo-labels) using a dynamic weighting strategy. This strategy adaptively balances the influence of supervised and unsupervised learning throughout training, giving more weight to unsupervised learning in early stages when pseudo-labels are less reliable and gradually increasing its importance as the model learns.

Datasets

The proposed S4-Crowd framework was evaluated on four widely used crowd counting datasets:

  • ShanghaiTech A & B: These datasets capture congested street views with varying crowd densities.
  • UCF_QNRF: A large-scale dataset with high-resolution images and dense crowds.
  • World Expo'10 (WE): This dataset features fixed crowd scenes.

The paper also mentions experiments using external unlabeled data from Google for comparison with existing methods.

Key Insights and Ideas

  • Self-supervised learning for crowd variations: The paper demonstrates that self-supervised losses (CSE and CEC) can effectively model and mitigate the impact of common crowd variations (scale, illumination) without requiring manual annotations, which is a significant step towards reducing annotation burden.
  • GCRU for richer crowd features: The introduction of GCRU, which explicitly models second-order crowd statistics, proves crucial for generating higher-quality pseudo-labels and improving the robustness of the crowd counting model.
  • Dynamic weighting is key: The dynamic adjustment of the unsupervised loss's weight during training is essential. It allows the model to leverage less reliable pseudo-labels early on and benefit more from them as they become more accurate, leading to better overall performance.
  • Semi-supervised learning is highly effective: The results strongly suggest that semi-supervised approaches, especially those incorporating sophisticated self-supervised components, can achieve performance comparable to or even exceeding fully supervised methods when labeled data is scarce.

Key Results

S4-Crowd achieved state-of-the-art performance among semi-supervised crowd counting methods on the evaluated datasets. For instance, on UCF_QNRF, it showed an 8.6 MAE reduction compared to the IRAST model. Ablation studies highlighted the effectiveness of individual components:

  • The dynamic training strategy significantly outperformed fixed weighting schemes, achieving the best MAE of 82.1 on ShanghaiTech A.
  • The GCRU unit was shown to be superior to a standard GRU, indicating the benefit of its second-order statistics modeling.
  • The number of augmentations (K) for CEC was found to be optimal at K=3, yielding the lowest MAE.

Limitations and Future Work

  • Domain Adaptation: The authors acknowledge that when using external unlabeled data from different sources (e.g., Google images vs. ShanghaiTech), performance can be impacted. They suggest that domain adaptation techniques will be explored in the future to better leverage diverse unlabeled data.
  • Real-world Scenarios: While the framework is designed for real-world scenarios, the paper notes that performance might not substantially outperform supervised baselines when dealing with significant domain shifts between labeled and unlabeled data.
  • Selection Mechanism for Labeled Data: For extreme cases with very limited labeled data, the paper mentions that a more sophisticated mechanism for selecting which data points to label might be beneficial.

Summary updated

BibTeX
@article{duan2021s,
  author = {Haoran Duan and Yu Guan},
  title = {{S4-Crowd: Semi-Supervised Learning with Self-Supervised Regularisation for Crowd Counting}},
  journal = {Pattern Recognition},
  year = {2021},
}
Figure