## 5 Conclusions  
Due to the limited number of defective images within gas polyethylene pipes, this study proposes an improved DCGAN. The key contributions are as follows:  
* Network Architecture Optimization: By combining Minibatch Discrimination, Spectral Normalization, and the DCGAN model, the network architecture is refined using the Two-Timescale Update Rule. This modification addresses the limitations of the original DCGAN, such as its tendency for pattern collapse, enhances the quality and diversity of generated samples, and mitigates the issue of unstable training caused by the generator being weaker than the discriminator. Additionally, the introduction of the Self-Attention Mechanism further refines the detailed features of the generated images.
* Generation Quality Assessment: The similarity between the generated images from the improved DCGAN model and the real images is first validated through visual comparison. The effects of different sub-models are also compared. Experimental results show that, after introducing TTUR, the generator loss amplitude is reduced by approximately 66%, while the maximum loss value of SN-TTUR decreases by around 83.33% compared to the original DCGAN. Regarding quantitative image evaluation metrics, the FID of defective images generated by the improved model is reduced by 21.5%, and the SSIM score increases by 45.9% compared to the original DCGAN. In classification validation experiments, the accuracy of VGGNet, AeNetx, and ResNet, based on the hybrid datasets, reaches 83.33%, 83.08%, and 76.82%, respectively, improving by 5.1%, 10.18%, and 5.68% compared to traditional data augmentation methods. The G-mean improves by 23%, 18.57%, and 7.38%, while the F-score improves by 10.22%, 11.29%, and 5.73%, respectively.
* The relationship between the generated defective image quantity and classification accuracy was explored. Classifier performance improved universally when incorporating these generated images.  
This study addresses the issues of data scarcity and uneven distribution through an improved DCGAN, but in the future, there is still a need to enrich and diversify the datasets to further supplement the defective samples under actual working conditions to better cope with the complexity of real-world applications. These samples should cover a wide range of factors such as different environmental conditions, pipeline aging and human interference, to ensure that the inspection system can operate effectively in a variety of complex and dynamic real-world scenarios. The robustness and generalization ability of the model can be further improved by introducing more actual working condition data, thus enhancing the accuracy and reliability of defect detection.  
Conceptualization, Z.Z. and Y.W.; Methodology, Z.Z. and Y.W.; Software, Z.Z. and S.R.; Validation, Z.Z., Y.W., S.R. and N.L.; Formal analysis, Z.Z. and Y.W.; Investigation, Z.Z., Y.W., S.R. and N.L.; Resources, Z.Z., Y.W. and N.L.; Data curation, Z.Z.; Writing--original draft, Z.Z.; Writing--review and editing, Z.Z. and Y.W.; Visualization, Z.Z.; Supervision, Y.W.; Project administration, Y.W.; Funding acquisition, Y.W. All authors have read and agreed to the published version of the manuscript.  
This research was funded by Natural Science Foundation of Xinjiang Uygur Autonomous Region (No. 2022D01C389), the Xinjiang University Doctoral Start-Up Foundation (No. 620321029), and the Science and Technology Planning Project of State Administration for Market Regulation (No. 2022 MK201).