Transformer Based Self-Context Aware Prediction for Few-Shot Anomaly Detection in Videos

Gargi V. Pillai, Ashish Verma, Debashis Sen
3/2/2025
cs.CV
transformer-attention

No confident code implementation found for this paper. 3 possible matches can be shown below.

Abstract

Anomaly detection in videos is a challenging task as anomalies in different videos are of different kinds. Therefore, a promising way to approach video anomaly detection is by learning the non-anomalous nature of the video at hand.

Show full abstract

To this end, we propose a one-class few-shot learning driven transformer based approach for anomaly detection in videos that is self-context aware. Features from the first few consecutive non-anomalous frames in a video are used to train the transformer in predicting the non-anomalous feature of the subsequent frame. This takes place under the attention of a self-context learned from the input features themselves. After the learning, given a few previous frames, the video-specific transformer is used to infer if a frame is anomalous or not by comparing the feature predicted by it with the actual. The effectiveness of the proposed method with respect to the state-of-the-art is demonstrated through qualitative and quantitative results on different standard datasets. We also study the positive effect of the self-context used in our approach.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. 3 weaker matches are hidden by default — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{pillai2025transformer,
  title  = {Transformer Based Self-Context Aware Prediction for Few-Shot Anomaly Detection in Videos},
  author = {Gargi V. Pillai and Ashish Verma and Debashis Sen},
  year   = {2025},
  eprint = {2503.00670},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2503.00670v1}
}

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/2503.00670.svg)](https://codeofpaper.com/paper/2503.00670)

Discussion