Semi-supervised Crowd Counting via Self-training on Surrogate Tasks

Yan Liu, Lingqiao Liu, Peng Wang, Pingping Zhang, Yinjie Lei

Abstract

Crowd counting is a vital computer vision task typically addressed through density map regression. However, training these models requires exhaustive point-by-point human annotation. This paper presents a semi-supervised approach that utilizes unlabeled images to enhance a shared feature extractor through multiple binary segmentation "surrogate tasks." The proposed Inter-Relationship-Aware Self-Training (IRAST) method enforces logical consistency across these tasks—for instance, ensuring a pixel labeled as "high density" is also labeled as "low density." Experimental results across major benchmarks demonstrate that IRAST significantly reduces the reliance on labeled data while outperforming existing semi-supervised methods.

Introduction

Crowd counting involves estimating the number of individuals in a scene, usually by generating a density map where the integral represents the total count. The primary bottleneck in developing these models is the annotation process: humans must manually click on every head in thousands of images. While semi-supervised learning (SSL) offers a potential solution by leveraging unlabeled data, applying SSL to regression is challenging. Continuous regression outputs are often noisy, and using them as pseudo-labels for unlabeled data can lead to error propagation.

Methods

The authors propose a strategy that shifts the focus of semi-supervised learning from the final regression output to the feature extractor. By using unlabeled data to solve simpler, more stable "surrogate tasks," the model learns robust spatial semantics without the noise inherent in regression pseudo-labeling.

Surrogate Tasks and Architecture

The complex regression problem is decomposed into several binary segmentation tasks. For a given density map, multiple thresholds (e.g., low, medium, high) are established. Each surrogate task predicts whether the density at a specific pixel exceeds a certain threshold.

The overall architecture of the proposed semi-supervised crowd counting framework.

The architecture features a shared feature extractor (such as CSRNet) with parallel branches: one for the primary density map regressor and several for the surrogate segmentation predictors. During training, unlabeled data only updates the feature extractor via these surrogate tasks, shielding the final counting head from noisy signals.

Inter-Relationship-Aware Self-Training (IRAST)

The core innovation, IRAST, introduces a logical consistency check when generating pseudo-labels for unlabeled images. In standard SSL, pseudo-labels are often filtered by model confidence. IRAST goes further by checking the inter-relationship between different surrogate tasks.

The Inner-relationship Pseudo Generator (IPG) identifies logically inconsistent pixels.

If a "high-density" predictor classifies a pixel as positive, but a "low-density" predictor (with a lower threshold) classifies it as negative, a logical contradiction occurs. The Inner-relationship Pseudo Generator (IPG) identifies these contradictions, marking such pixels as "invalid" and excluding them from the training signal. This mechanism acts as a powerful denoising filter, ensuring the feature extractor learns from logically sound spatial information.

Key Results

The IRAST method was evaluated on three major benchmarks: ShanghaiTech (Part A & B), UCF-QNRF, and WorldExpo’10. It consistently outperformed other semi-supervised approaches, such as Learning-to-Rank (L2R) and Mean Teacher.

  • ShanghaiTech Part A: The Mean Absolute Error (MAE) improved from 98.3 (using only labeled data) to 86.9.
  • UCF-QNRF: The model achieved an MAE of 135.6, significantly better than the label-only baseline of 147.7. Notably, using only 480 labeled images plus unlabeled data, IRAST nearly matched the performance of a fully supervised model using twice as many labeled images.
  • WorldExpo’10: The method showed superior performance in surveillance-style scenarios, confirming its versatility.

Conclusion

By reframing semi-supervised crowd counting as a multi-task learning problem with logical constraints, the authors avoid the pitfalls of semi-supervised regression. The IRAST framework demonstrates that the feature extractor can be effectively trained on unlabeled data using surrogate segmentation tasks. While the selection of optimal thresholds remains a challenge, the success of logical consistency checks suggests a promising direction for other semi-supervised regression tasks in computer vision.

Summary updated

BibTeX
@inproceedings{liu2020semi,
  author = {Yan Liu and Lingqiao Liu and Peng Wang and Pingping Zhang and Yinjie Lei},
  title = {{Semi-supervised Crowd Counting via Self-training on Surrogate Tasks}},
  booktitle = {European Conference on Computer Vision},
  year = {2020},
  doi = {10.1007/978-3-030-58555-6\_15},
}
Figure