HyperAIHyperAI
3 months ago

Exploring Intrinsic Normal Prototypes within a Single Image for Universal Anomaly Detection

Luo, Wei, Cao, Yunkang, Yao, Haiming, Zhang, Xiaotian, Lou, Jianan, Cheng, Yuqi, Shen, Weiming, Yu, Wenyong
Exploring Intrinsic Normal Prototypes within a Single Image for
  Universal Anomaly Detection
Abstract

Anomaly detection (AD) is essential for industrial inspection, yet existingmethods typically rely on ``comparing'' test images to normal references from atraining set. However, variations in appearance and positioning oftencomplicate the alignment of these references with the test image, limitingdetection accuracy. We observe that most anomalies manifest as localvariations, meaning that even within anomalous images, valuable normalinformation remains. We argue that this information is useful and may be morealigned with the anomalies since both the anomalies and the normal informationoriginate from the same image. Therefore, rather than relying on externalnormality from the training set, we propose INP-Former, a novel method thatextracts Intrinsic Normal Prototypes (INPs) directly from the test image.Specifically, we introduce the INP Extractor, which linearly combines normaltokens to represent INPs. We further propose an INP Coherence Loss to ensureINPs can faithfully represent normality for the testing image. These INPs thenguide the INP-Guided Decoder to reconstruct only normal tokens, withreconstruction errors serving as anomaly scores. Additionally, we propose aSoft Mining Loss to prioritize hard-to-optimize samples during training.INP-Former achieves state-of-the-art performance in single-class, multi-class,and few-shot AD tasks across MVTec-AD, VisA, and Real-IAD, positioning it as aversatile and universal solution for AD. Remarkably, INP-Former alsodemonstrates some zero-shot AD capability. Code is availableat:https://github.com/luow23/INP-Former.