ABSTRACT The urban water supply network is part of the infrastructure that sustains the economic and social functions of cities and regions. Timely inspection and maintenance of the network can effectively reduce resource wastage and prevent accidents. Traditional manual detection methods are inefficient and can be based on subjective judgments. A classification model based on an improved ResNet34 network has been proposed to classify and detect various types of corrosion on the inner walls of pipes under challenging conditions. The introduction of the attention mechanism and multi-scale feature fusion modules further improved the model's effectiveness in classifying defects within the inner walls of pipes. The model can detect various types of pipeline corrosion with a detection accuracy of 98.61%. This accuracy is significantly superior to that achieved with traditional models such as ResNet34, AlexNet, MobileNet, and VGGNet.