Automated defect classification and localization in sewer pipelines using hybrid ResNet50–Swin transformer and modified YOLOv8 on CCTV inspection images
摘要
Sewer pipelines are a critical foundation of modern urban infrastructure, requiring frequent inspection to ensure integrity and prevent deterioration. Manual evaluation of CCTV footage is inefficient and prone to errors, particularly under real-world conditions where low-contrast imagery, visual noise, and invisible sediment deposits hinder defect detection. Existing deep learning models have struggled to generalize across these challenges, motivating the need for a more accurate and resilient framework for classification and localization. We present a two-stage approach that first leverages a hybrid ResNet50–Swin Transformer classifier to robustly distinguish defective from non-defective images with 90.28% accuracy, dramatically reducing misclassification and data volume for the subsequent stage. This filtering mechanism directly enhances detection precision—improving the mAP of our modified YOLOv8 from 0.70 to 0.81 (a 11% gain) by eliminating false-positive inputs. For defect localization, we integrate Convolutional Block Attention Modules (CBAM) into YOLOv8, enhancing the model’s ability to focus on regions where defect boundaries are difficult to distinguish. This attention mechanism significantly improves localization precision, particularly for visually subtle or ambiguous defects. The fusion of residual learning and hierarchical attention proves highly effective on our inspection dataset comprising 6912 images from over 200 sewer pipelines in Iran. This system offers a scalable, real-time solution for urban infrastructure monitoring, outperforming baseline methods in both efficiency and accuracy.