Abstract:
In order to solve the problem of too small defect dataset in the defect detection task of the upper door trim panel, the article proposes a defect generation model CDGAN based on generative adversarial network. The primary goal is to generate images of car door trims with various types of defects, thereby increasing the diversity of training data and enhancing the performance of the defect detection model. It involves two stages: training the GAN generator to learn the distribution of the defect dataset, and sampling data from the trained generator to augment model performance. The CDGAN model consists of two networks: a defect generation network and an image translation network. The defect generation network produces defect images located within the dataset’s bounding boxes, and the image translation network merges these defects with defect-free images. Ablation experiments demonstrate that the generated defect images significantly improve the defect detection capability of the YOLOv5 model, achieving an average precision (mAP@50) of 94.9% on the car door trim defect dataset. This method has been applied in the production and manufacturing of car door trims. Its feasibility has been proven in practical industrial applications.