In this paper, an anomaly detection method based on background reconstruction is proposed to perform defect inspection on the texture surface of the industrial products. This method consists of two modules: (i) An autoencoder integrated with generative adversarial network is utilized to reconstruct the textured background of the original image as a defect-free reference. Specifically, extra anomalous images are introduced and a mapping method of anomaly is given to improve the stability of reconstruction. (ii) A U-net based inspection network is trained to perform pixel-wise analysis of the differences between the original and the reconstructed defect-free image. During these processes, only artificial synthesized defective images are utilized to train the model without any real defective samples. A series of experiments are conducted on several texture images datasets and the industrial production line. The experimental results reveal the effectiveness and versatility of the proposed method.
Defect generation is a crucial method for solving data problems in industrial defect detection. However, the current defect generation methods suffer from the problems of background information loss, insufficient consideration of complex defects, and lack of accurate annotations, which limits their application in defect segmentation tasks. To tackle these problems, we proposed a mask-guided background-preserving defect generation method, MDGAN (mask-guided defect generation adversarial networks). First, to preserve the normal background and provide accurate annotations for the generated defect samples, we proposed a background replacement module (BRM), to add real background information to the generator and guide the generator to only focus on the generation of defect content in specified regions. Second, to guarantee the quality of the generated complex texture defects, we proposed a double discrimination module (DDM), to assist the discriminator in measuring the realism of the input image and distinguishing whether or not the defects were distributed at specified locations. The experimental results on metal, fabric, and plastic products showed that MDGAN could generate diversified and high-quality defect samples, demonstrating an improvement in detection over the traditional augmented samples. In addition, MDGAN can transfer defects between datasets with similar defect contents, thus achieving zero-shot defect detection.
9 November 2019 in International Journal of Precision Engineering and Manufacturing