Modeling Noisy Annotations for Crowd Counting

Jia Wan, Antoni B. Chan

Introduction

In the field of crowd counting, the standard approach relies on human annotators placing a single dot on every person's head within an image. Algorithms then apply a Gaussian blur to these discrete dots to create a continuous "density map," which a neural network is trained to predict.

Historically, most networks treat this as a standard regression task, optimizing an L2 loss function between the predicted and ground-truth density maps. However, using L2 loss mathematically assumes that there is independent, identically distributed (i.i.d.) Gaussian noise on the pixel values of the density map. This assumption is fundamentally flawed. The actual source of noise is the human annotator's click location. If an annotator clicks slightly to the left of a head, the entire Gaussian blob shifts, causing highly correlated changes across multiple nearby pixels. Existing methods that ignore this generative process end up overly penalizing models for noisy training data, causing them to struggle when learning the true centers of objects.

This paper introduces a novel loss function that explicitly models annotation location noise, capturing the spatial correlations it creates in the resulting density maps.

Methodology

To address the mismatch between actual annotation noise and traditional loss functions, the authors propose a generative statistical model that translates spatial coordinate noise into a tractable loss function for deep learning.

Overview of the proposed generative model for modeling annotation noise versus traditional L2 loss.
  1. Modeling Spatial Noise: The true location of a person is treated as the observed (noisy) annotation coordinate plus Gaussian noise.
  2. Deriving the Density Distribution: The authors mathematically derive how this spatial coordinate noise translates into uncertainty in the final density map. Because the exact probability distribution is highly complex (involving non-central $\chi^2$ distributions), they approximate the marginal distribution of each pixel's density value with a 1D Gaussian.
  3. Capturing Pixel Correlations: A shifted dot affects a whole neighborhood of pixels simultaneously. To account for this, the authors approximate the joint distribution of the entire density map using a multivariate Gaussian with a full covariance matrix.
  4. Low-Rank Approximation: A full covariance matrix for an entire image is computationally impossible to store or invert on a GPU ($O(N^2)$ complexity). To solve this, the authors introduce a clever low-rank approximation: they only calculate covariance for pixels near the annotations (where variance is highest) and treat background pixels as independent. This reduces complexity to a manageable $O(M^2+N)$.
  5. New Loss Function: The negative log-likelihood of this approximated multivariate Gaussian is then used as the loss function to train standard convolutional neural networks (like VGG19 or CSRNet).

Key Insights

  • Source vs. Symptom: Modeling uncertainty at the source (the spatial coordinate of the annotation) is much more effective than modeling it at the output (the pixel intensity of the density map).
  • Correlations Matter: By using a full-covariance matrix to capture neighborhood pixel correlations, the network's predicted high-density regions are allowed to "move around" during training to find a consistent, true location, rather than being rigidly penalized by L2 loss.
  • Tractable Math for Deep Learning: The low-rank covariance approximation brilliantly bridges complex statistical derivations with practical deep learning, proving that mathematical rigor does not have to be sacrificed for GPU efficiency.

Key Results

The authors evaluated their method on six standard crowd counting benchmarks, including NWPU-Crowd, JHU-CROWD++, UCF-QNRF, Shanghai_Tech, UCSD, and Mall.

State-of-the-Art Performance: Using a standard VGG19 backbone, the proposed loss achieved a Mean Absolute Error (MAE) of 85.8 on the challenging UCF-QNRF dataset. This significantly outperforms the standard L2 loss (98.7) and the previous state-of-the-art Bayesian Loss (88.8).

High Robustness to Noise: In ablation studies, the authors added synthetic noise to the training data by randomly shifting annotation dots by up to 64 pixels.

Robustness to synthetic noise: The proposed method (Ours) degrades much more gracefully than L2 and Bayesian Loss (BL) as noise increases.

As shown in the noise ablation results, the proposed loss degraded much more gracefully than baselines. At a severe noise level of 32 pixels, the proposed method's MAE remained around 95, while Bayesian Loss jumped to ~100 and L2 skyrocketed to ~161.

Ablation on Covariance: Modeling pixel correlations proved crucial. Using only a diagonal covariance matrix (assuming independent pixels) yielded an MAE of 103.2 on UCF-QNRF, while upgrading to the full covariance matrix dropped the error to 92.6.

Limitations and Future Work

While highly effective, the low-rank approximation requires tuning a hyperparameter: the percentage of variance to preserve. Preserving too much variance (e.g., >60% on the Mall dataset) can slightly hurt performance because it starts heavily weighting background pixels. Additionally, while the loss improves standard backbones, some specialized multi-scale architectures still outperform the VGG19 baseline on specific datasets, though this new loss could theoretically be integrated into those architectures as well.

Looking forward, the authors suggest applying this spatial noise modeling to other computer vision tasks that rely on response maps generated from point-wise annotations, such as saliency prediction, center-point object detection, and visual tracking.

Summary updated

BibTeX
@inproceedings{wan2020modeling,
  author = {Jia Wan and Antoni B. Chan},
  title = {{Modeling Noisy Annotations for Crowd Counting}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2020},
}
Figure