To overcome the problem of small defect samples and the imbalanced distribution of defect categories during adhesive structure defect detection, a defect identification approach based on DCGAN and YOLOv5 is proposed. The above problems are solved by fine-tuning the structure and the loss function of the DCGAN, generating high-quality defect images, and expanding the dataset of adhesive structure defects. Generally, using the EIOU loss function in the YOLOv5 network allows the network to converge faster during training and improve the recognition effect. In this article, it is illustrated by comparing with the GIOU loss function, that utilizing the EIOU loss function increases the mAP value by 3.9% and the recall by 10.5%, but the precision decreases. To solve this problem, the feature extraction capability of the network is enhanced by incorporating the CBAM after the C3 module in the YOLOv5 network. Interestingly, the mAP, precision, and recall of the optimized YOLOv5 algorithm are improved to 78.6%, 77.2%, and 76%, respectively, where the precision compared to the original model improved by 10.6%. This study has demonstrated that the improved YOLOv5 model can effectively detect adhesive structure defects, which provides defect identification and control theoretical research and technical support.