Introduction

DiffAD, iccv23: Unsupervised Surface Anomaly Detection with Diffusion Probabilistic Model

Why is it proposed?

  1. Anomaly of structural changes / deformations

    1. VAE based methods are good at repairing textural anomalies, but they are vulnerable to structural changes in the images. Example:

      image.png

      Top: input anomaly images Ia & GT;

      Medium: The reconstructed samples Ir of VAE based methods 保持了Ia;

      Bottom: DiffAD generated images;

      但是合成的异常并不包括structural changes!!!

  2. More examples:

    image.png

    Figure 3. (a) the anomalous inputs; the reconstruction outputs of (b) autoencoder, (c) DDPM, and (d) our DiffAD.

    Anomaly are usually restored in (b),即生成不足,尊重太多; (c) 引入了无关的局部颜色的变化,pose的变化,和全局颜色的变化,总的来说:生成太多,尊重不足

Method

image.png

  1. Anomaly generation: proposed by DRAEM
  2. anomalous images xa; reconstructed anomaly-free images xr
  3. Reconstructive sub-network
    1. z=E(x); c=E(Xa);
  4. 分割子网络 discriminative sub-network
    1. takes the concatenation of xa, xr, and the additional interpolated channels xinter as input ⇒ more accurate

Methods

Latent Diffusion Models

$$ \begin{equation}\mathcal{L}{LDM}=\mathbb{E}{z,\;\epsilon \sim N(0,I),\;t}\left[\left\|\epsilon - \epsilon_\theta\!\left(z_t,\, t\right)\right\|_2^2\right]\end{equation} $$

ϵ是forward diffusion 中显式引入的高斯噪声随机变量

xr = D(zr)

Noisy Condition Embedding

propose a noisy condition embedding to instruct sample generation while avoiding the model excessively relying on the condition. 即可以处理没见过的anomaly。

$$ \begin{equation}\mathcal{L}{LDM}=\mathbb{E}{x_0,\;\epsilon,\;t}\left[\left\|\epsilon - \epsilon_\theta\!\left(x_t,t, c_{noisy}\right)\right\|_2^2\right]\end{equation} $$

Interpolated Channels