Source-linked AI summary

Bayesian Loss for Crowd Count Estimation with Point Supervision

Zhiheng Ma, Xing Wei, Xiaopeng Hong, Yihong Gong

arXiv:1908.03684v1cs.CV

TL;DR

Crowd counting must learn from sparse point annotations, while Gaussian-generated density targets can be unreliable under occlusion, perspective, and object variation. The paper introduces Bayesian loss, which models density contributions probabilistically and supervises count expectations at annotated points; it substantially improves baseline loss performance across tested datasets and achieves state-of-the-art results without external detectors or multi-scale architectures.

  • Problem

    Sparse point annotations lack object size and shape information, while Gaussian-derived density-map targets can be inaccurate under occlusion, perspective effects, and crowd variation.

  • Method

    Bayesian loss constructs a density-contribution probability model from point annotations and supervises the expected count at each annotated point.

  • Results

    The loss substantially outperforms the baseline on UCF-QNRF, ShanghaiTech, and UCF CC 50, while a VGG-19 implementation achieves state-of-the-art performance without external detectors or multi-scale architectures.

  • Takeaways & Limitations

    Point annotations can serve as priors or likelihoods for density estimation rather than strict pixel-wise learning targets.

  • Takeaways & Limitations

    Adaptive Gaussian alternatives assume evenly distributed crowds, while perspective information is generally unavailable.

Abstract

from arXiv · show

