计算机科学 ›› 2026, Vol. 53 ›› Issue (11A): 260400165-434.doi: 10.11896/jsjkx.260400165

• 图像处理&多媒体技术 • 上一篇    下一篇

文本引导与上下文感知提示调优的视频异常检测方法

耿建勋, 许成杰, 孟思雨, 王蓉   

  1. 中国人民公安大学信息网络安全学院 北京 100038
  • 出版日期:2026-11-16 发布日期:2026-11-16
  • 通讯作者: 王蓉(dbdxwangrong@163.com)
  • 作者简介:(2024211445@stu.ppsuc.edu.cn)
  • 基金资助:
    国家自然科学基金(62076246);中央高校基本科研业务费专项资金(2024JKF11)

Video Anomaly Detection Method with Text Guidance and Context-aware Prompt Tuning

GENG Jianxun, XU Chengjie, MENG Siyu, WANG Rong   

  1. College of Information and Cyber Security,People’s Public Security University of China,Beijing 100038,China
  • Published:2026-11-16 Online:2026-11-16
  • About author:GENG Jianxun,born in 2000,postgra-duate,is a student member of CCF(No.A50998G).His main research interests include video anomaly detection and computer vision.
    WANG Rong,born in 1971,professor,Ph.Dsupervisor,is a member of CCF(No.C4366M).Her main research interests include pattern recognition and computer vision.
  • Supported by:
    This work was supported by the National Natural Science Foundation of China(62076246) and Fundamental Research Funds for the Central Universities of Ministry of Education of China(2024JKF11).

摘要: 在弱监督视频异常检测中,对比语言-图像预训练模型作为一种基于多模态对比训练的神经网络,展现出了显著优势。然而,现有视频异常检测方法对文本与视频特征的深度结合研究不够深入,未能建立深层语义关联。针对这一问题,提出一种基于文本引导时序注意力与上下文感知提示调优的视频异常检测方法。首先,设计文本引导的时序注意力模块,通过静态文本语义与时序视觉特征的跨模态匹配生成多尺度时序注意力,结合残差门控机制增强异常相关片段响应,并利用图卷积网络建模片段间的时空关系。其次,提出上下文感知提示调优机制,通过提取视频特定的视觉上下文对文本提示进行动态调制,实现文本提示的场景自适应调整。最后,引入双分支方法,利用静态文本特征指导时序注意力,借助场景自适应的动态文本特征完成最终分类,有效平衡了训练稳定性与推理适应性。在UCF-Crime与XD-Violence两个公开数据集上开展的大量实验表明,所提方法在两个数据集上分别取得了88.32%的AUC值与85.37%的AP值,优于其他先进方法,有效提升了检测性能。

关键词: 视频异常检测, 文本引导, 弱监督学习, 对比语言-图像预训练, 提示调优

Abstract: In weakly supervised video anomaly detection,contrastive language-image pre-training(CLIP),a neural network built upon multimodal contrastive learning,has exhibited remarkable advantages.However,most existing video anomaly detection methods rely on shallow combinations of text and video features,failing to capture deep semantic associations.To address this issue,this paper proposes a video anomaly detection method based on text-guided temporal attention and context-aware prompt tuning.Firstly,it designs a text-guided temporal attention module that generates multi-scale temporal attention through cross-modal matching of static text semantics and temporal visual features,enhancing responses to anomaly-related segments with a resi-dual gating mechanism.Meanwhile ituses a graph convolutional network to model the spatiotemporal relationships between segments.Secondly,it introduces a context-aware prompt tuning mechanism that dynamically modulates text prompts by extracting video-specific visual context,thereby achieving scene-adaptive adjustment of the prompts.Finally,a dual-branch framework is adopted:static text features guide the temporal attention,while scene-adaptive dynamic text features are used for the final anomaly classification.This design effectively balances training stability and inference adaptability.Extensive experiments on two public benchmarks,UCF-Crime and XD-Violence,demonstrate that theproposed method achieves an AUC of 88.32% on UCF-Crime and an average precision(AP) of 85.37% on XD-Violence,surpassing state-of-the-art approaches and significantly boosting detection performance.

Key words: Video anomaly detection, Text guidance, Weakly supervised learning, CLIP, Prompt tuning

中图分类号: 

  • TP391
