无需训练和提示,用扩散模型反演实现零样本异常定位
Training Free Zero-Shot Visual Anomaly Localization via Diffusion Inversion
- 通过反演预训练扩散模型的中间状态重建图像
- 输入与重建图差异显著处即为异常区域,准确率超当前最优
- 无需额外模态或提示,适合无标注数据场景
零样本图像异常检测(ZSAD)旨在不依赖目标数据的正常样本情况下,实现异常检测与定位。现有方法虽借助语言等多模态生成细粒度提示以提升定位精度,但纯视觉方法仍局限于图像级分类,缺乏空间精细度。本文提出一种无需训练、纯视觉的ZSAD框架,通过反演预训练去噪扩散隐式模型(DDIM)实现高精度定位。给定输入图像与通用文本描述(如“一个[物体类别]的图像”),我们对图像进行反演获取潜在表示,并从固定中间时间步启动去噪过程以重构图像。由于扩散模型仅在正常数据上训练,重构结果呈现正常外观,输入与重建间的差异即反映潜在异常。该方法在VISA数据集上达到当前最优性能,展现出强定位能力,且无需依赖细粒度提示,推动了零样本异常检测向摆脱提示依赖的方向发展。代码已开源。
原文摘要 · Abstract (English)
Zero-Shot image Anomaly Detection (ZSAD) aims to detect and localise anomalies without access to any normal training samples of the target data. While recent ZSAD approaches leverage additional modalities such as language to generate fine-grained prompts for localisation, vision-only methods remain limited to image-level classification, lacking spatial precision. In this work, we introduce a simple yet effective training-free vision-only ZSAD framework that circumvents the need for fine-grained prompts by leveraging the inversion of a pretrained Denoising Diffusion Implicit Model (DDIM). Specifically, given an input image and a generic text description (e.g., "an image of an [object class]"), we invert the image to obtain latent representations and initiate the denoising process from a fixed intermediate timestep to reconstruct the image. Since the underlying diffusion model is trained solely on normal data, this process yields a normal-looking reconstruction. The discrepancy between the input image and the reconstructed one highlights potential anomalies. Our method achieves state-of-the-art performance on VISA dataset, demonstrating strong localisation capabilities without auxiliary modalities and facilitating a shift away from prompt dependence for zero-shot anomaly detection research. Code is available at https://github.com/giddyyupp/DIVAD.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。