Weakly-supervised Video Anomaly Detection with Robust Temporal Feature Magnitude Learning

Yu Tian, Guansong Pang, Yuanhong Chen, Rajvinder Singh, Johan W. Verjans +1 more
1/25/2021
cs.CV

Official code: tianyu0207/RTFM (347 stars, PyTorch, last commit 2025-10-29).

Abstract

Anomaly detection with weakly supervised video-level labels is typically formulated as a multiple instance learning (MIL) problem, in which we aim to identify snippets containing abnormal events, with each video represented as a bag of video snippets. Although current methods show effective detection performance, their recognition of the positive instances, i.e., rare abnormal snippets in the abnormal videos, is largely biased by the dominant negative instances, especially when the abnormal events are subtle anomalies that exhibit only small differences compared with normal events. This issue is exacerbated in many methods that ignore important video temporal dependencies. To address this issue, we introduce a novel and theoretically sound method, named Robust Temporal Feature Magnitude learning (RTFM), which trains a feature magnitude learning function to effectively recognise the positive instances, substantially improving the robustness of the MIL approach to the negative instances from abnormal videos. RTFM also adapts dilated convolutions and self-attention mechanisms to capture long- and short-range temporal dependencies to learn the feature magnitude more faithfully. Extensive experiments show that the RTFM-enabled MIL model (i) outperforms several state-of-the-art methods by a large margin on four benchmark data sets (ShanghaiTech, UCF-Crime, XD-Violence and UCSD-Peds) and (ii) achieves significantly improved subtle anomaly discriminability and sample efficiency. Code is available at https://github.com/tianyu0207/RTFM.

View on arXivView PDF

Code Implementations(1)

tianyu0207/RTFMOfficial100%
PyTorch

Official code for 'Weakly-supervised Video Anomaly Detection with Robust Temporal Feature Magnitude Learning' [ICCV 2021]

34780PythonJan 25, 202111 months ago
anomaly-detectiondeep-learningpytorchvideo-anomaly-detection

Similar Papers

Cite this paper

@article{tian2021weaklysupervised,
  title  = {Weakly-supervised Video Anomaly Detection with Robust Temporal Feature Magnitude Learning},
  author = {Yu Tian and Guansong Pang and Yuanhong Chen and Rajvinder Singh and Johan W. Verjans and Gustavo Carneiro},
  year   = {2021},
  eprint = {2101.10030},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2101.10030}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2101.10030.svg)](https://codeofpaper.com/paper/2101.10030)

Discussion