Drainage pipe defect image classification via frequency domain attention and Bayesian optimization
摘要
Ensuring the operational safety and efficiency of urban drainage systems is critical for flood prevention and quality of life. However, challenges such as limited labeled data, inefficient feature fusion, and time-consuming hyperparameter tuning hinder the effectiveness of existing defect detection methods. To address these issues, this study proposes an enhanced MobileViT model, MF-IDA-MobileViT, which integrates a Multi-Frequency Channel Attention (MFCA) mechanism and Iterative Deep Aggregation (IDA) strategy. The MFCA module leverages 2D Discrete Cosine Transform (DCT) to extract discriminative frequency-domain features, while the IDA strategy optimizes multi-scale feature fusion. Additionally, Bayesian optimization via the Optuna framework is employed to automate hyperparameter tuning, improving model efficiency. Experiments on a seven-class pipe defect dataset demonstrate that MF-IDA-MobileViT achieves state-of-the-art performance, with 96.30% precision, 96.21% recall, and 96.21% F1-score, outperforming baseline models like ConvNeXt and Swin Transformer. Ablation studies confirm the individual and synergistic contributions of MFCA and IDA, with F1-score improvements of 9.89% and 9.25%, respectively. The optimized hyperparameters, particularly learning rate and DropPath, further enhance model robustness. This work provides a reliable, lightweight solution for automated pipe defect classification, suitable for edge deployment in real-world scenarios.