Interlayer and Intralayer Scale Aggregation for Scale-invariant Crowd Counting

Mingjie Wang, Hao Cai, Jun Zhou, Minglun GongarXiv 2020

TL;DR

This paper introduces ScSiNet (Single-column Scale-invariant Network), a streamlined architecture for crowd counting that achieves state-of-the-art accuracy without the complexity of traditional multi-column models. By combining dense interlayer connections with a novel Stochastic Scale Mixer, the network effectively handles the extreme scale variations and density shifts common in crowded scenes while remaining robust to changes in image resolution.

What Problem Does This Paper Address?

Crowd counting is notoriously difficult because the "scale" of people changes dramatically within a single image—think of a wide shot where people in the foreground are large and clear, while those in the background are tiny dots.

Existing solutions often use "multi-column" networks (different branches for different scales), but these are hard to train, computationally expensive, and often fail to generalize to new datasets. Furthermore, standard training methods that average losses across a batch can inadvertently "smooth out" the very density variations the model needs to learn. The authors aim to create a single-branch model that is both scale-invariant and easy to train.

Methods

The authors propose the Single-column Scale-invariant Network (ScSiNet), which relies on two primary innovations:

  1. Interlayer and Intralayer Scale Aggregation:
    • Interlayer: The model uses dense connections (inspired by DenseNet) to pass low-level spatial details from shallow layers to deeper ones, ensuring the network retains fine-grained information.
  2. Intralayer (The SiT Module): Within each layer, the Scale-invariant Transformation (SiT) splits feature channels into groups. Each group uses dilated convolutions with different rates to capture a "pyramid" of scales.
  3. Stochastic Scale Mixer: To avoid "hard" boundaries between these scales, the SiT module uses a stochastic tree structure to blend features. During training, random variables ($\alpha$) determine how much each scale contributes, forcing the model to learn a continuous representation of scale rather than discrete steps.
Fig. 2. Pipeline of the proposed ScSiNet for crowd counting. The backbone subnetwork is formed by the first ten layers of a pre-trained VGG-16 [41] to produce general features. The SiTs are combined by interlayer dense connections [17] and each SiT is comprised of an intralayer scale pyramid and a stochastic scale mixer. Specifically, the input of SiT is first processed by an 1×1 layer and then divided into G = 6 groups, denoted as F0, ..., F5. The scale pyramid performs dilated convolutions for groups F1, ..., F5 with dilation rates (DR) ranging from 1 to 5. This is followed by the scale mixer, which is designed to blend the multi-scale features in a stochastic fashion. α1, α2, α3, α4 are random variables following the uniform distribution between 0 and 1.
  1. Randomly Integrated Loss: Standard loss functions average the error across a batch. The authors argue this reduces density diversity. Instead, they propose a loss that sums sub-losses from randomly cropped patches of varying densities. This "divide-and-conquer" approach helps the model handle massive density shifts without needing specialized sub-networks.
Fig. 3. Schema of randomly integrated loss with patch number N = 16. During each iteration, N patches randomly cropped from various original images are fed into our ScSiNet and finally an integrated loss is computed as the supervision.

Datasets

The model was evaluated on four standard crowd-counting benchmarks:

  • ShanghaiTech (Part A & B): Contains varying crowd densities and scales.
  • UCF-QNRF: A large-scale dataset with high-resolution images and extreme density variance (up to 12,000+ people per image).
  • UCF_CC_50: A small but extremely challenging dataset with very high-density scenes.

Key Insights and Ideas

  • Stochasticity as Regularization: The "Stochastic Scale Mixer" is a standout idea. By randomly blending scale features during training, the model becomes less sensitive to the exact size of an object, effectively simulating the continuous scale changes found in the real world.
  • Efficiency of Single-Column: The authors prove that a well-designed single-column network can outperform complex multi-branch models. ScSiNet is 64% faster than the previous state-of-the-art (S-DCNet) during inference.
  • Resolution Robustness: Because the model learns scale-invariant features, it performs remarkably well even when test images are significantly downsampled—a critical feature for deployment on low-power security cameras.

Key Results

ScSiNet achieved top-tier results across all tested datasets:

  • Accuracy: On the challenging UCF-QNRF dataset, it achieved an MAE (Mean Absolute Error) of 89.69, a significant improvement over the previous best of 92.9.
  • Transferability: When trained on one dataset and tested on another (e.g., trained on QNRF, tested on ShanghaiTech A), ScSiNet outperformed existing methods by a wide margin, proving it learns generalizable features rather than just memorizing dataset-specific quirks.
  • Qualitative Superiority: As seen in Figure 1, ScSiNet produces much cleaner, more accurate density maps compared to competitors, especially in areas with high density shifts.
Fig. 1. Samples (a) taken from the ShanghaiTech Part A dataset [55] demonstrate the challenges of continuous scale changes within a single image and high density shifts both within and across images. Green arrows in the ground truth (GT) density maps (b) show the directions of scale changes, whereas red and yellow rectangular boxes highlight high and low density areas, respectively. Compared to S-DCNet [47] (c), our method (d) handles these challenges much more effectively.

Limitations and Future Work

While ScSiNet performs exceptionally well, the authors noted that on ShanghaiTech Part B, its performance was slightly lower than a few specific models (like SPANet). This suggests that while the model is a powerhouse for high-density, high-variance scenes, there may still be room to optimize it for simpler, more uniform crowd distributions. The paper does not deeply explore the computational overhead of the dense connections in very deep architectures, which could be a point for future optimization.

Summary updated

Abstract

Crowd counting is an important vision task, which faces challenges on continuous scale variation within a given scene and huge density shift both within and across images. These challenges are typically addressed using multi-column structures in existing methods. However, such an approach does not provide consistent improvement and transferability due to limited ability in capturing multi-scale features, sensitiveness to large density shift, and difficulty in training multi-branch models. To overcome these limitations, a Single-column Scale-invariant Network (ScSiNet) is presented in this paper, which extracts sophisticated scale-invariant features via the combination of interlayer multi-scale integration and a novel intralayer scale-invariant transformation (SiT). Furthermore, in order to enlarge the diversity of densities, a randomly integrated loss is presented for training our single-branch method. Extensive experiments on public datasets demonstrate that the proposed method consistently outperforms state-of-the-art approaches in counting accuracy and achieves remarkable transferability and scale-invariant property.
BibTeX
@misc{wang2020interlayer,
  author = {Mingjie Wang and Hao Cai and Jun Zhou and Minglun Gong},
  title = {{Interlayer and Intralayer Scale Aggregation for Scale-invariant Crowd Counting}},
  year = {2020},
  eprint = {2005.11943},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2005.11943},
}

Loading related content...

Figure