Font Size: a A A

Research And Implementation Of Product Surface Defect Detection Method Based On Unsupervised Learning

Posted on:2023-02-06Degree:MasterType:Thesis
Country:ChinaCandidate:C Q RenFull Text:PDF
GTID:2568306794955289Subject:Computer technology
Abstract/Summary:PDF Full Text Request
Artificial intelligence-based defect detection methods are widely used in product defect detection in mass industrial production.Defect detection methods mainly include supervised learning method and unsupervised learning method.Compared with the supervised learning method that requires a large number of defective samples for training,the unsupervised learning method only requires a small number of normal samples for training,which has the advantages of low cost,stronger versatility,and short training time.Therefore,it is more suitable for defect detection on product surfaces in industrial production scenarios.However,the current methods based on unsupervised learning strategies have their own advantages and disadvantages,and have not yet achieved the goals of high accuracy,speed,and low memory overhead.Based on the classic teacher-student network,combined with the patch distribution model(PaDiM)that has appeared in recent years,this paper designs two improved unsupervised learning defect detection methods with high accuracy,high speed and low memory overhead.The improved method has higher accuracy and has been tested in practical application scenarios.The improved unsupervised learning method in this paper effectively realizes the defect detection on the product surface.The main research contents are as follows:1.Aiming at the problem that the prediction speed of teacher-student network is slow and defects cannot be located at the same time,a multi-student teacher network is proposed.Multiple student networks are used to jointly regression the output of teacher network,and the minimum square deviation of the output of student and teacher in each dimension is selected as the difference value.The information in the middle layer of the network is used to represent the features of each patch of the image to calculate the anomaly distance and locate the defect,and the maximum anomaly score is used to represent the anomaly degree of the image to detect the defect.The experimental results on the MVTec AD dataset show that the prediction time of this method is reduced from 1 hour for a picture to 0.17 seconds for a picture,and the defect localization results can be output at the same time.Image AUROC,the evaluation index of defect detection effect,increased from 87.4% to 91.1%.2.Light PaDiM is proposed to solve the problem that PaDiM cannot run on most machines due to excessive memory requirements and is slow.Firstly,the features of normal images and test images are extracted by backbone network and PCA dimension reduction is performed.Then,the Mahalanobis distance from the feature distribution of the test graph to the normal graph was calculated,and the bias matrix was added to calculate the covariance matrix.Finally,Mahalanobis distance is used to represent the anomaly degree of the test image to segment the defect area and judge whether the image is defective.Experiments on the MVTec AD dataset show that,on the basis of ensuring a small increase in accuracy,the memory requirement is reduced from more than 13.1GB to 3.9GB,and the prediction time is reduced from an average of 0.77 seconds to predict a graph to 0.33 seconds to predict a graph.3.In order to apply the method to practice,a product surface defect detection system based on unsupervised learning is made based on Pyqt5.QTdesigner is used to create system Windows,add various controls and design appearance;The lightweight regional distribution model method was used to detect and locate defects,and the functions of detecting defects in test data sets and testing model effects with complete data sets were designed.Finally,CV2 is used to read the input data of the camera,and the function of real-time defect detection is designed.Experimental results show that the system can run normally and perform the function of defect detection.
Keywords/Search Tags:defect detection, unsupervised learning, deep learning, defect detection system
PDF Full Text Request
Related items