Omni-AD: Learning to Reconstruct Global and Local Features for Multi-class Anomaly Detection

Jiajie Quan, Ao Tong, Yuxuan Cai, Xinwei He, Yulong Wang +1 more
3/27/2025
3 citations
cs.CV

Official code: easyoo/Omni-AD (13 stars, Python, last commit 2025-04-10).

Abstract

In multi-class unsupervised anomaly detection(MUAD), reconstruction-based methods learn to map input images to normal patterns to identify anomalous pixels. However, this strategy easily falls into the well-known "learning shortcut" issue when decoders fail to capture normal patterns and reconstruct both normal and abnormal samples naively.

Show full abstract

To address that, we propose to learn the input features in global and local manners, forcing the network to memorize the normal patterns more comprehensively. Specifically, we design a two-branch decoder block, named Omni-block. One branch corresponds to global feature learning, where we serialize two self-attention blocks but replace the query and (key, value) with learnable tokens, respectively, thus capturing global features of normal patterns concisely and thoroughly. The local branch comprises depth-separable convolutions, whose locality enables effective and efficient learning of local features for normal patterns. By stacking Omni-blocks, we build a framework, Omni-AD, to learn normal patterns of different granularity and reconstruct them progressively. Comprehensive experiments on public anomaly detection benchmarks show that our method outperforms state-of-the-art approaches in MUAD. Code is available at https://github.com/easyoo/Omni-AD.git

View on arXivView PDF

Code Implementations(1)

easyoo/Omni-ADOfficial100%
130PythonMar 24, 20251 years ago

Similar Papers

Cite this paper

@article{quan2025omniad,
  title  = {Omni-AD: Learning to Reconstruct Global and Local Features for Multi-class Anomaly Detection},
  author = {Jiajie Quan and Ao Tong and Yuxuan Cai and Xinwei He and Yulong Wang and Yang Zhou},
  year   = {2025},
  eprint = {2503.21125},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2503.21125v2}
}

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

Discussion