Paper commentary
CSRNet: Dilated Convolutional Neural Networks for Understanding the Highly Congested Scenes
Dilated convolutions let a network count dense crowds without pooling
- Problem Multi-column crowd counters are slow to train, and their columns tend to learn nearly identical features. Pooling layers also shrink the density map too much for high-quality output.
- Method CSRNet keeps the first ten convolutional layers of VGG-16 as its front-end. Its back-end uses dilated convolutions instead of pooling, so it predicts a density map at input resolution.
- Results CSRNet reached an MAE of 68.2 on ShanghaiTech Part A and 10.6 on Part B. On Part B that is 47.3% lower than CP-CNN.
Why multi-column counters are hard to justify
Crowd analysis has moved from reporting a head count to predicting a density map, because one head count can correspond to very different spatial layouts. A density map is predicted pixel by pixel, so neighbouring values must change smoothly, and irregular clusters and varied camera perspectives make this harder without deep networks. Recent congested-scene counters mostly use multi-scale designs built from several parallel columns.
Such designs are slow to train and their branches are not used efficiently.
To test whether the columns really differ, three MCNN columns with small, medium and large kernels were evaluated on 50 ShanghaiTech Part A test cases. Their estimated error curves follow very similar patterns, which suggests the columns learn nearly identical features instead of the scale-specific features the design intends.
Switch-CNN and CP-CNN spend a large share of their parameters on density-level classification, which leaves fewer parameters for generating the density map. Choosing the granularity of those density levels is hard when object counts vary widely, and finer levels add more columns.
A VGG-16 front-end with a dilated back-end
CSRNet keeps the convolutional part of VGG-16 and drops its fully connected layers. Its front-end uses the first ten convolutional layers, and it keeps three of the five pooling layers. The front-end output is one eighth of the input size, and stacking further pooling would shrink it more, which the authors judge too coarse for high-quality density maps.
The back-end therefore uses dilated convolutions to enlarge the receptive field while keeping the output resolution.
A two-dimensional dilated convolution is written as \(y(m,n)=\sum_{i=1}^{M}\sum_{j=1}^{N} x(m+r\times i,\; n+r\times j)\,w(i,j)\), where \(w\) is an M by N filter and \(r\) is the dilation rate. A rate of 1 gives an ordinary convolution, and larger rates spread the filter taps further apart over the same input grid. The effective extent of a k by k kernel becomes k + (k-1)(r-1), so 3 by 3 kernels cover 5 by 5 at rate 2 and 7 by 7 at rate 3, with the same number of weights.
Pooling discards spatial detail, and deconvolution can recover it only at extra complexity and execution latency. In the authors' comparison, max pooling with a 3 by 3 Sobel convolution and bilinear upsampling is set against a dilated 3 by 3 Sobel kernel at rate 2, which keeps the input size and preserves more detail.
The four back-end configurations share the same front-end and differ only in dilation rate: A uses rate 1, B uses rate 2, D uses rate 4, and C mixes 2 and 4. A 1 by 1 convolution produces the output, and bilinear interpolation by a factor of 8 brings the density map to the input size. The count is the sum of all density map pixels.
Density targets and training
Each annotated head is replaced by a Gaussian whose width is \(\sigma_i=\beta d_i\), where \(d_i\) is the average distance to its nearest neighbours, and the ground truth is \(F(x)=\sum_{i=1}^{N}\delta(x-x_i)\times G_{\sigma_i}(x)\). The paper uses \(\beta = 0.3\) and k = 3 for the crowded datasets. Sparse frames use the average head size as the kernel width instead, and Table 2 lists fixed kernel widths of 15 for Part B, 10 for TRANCOS and 3 for WorldExpo'10.
Each image yields nine patches, each a quarter of the image size: four non-overlapping quarters and five random crops. Mirroring these patches doubles the training set.
The first ten convolutional layers are fine-tuned from VGG-16, and the remaining layers start from Gaussian initialisation with a 0.01 standard deviation. Training is end to end with SGD at a fixed learning rate of 1e-6. The loss is a Euclidean distance between predicted and ground truth density maps, averaged over a batch of N images, where \(Z(X_i;\Theta)\) is the network output for input \(X_i\) and \(Z^{GT}_i\) is its ground truth.
Choosing the back-end dilation rate
Four configurations were trained and compared on ShanghaiTech Part A, a set of 482 congested images with 241,667 annotated persons.
Configuration A reached 69.7 MAE and 116.0 MSE, B reached 68.2 and 115.0, C reached 71.91 and 120.58, and D reached 75.81 and 120.82. B has the lowest error, and the authors use it for all later experiments. C and D, which use mixed or rate-4 back-ends, have higher MAE than both A and B.
Dropout was tried against overfitting and gave no noticeable improvement, so the final model omits it. Each configuration is reported as a single value, so these numbers do not show run-to-run variation.
ShanghaiTech counts and density map quality
ShanghaiTech contains 1198 annotated images with 330,165 persons, split into Part A with 482 highly congested images and Part B with 716 sparser street images. On Part A, CSRNet's MAE of 68.2 is the lowest in Table 5, and the text reports 7% lower MAE than CP-CNN. On Part B, CSRNet's MAE of 10.6 is against 20.1 for CP-CNN, a 47.3% lower MAE as the text reports.
Part B MSE also favours CSRNet, at 16.0 against 30.1, but on Part A its MSE of 115.0 is above CP-CNN's 106.4.
Density map quality was measured with PSNR and SSIM on Part A only, after resizing each density map to the input size. CSRNet reached a PSNR of 23.79 and an SSIM of 0.76, against 21.72 and 0.72 for CP-CNN and 21.4 and 0.52 for MCNN. The authors read these scores as higher map fidelity, measured under the resizing and normalisation described above.
UCF CC 50 and WorldExpo'10 errors
UCF CC 50 has 50 images with 94 to 4543 persons per image, averaging 1280, and is evaluated with 5-fold cross-validation. CSRNet's MAE is 266.1 against 295.8 for CP-CNN, which the text puts at 10.0% lower. Its MSE of 397.5 is above CP-CNN's 320.9, so the advantage is on MAE.
WorldExpo'10 has 3980 annotated frames from 1132 video sequences across 108 cameras, with 3380 frames for training and 600 for testing across five scenes, and ROI masks applied. Per-scene errors in Table 8 average 8.6 for CSRNet against 8.86 for CP-CNN. CSRNet has the lowest error in Sce.2 (11.5) and Sce.3 (8.6), and ties Chen et al. in Sce.5 at 3.4 and CP-CNN in Sce.1 at 2.9.
In Sce.4, CSRNet's error of 16.6 is higher than CP-CNN's 10.4 and MCNN's 13.0.
Sparse UCSD frames
The frames are 238 × 158, too small for several pooling stages, so they were enlarged by bilinear interpolation to 952 × 632 before training.
CSRNet reached an MAE of 1.16 and an MSE of 1.47 on UCSD. MCNN is lower on both, with 1.07 MAE and 1.35 MSE, and CSRNet has a lower MAE than every other listed method except MCNN. The authors take this as evidence that the approach also works on sparse scenes, not only on dense ones.
Vehicle counting on TRANCOS
TRANCOS contains 1244 traffic images with 46796 annotated vehicles, and it is scored with GAME over the provided region of interest. GAME(L) divides each image into a grid of 4^L regions and sums the absolute count errors in those regions, so GAME(0) is the plain MAE. The comparison covers Fiaschi et al., Lempitsky et al., Hydra-3s and FCN-HA, where Hydra-3s uses an MCNN-like network and FCN-HA combines an FCN with an LSTM.
CSRNet's GAME scores are 3.56, 5.49, 8.57 and 15.04 for levels 0 to 3, against 10.99, 13.75, 16.69 and 19.32 for Hydra-3s. Relative to Hydra-3s, the text reports 67.7%, 60.1%, 48.7% and 22.2% lower values at GAME(0) to GAME(3). FCN-HA is reported only at GAME(0), with 4.21, and the text puts CSRNet's MAE at 15.4% lower than FCN-HA.
Limits of the reported evidence
On WorldExpo'10 Sce.4, CSRNet's error of 16.6 is above CP-CNN's 10.4 and MCNN's 13.0. On UCSD, MCNN's MAE of 1.07 is lower than CSRNet's 1.16.
The architecture ablation covers four back-end variants on ShanghaiTech Part A only, and the chosen B configuration is used unchanged for the other datasets. Dropout was tested only on Part A, where it gave no noticeable gain. Density map quality is compared with MCNN and CP-CNN on ShanghaiTech Part A alone. The TRANCOS comparison is against Fiaschi et al., Lempitsky et al., Hydra-3s and FCN-HA, and FCN-HA is available only at GAME(0).
Paper info
- Authors
- Yuhong Li, Xiaofan Zhang, Deming Chen
- Venue
- arXiv · Preprint
- First published
- 2018-2-27
- Added
- 2026-11-12
- Updated
- 2018-4-11
- Version
- v4
- arXiv
- 1802.10062
- Category
- cs.CV
- Original paper terms
- arXiv non-exclusive 1.0
- What we show
- Paper info and commentary
AI commentary is a separate explanation from the original paper and may contain errors. The original paper and figures follow each source's terms of use and any rights noted separately.
Quote from the paper
Yuhong Li, Xiaofan Zhang, Deming Chen (2018). CSRNet: Dilated Convolutional Neural Networks for Understanding the Highly Congested Scenes. arXiv:1802.10062v4. https://arxiv.org/abs/1802.10062v4
BibTeX
@misc{li2018csrnet,
title = {{CSRNet: Dilated Convolutional Neural Networks for Understanding the Highly Congested Scenes}},
author = {Yuhong Li and Xiaofan Zhang and Deming Chen},
year = {2018},
eprint = {1802.10062},
archivePrefix = {arXiv},
url = {https://arxiv.org/abs/1802.10062v4}
}