| Anomaly detection refers to the use of visual devices to obtain images and build detection models to detect and locate anomalies in the test image.In recent years,due to the development of deep learning theory and the improvement of computer computing power,anomaly detection has been applied to industrial quality inspection,medical treatment,network security,finance,etc.,and has achieved preliminary effects.What an anomaly means varies depending on the domain.Anomalies can be surface defects in industrial products,malicious attacks in network security,or fraud risks in the financial field.This thesis focuses on the field of industrial manufacturing,and aims to study the anomaly detection of industrial images in unsupervised scenarios.At present,there are two main problems in the field of industrial image anomaly detection.One is that the few training samples and the little difference between the same category of samples.The existing models are difficult to extract discriminative features for anomaly detection tasks,resulting in poor performance of anomaly detection.Secondly,due to the scarcity of abnormal samples,many studies introduce synthetic anomaly samples in the training stage.However,the existing methods often use noise with certain statistical laws to synthesize anomaly images,so the existing methods cannot effectively deal with the problems such as the diversity of anomaly types and the different sizes of anomaly regions in real industrial images.The main research contents of this thesis can be summarized as follows:(1)Aiming at the problem that the anomaly detection task has few training samples and the difference between training samples is small,it is difficult for the current model to extract discriminative features,this thesis proposes an unsupervised anomaly detection algorithm based on modeling the distribution of normal sample features.Specifically,this work uses a pretrained network to extract the hierarchical features of the training images,then uses multivariate Gaussian to model the distribution of the hierarchical features,and finally determines whether there are anomaly regions in the test image according to the Mahalanobis distance between the test image and the constructed Gaussian distribution.This work is evaluated and analyzed on the MVTec anomaly detection dataset,and further explored which convolution layers of the pre-trained network can extract more discriminative features for anomaly detection tasks.Extensive experimental results fully prove that this work can accurately identify anomaly images and locate anomaly regions in the image.(2)Aiming at the problem of diversity of real anomaly types and the weak robustness of the model in anomaly detection tasks,this thesis proposes an anomaly detection algorithm based on synthetic anomaly samples.Specifically,this work designs a novel anomaly sample simulation module that can generate synthetic abnormal samples by adding abnormal pixels randomly to normal samples.Furthermore,this work proposes an effective anomaly sample reconstruction network to accurately reconstruct abnormal areas into normal areas.Finally,this work employs a scoring and segmentation network to localize anomalous regions.Abundant experimental results on the MVTec dataset indicate that this work can detect the anomaly images and locate the local anomaly areas effectively,improve the robustness of the model against distractors(such as the non-uniform illumination conditions in the samples),and the performance is better than other related anomaly detection methods. |