Skip to main content
QUICK REVIEW

[论文解读] DiAD: A Diffusion-based Framework for Multi-class Anomaly Detection

Haoyang He, Jiangning Zhang|arXiv (Cornell University)|Dec 11, 2023
Anomaly Detection Techniques and Applications被引用 7
一句话总结

DiAD 提出了一种基于扩散的新型多类别异常检测框架,结合了像素空间自编码器、与 Stable Diffusion 关联的语义引导(SG)去噪网络,以及空间感知特征融合(SFF)模块,以保持语义完整性并重建大范围异常区域。该方法在 MVTec-AD 数据集上实现了最先进性能,异常检测的 AUROC 达到 97.2,定位任务的 AP 达到 96.8。

ABSTRACT

Reconstruction-based approaches have achieved remarkable outcomes in anomaly detection. The exceptional image reconstruction capabilities of recently popular diffusion models have sparked research efforts to utilize them for enhanced reconstruction of anomalous images. Nonetheless, these methods might face challenges related to the preservation of image categories and pixel-wise structural integrity in the more practical multi-class setting. To solve the above problems, we propose a Difusion-based Anomaly Detection (DiAD) framework for multi-class anomaly detection, which consists of a pixel-space autoencoder, a latent-space Semantic-Guided (SG) network with a connection to the stable diffusion's denoising network, and a feature-space pre-trained feature extractor. Firstly, The SG network is proposed for reconstructing anomalous regions while preserving the original image's semantic information. Secondly, we introduce Spatial-aware Feature Fusion (SFF) block to maximize reconstruction accuracy when dealing with extensively reconstructed areas. Thirdly, the input and reconstructed images are processed by a pre-trained feature extractor to generate anomaly maps based on features extracted at different scales. Experiments on MVTec-AD and VisA datasets demonstrate the effectiveness of our approach which surpasses the state-of-the-art methods, e.g., achieving 96.8/52.6 and 97.2/99.0 (AUROC/AP) for localization and detection respectively on multi-class MVTec-AD dataset. Code will be available at https://lewandofskee.github.io/projects/diad.

研究动机与目标

  • 解决现有扩散模型在多类别异常检测中的局限性,特别是重建过程中类别与语义混淆的问题。
  • 在保持类别身份的同时,保留重建异常区域的语义一致性和结构细节。
  • 通过有效整合多尺度特征,提升大尺度缺陷的重建精度。
  • 开发一种鲁棒的无监督框架,无需类别特定微调即可在多个物体类别上实现良好泛化。
  • 在标准基准上实现异常定位与分类任务的最先进性能。

提出的方法

  • 使用像素空间自编码器在像素空间中重建输入图像,实现输入与输出的直接比较。
  • 引入语义引导(SG)去噪网络,与 Stable Diffusion 的去噪 U-Net 相连,确保重建过程中的语义一致性。
  • 采用空间感知特征融合(SFF)模块,通过实例归一化和 SiLU 激活函数,融合多尺度特征,提升重建保真度。
  • 利用预训练的 ImageNet 主干网络(如 ResNet50、WideResNet101)从输入图像和重建图像中提取多尺度特征。
  • 通过不同层特征图之间的余弦相似度计算异常分数,重点聚焦于 f2、f3 和 f4 层以获得最佳性能。
  • 应用可调时间步数的前向扩散过程,在去噪前逐步对输入图像加噪,从而提升重建质量。

实验结果

研究问题

  • RQ1在多类别设置下,基于扩散的框架是否能有效重建异常区域,同时保持原始图像的语义类别和结构细节?
  • RQ2将语义引导去噪网络与 Stable Diffusion 结合,相比标准扩散模型,能否显著提升重建保真度?
  • RQ3空间感知特征融合机制在多大程度上提升了大尺度异常的重建精度?
  • RQ4哪些预训练特征提取器及特征层在分类与分割任务中能实现最佳异常检测性能?
  • RQ5前向扩散步数如何影响最终的重建质量与异常检测性能?

主要发现

  • DiAD 在 MVTec-AD 数据集上实现 97.2 AUROC 和 96.8 AP 的异常检测性能,显著优于先前的 SOTA 方法。
  • 在 VisA 数据集上,DiAD 在定位和检测任务中分别取得 96.8 AUROC 和 99.0 AP,展现出对多样化异常类型的强泛化能力。
  • 消融实验表明,使用 ResNet50 作为主干网络时分类性能最佳(97.2 AUROC),而 WideResNet101 在分割任务中表现更优(56.4 F1max)。
  • 结合 SG 网络时,采用 IN+SiLU 激活的 SFF 模块优于 BN+ReLU,实现 97.2 AUROC 和 96.8 AP 的性能。
  • 使用 f2、f3 和 f4 层(分辨率分别为 64×64、32×32、16×16)的特征图可获得最高性能,在 MVTec-AD 上实现 97.2 AUROC 和 99.0 AP。
  • 当前向扩散步数超过 600 时,重建质量进一步提升;但若步数过低(如 <600),性能会急剧下降,表明存在有效的去噪临界阈值。

更好的研究,从现在开始

从阅读论文到最终审阅,大幅缩短您的研究时间。

无需绑定信用卡

本解读由 AI 生成,并经人工编辑审核。