Abstract To address the challenge of defect recognition in sewer pipelines under fully flooded and turbid conditions, this study proposes multi-scale adaptive attention-multi-scale feature fusion network (MSAA-MSFNet), a sonar image classification network that integrates MSAA and a dual-path multi-scale feature fusion (MSFM) module. The design follows a three-stage strategy: noise-robust feature extraction, efficient fusion, and imbalanced learning. First, to suppress noise and highlight key structures, we introduce an MSAA mechanism that computes multi-order spatial adaptive weights on top of multi-scale feature extraction, thereby enhancing salient regions while attenuating redundant responses. Second, building on the lightweight backbone ShuffleNetV2, we design a dual-path MSFM module to enable complementary cross-layer feature fusion while maintaining inference efficiency. Third, to mitigate the long-tailed distribution in sonar image datasets, we propose a dual-weighted focal loss that adaptively increases the learning weights of minority and hard-to-classify samples. With only a marginal increase in parameter count and computational complexity, experiments show that MSAA-MSFNet improves Top-1 accuracy on sonar defect recognition by 1.38% over the state-of-the-art baseline. These results verify the method’s ability to automatically identify sewer-pipeline defects under complex operating conditions and indicate promising engineering applicability. Code is available at: https://github.com/gerry-shd/MSAA-MSFNet .