Reproduce “AnomalySD: Few-Shot Multi-Class Anomaly Detection with Stable Diffusion Model” on OpenResearch
Run Claude Code, Codex or any coding agent as a research agent: literature, hypotheses and experiments on your laptop, cluster or cloud GPUs.
Universal app for Apple silicon and Intel. Requires macOS 11 or later.
About this paper
Zhenyu Yan, Qingqing Fang, Wenxi Lv, Qinliang Su
AnomalySD introduces a unified framework that leverages Stable Diffusion models for few-shot, multi-class anomaly detection in industrial settings, requiring only a small number of normal samples per product category. The method achieves high accuracy in both anomaly classification and localization on MVTec-AD and VisA datasets by re-framing anomaly detection as an inpainting problem.
Key insights
- Anomaly detection can be reframed as an inpainting problem, where a fine-tuned diffusion model attempts to reconstruct anomalous regions to appear normal, with the difference indicating an anomaly.
- Combining multi-scale and prototype-guided masking strategies during inference effectively covers anomalies of varying sizes and characteristics.
- Hierarchical text prompts and foreground masking during fine-tuning enhance the Stable Diffusion model's ability to learn and reconstruct normal industrial patterns.
Summary by alphaXiv.
Tip: change arxiv.org to autoarxiv.org in any arXiv abstract link to open the paper here.