In crowd counting datasets, each person is annotated by a point, which is usually the center of the head. And the task is to estimate the total count in a crowd scene. Most of the state-of-the-art methods are based on density map estimation, which convert the sparse point annotations into a "ground truth" density map through a Gaussian kernel, and then use it as the learning target to train a density map estimator. However, such a "ground-truth" density map is imperfect due to occlusions, perspective effects, variations in object shapes, etc. On the contrary, we propose \emph{Bayesian loss}, a novel loss function which constructs a density contribution probability model from the point annotations. Instead of constraining the value at every pixel in the density map, the proposed training loss adopts a more reliable supervision on the count expectation at each annotated point. Without bells and whistles, the loss function makes substantial improvements over the baseline loss on all tested datasets. Moreover, our proposed loss function equipped with a standard backbone network, without using any external detectors or multi-scale architectures, plays favourably against the state of the arts. Our method outperforms previous best approaches by a large margin on the latest and largest UCF-QNRF dataset. The source code is available at \url{https://github.com/ZhihengCV/Baysian-Crowd-Counting}.

1. Introduction

Crowd counting commonly uses sparse point annotations to train density-map estimators, but Gaussian-derived targets can be inaccurate under crowding and perspective variation. Bayesian loss instead supervises expected counts at annotated points and improves benchmark performance.

  • Point annotations mark one pixel per person, typically the head center, leaving object size and shape unspecified for density-map training.
  • Gaussian-kernel density maps can be inaccurate because of occlusions, irregular crowd distributions, and variations in object size, shape, and density.
  • Bayesian loss constructs a density-contribution probability model from point annotations and supervises the expected count at each annotated point.
  • The proposed loss substantially outperforms the baseline training loss on UCF-QNRF, ShanghaiTech, and UCF CC 50.
  • Using a standard VGG-19 backbone without external detectors or multi-scale architectures, the method achieves state-of-the-art performance on all benchmark datasets.

2. Related Work

Prior crowd-counting approaches include detection, direct count regression, density-map estimation, and hybrid training. These methods trade off instance-level complexity, use of point supervision, density modeling, and reliance on auxiliary models.

  • Detection-then-counting: Detection-then-counting methods estimate individual objects, but heavy clutter and occlusion make detecting every person infeasible in overcrowded scenes.
  • Direct count regression: Direct count regression learns image-to-count mappings more efficiently than detection-based methods but does not fully utilize available point supervision.
  • Density map estimation: Density-map methods use point locations to learn per-pixel density values and obtain the final count by summing the predicted map.
  • Hybrid training: Hybrid training combines strategies such as detection and density estimation, but some approaches require external pretrained human detectors and are less efficient.

3. The Proposed Method

The method replaces pixel-wise supervision from imperfect Gaussian “ground-truth” density maps with Bayesian supervision of expected counts at annotated points. It models foreground and background label probabilities, enabling count-based training and entropy analysis.

  • 3.1. Background and Motivation: Point annotations are sparse and lack object size or shape information, so prior methods convert them into Gaussian-kernel density maps as learning targets.Fixed kernels assume uniform head size and shape, while adaptive kernels assume evenly distributed crowds.
  • 3.2. Bayesian Loss: Bayesian loss constructs likelihoods from point annotations and supervises the expected count assigned to each annotated point rather than density values at every pixel.The expected count is computed from posterior label probabilities and the estimated density map, with the ground-truth count at each annotation point equal to one.
  • 3.2. Bayesian Loss: Equal class priors are used by default, but tailored priors can incorporate known tendencies for crowds to appear in particular locations.The formulation assumes p(y_n) = 1/N for head labels in the basic derivation.
  • 3.2. Bayesian Loss: The differentiable loss can be trained with standard CNN backpropagation, and inference does not require posterior label probabilities in advance.Entropy maps visualize label-assignment uncertainty; warmer colors indicate larger entropy, with higher values in dense regions.
  • 3.3. Background Pixel Modelling: A dummy background point and background label model pixels far from annotated heads, while the enhanced loss targets zero background count and one count per foreground annotation.The parameter d controls the margin between foreground and background points.
  • 3.4. Visualization and Analysis: The posterior roughly identifies person boundaries, while σ controls label-probability softness and d controls the foreground–background margin.Background pixel modelling improves handling of pixels far from crowds.

4. Experiments

Experiments evaluate Bayesian loss across four crowd-counting benchmarks, comparing accuracy, parameter sensitivity, annotation-error robustness, and backbone portability against a matched baseline. The method consistently outperforms the baseline and achieves state-of-the-art performance without external detectors or multi-scale structures.

  • Benchmark setup: MAE and MSE are the evaluation metrics, with experiments spanning UCF-QNRF, UCF CC 50, and ShanghaiTech parts A and B.UCF-QNRF is the largest dataset, while UCF CC 50 uses five-fold cross-validation because it has no predefined train-test split.
  • Benchmark results: BAYESIAN+ achieves state-of-the-art accuracy on all four benchmark datasets without external detection models or multi-scale structures.On UCF-QNRF, it reduces the best method’s MAE and MSE by 43.3 and 36.2, respectively.
  • Benchmark results: BAYESIAN consistently improves over BAYESIAN by around 3% across all four datasets.The comparison isolates the added BAYESIAN+ component while retaining the same general training framework.
  • Benchmark results: BAYESIAN+ improves over BASELINE by 15% on UCF-QNRF, 9% on ShanghaiTechA, 8% on ShanghaiTechB, and 8% on UCF CC 50.Both Bayesian variants significantly outperform the baseline across all four datasets.
  • Parameter sensitivity: BAYESIAN is less sensitive to σ than BASELINE, maintaining MAE below 98.0 and MSE below 180.0 as σ varies from 0.1 to 32.0.BASELINE’s MAE varies from 118.4 to 136.2, while its MSE varies from 192.3 to 250.6.
  • Parameter sensitivity: BAYESIAN+ consistently outperforms BAYESIAN when d ranges from 3% to 100% of the image’s shorter side.The parameter d controls the margin between foreground and background and relates to the assumed head-size bound.
  • Robustness: BAYESIAN outperforms BASELINE at different annotation-noise levels, even when using a smaller σ value.The experiment adds uniform random noise to annotated head positions to simulate human labeling errors.
  • Backbone and resolution studies: The Bayesian losses outperform the baseline significantly with both VGG-19 and AlexNet backbones, while both methods benefit from image resizing.These results support applicability across network structures and the evaluated resolution setting.

5. Conclusions and Future Work

The paper proposes Bayesian loss for crowd counting with point supervision, replacing pixel-wise density-map supervision with count-expectation supervision at annotated points. Experiments demonstrate advantages in accuracy, robustness, and generalization, while the formulation can incorporate additional knowledge.

  • Bayesian loss supervises the count expectation at each annotated point instead of using Gaussian-kernel density maps with pixel-wise supervision.The method constructs a density contribution probability model from point annotations.
  • Experiments demonstrate advantages of the proposed methods in accuracy, robustness, and generalization.
  • The formulation can incorporate foreground or background priors, scale and temporal likelihoods, and other facts for further improvement.
Loading 1908.03684v1…