Abstract
Video Anomaly Detection (VAD) is a critical task in automated surveillance, yet it remains challenging due to the scarcity of labeled anomalous data and the inherent complexity of modeling spatio-temporal dynamics. We present CT-D2GAN, a novel unsupervised framework that treats VAD as a future frame prediction task. The architecture integrates a Convolutional Transformer generator with a Dual Discriminator GAN. By employing temporal self-attention and a spatial selective gate, the model captures long-range dependencies while preserving fine-grained details. The dual discriminator setup—consisting of 2D and 3D components—ensures both local image quality and global motion coherence. Our approach achieves state-of-the-art results on major benchmarks, including UCSD Ped2 and ShanghaiTech, while maintaining real-time inference speeds of 45 FPS.
Introduction
Identifying "abnormal" events in surveillance footage, such as a vehicle on a pedestrian walkway or sudden running in a crowd, is difficult for several reasons. First, anomalies are rare and diverse, making supervised learning impractical; models must instead learn "normal" behavior and identify deviations. Second, models must simultaneously process spatial (object appearance) and temporal (motion) information. While traditional tools like ConvLSTMs are commonly used, they are often computationally expensive and struggle with long-range dependencies. CT-D2GAN addresses these issues by replacing recurrence with self-attention and utilizing a multi-scale adversarial training strategy.
Methodology
The CT-D2GAN framework is built upon the premise that a model trained exclusively on normal video sequences will fail to accurately predict future frames when an anomaly occurs.
Convolutional Transformer Generator
The generator consists of a convolutional encoder-decoder architecture enhanced by a Temporal Self-attention Module. Unlike standard Transformers designed for 1D sequences, this module is adapted for 2D video features. It weighs the importance of past frames to predict the next frame $t+1$. To prevent the loss of spatial detail often caused by Global Average Pooling in attention mechanisms, the authors introduce a Spatial Selective Gate (SSG), which applies pixel-wise weighting to the attended feature maps.
Dual Discriminator GAN
To refine the predicted future frame, CT-D2GAN employs two distinct discriminators:
- 2D Image Discriminator: Focuses on local consistency, ensuring the predicted frame is sharp and realistic.
- 3D Video Discriminator: Focuses on global coherence, ensuring the transition from past frames to the predicted frame follows logical motion patterns.
The model is trained using a combination of WGAN-GP loss for adversarial stability and pixel-wise L1 loss for reconstruction accuracy.
Experimental Setup
The model was evaluated on three standard VAD benchmarks: UCSD Ped2 (pedestrian walkways), CUHK Avenue (campus footage with staged anomalies), and ShanghaiTech Campus (a large-scale, multi-scene dataset).
Results and Discussion
CT-D2GAN demonstrates superior performance across multiple metrics. It achieved state-of-the-art Area Under the Curve (AUC) scores on UCSD Ped2 (97.2%) and ShanghaiTech (77.7%). On the CUHK Avenue dataset, it reached a competitive 85.9% AUC.
Key Insights
- Efficiency of Attention: Self-attention proves more effective than recurrence (ConvLSTMs) for modeling video dynamics, avoiding memory bottlenecks and vanishing gradients.
- Dual Critique: Ablation studies confirmed that both the 2D and 3D discriminators are essential. Removing either leads to a significant drop in AUC, as the 2D discriminator prevents blurriness while the 3D discriminator ensures motion continuity.
- Real-time Performance: The model processes video at 45 FPS on an NVIDIA 1080 Ti, meeting the requirements for real-time surveillance applications.
Conclusion
CT-D2GAN offers a robust and efficient solution for unsupervised video anomaly detection. By combining convolutional transformers with a dual-discriminator adversarial strategy, the model effectively captures the complex spatio-temporal patterns of normal behavior. Future work may involve integrating memory-augmented modules to explicitly store prototypical normal patterns and exploring end-to-end motion feature learning to remove the dependency on pre-computed optical flow.
Summary updated