Traditional industrial component inspection methods rely primarily on creating templates on the basis of component shape and color features, resulting in high rates of missed defects. To reduce this rate, we propose a defect detection algorithm based on Conditional Generative Adversarial Networks (GANs) for high-precision detection and identification of random two-dimensional surface defects in industrial defective products. First, a dataset of identical socket panels was constructed through data augmentation. Next, a conditional GAN (pix2pix) was employed as the backbone architecture for the detection model. This generated repaired images of the defective panels, which were subtracted from the original images to produce difference maps. Sobel edge features were subsequently extracted from both the input image and its corresponding repaired image, and the edge features from both sources were differentially processed. By weighting and fusing the edge feature differences with the difference map, the detection and localization of panel defects were achieved. The experimental results validate that the proposed algorithm can efficiently detect and locate defects precisely on socket panels even in the presence of reflective interference while maintaining high accuracy and reliability.
Wang et al. (Fri,) studied this question.