Table of Contents
Fetching ...

Dual-path Frequency Discriminators for Few-shot Anomaly Detection

Yuhu Bai, Jiangning Zhang, Zhaofeng Chen, Yuhang Dong, Yunkang Cao, Guanzhong Tian

TL;DR

A Dual-Path Frequency Discriminators (DFD) network from a frequency perspective is proposed, where the original spatial images are transformed into multi-frequency images, making them more conducive to the tailored discriminators in detecting anomalies.

Abstract

Few-shot anomaly detection (FSAD) plays a crucial role in industrial manufacturing. However, existing FSAD methods encounter difficulties leveraging a limited number of normal samples, frequently failing to detect and locate inconspicuous anomalies in the spatial domain. We have further discovered that these subtle anomalies would be more noticeable in the frequency domain. In this paper, we propose a Dual-Path Frequency Discriminators (DFD) network from a frequency perspective to tackle these issues. The original spatial images are transformed into multi-frequency images, making them more conducive to the tailored discriminators in detecting anomalies. Additionally, the discriminators learn a joint representation with forms of pseudo-anomalies. Extensive experiments conducted on MVTec AD and VisA benchmarks demonstrate that our DFD surpasses current state-of-the-art methods. The code is available at \url{https://github.com/yuhbai/DFD}.

Dual-path Frequency Discriminators for Few-shot Anomaly Detection

TL;DR

A Dual-Path Frequency Discriminators (DFD) network from a frequency perspective is proposed, where the original spatial images are transformed into multi-frequency images, making them more conducive to the tailored discriminators in detecting anomalies.

Abstract

Few-shot anomaly detection (FSAD) plays a crucial role in industrial manufacturing. However, existing FSAD methods encounter difficulties leveraging a limited number of normal samples, frequently failing to detect and locate inconspicuous anomalies in the spatial domain. We have further discovered that these subtle anomalies would be more noticeable in the frequency domain. In this paper, we propose a Dual-Path Frequency Discriminators (DFD) network from a frequency perspective to tackle these issues. The original spatial images are transformed into multi-frequency images, making them more conducive to the tailored discriminators in detecting anomalies. Additionally, the discriminators learn a joint representation with forms of pseudo-anomalies. Extensive experiments conducted on MVTec AD and VisA benchmarks demonstrate that our DFD surpasses current state-of-the-art methods. The code is available at \url{https://github.com/yuhbai/DFD}.
Paper Structure (18 sections, 17 equations, 8 figures, 9 tables)

This paper contains 18 sections, 17 equations, 8 figures, 9 tables.

Figures (8)

  • Figure 1: The comparison between DFD and sota methods. The top figure is previous FSAD framework v.s. ours. Comparison with meta-learning-based FSAD, our model is simple and stability. Comparison with memory-bank-based FSAD, our method needs no extra memory to restore features. The bottle figure is comparison with previous sota performance on MVTec AD dataset for 2-/4-shot setting.
  • Figure 2: Energy density distribution and gray-level histogram distribution of tile category. (a) Energy density distribution in low-/high- frequency of tile category, showing that normal/abnormal images obviously differ in frequency distribution. (b) Original gray-level histogram distribution of tile category, showing that normal/abnormal images are hard to distinguish in spatial domain.
  • Figure 3: Overview of proposed DFD framework, which mainly consists of: 1) Anomaly Generation module in \ref{['anomaly generation']}; 2) Multi-Frequency Information Construction module in \ref{['multi-frequency']}; 3) Fine-grained Feature Construction module in \ref{['Fine-grained Feature Construction']}; and 4) Dual-path Feature Discrimination module in \ref{['dual-path']}. Input image $I$ is used to generate normal image $I^n$ and abnormal image $I^a$, which are then decoupled into different frequency components by Multi-Frequency Information Construction module, obtaining $I_l^n$/$I_h^n$ and $I_l^a$/$I_h^a$. Fine-grained Feature Construction takes above components as inputs that go through a pre-trained feature extractor $\varphi^E$ to extract local feature $p_l^n$/$p_h^n$ and $p_l^a$/$p_h^a$. Subsequent feature adaptor $\psi^A$ further transforms local feature to adapted feature $q_l^n$/$q_h^n$ and $q_l^a$/$q_h^a$. Gaussian noise is added to normal features $q_l^n$/$q_h^n$ to get pseudo-anomalous features $q_l^{n-}$/$q_h^{n-}$. Dual-path Feature Discrimination module contains Gaussian Discriminator $\phi^G$ estimating anomalies $S_{Gau}^-$ and $S_{Gau}^+$ for $q_l^{n-}$/$q_h^{n-}$ and $q_l^n$/$q_h^n$, and Perlin Discriminator $\phi^P$ estimating anomalies $S_{Per}$ for $p_l^{a}$/$p_h^{a}$.
  • Figure 4: Image-level anomaly generation strategy. The mask $M$ is obtained by performing element-wise product on $M_p$ and $M_f$ which are generated from random Perlin noise and source normal image. The pseudo-anomalous image is generated from $I$/$I_t$ according to $M$.
  • Figure 5: Visualization results of anomaly localization on MVTec AD dataset and VisA dataset.
  • ...and 3 more figures