NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Real-World Anomaly Detection in Surveillance Videos

Waqas Sultani, Chen Chen, Mubarak Shah

Abstract

Surveillance videos are able to capture a variety of realistic anomalies. In this paper, we propose to learn anomalies by exploiting both normal and anomalous videos. To avoid annotating the anomalous segments or clips in training videos, which is very time consuming, we propose to learn anomaly through the deep multiple instance ranking framework by leveraging weakly labeled training videos, ie the training labels (anomalous or normal) are at video-level instead of clip-level. In our approach, we consider normal and anomalous videos as bags and video segments as instances in multiple instance learning (MIL), and automatically learn a deep anomaly ranking model that predicts high anomaly scores for anomalous video segments. Furthermore, we introduce sparsity and temporal smoothness constraints in the ranking loss function to better localize anomaly during training. We also introduce a new large-scale first of its kind dataset of 128 hours of videos. It consists of 1900 long and untrimmed real-world surveillance videos, with 13 realistic anomalies such as fighting, road accident, burglary, robbery, etc. as well as normal activities. This dataset can be used for two tasks. First, general anomaly detection considering all anomalies in one group and all normal activities in another group. Second, for recognizing each of 13 anomalous activities. Our experimental results show that our MIL method for anomaly detection achieves significant improvement on anomaly detection performance as compared to the state-of-the-art approaches. We provide the results of several recent deep learning baselines on anomalous activity recognition. The low recognition performance of these baselines reveals that our dataset is very challenging and opens more opportunities for future work.

Introduction

Automating surveillance is a "needle in a haystack" problem. Anomalies such as crimes and accidents are rare, diverse, and highly dependent on context. Traditionally, researchers have relied on unsupervised learning (modeling only "normal" data) or fully supervised learning (requiring frame-by-frame annotations). The former often fails as environments change, while the latter is prohibitively expensive to scale.

This paper addresses these limitations by using weakly labeled data. We propose a system that learns from a large collection of videos labeled simply as "anomalous" or "normal," without requiring the exact timestamps of the events during training. This approach allows for the efficient use of massive amounts of real-world footage.

Methodology: Deep Multiple Instance Learning

The core of our approach is a Deep Multiple Instance Learning (MIL) Ranking Framework. In MIL terminology, a video is treated as a "bag" and short segments of that video are "instances."

  • Positive Bag: An anomalous video containing at least one anomalous segment.
  • Negative Bag: A normal video containing zero anomalous segments.

Instead of simple classification, the model uses a ranking loss to ensure that the highest-scoring segment in an anomalous video has a significantly higher score than the highest-scoring segment in a normal video. This forces the model to distinguish between actual anomalies and "hard negatives"—the most suspicious-looking parts of normal videos.

Proposed Deep MIL Ranking Framework

To refine localization, we introduce two temporal priors into the loss function:

  1. Sparsity: Penalizes the model for assigning high anomaly scores to too many segments, reflecting the fact that anomalies are typically brief.
  2. Smoothness: Ensures that anomaly scores transition smoothly between adjacent segments, maintaining temporal consistency.

Features are extracted using a pre-trained C3D (Convolutional 3D) network, which captures both motion and appearance, and are then processed by a 3-layer fully connected network to generate the final anomaly scores.

The UCF-Crime Dataset

To support this research, we introduced the UCF-Crime Dataset, a massive new benchmark for the field. It consists of 128 hours of real-world surveillance footage across 1,900 videos, making it over 25 times larger than previous standard datasets like UCSD Ped2 or Avenue.

UCF-Crime Dataset Statistics

The dataset covers 13 distinct anomaly categories, including fighting, road accidents, burglary, and robbery. Unlike older datasets that used staged actors, UCF-Crime contains real-world footage, providing a much more challenging and realistic testbed for anomaly detection.

Results and Discussion

Our proposed MIL method achieved an AUC (Area Under the Curve) of 75.41% on the UCF-Crime dataset, significantly outperforming previous state-of-the-art methods such as Lu et al. (65.51%) and Hasan et al. (50.6%). The model also maintained a low false alarm rate of 1.9% on normal videos. Qualitative results show the model successfully "spikes" its anomaly score exactly when events like car crashes or fights begin, despite never being told those timestamps during training.

Despite these gains, challenges remain in very dark scenes or environments with high-frequency normal motion. Furthermore, while the model is effective at detecting anomalies, categorizing the specific type of crime remains difficult, with baseline multi-class classification accuracy reaching only ~23-28%.

Conclusion

By leveraging weakly labeled data through a deep MIL ranking framework, we have demonstrated that effective anomaly detection is possible without exhaustive manual annotation. The UCF-Crime dataset provides a robust platform for future research in both anomaly detection and fine-grained activity recognition in surveillance contexts.

Summary updated

BibTeX
@inproceedings{sultani2018real,
  author = {Waqas Sultani and Chen Chen and Mubarak Shah},
  title = {{Real-World Anomaly Detection in Surveillance Videos}},
  booktitle = {IEEE/CVF Conference on Computer Vision and Pattern Recognition},
  year = {2018},
  url = {https://openreview.net/forum?id=rJ4QpyzuWS},
}
Figure