|
For unsupervised anomaly detection, we focus on two specific algorithms.
First, PaDiM, or Patch Distribution Modeling, is an unsupervised visual anomaly detection algorithm. It extracts intermediate feature maps from a pre-trained CNN using only normal images during training. It models the distribution of patches at spatial locations as a multivariate normal distribution, estimating the mean vector and covariance matrix for the normal state at each spatial coordinate. During inference, it calculates an anomaly map based on how much the patch features of the incoming sample deviate from this distribution. PaDiM is simple, stable, and its computational load during inference is predictable, enabling easy integration into real-time inspection pipelines.
Second, Dinomaly is a Transformer-based unsupervised anomaly detection algorithm that aims for high performance in multi-class environments. Its key components include a Foundation Transformer, Noisy Bottleneck utilizing dropout, Linear Attention, and Loose Reconstruction. It extracts multi-layer features using a ViT-based architecture like DINO or DINOv2, passes them through an MLP bottleneck, and reconstructs them via a Transformer decoder. Dinomaly mitigates the identity mapping issue of traditional reconstruction-based methods, reduces memory and computational costs through Linear Attention, and enhances generalization capabilities. |