Abstract:Given the problem that no image datasets of defective cloth with defect location information are available for the training of the automatic detection model for cloth defects in industrial production, this study proposes an image generation model EC-PConv with defect location information for defective cloth, and it uses an improved partial convolutional network as its basic framework. This model adopts a feature extraction network for small-scale defects, splices the extracted defect texture features with the blank mask to obtain a mask with position information and defect texture features, and generates an image with defect position information in a repaired way for the defective cloth. Furthermore, a hybrid loss function integrating the mean squared error (MSE) loss is proposed to generate clearer defect textures. The experimental results show that compared with the latest generative adversarial network (GAN) generation model, the proposed model reduces the Frechet inception distance (FID) score by 0.51 and improves the precision P and mean average precision (MAP) values of the generated image of the defective cloth in the cloth defect detection model by 0.118 and 0.106, respectively. This method is more stable than other algorithms in generating images of defective cloth and can generate images of defective cloth that contain defect location information and have higher quality. Therefore, it can effectively solve the problem that no training datasets are available for the automatic detection model for cloth defects.