| Defect detection is a crucial link in intelligent manufacturing.Industrial products defects have the characteristics of complexity and diversity.Aiming at the problem that defect labeling requires high cost and expert knowledge,a special challenge is studied: cold start problem.That is to study how to only apply the defect free image as the training sample,so that the model can detect any abnormal sample.In addition to the task of distinguishing whether the sample is normal or not,it also needs to locate the defect.Firstly,an anomaly detection framework based on distance measurement is proposed.The framework includes pre training model parameter optimization,multi-scale feature extraction,establishment of feature knowledge base and anomaly evaluation.At the same time,the core set sub sampling method is proposed to reduce the reasoning time and improve the efficiency.(1)Parameter optimization: in order to make the training model more suitable for the detection task of the target domain and realize the feature decoupling of normal and abnormal modes.A self-supervised learning and self-clustering method based on forged anomaly is proposed to train the network,and the model is further optimized for specific tasks on the basis of the pre training model.(2)Multi-scale feature extraction: in order to detect and locate the multi-scale anomaly in the image,the middle layer feature of neural network is extracted as the feature coding of the image.Combined with rich color texture and semantic information,each feature vector represents the corresponding region in the image,so as realizing the anomaly detection of the local region,so as locating the anomaly in the image.(3)Evaluating anomalies: in order to evaluate anomalies more comprehensively,a knearest neighbor weighted anomaly evaluation method based on Euclidean distance is proposed.A feature knowledge base is established for the features of normal samples,and the anomaly degree of samples is measured by the distance between the feature coding of sample images and the features in the base.(4)Reduce reasoning time: in order to achieve faster reasoning,a core set sub sampling method is proposed,and the dimension of features is reduced by random linear projection.This method can not only greatly reduce the reasoning time while maintaining high performance,but also detect and locate structural and non-structural multi-scale anomalies.Research and experiments show that after self-supervised learning and self-clustering loss parameter optimization,the pre training model significantly improves the feature extraction ability of specific tasks.It also shows that the middle layer of neural network can well characterize the color and texture information of the image,and the extracted local region features can effectively locate the anomaly.The core set sub sampling method greatly reduces the amount of calculation and improves the detection speed on the basis of maintaining the original performance.The research method is applied to the standard data set MVTec AD and shows excellent performance in detection and location.The average score of image level anomaly detection AUROC is 97.86%,and the average score of pixel level anomaly detection AUROC is98.42%.Compared with the latest method,it has significantly improved the detection accuracy and efficiency.At the same time,experiments show that this method also shows competitive performance in the end face data of motor commutator collected in actual industrial production.In addition,an anomaly forgery method for commutator end face based on Gaussian mixture model is proposed.This method adopts the a priori anomaly map extraction method based on Gaussian mixture model,and adds it as a priori information to the segmentation decision network,so that the network pays more attention to the region with high probability.The training of segmentation decision network can obtain excellent performance only by using forged exceptions and a priori information.The research shows that this method can not only effectively detect the real samples,but also remove the possible detection noise of conventional segmentation methods,and its performance is comparable to that of the segmentation network trained with real samples. |