[1] YAO H L,HU X.A survey of video violence detection[J].Cy-ber-Physical Systems,2023,9(1):1-24.
[2] CAO Y,XU X,SUN C,et al.Towards Generic Anomaly Detec-tion and Understanding:Large-scale Visual-linguistic Model(GPT-4V) Takes the Lead[J].arXiv:2311.02782,2023.
[3] SUN C,JIA Y,HU Y,et al.Scene-aware context reasoning for unsupervised abnormal event detection in videos[C]//Procee-dings of the 28th ACM International Conference on Multimedia.2020:184-192.
[4] WANG J,CHERIAN A.Gods:Generalized one-class discriminative subspaces for anomaly detection.[C]//Proceedings of the IEEE/CVF International Conference on Computer Vision.2019:8201-8211.
[5] WU P,LIU X T,LIU J.Weakly supervised audiovisual violencedetection[J].IEEE Transactions on Multimedia,2022,25:1674-1685.
[6] PU Y J,WU X Y,WANG S L,et al.Learning prompt-enhanced context features for weakly supervised video anomaly detection.[J].IEEE Transactions on Image Processing,2024,33:4923-4936.
[7] SULTANI W,CHEN C,SHAH M.Real-world Anomaly Detection in Surveillance Videos [C]//Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition.2018:6479-6488.
[8] TIAN Y,PANG G,CHEN Y,et al.Weakly-supervised videoanomaly detection with robust temporal feature magnitude lear-ning[C]//Proceedings of the IEEE/CVF International Confe-rence on Computer Vision.2021:4975-4986.
[9] WU J C,HSIEH H Y,CHEN D J,et al,Self-supervised Sparse Representation for Video Anomaly Detection[C]//European Conference on Computer Vision.2022:729-745.
[10] ZHONG J X,LI N,KONG W,et al.Graph Convolutional Label Noise Cleaner:Train a Plug-And-Play Action Classifier for Anomaly Detection[C]//Proceedings of the IEEE/CVF Confe-rence on Computer Vision and Pattern Recognition.2019:1237-1246.
[11] CARREIRA J,ZISSERMAN A,QUO V.Action Recognition? A New Model and the Kinetics Dataset[C]//Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition.2017:6299-6308.
[12] TRAN D,BOURDEV L,FERGUS R,et al.Learning Spatiotemporal Features with 3D Convolutional Networks[C]//Procee-dings of the IEEE International Conference on Computer Vision.2015:4489-4497.
[13] RADFORD A,KIM J W,HALLACY C,et al.Learning Transferable Visual Models From Natural Language Supervision[C]//International Conference on Machine Learning.2021:8748-8763.
[14] WU P,ZHOU X,PANG G,et al.VadCLIP:Adapting Vision-Language Models for Weakly Supervised Video Anomaly Detection[C]//Proceedings of the AAAI Conference on Artificial Intelligence.2024:6074-6082.
[15] SU Y,TAN Y,AN S,et al.Semantic-driven dual consistency learning for weakly supervised video anomaly detection[J].Pattern Recognit,2025,157:110898.
[16] YU J,LIU J,CHENG Y,et al.Modality-aware contrastive instance learning with self-distillation for weakly-supervised audio-visual violence detection[C]//Proceedings of the 30th ACM International Conference on Multimedia.2022:6278-6287.
[17] WEI D,LIU Y,ZHU X,et al.MSAF:multimodal supervise-attention enhanced fusion for video anomaly detection[J].IEEE Signal Process.Lett,2022,29:2178-2182.
[18] YANG Z,LIU J,WU P,Text Prompt with Normality Guidance for Weakly Supervised Video Anomaly Detection[C]//Procee-dings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition.2024:18899-18908.
[19] ZHOU Y,QU Y,XU X,et al.Batch Norm-based weakly supervised video anomaly detection[J].IEEE Transactions on Circuits and Systems for Video Technology,2024,34(12):13642-13654.
[20] WU P,ZHOU X,PANG G,et al.Weakly supervised videoanomaly detection and localization with spatio-temporal prompts[C]//Proceedings of the 32nd ACM International Conference on Multimedia.2024:9301-9310.
[21] WANG Y,CHEN S W.Learning event completeness for weakly supervised video anomaly detection[C]//Proceedings of the 42nd International Conference on Machine Learning.2025:62505-62517.
[22] MA X,ZHANG G,PAN L,et al.Weakly Supervised Video Anomaly Detection Based on Spatiotemporal Dual-Memory Enhancement and Contrastive Magnitude[C]//International Joint Conference on Neural Networks(IJCNN).Rome,Italy,2025:1-8.
[23] WUP,LIU J,SHI Y,et al.Not only look,but also listen:lear-ning multimodal violence detection under weak supervision[C]//Proceedings of the European Conference on Computer Vision.2020:322-339.
[24] TIANY,PANG G S,CHEN Y H,et al.Weakly-supervised video anomaly detection with robust temporal feature magnitude learning[C]//Proceedings of the IEEE/CVF International Conference on Computer Vision.2021:4955-4966.
[25] LI S,LIU F,JIAO L.Self-training multi-sequence learning with transformer for weakly supervised video anomaly detection[C]//Proceedings of the AAAI Conference on Artificial Intelligence.2022:1395-1403.
[26] ZHOU H,YU J,YANG W.Dual memory units with uncertainty regulation for weakly supervised video anomaly detection[C]//Proceedings of the AAAI Conference on Artificial Intelligence.2023:3769-3777.
[27] LV H,YUE Z,SUN Q,et al.Unbiased multiple instance lear-ning for weakly supervised video anomaly detection[C]//Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition.2023:8022-8031.
[28] JOOH K,VO K,YAMAZAKI K,et al.CLIP-TSA:CLIP-assisted temporal self-attention for weakly supervised video anomaly detection[C]//IEEE International Conference on Image Processing.2023:3230-3234.
[29] FIGUEIREDO G N,BATISTA J.ESTER-VAR:Enhancing Semantic and Temporal Events Representation for Video Anomaly Recognition[C]//Proceedings of the14th International Sympo-sium on Image and Signal Processing and Analysis.2025:1-6.
[30] WU P,LIU X,LIU J.Weakly Supervised Audio-Visual Violence Detection[J].IEEE Transactions on Multimedia,2023,25:1674-1685.
[31] CHEN W,MA K T,YEW Z J,et al.TEVAD:improved videoanomaly detection with captions[C]//Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition.2023:5549-5559.
Viewed
Full text


Abstract

Cited

  Shared   
  Discussed   
No Suggested Reading articles found!