MAEDAY: MAE for few and zero shot AnomalY-Detection
Eli Schwartz, Assaf Arbelle, Leonid Karlinsky, Sivan Harary, Florian Scheidegger, Sivan Doveh, Raja Giryes
TL;DR
MAEDAY tackles anomaly detection under zero- and few-shot regimes by repurposing a pre-trained MAE for image reconstruction. It leverages multiple random masks and reconstruction consistency to localize anomalies without training data (ZSAD) and, with limited normal samples, finetunes via LoRA to improve FSAD performance. The approach can be ensemble with PatchCore to achieve state-of-the-art results on MVTec-AD, and it extends to Zero-Shot Foreign Object Detection with competitive performance on texture-like surfaces. This work broadens practical AD capabilities for industrial inspection and texture analysis by combining pre-trained reconstruction with selective fine-tuning and ensemble strategies.
Abstract
We propose using Masked Auto-Encoder (MAE), a transformer model self-supervisedly trained on image inpainting, for anomaly detection (AD). Assuming anomalous regions are harder to reconstruct compared with normal regions. MAEDAY is the first image-reconstruction-based anomaly detection method that utilizes a pre-trained model, enabling its use for Few-Shot Anomaly Detection (FSAD). We also show the same method works surprisingly well for the novel tasks of Zero-Shot AD (ZSAD) and Zero-Shot Foreign Object Detection (ZSFOD), where no normal samples are available. Code is available at https://github.com/EliSchwartz/MAEDAY .
