CSRNet: Dilated Convolutional Neural Networks for Understanding the Highly Congested Scenes

Yuhong Li, Xiaofan Zhang, Deming Chen

Abstract

We propose a network for Congested Scene Recognition called CSRNet to provide a data-driven and deep learning method that can understand highly congested scenes and perform accurate count estimation as well as present high-quality density maps. The proposed CSRNet is composed of two major components: a convolutional neural network (CNN) as the front-end for 2D feature extraction and a dilated CNN for the back-end, which uses dilated kernels to deliver larger reception fields and to replace pooling operations. CSRNet is an easy-trained model because of its pure convolutional structure. We demonstrate CSRNet on four datasets (ShanghaiTech dataset, the UCF_CC_50 dataset, the WorldEXPO'10 dataset, and the UCSD dataset) and we deliver the state-of-the-art performance. In the ShanghaiTech Part_B dataset, CSRNet achieves 47.3% lower Mean Absolute Error (MAE) than the previous state-of-the-art method. We extend the targeted applications for counting other objects, such as the vehicle in TRANCOS dataset. Results show that CSRNet significantly improves the output quality with 15.4% lower MAE than the previous state-of-the-art approach.

Introduction

Crowd counting in highly congested scenes—such as marathons, political protests, or packed stadiums—presents a significant challenge for computer vision. Traditional object detection methods often fail in these environments because individuals are small, heavily occluded, and packed tightly together. To address this, research has shifted toward density map estimation, where a network predicts a continuous map of person density rather than discrete counts.

However, previous state-of-the-art models, such as Multi-Column CNNs (MCNNs), relied on complex architectures with multiple parallel branches of varying filter sizes to handle multi-scale features. These architectures are often redundant, difficult to train, and lose critical spatial resolution due to excessive pooling operations. CSRNet addresses these issues by utilizing a streamlined, single-column architecture powered by dilated convolutions.

The CSRNet Architecture

CSRNet (Congested Scene Recognition Network) employs a "pure" convolutional structure designed to maintain high resolution while capturing broad contextual information. The architecture is divided into two primary components:

  1. Front-end (Feature Extraction): The model utilizes the first 10 layers of a pre-trained VGG-16 network. This provides a robust foundation for 2D feature extraction, leveraging weights already optimized for visual recognition.
  2. Back-end (Dilated Convolution): This is the core innovation of CSRNet. Instead of using standard pooling layers that shrink the image and subsequent deconvolution layers to upscale it, CSRNet uses dilated convolutional layers (also known as "atrous" convolutions).
Comparison of 3x3 kernels with different dilation rates (1, 2, and 3), demonstrating how the receptive field expands without increasing the number of parameters.

As shown in the figure above, dilated kernels have "gaps" between their weights. This allows the network to expand its receptive field—the area of the input image it "sees"—without increasing the number of parameters or losing spatial resolution through pooling. This is crucial for crowd counting, as the network must understand global context (e.g., distinguishing a crowd from a background texture) while maintaining the pixel-level precision necessary for accurate density estimation.

Experimental Evaluation

The authors evaluated CSRNet across five major benchmarks to test its accuracy and generalization:

  • ShanghaiTech (Part A & B): A large-scale dataset containing over 330,000 annotated persons.
  • UCF_CC_50: A challenging dataset with only 50 images but extremely high densities, ranging from 94 to over 4,500 people per image.
  • WorldExpo’10: Focused on cross-scene surveillance performance.
  • UCSD: A dataset for relatively sparse crowd scenes.
  • TRANCOS: A vehicle counting dataset used to demonstrate the model's versatility beyond human crowds.

Key Results and Performance

CSRNet achieved state-of-the-art performance across nearly all tested datasets. In the ShanghaiTech Part B dataset, it achieved a 47.3% lower Mean Absolute Error (MAE) than the previous best method. It also showed a 15.4% improvement in vehicle counting on the TRANCOS dataset.

Beyond numerical metrics, the visual quality of the output is a major strength. By avoiding pooling in the back-end, CSRNet maintains an output resolution that is 1/8 of the original input. This results in smoother, more coherent density maps compared to methods that downsample heavily.

Highly congested scenes and their corresponding high-quality density maps generated by CSRNet, showing clear spatial coherence.

As illustrated in the density maps above, CSRNet effectively handles perspective distortion and varying crowd densities, producing maps that closely align with the ground truth. The study demonstrates that a deeper, single-column network with dilated convolutions can outperform complex multi-column designs, which often learn redundant features across their branches.

Conclusion

CSRNet provides a high-performance, easy-to-train approach to crowd counting by leveraging the strengths of dilated convolutions. While it excels in congested scenes, future work may explore even higher resolution outputs for extremely tiny objects or further optimize the architecture for real-time inference on edge devices. Its success on the TRANCOS dataset suggests that the "texture of congestion" captured by dilated kernels is a powerful feature for object counting tasks across various domains.

Summary updated

BibTeX
@inproceedings{li2018csrnet,
  author = {Yuhong Li and Xiaofan Zhang and Deming Chen},
  title = {{CSRNet: Dilated Convolutional Neural Networks for Understanding the Highly Congested Scenes}},
  booktitle = {IEEE/CVF Conference on Computer Vision and Pattern Recognition},
  year = {2018},
  url = {https://openreview.net/forum?id=SJW9OT-ubB},
}
Figure