Electronic Research Archive (Jun 2024)
Weakly supervised anomaly detection based on sparsity prior
Abstract
Anomaly detection is a binary classification task, which is to determine whether each pixel is abnormal or not. The difficulties are that it is hard to obtain abnormal samples and predict the shape of abnormal regions. Due to these difficulties, traditional supervised segmentation methods fail. The usual weakly supervised segmentation methods will use artificially generate defects to construct training samples. However, the model will be overfitted to artificially generated defects during training, resulting in insufficient generalization ability of the model. In this paper, we presented a novel reconstruction-based weakly supervised method for sparse anomaly detection. We proposed to use generative adversarial networks (GAN) to learn the distribution of positive samples, and reconstructed negative samples which contained the sparse defect into positive ones. Due to the nature of GAN, the training dataset only needs to contain normal samples. Subsequently, the segmentation network performs progressive feature fusion on reconstructed and original samples to complete the anomaly detection. Specifically, we designed the loss function based on kullback-leibler divergence for sparse anomalous defects. The final weakly-supervised segmentation network only assumes a sparsity prior of the defect region; thus, it can circumvent the detailed semantic labels and alleviate the potential overfitting problem. We compared our method with the state of the art generation-based generative anomaly detection methods and observed the average area under the receiver operating characteristic curve increase of 3% on MVTec anomaly detection.
Keywords