An Image Anomaly Detection Method Based on Knowledge Distillation
The shallow architecture of the model in image anomaly detection has a weak ability to detect subtle differences,and it is a challenge to find effective feature representations to distinguish between positive and negative samples.To solve this problem,a new image anomaly detection method based on knowledge distillation was proposed.This method proposes a new knowledge distillation framework,which consists of a T-S model and a single-class embedding module,and generalizes new anomalies through transfer learning.Firstly,the high-capacity wide_resnet50_2 network as a teacher network aggregates multi-scale features at the lowest level through a single-class embedding module,retains the universality and spatial resolution,and enhances the ability of the distillation model to represent anomalies.Secondly,the work of embedding attention mechanism provides a new perspective for the effective use of pre-trained parameters and improves the performance of the model while maintaining the integrity of the network structure.Finally,a new a-nomaly representation method is proposed,which calculates the cosine similarity loss of each pair of tensors,and accumulates multi-scale anomalies to obtain the anomaly score graph.Experimental results show that the proposed method achieves an average AUC value of 97.8%and95.5%on the texture and object class of the MVTec dataset,respectively,and has excellent detection ability for subtle anomalies in the image.