Self-Supervised Feature Extraction for Domain-Specific Anomaly Detection with Normalizing Flows
Abstract
The monitoring of defects using visual inspection is a complex and time-consuming task that is vital to the safety and reliability of infrastructures. This work proposes to tackle the automation of this task as a semi-supervised anomaly detection problem to overcome the limitations caused by the scarcity of defect samples. We choose to rely on normalizing Flows (NFs), a category of probabilistic models that map a source distribution to a target one, and that have recently proven to be very effective for anomaly detection. Most of these models have been tested on industrial inspection datasets and leverage neural networks pretrained on ImageNet to extract generic features before passing them to the NF to learn the distribution of healthy samples. In this paper, we investigate the use of a self-supervised feature extractor —a Masked Autoencoder (MAE)— to learn domain-specific features when the application domain differs significantly from ImageNet. To perform empirical comparaison, this encoder and two versions of the same architecture pretrained on Imagenet are used to train differents NFs. To evaluate the effectiveness of our approach, we then compute the resulting anomaly maps for each of them on concrete datasets.