Unsupervised Spark Plug Surface Defect Detection Based on Feature Embedding
In the spark plug defect detection task,existing unsupervised defect detection methods have problems with false detec-tion due to the lack of boundaries for the normal features of the detection target and the imbalance of training samples.A new unsuper-vised defect detection algorithm based on feature embedding is proposed to address this issue.This method uses a twin network trained with a feature similarity attention module to bring closer the distribution of normal feature samples in high-dimensional space.It em-ploys a feature down-sampling method based on density information to balance the feature distribution and remove redundant features.The K-Nearest Neighbor algorithm is used for outlier detection on the test set features,with the abnormal probability of each feature being used as the basis for abnormal detection and localization.Experimental results show that this method achieves an average detec-tion accuracy of 97.0%and a localization accuracy of 96.9%on a self-collected spark plug dataset,making it more suitable for cur-rent spark plug defect detection tasks compared to several similar methods.