One-for-All: Proposal Masked Cross-Class Anomaly Detection

Authors

  • Xincheng Yao Shanghai Jiao Tong University, Shanghai, China
  • Chongyang Zhang Shanghai Jiao Tong University, Shanghai, China
  • Ruoqi Li Shanghai Jiao Tong University, Shanghai, China
  • Jun Sun Shanghai Jiao Tong University, Shanghai, China
  • Zhenyu Liu Ningbo HTVision Digital Technology Co.,Ltd, Ningbo, China

DOI:

https://doi.org/10.1609/aaai.v37i4.25604

Keywords:

DMKM: Anomaly/Outlier Detection, CV: Applications, CV: Object Detection & Categorization, CV: Other Foundations of Computer Vision

Abstract

One of the most challenges for anomaly detection (AD) is how to learn one unified and generalizable model to adapt to multi-class especially cross-class settings: the model is trained with normal samples from seen classes with the objective to detect anomalies from both seen and unseen classes. In this work, we propose a novel Proposal Masked Anomaly Detection (PMAD) approach for such challenging multi- and cross-class anomaly detection. The proposed PMAD can be adapted to seen and unseen classes by two key designs: MAE-based patch-level reconstruction and prototype-guided proposal masking. First, motivated by MAE (Masked AutoEncoder), we develop a patch-level reconstruction model rather than the image-level reconstruction adopted in most AD methods for this reason: the masked patches in unseen classes can be reconstructed well by using the visible patches and the adaptive reconstruction capability of MAE. Moreover, we improve MAE by ViT encoder-decoder architecture, combinational masking, and visual tokens as reconstruction objectives to make it more suitable for anomaly detection. Second, we develop a two-stage anomaly detection manner during inference. In the proposal masking stage, the prototype-guided proposal masking module is utilized to generate proposals for suspicious anomalies as much as possible, then masked patches can be generated from the proposal regions. By masking most likely anomalous patches, the “shortcut reconstruction” issue (i.e., anomalous regions can be well reconstructed) can be mostly avoided. In the reconstruction stage, these masked patches are then reconstructed by the trained patch-level reconstruction model to determine if they are anomalies. Extensive experiments show that the proposed PMAD can outperform current state-of-the-art models significantly under the multi- and especially cross-class settings. Code will be publicly available at https://github.com/xcyao00/PMAD.

Downloads

Published

2023-06-26

How to Cite

Yao, X., Zhang, C., Li, R., Sun, J., & Liu, Z. (2023). One-for-All: Proposal Masked Cross-Class Anomaly Detection. Proceedings of the AAAI Conference on Artificial Intelligence, 37(4), 4792-4800. https://doi.org/10.1609/aaai.v37i4.25604

Issue

Section

AAAI Technical Track on Data Mining and Knowledge Management