A Real-Time Deep Network for Crowd Counting

Xiaowen Shi, Xin Li, Caili Wu, Shuchen Kong, Jing Yang, Liang He

Abstract

Crowd counting is a vital task for public safety and urban management, yet most high-accuracy models are computationally intensive, hindering real-time deployment. This paper introduces the Compact Convolutional Neural Network (C-CNN), a streamlined architecture designed to achieve high-speed crowd counting with a minimal memory footprint. By employing a sparse parallel front-end to handle scale variation, C-CNN achieves a processing speed of over 104 FPS with only 0.07 million parameters. Our evaluations on the ShanghaiTech and WorldExpo’10 datasets demonstrate that C-CNN maintains competitive accuracy while being significantly more efficient than traditional multi-column or deep architectures.

Introduction

In computer vision, crowd counting faces the significant challenge of scale variation: individuals near the camera appear much larger than those in the distance. While Multi-Column CNNs (MCNNs) have been used to address this by employing different branches for different scales, these models are often redundant, slow, and difficult to train. There is a critical need for models that can run on standard hardware in real-time to respond immediately to emergencies in dense environments.

The C-CNN Architecture

The core innovation of C-CNN is its sparse and parallel front-end. Rather than using deep, separate branches, the model utilizes three parallel filters with different receptive field sizes (5×5, 7×7, and 9×9) at the very first layer. This design allows the network to capture multi-scale information—representing small, medium, and large heads—immediately at the start of the pipeline.

The C-CNN architecture featuring a parallel front-end with three filter sizes (5x5, 7x7, 9x9) for multi-scale feature extraction.

Following this early fusion of features, the data passes through a streamlined backbone consisting of six convolutional layers and max-pooling layers. The final output is a density map generated via a 1×1 convolution, where pixel intensity represents local crowd density. The model is trained using Euclidean distance to minimize the error between predicted and ground-truth density maps.

Experimental Evaluation

The researchers evaluated C-CNN on two major benchmarks:

  • ShanghaiTech (Part A & B): Containing nearly 1,200 images and 330,000 annotations, Part A focuses on highly congested scenes, while Part B covers sparser street views.
  • WorldExpo’10: A dataset of 1,132 video frames across five different scenes, testing the model's cross-scene generalization capabilities.

Ablation studies confirmed that the "one-layer" multi-scale approach is sufficient for extracting spatial details, and the inclusion of max-pooling layers provides essential scale invariance to local translations, improving overall counting stability.

Performance and Efficiency

C-CNN demonstrates a superior trade-off between size, speed, and accuracy. It achieves a throughput of 104.16 FPS on a standard GTX 1080 GPU, outperforming MCNN (64 FPS) and significantly leading over heavier cascaded models (8 FPS).

Performance comparison on ShanghaiTech dataset. C-CNN achieves competitive MAE with significantly fewer parameters (0.07M).

As shown in the results table, C-CNN possesses only 0.07 million parameters, making it roughly 200 times smaller than state-of-the-art models like CSRNet (16.26M) or CP-CNN (68.40M). Despite its tiny size, it achieved a Mean Absolute Error (MAE) of 88.1 on ShanghaiTech Part A, outperforming other lightweight models such as CMTL and MCNN.

Conclusion

C-CNN proves that high-density crowd counting does not require massive, redundant architectures. By optimizing the front-end for multi-scale feature extraction and streamlining the backbone, the model achieves real-time performance suitable for edge devices and live monitoring. Future work may explore temporal consistency for video streams and further optimization for mobile and embedded IoT processors.

Summary updated

Abstract

Automatic analysis of highly crowded people has attracted extensive attention from computer vision research. Previous approaches for crowd counting have already achieved promising performance across various benchmarks. However, to deal with the real situation, we hope the model run as fast as possible while keeping accuracy. In this paper, we propose a compact convolutional neural network for crowd counting which learns a more efficient model with a small number of parameters. With three parallel filters executing the convolutional operation on the input image simultaneously at the front of the network, our model could achieve nearly real-time speed and save more computing resources. Experiments on two benchmarks show that our proposed method not only takes a balance between performance and efficiency which is more suitable for actual scenes but also is superior to existing light-weight models in speed.
BibTeX
@inproceedings{shi2020real,
  author = {Xiaowen Shi and Xin Li and Caili Wu and Shuchen Kong and Jing Yang and Liang He},
  title = {{A Real-Time Deep Network for Crowd Counting}},
  booktitle = {IEEE International Conference on Acoustics, Speech and Signal Processing},
  year = {2020},
  url = {https://openreview.net/forum?id=Vx-fDu-Cpe},
}
Figure