Abstract:CCTV inspection technology is widely used in underground drainage pipe defect detection, but the defect imagescollected by CCTV need to rely on professional inspectors for inspection and identification, and the results are subjective and time-consuming. In order to automate underground drainage pipe defect detection and identification, an improved YOLOX-based underground drainage pipe defect identification method is proposed. Firstly, for the problem of too small data set, the original image is preprocessed by StyleGAN2 to generate multi-defect images. Second, to improve the detection accuracy, the feature fusion layer of YOLOX is improved by borrowing the idea of convolutional pooling pyramid in the null space and introducing the SE attention mechanism to solve the problem that the top layer features contain only single-scale features and are not fused with other feature maps, and a weight-based feature fusion module is designed to solve the feature blending problem brought by the fusion of different feature layers. Finally, the YOLOX boundary loss function is changed to CIOU to improve the efficiency of target detection frame regression. The experimental results show that the proposedalgorithm can well identify five defects, namely, deposition, leakage, tree root invasion, cracks and misalignment, with an mAP of 68.76%, which is 1.62% better than the original YOLOX algorithm.