Learning Temporal Regularity in Video Sequences

Mahmudul Hasan, Jonghyun Choi, Jan Neumann, Amit K. Roy-Chowdhury, Larry S. Davis

Abstract

This paper presents a novel unsupervised framework for video anomaly detection by learning the temporal regularity of video sequences. Instead of explicitly modeling anomalies—which are often ill-defined and diverse—the authors utilize deep autoencoders to reconstruct "normal" video patterns. High reconstruction errors are then used as indicators of irregular events. The approach is evaluated on several benchmark datasets, demonstrating robust performance in identifying diverse anomalies such as loitering and movement in prohibited directions.

Introduction: The Challenge of Defining Anomalies

In computer vision, identifying "meaningful" or "anomalous" activities in long video streams is notoriously difficult. The primary challenge is that "abnormal" is an ill-defined, open-ended category; it is practically impossible to train a classifier on every potential irregular event. Traditional approaches often relied on complex, computationally expensive methods like sparse coding or "bag-of-words" models, which frequently lose the spatial and temporal structure of the video and require significant manual tuning.

This research addresses these limitations by asking: Can we build a generative model that learns the patterns of everyday, "regular" motion and flags anything it cannot accurately recreate?

Methodology

The authors propose two distinct architectures based on autoencoders—neural networks designed to compress an input into a lower-dimensional representation and then reconstruct it as accurately as possible.

The proposed framework for anomaly detection, illustrating both training on weakly labeled data and the testing phase for identifying irregular events.
  1. Handcrafted Feature Autoencoder: This model utilizes "Improved Trajectories" (IT), combining Histograms of Oriented Gradients (HOG) and Histograms of Optical Flow (HOF). These 204-dimensional features are processed through a seven-layer, fully connected deep autoencoder.
  2. Fully Convolutional Autoencoder (Conv-AE): This end-to-end framework takes "temporal cuboids" (stacks of raw video frames) as input. It employs convolutional layers to encode the video and deconvolutional (transpose convolution) layers for reconstruction. Crucially, it uses unpooling layers to preserve spatial information, which is often lost in standard max-pooling.

The core logic is straightforward: the model is trained exclusively on "normal" video. When it encounters a regular scene, it reconstructs it with low error. Conversely, when it encounters an anomaly (e.g., a person running in a walking zone), it fails to reconstruct it accurately, resulting in a high error and a low "regularity score."

Key Insights and Ideas

  • Modeling Regularity vs. Anomaly: Because "normal" behavior is repetitive and follows predictable patterns, it is significantly easier to learn in an unsupervised or weakly supervised manner than the infinite variety of "abnormal" events.
  • Spatial Preservation: By utilizing a fully convolutional architecture, the model maintains the spatial context of motion, allowing for pixel-precise anomaly localization.
  • Generalizability: A surprising finding was that a model trained on a combined dataset performed as well as, or better than, models fine-tuned on specific datasets. This suggests the autoencoder learns fundamental "laws" of motion regularity.
Visualization of the regularity score over time. Dips in the score correspond to detected irregularities like loitering and movement in the opposite direction.

Key Results

The models were evaluated using Area Under the Curve (AUC) and Equal Error Rate (EER) across several benchmark datasets, including CUHK Avenue, Subway, and UCSD Pedestrian.

  • Subway Entrance: The Conv-AE achieved a high AUC of 94.3%, outperforming several state-of-the-art methods.
  • UCSD Ped2: The model reached an AUC of 90.0%.
  • Qualitative Performance: The model successfully identified "loitering," "opposite direction" movement, and "running" in environments where these were not the norm. It also produced "regularity maps" that visually highlight the exact pixels where an anomaly occurs.

Limitations and Future Work

The authors note that the model identifies any deviation from regularity, which can lead to "false alarms" where unusual but non-malicious behavior is flagged. Future work may involve integrating more complex temporal modeling, such as combining the spatial strengths of the Conv-AE with the long-term memory of Recurrent Neural Networks (RNNs) to better understand activities unfolding over longer durations.

Summary updated

BibTeX
@inproceedings{hasan2016learning,
  author = {Mahmudul Hasan and Jonghyun Choi and Jan Neumann and Amit K. Roy-Chowdhury and Larry S. Davis},
  title = {{Learning Temporal Regularity in Video Sequences}},
  booktitle = {IEEE/CVF Conference on Computer Vision and Pattern Recognition},
  year = {2016},
  doi = {10.1109/cvpr.2016.86},
}
Figure