Skip to main content
QUICK REVIEW

[Paper Review] Context Recovery and Knowledge Retrieval: A Novel Two-Stream Framework for Video Anomaly Detection

Congqi Cao, Yue Lu|arXiv (Cornell University)|Sep 7, 2022
Anomaly Detection Techniques and ApplicationsComputer Science6 citations
TL;DR

This paper proposes a novel two-stream framework for video anomaly detection that combines context recovery and knowledge retrieval to improve anomaly detection by leveraging both local motion patterns and learned normality knowledge. The method uses a spatiotemporal U-Net with maximum local error for reconstruction-based anomaly scoring and an improved learnable locality-sensitive hashing (iL2SH) for normality knowledge retrieval, achieving state-of-the-art performance on four benchmark datasets.

ABSTRACT

Video anomaly detection aims to find the events in a video that do not conform to the expected behavior. The prevalent methods mainly detect anomalies by snippet reconstruction or future frame prediction error. However, the error is highly dependent on the local context of the current snippet and lacks the understanding of normality. To address this issue, we propose to detect anomalous events not only by the local context, but also according to the consistency between the testing event and the knowledge about normality from the training data. Concretely, we propose a novel two-stream framework based on context recovery and knowledge retrieval, where the two streams can complement each other. For the context recovery stream, we propose a spatiotemporal U-Net which can fully utilize the motion information to predict the future frame. Furthermore, we propose a maximum local error mechanism to alleviate the problem of large recovery errors caused by complex foreground objects. For the knowledge retrieval stream, we propose an improved learnable locality-sensitive hashing, which optimizes hash functions via a Siamese network and a mutual difference loss. The knowledge about normality is encoded and stored in hash tables, and the distance between the testing event and the knowledge representation is used to reveal the probability of anomaly. Finally, we fuse the anomaly scores from the two streams to detect anomalies. Extensive experiments demonstrate the effectiveness and complementarity of the two streams, whereby the proposed two-stream framework achieves state-of-the-art performance on four datasets.

Motivation & Objective

  • Address the limitation of existing video anomaly detection methods that rely solely on local reconstruction or prediction errors without modeling global normality.
  • Overcome the challenge of detecting scene-dependent anomalies (e.g., playing football on the road) that standard context-recovery models fail to recognize.
  • Improve detection of rare or infrequent normal events that are often misclassified as anomalies due to data imbalance.
  • Enhance model robustness by integrating both short-term motion consistency and long-term knowledge of normal behavior.
  • Achieve state-of-the-art performance without relying on object detection or external datasets, ensuring generalization across diverse scenarios.

Proposed method

  • Proposes a spatiotemporal U-Net (STU-Net) in the context recovery stream to predict future frames using motion information from input snippets.
  • Introduces a maximum local error (MLE) mechanism that isolates and emphasizes recovery errors in anomalous regions to improve anomaly score precision.
  • Develops an improved learnable locality-sensitive hashing (iL2SH) that uses a Siamese network and mutual difference loss to optimize hash functions for normal event representation.
  • Encodes normal events into a knowledge base using iL2SH, where normality knowledge is stored as compact hash codes.
  • Computes anomaly scores based on the distance between a testing snippet’s representation and the nearest knowledge base entries, reflecting consistency with normal behavior.
  • Fuses anomaly scores from both streams using a learned or weighted combination to produce the final detection score.

Experimental results

Research questions

  • RQ1Can a two-stream framework that combines context recovery and knowledge retrieval outperform single-stream methods in detecting scene-dependent anomalies?
  • RQ2To what extent can a learnable locality-sensitive hashing mechanism effectively encode and retrieve knowledge about normal video behavior?
  • RQ3Does incorporating a maximum local error mechanism improve the sensitivity of reconstruction-based anomaly detection to localized anomalies?
  • RQ4Can the proposed framework achieve state-of-the-art performance without relying on object detection or external datasets?
  • RQ5How do the two streams complement each other in detecting both short-term motion anomalies and rare or contextually anomalous events?

Key findings

  • The proposed two-stream framework achieves state-of-the-art performance on four benchmark datasets: ShanghaiTech, Avenue, Corridor, and Ped2.
  • On the ShanghaiTech dataset, the method achieves a micro-AUC of 83.7%, outperforming the next best method (CAC) by 4.4% and VADB by 5.5% without using object detection.
  • On the Corridor dataset under a fair setting without manual region cropping, the method achieves a micro-AUC of 73.1%, the highest among all compared methods.
  • The framework achieves a macro-AUC of 99.3% on the Avenue dataset, the best result among all methods evaluated.
  • The ablation study confirms that both streams are complementary: the context recovery stream excels in detecting motion anomalies, while the knowledge retrieval stream improves detection of contextually anomalous events.
  • Even on the Ped2 dataset, where anomalies are object-related, the method remains competitive and can be further improved with integration of object detection and optical flow.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.