Anomaly detection is an essential task in industrial applications. Traditional anomaly detection algorithms based on convolutional neural networks (CNNs) struggle to extract global context information, resulting in poor anomaly detection performance. Moreover, the diversity and inherent uncertainty of anomalous samples present considerable constraints on the effectiveness of traditional anomaly detection algorithms. In this paper, a novel Swin Transformer Unet with Random Masks for self-supervised anomaly detection is proposed. First of all, a random mask strategy(RMS)is adopted to generate simulated anomalies in anomaly-free samples to solve the limited availability of abnormal samples during the training phase. Furthermore, to enhance the overall feature representation for anomaly detection tasks, the Swin Transformer Unet is utilized as the backbone network to extract local features and global contextual information from multi-scale feature maps. Experimental results on the industrial dataset MVTec AD demonstrate that our model achieves comparable performance in terms of anomaly detection.
|