Introduction
Crowd counting is a critical task for public safety, traffic management, and urban planning. While many existing models focus on static images, video sequences provide rich spatial-temporal information regarding crowd dynamics. However, video crowd counting introduces significant challenges, including appearance variations due to lighting and perspective, dynamic occlusions, and the limitations of implicit temporal modeling (e.g., standard LSTMs), which can accumulate irrelevant historical data. To address these issues, researchers have developed the Locality-constrained Spatial Transformer Network (LSTN).
Methodology
The LSTN architecture is composed of two primary components: a Density Map Regression Module and a Locality-constrained Spatial Transformer (LST) Module.
Density Map Regression Module
This module utilizes a VGG-16 backbone to estimate a density map for each video frame. Rather than attempting to detect individual heads—a task that is often computationally prohibitive in dense crowds—the model predicts a heatmap where the integral of pixel values represents the total crowd count.
Locality-constrained Spatial Transformer (LST) Module
The LST module is the core innovation of this work. Unlike implicit methods that rely on memory units, the LST explicitly warps the density map from the previous frame to align with the current frame.
To manage individuals entering or exiting the scene, the module employs a "locality constraint." The frame is partitioned into blocks, and a similarity score is calculated between corresponding blocks in adjacent frames. If blocks are highly similar, the model prioritizes the warped density map; if they differ significantly (indicating a scene change or new arrivals), the model relies more heavily on the current frame's regression, preventing error propagation.
Datasets
The study introduces the Fudan-ShanghaiTech (FDST) Dataset, a large-scale benchmark comprising 100 videos across 13 diverse scenes (e.g., malls, hospitals, squares). It contains 15,000 frames and approximately 394,000 annotated heads. The model was also evaluated on standard benchmarks including the UCSD and Mall datasets.
Experimental Results
The LSTN consistently outperformed state-of-the-art methods across all benchmarks. On the FDST dataset, the model achieved a Mean Absolute Error (MAE) of 3.35, significantly surpassing popular architectures like ConvLSTM and MCNN.
Ablation studies highlighted the importance of the LST module. Removing this component resulted in a performance degradation of approximately 13-15% across datasets, confirming that explicit spatial-temporal modeling is essential for accurate video-based counting. On the Mall dataset, LSTN reached an MAE of 2.00, outperforming Bidirectional ConvLSTM.
Conclusion
The LSTN demonstrates that explicit modeling of crowd movement via density map warping is superior to implicit memory-based approaches. By focusing on density map dynamics rather than raw pixel appearance, the model achieves robustness against visual noise and perspective changes. Future research directions include extending the model to capture longer-range temporal dependencies and optimizing the architecture for real-time deployment on edge devices.
Summary updated