Abstract:Obtaining defective samples in industrial products is difficult, and the manifestations of defects are diverse. To better identify defects and improve detection accuracy, an anomaly detection model SPGAN based on GANomaly improvement is proposed. First, a SPAM dual attention module is designed, which realizes the joint perception of local defect texture and global spatial relationships through the synergistic mechanism of spatial attention (SAM) and position-aware attention (PAM). Second, an improved Inception module is introduced between the encoder and decoder to enhance the reconstruction ability of tiny defect features using multi-scale convolutional kernels. Finally, a deep discriminator network based on ResNet18 is constructed to strengthen the discrimination performance of abnormal features through residual connections. To verify the effectiveness of the improved network, a series of comparative experiments and ablation experiments were conducted using a self-made tire dataset. The experimental results show that the improved network has significantly improved detection and segmentation performance on the self-made tire defect image detection dataset, with an AUC value of 0.948 and an AP value of 0.885, an increase of 9% in AUC and 8.9% in AP compared to the original model. The experimental results demonstrate that this method has good application potential in the field of industrial defect detection.