Congested crowd instance localization with dilated convolutional swin transformer

Junyu Gao, Maoguo Gong, Xuelong Li

TL;DR

This paper introduces the Dilated Convolutional Swin Transformer (DCST), a novel architecture designed to move beyond simple crowd counting to precise individual localization in extremely dense scenes. By integrating dilated convolutions into a window-based Vision Transformer, the model effectively captures the large-range contextual information necessary to identify people in blurred, tiny, or heavily occluded image regions.

What Problem Does This Paper Address?

While "crowd counting" (estimating the total number of people) is a well-studied field, "crowd localization" (identifying the specific $(x, y)$ coordinates of every head) is much harder. In highly congested environments—like music festivals or protests—traditional computer vision models face three major hurdles:

  1. Tiny Objects: Heads may only be a few pixels wide.
  2. Mutual Occlusion: People overlap, making it hard to distinguish individuals.
  3. Blurred Regions: Distant crowds often appear as a textured blur, causing models to miss the structured patterns of human faces.

Traditional Convolutional Neural Networks (CNNs) often lack the global context to resolve these issues, while standard Vision Transformers can be computationally expensive or limited by fixed-window attention mechanisms.

Methods

The authors propose a hybrid architecture called DCST, which consists of three main parts:

  • Swin Transformer Backbone: They use the Swin Transformer as an encoder because its hierarchical structure and "shifted window" attention allow it to learn richer representations than standard CNNs.
  • Dilated Convolutional Block (DCB): To solve the "blur" problem, the authors insert DCBs between the later stages of the Transformer. These blocks use dilated convolutions (with rates of 2 and 3) to expand the model's "receptive field" without losing resolution. This allows the model to use surrounding context to "infer" the location of heads in blurry or occluded areas.
  • FPN Decoder: A Feature Pyramid Network (FPN) acts as the decoder, fusing features from different stages of the transformer to produce a high-resolution "score map." This map is then thresholded to find individual point locations.

Datasets

The model was evaluated on six major crowd-related benchmarks:

  • NWPU-Crowd: A large-scale, high-resolution dataset with over 2 million instances.
  • JHU-CROWD++: Noted for high diversity, including weather effects like rain and snow.
  • UCF-QNRF: A dataset of extremely congested scenes.
  • ShanghaiTech (Parts A & B): Standard benchmarks for crowd analysis.
  • FDST: A video-based crowd counting dataset.

Key Insights and Ideas

  • Context is King for Blur: The most significant "aha moment" is that in blurred regions, you can't rely on facial features alone. By adding dilated convolutions to the Transformer, the model learns to look at the spatial arrangement of the crowd to predict where an individual should be, even if their face isn't clear.
  • Pixel-wise vs. Scene-level: The authors found that training with pixel-wise spatial annotations (localization) significantly outperforms scene-level training (counting). The model learns more "reasonable" features when it is forced to find exactly where people are.
  • The Receptive Field Gap: While Swin Transformers use shifted windows to communicate across patches, the authors proved that this isn't enough for dense prediction. The explicit addition of dilated convolutions provides a necessary boost in capturing long-range dependencies.

Key Results

The DCST model achieved state-of-the-art (SOTA) performance across multiple benchmarks:

  • NWPU-Crowd Leaderboard: At the time of writing, it ranked #1 for localization, achieving an F1-measure of 77.5% and a Mean Absolute Error (MAE) of 84.2.
  • Robustness: In "Negative Samples" (images with no people), the model produced zero false positives, outperforming previous methods like TinyFaces and VGG+GPR.
  • Ablation Success: Adding the Dilated Convolutional Block improved the counting error (MAE) by nearly 20% compared to a standard Swin Transformer setup.

Limitations and Future Work

  • Threshold Sensitivity: The final localization depends on choosing a "proper threshold" to convert the continuous score map into binary points. The authors noted that the best threshold for localization isn't always the best for counting, creating a trade-off.
  • Computational Load: While more efficient than global Transformers, the hybrid DCST+FPN architecture is still complex.
  • Future Directions: The authors suggest exploring how to better balance the learning parameters between the localization and counting tasks, as they are related but distinct objectives.

Summary updated

BibTeX
@inproceedings{gao2022congested,
  author = {Junyu Gao and Maoguo Gong and Xuelong Li},
  title = {{Congested crowd instance localization with dilated convolutional swin transformer}},
  booktitle = {Neurocomputing},
  year = {2022},
  url = {https://openreview.net/forum?id=jhi0Iq6Tiw},
}
Figure