Abstract:Aiming at the issues of scarcity of anomalous samples and drastic variations in defect scales in industrial production, this paper proposes the STU-Seg method, an unsupervised anomaly detection method based on knowledge distillation and a Selective Fusion Module (SFM). This method designs a heterogeneous student-teacher network architecture, in which the student network is reconstructed into a U-Net structure with skip connections. By reusing shallow high-resolution features, the model improves its ability to identify and restore the geometric boundaries of tiny defects. Meanwhile, the introduced SFM dynamically adjusts the weights of features at different levels according to the global context of the image content, enhancing the model's perception of multi-scale defects. Experimental results on the MVTec AD benchmark dataset show that while the image-level anomaly detection metrics of the STU-Seg model are on par with current state-of-the-art unsupervised models, it achieves 72.43% and 72.52% in Pixel-level Average Precision (Pixel AP) and Instance-level Average Precision (IAP) respectively, both outperforming existing mainstream unsupervised models.