Abstract:Addressing the issues of urban drainage pipeline defects being susceptible to background interference, the variability of characteristic scales, and the low detection accuracy and high false positive rate of existing detection models, this paper presents an improved defect detection algorithm based on YOLOv8. Initially, the DSK module is designed and embedded within the C2f module of the backbone network to expand the receptive field and improve the ability to extract multi-scale defect features. Subsequently, the Slim-neck network structure is introduced to refine the neck network, effectively utilizing and fusing defect feature information, which also contributes to the lightweightification of the model. Finally, the FocalEIOU loss function is adopted to enhance the detection performance for smaller defect targets and the convergence speed of the model. Experimental results on a pipeline defect dataset indicate that the proposed improved algorithm achieves a mean Average Precision (mAP) of 67.5% at a detection rate of 70.4 frames per second. Compared to the original YOLOv8 algorithm, the mAP value and detection speed are respectively increased by 3.8% and 1.7 frames per second, demonstrating superior detection performance. For the purpose of practical application, this paper has developed a system software capable of real-time detection of pipeline defects based on an improved algorithm. Through actual project detection, the enhanced algorithm proposed in this paper has been validated to meet the requirements of high precision and real-time detection for the task of urban drainage pipeline defect inspection.