A Lightweight Drainage Pipe Defect Detection Method Based on an Improved YOLO11 Network
Rui Xue, Hongtao Fu, Hui Zhao, Chongquan WangDrainage pipe defect detection is essential for maintaining the normal operation of urban infrastructure. In recent years, deep learning-based object detection methods have provided an effective technical solution for drainage pipe defect recognition. Among them, YOLO-series models have demonstrated strong potential in visual detection tasks due to their end-to-end architecture and high inference efficiency. However, directly applying baseline YOLO models may still face challenges such as limited detection accuracy, relatively high model complexity, and insufficient adaptability for lightweight deployment scenarios. To address these issues, this paper proposes a lightweight drainage pipe defect detection method based on an improved YOLO11 network. Rather than treating detection enhancement and model compression as two separate procedures, the proposed method integrates feature enhancement, adaptive pruning, and distillation-based recovery into a unified lightweight detection framework. Specifically, an improved SimAM attention mechanism is introduced into the backbone and integrated with the C3k2 module to construct the C3K2_SWS module, aiming to enhance the representation capability of critical defect features. In the neck network, a focused diffusion pyramid network with a dimension-aware selective fusion structure, termed FDPN-DASI, is designed to strengthen multi-scale feature interactions. In addition, an adaptive-threshold focal loss (ATFL) is introduced to improve the learning capability for hard samples. For efficient deployment, the LAMP pruning algorithm is further improved, and an entropy-guided entropy-adaptive magnitude-based pruning method (EA-LAMP) is proposed to enable adaptive allocation of pruning ratios across different network layers. Moreover, BCKD knowledge distillation is applied after pruning to mitigate the accuracy degradation caused by model compression. Experimental results indicate that the proposed lightweight YOLO11-SFA+EA+BCKD framework achieves a precision of 92.4%, a recall of 88.5%, and an mAP50 of 93.3%, while maintaining a compact model size of 1.6 M parameters and 4.5 G FLOPs. Compared with the baseline model, the proposed method improves precision, recall, and mAP50 by 5.9%, 5.0%, and 4.7%, respectively, while reducing the number of parameters, FLOPs, and model size by 1.0 M, 1.8 G, and 2.1 M, respectively. These results suggest that the proposed framework can improve detection performance while reducing model complexity under the current experimental setting, indicating its potential for lightweight drainage pipe defect detection tasks.