Abstract:In existing industrial systems, using unsupervised algorithms for structural anomaly detection in industrial scenes is a very important means. To address the low sensitivity of existing unsupervised anomaly detection models to outlier normal features, an improved unsupervised anomaly detection model based on PatchCore was proposed. Firstly, an unsupervised clustering algorithm was introduced to cluster and sample its core feature set, in order to reduce the sensitivity of the algorithm to outlier normal features. Secondly, using cosine similarity as a metric, only the similarity in the direction of the feature vectors was considered to eliminate the influence of outliers within the normal feature vectors on the Euclidean distance anomaly. Finally, validation was performed on the MVTec LOCO AD and MVTec AD datasets, respectively. The experimental results show that the improved PatchCore model achieves image-level AUROC and pixel-level AUROC scores of 0.876 and 0.860 on the MVTec LOCO AD and MVTec AD datasets, respectively, which is increased by 5.1% and 3.7% compared with that of the PatchCore model.