Abstract
In this paper, we propose a novel SpatioTemporal convolutional Dense Network (STDNet) to address the video-based crowd counting problem, which contains the decomposition of 3D convolution and the 3D spatiotemporal dilated dense convolution to alleviate the rapid growth of the model size caused by the Conv3D layer. Moreover, since the dilated convolution extracts the multiscale features, we combine the dilated convolution with the channel attention block to enhance the feature representations. Due to the error that occurs from the difficulty of labeling crowds, especially for videos, imprecise or standard-inconsistent labels may lead to poor convergence for the model. To address this issue, we further propose a new patch-wise regression loss (PRL) to improve the original pixel-wise loss. Experimental results on three video-based benchmarks, i.e., the UCSD, Mall and WorldExpo'10 datasets, show that STDNet outperforms both image- and video-based state-of-the-art methods.
Introduction
Crowd counting in video sequences presents unique challenges compared to static image analysis, including significant scale variations, occlusions, and perspective distortions. While temporal data offers rich information about crowd dynamics, existing video-based approaches often suffer from excessive model size (due to standard 3D CNNs) and sensitivity to label noise. Human annotations—typically dot maps on individual heads—are often inconsistent across frames, making standard pixel-wise loss functions like Mean Squared Error (MSE) prone to instability and poor convergence.
Methodology: The STDNet Framework
The proposed SpatioTemporal convolutional Dense Network (STDNet) introduces three core innovations to improve efficiency and robustness:
- Decomposed 3D Dilated Convolutions: To avoid the parameter explosion of standard 3D convolutions, STDNet decomposes them into 2D spatial and 1D temporal convolutions. These are integrated into Dense Spatio-Temporal Blocks (DSTB) using dilated convolutions to capture multiscale features without increasing the parameter count.
- Channel Attention (CA): A channel attention mechanism adaptively weights feature maps, allowing the model to focus on the most relevant scales for different regions of a scene.
- Patch-wise Regression Loss (PRL): Instead of strict pixel-to-pixel matching, PRL compares the sum of density values within local patches. This "uncertain matching" accounts for minor misalignments in manual labeling, leading to more stable training.
Key Insights: Overcoming the "Pixel-wise Trap"
A critical finding of this research is the limitation of traditional pixel-wise loss. Because manual annotations are rarely perfectly aligned across video frames, pixel-wise metrics penalize the model for being "nearly right." By shifting to a patch-wise approach, the authors significantly reduced oscillations in the training curve, leading to faster and more stable convergence.
Experimental Results
STDNet was evaluated on three major benchmarks: UCSD, Mall, and WorldExpo’10.
- Performance: On the UCSD dataset, STDNet achieved an MAE of 0.76, a 10.5% improvement over previous state-of-the-art (SOTA) methods. It similarly outperformed SOTA on the Mall (MAE 1.47) and WorldExpo’10 (Avg MAE 7.05) datasets.
- Efficiency: Despite its temporal processing capabilities, STDNet remains lightweight—only 11.6% larger than the image-based CSRNet, whereas ConvLSTM-based approaches often increase parameter counts by over 150%.
- Real-time Capability: The model achieves an inference speed of 34 fps on a standard GPU, making it suitable for real-time surveillance applications.
Conclusion
STDNet effectively balances accuracy and computational efficiency for video-based crowd counting. By leveraging decomposed 3D convolutions and a novel patch-wise regression loss, the model overcomes the hurdles of model complexity and label noise. While temporal gains are limited in low-frame-rate datasets like WorldExpo’10, the framework sets a new benchmark for high-frame-rate video crowd estimation.
Summary updated