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.

  • A deep learning model was developed for the classification of pipeline corrosion defects.

  • Good accuracy was achieved in the experiment.

  • Practical classification methods and technical support for pipeline damage detection are provided by this model.

The urban water supply is a crucial aspect of urban infrastructure. With the continuous advancement of industrialization and urbanization, the population of cities has seen a marked increase. Consequently, water pipe networks have become more complex, with a higher laying density. In piping systems, steel and cast iron have been the primary materials used in metal pipelines for centuries. The water supply pipelines in most cities have a history of several decades, and the service life of some pipelines even exceeds 100 years (Barton et al. 2019). With an increase in the service life of pipelines, the probability of structural or functional defects also rises, leading to groundwater pollution, urban waterlogging, and other significant safety hazards (Lv et al. 2019). These issues often result in accidents, which can affect the environment, public facilities, and even the personal safety of residents (You et al. 2023b). Therefore, the issue of pipeline detection and maintenance is becoming an increasingly prominent concern (Adedeji et al. 2017). Categorizing corrosion on the inside of pipelines can reveal the cause of corrosion, whether it is due to water quality issues, a poor choice of pipeline materials, or other reasons. This can help to improve pipeline designs in order to prevent corrosion from occurring in the future. In addition, pipeline detection can inform assessments of the health of the pipeline, so that timely measures can be taken to repair or replace it. Inspection and timely repair of pipes with serious defects can not only reduce accidents such as blockage and overflow but also prolong the service life of pipes (Wang et al. 2021). Additionally, through effective corrosion monitoring, the high costs incurred by accidents and sudden maintenance can be reduced along with a reduction in the daily operation and maintenance costs. Given the large scale of water supply pipelines, efficient, automatic, and large-scale pipeline inspection has become an urgent requirement for pipeline facility construction and management (Zhou et al. 2022).

The existing detection technology has been a limiting factor affecting evaluations of the conditions of water supply pipelines. Lack of regular inspections, or delays in the inspection cycle, can lead to various issues in managing and maintaining water pipes (Wang et al. 2020). Currently, common pipeline detection methods include sonar detection (Nadimi et al. 2021), eddy current detection (Chu et al. 2021), magnetic flux leakage detection (Peng et al. 2020), and laser projection imaging detection (Mukherjee et al. 2022). However, compared to machine vision methods, conventional detection techniques cannot directly reveal damage to the internal surface of the pipeline. These methods also have lower automation levels and lower rates of damage identification with respect to machine vision methods. By utilizing digital image processing technology in computer vision, pipeline images can automatically be assessed. This technique can effectively address the aforementioned issues and establish a dependable framework for the safety assessment and maintenance of pipelines. Wang & Zhang (2014) designed a circular structured light detection system. The light emitted by the laser was controlled by adjusting the shape of the material surface and converted into bars of light containing three-dimensional information. This analysis can be used to obtain the coordinates of the inner wall of the pipeline, enabling the detection of pipeline deformation. Kannala et al. (2008) utilized a hyperboloid panorama camera to capture images of pipelines. This camera is capable of producing a 360° panoramic image of the inner wall. Given the low levels of light inside the pipeline and the complex environment, the SFM method relies on the selection and matching of feature points, which can be challenging, ultimately leading to reduced detection accuracy. Gunatilake et al. (2020) developed a set of mobile robot sensing systems that rely on RGB-Depth image detection to locate 3D images. They successfully implemented scanning, detection, location, and measurement of internal defects in pipelines with this technique. The system can achieve linear quantification of defects without a complicated calibration process through the directional correction of RGB-Depth images.

Traditional machine learning methods require the selection and extraction of artificial features before implementing damage identification through classifier design. Given that this method requires human intervention to create and extract features manually, this subjective element may play a role. Artificially created features are insensitive to changes, which makes it challenging to accurately represent the detailed features of high-level images. This limitation results in a notable decrease in feature recognition efficiency. In recent years, deep learning techniques have shown powerful capabilities in various fields. For example, Yeganeh et al. (2024) compared the performance of seven machine learning techniques in predicting water table levels and found that these techniques have significant advantages in identifying complex trends and nonlinear relationships. In addition, Mirboluki et al. (2024) successfully predicted the water table using improved deep learning and soft computing methods, demonstrating the significant advantages of the Long Short Term Memory Network-Grey Wolf Optimization (LSTM-GWO) hybrid model when dealing with complex time series data. It shows that deep learning models have great application potential in complex environments. Deep learning technology can be used to analyze internal and external surface defects in piping efficiently. Atha & Jahanshahi (2018) employed the ZFNet and VGG16 deep convolutional neutral networks (CNNs) to detect and assess the corrosion of metal surfaces, although the detection accuracy of these two models is relatively low. Ahuja et al. (2019) conducted a study on pipeline corrosion and classified four different types of corrosion using the Mask region-based CNN (He et al. 2017), achieving an average accuracy of 93.4%. Wang et al. (2021) proposed an intelligent recognition technology for damage detection in underground drainage pipes using a deep learning model. However, the detection speed and accuracy reported are both inadequate. You et al. (2023a) developed an automated detection and identification algorithm for joint defects in drainage pipes using the YOLOv5 object detection framework. This algorithm can identify staggered and broken joints of pipes, but its detection accuracy is low.

The main objective of this study is to propose a novel method to classify the inner wall corrosion of the water supply pipeline based on the internal video images obtained by endoscope and deep learning technology. The classic ResNet classification network is adopted to identify the corrosion types. The improved model can identify various types of corrosion defects on the inner wall of pipeline more accurately. As a reliable basis for staff to assess the health of the pipeline and determine whether the pipeline needs to be repaired and replaced, sudden accidents and losses caused by pipeline corrosion can be avoided.

Convolutional neural networks

Machine learning has been widely used to detect structural damage (Salkhordeh et al. 2021), although this technique can often face difficulties in classification and recognition. Numerous algorithms can be used to solve these problems. In this study, a CNN is used to identify corrosion images. Compared to traditional neural networks, CNNs have a better ability to process images and sequential data, because they are able to learn the features in an image automatically and to extract the most useful information.

During the initial stages of the deployment of deep learning methods for defect detection, different approaches emerged, some of which are based on CNNs. Features of defects can be extracted from images based on a specific detection model. It identifies and classifies defects in images, enabling recognition, prediction, and decision-making based on these features. Existing surface defect classification networks include AlexNet (Krizhevsky et al. 2012), VGGNet, GoogLeNet (Szegedy et al. 2015), ResNet (He et al. 2016), and MobileNet (Howard et al. 2017).

In this paper, the process of water pipe inner wall defect recognition is shown in Figure 1, which are data acquisition, model training, and defect identification detection and analysis.
Figure 1

Defect categorization flowchart.

Figure 1

Defect categorization flowchart.

Close modal

ResNet

ResNet is an architecture developed to mitigate the challenges of gradient vanishing in the training of deep networks. Introduced by Kaiming He et al. in 2015, ResNet garnered exceptional results in the ImageNet Large Scale Visual Recognition Challenge (ILSVRC) competition.

The main innovation of ResNet lies in introducing the concept of the Residual Block. Traditional neural networks learn the feature representation of input data by stacking layers. However, with the proliferation of network layers, the gradient tends to vanish during backpropagation, making it challenging to train the model effectively. To solve this problem, ResNet introduces cross-layer residual connections, which allow information to be transmitted directly from one layer to a subsequent layer, thus alleviating the issue of gradient vanishing. As a basic element of ResNet, the residual block has two primary branches: the main path and the residual path. The main path performs ordinary feature transformation, while the residual path directly adds the input to the output of the main path. This design enables the model to learn the residuals directly and accelerate the propagation of gradients.

The fundamental component of ResNet34 is the residual block, otherwise known as the ‘Basic Block,’ which consists of two primary 3 × 3 convolution layers. The Basic Block is different from traditional convolution layers; it introduces residual connections, which make it easier to learn and optimize the deep structure of the network during the training process. The Basic Block's structure is depicted in Figure 2. The ResNet34 network's structure is depicted in Figure 3.
Figure 2

Basic block structure.

Figure 2

Basic block structure.

Close modal
Figure 3

ResNet34 network structure.

Figure 3

ResNet34 network structure.

Close modal

Squeeze-and-excitation attention mechanism

The squeeze-and-excitation (SE) attention module (Hu et al. 2018) is a lightweight channel attention module that can integrate any transformation into a computational unit. It can be seamlessly incorporated into different existing network model frameworks, increasing its efficiency. The purpose of this process is to assign varying weights to different parts of the image within the channel domain using a weight matrix. This is done to extract more crucial characteristic information. The structure of the SE module is depicted in Figure 4.
Figure 4

SE module.

In CNN architectures, convolutional layers and pooling layers are typically employed to extract features from images. However, the link between feature channels is not well modeled by this approach, as some channels have comparatively less effect on how well a task is performed. The SE operation introduced by this model aims to model clearly the relationship between channels. Firstly, the SE module utilizes global pooling to condense the input feature map channel into a single real number. This number represents the weight of the feature channel and is derived by pooling the two-dimensional features of the map, giving it a global receptive field. During the compression process, the original number of channels remains unchanged, while the feature dimension is compressed to 1 × 1 × C. After compression, the SE module learns to generate a channel weight vector using a fully connected layer and a nonlinear activation function. This weight vector is applied to each channel of the original feature map to weigh the features of the different channels.

The SE module is applied to the spatial information of the image, and it learns to distinguish between corroded and normal areas in the image. By highlighting corrosion-related areas in the image, the model can focus more on corrosion-related areas and ignore parts that are irrelevant for classification. By embedding the SE module into the ResNet34 network, the feature channel recalibration strategy of the SE module can be combined with ResNet34. This integration can effectively improve the recognition capability of the network.

Multi-scale feature fusion module

The multi-scale feature fusion (MSFF) module is a common structure in deep neural networks. Its main purpose is to process feature maps of different scales or resolutions in order to enhance the model's capacity to gather multi-scale information, to enhance the network's ability to process such information, and increase the generality of the model.

For this study, this module was integrated into the ResNet34, enhancing the comprehensive utilization of multi-layer features within the network. To determine the pixel value in the target image, the feature fusion module uses a bilinear interpolation method to explore fully the four real pixel values in the vicinity of the virtual point in the original image. By adjusting the smaller feature map to match the largest feature map, all feature maps have the same spatial dimension. Integrating feature maps from different depths using this feature fusion strategy helps to extract more information from the feature map, optimize the model's processing effect on image data, and enhance its capacity to capture multi-scale features. Image features at different scales may contain different levels and sizes of corrosion defect information. By capturing multi-scale information, these features can be fused together to help the network to adapt better to variations in corrosion defects at different scales, resulting in a more comprehensive feature representation. This network can then better differentiate between different types and sizes of corrosion defects, thus enhancing its ability to express information at different scales.

Improved ResNet34 model

SE–MSFF–ResNet34 model

By combining the strengths of different models, it is possible to increase accuracy in judging the type of pipeline corrosion and to extract more critical discriminant information from corrosion images. In this work, an SE attention module and an MSFF module were added to the ResNet34 network. As a result, the improved ResNet34 model was well-suited for identifying and categorizing faults on the inner walls of pipes. The improved two-layer residual module structure (SE_BasicBlock) is depicted in Figure 5, and the improved ResNet34 network structure is depicted in Figure 6.
Figure 5

SE_BasicBlock structure.

Figure 5

SE_BasicBlock structure.

Close modal
Figure 6

Improved ResNet34 network structure.

Figure 6

Improved ResNet34 network structure.

Close modal

Activation function

As an essential component of CNNs, the activation function is typically employed to determine the output of each neuron. Its main function is to introduce nonlinear mapping into neural networks, so that they can learn and express more complicated patterns and relationships. The activation function assumes a pivotal role in enhancing the expressive capacity of the neural network, addressing nonlinear problems, and facilitating the training and optimization of the model. It can help to eliminate single linear relationships during network training, enhance the nonlinear fitting capability of the network, and improve the model's expressive power. By activating the function, the neural network can model various curves to adapt better to the complex data distribution.

The activation function should be optimized to adapt better to the image characteristics of the inner wall. The Rectified Linear Unit (ReLU) activation function is given in Equation (1).
(1)
When the input of ReLU activation function is negative, the gradient is 0, which may cause neurons to deactivate during training, thus affecting the performance of the model. Thus, we have used the Leaky ReLU function, which allows computation of the gradient in the region where the activation function input value is less than 0 during backpropagation, thus reducing the possibility of neuron deactivation and helping to improve the network's identification results. Leaky ReLU effectively mitigates the limitations of ReLU by introducing small negative slopes, which makes the model more expressive to the data. This is because leaky ReLU is better able to retain the features of the input information, especially the negative input features that are ignored in ReLU. This captures more feature information and thus improves the accuracy of the classification task. The Leaky ReLU function is given in Equation (2).
(2)
where is a fixed parameter, and its size affects the slope of Leaky ReLU in the negative interval. An excessively large value will result in the deactivation of the activation function in the negative range, while an excessively small value will impede the model's convergence. A suitable value will reduce the calculated amount of Leaky ReLU and increase the convergence speed.

Data acquisition

In this work, an industrial endoscopy-based detection system was used to obtain video images of the inside wall of a pipeline. Image frames were extracted from the captured video, and then images with corrosion defects were selected as the experimental dataset. For this paper, a total of 6,544 pipeline corrosion images were collected: 4,592 in the training set, 652 in the validation set, and 1,300 in the test set. The number of corrosion images occupied by each category is shown in Table 1.

Table 1

Dataset partitioning

CategoryTraining setValidation setTest setTotal
Slight corrosion 1,084 152 308 1,544 
Pitting corrosion 1,132 160 320 1,612 
Areal corrosion 1,192 172 336 1,700 
Full corrosion 1,184 168 336 1,688 
Total 4,592 652 1,300 6,544 
CategoryTraining setValidation setTest setTotal
Slight corrosion 1,084 152 308 1,544 
Pitting corrosion 1,132 160 320 1,612 
Areal corrosion 1,192 172 336 1,700 
Full corrosion 1,184 168 336 1,688 
Total 4,592 652 1,300 6,544 

By studying the material of the pipeline and the common types of damage to the pipeline inner wall, this research focused on corrosion defects on the inner walls of pipelines. Because pipelines are typically situated underground or in enclosed environments, the grayscale information in the captured images is often uneven. This results in blurred outlines and edges of corroded areas, making defects less noticeable against the background. Additionally, the small gray value difference between the corroded area and the background complicates feature extraction, impacting the accuracy of damage identification through feature recognition. Therefore, image denoising and enhancement operations were performed on the original pipeline images.

In this study, the inner wall of the pipeline was categorized into four corrosion types based on the severity and morphology of corrosion, as illustrated in Figure 7. Figure 8 displays the features extracted from various samples.
Figure 7

Sample data presentation. (a) Slight corrosion, (b) pitting corrosion, (c) areal corrosion, and (d) full corrosion.

Figure 7

Sample data presentation. (a) Slight corrosion, (b) pitting corrosion, (c) areal corrosion, and (d) full corrosion.

Close modal
Figure 8

Features of the sample to be extracted. (a) Slight corrosion, (b) pitting corrosion, (c) areal corrosion, and (d) full corrosion.

Figure 8

Features of the sample to be extracted. (a) Slight corrosion, (b) pitting corrosion, (c) areal corrosion, and (d) full corrosion.

Close modal

Experimental platform

The experiments were implemented using the PyTorch framework in the Python language with Windows 11. The Graphics Processing Unit (GPU) used was the NVIDIA GeForce RTX 3090. In this model, each training batch size is 16, and 200 epochs are trained.

Evaluating indicator

Accuracy, precision rate, and recall rate are typically chosen as the model evaluation metrics. The calculation formulas are as follows.

  • Accuracy:
    (3)
  • Precision:
    (4)
  • Recall:
    (5)

TP is the true positive rate, FP is the false positive rate, TN are true negatives, and FN are false negatives.

Experimental results

Model training results

To assess how the improved network impacted the performance of pipeline corrosion identification, we tested it with traditional models such as ResNet34, AlexNet, MobileNetv2, and VGGNet.

The results of the experiments are depicted in Figure 9, in which it is shown that the improved ResNet34 model has the highest training accuracy. The training accuracy of the algorithm used in this paper is up to 99%, indicating that the model can perform the classification task well on the training dataset and can capture the patterns and features of the training data.
Figure 9

Training accuracy.

Figure 9

Training accuracy.

Close modal
The loss function curves of the various models are depicted in Figure 10. It can be seen that the improved ResNet34 model exhibits a superior trend in the training process compared to other models. The training loss of the algorithm used in this paper is as low as 0.04, which indicates that the prediction error of the model is small, and the model parameters have been adjusted better through the optimization process to minimize the difference between the predicted and true values of the model. The improved model reaches the fitting state earlier and gradually approaches zero during training.
Figure 10

Training loss.

The final training results are given in Table 2, which shows that after 200 rounds of training, the improved algorithm developed for this study achieves the highest training accuracy and the lowest loss.

Table 2

Training results of models

ResultsAlexNetVGGNetMobileNetv2ResNet34NewResNet34
Train accuracy 0.98 0.97 0.97 0.98 0.99 
Train loss 0.08 0.09 0.07 0.07 0.04 
ResultsAlexNetVGGNetMobileNetv2ResNet34NewResNet34
Train accuracy 0.98 0.97 0.97 0.98 0.99 
Train loss 0.08 0.09 0.07 0.07 0.04 

Classification results

In order to verify the generalization ability of the algorithm in this paper, the test set was then fed into the improved ResNet34. In order to highlight the classification ability of the new water supply pipeline model, its performance was again contrasted with traditional models such as ResNet34, AlexNet, MobileNetv2, VGGNet, the Support Vector Machines (SVM)-based pipe detection algorithm proposed in Zhou et al. (2021), and the convolutional neural network-based approach proposed in Zhao et al. (2022). The classification results are depicted in Table 3.

Table 3

Comparison test results

ModelAcc (%)P (%)R (%)
AlexNet 96.76 96.83 96.70 
VGGNet 96.06 96.09 95.95 
MobileNetv2 96.76 96.74 96.76 
ResNet34 96.84 96.91 96.80 
Zhou et al. (2021)  96.31 96.29 96.23 
Zhao et al. (2022)  96.92 96.98 96.85 
NewRestNet34 98.61 98.63 98.59 
ModelAcc (%)P (%)R (%)
AlexNet 96.76 96.83 96.70 
VGGNet 96.06 96.09 95.95 
MobileNetv2 96.76 96.74 96.76 
ResNet34 96.84 96.91 96.80 
Zhou et al. (2021)  96.31 96.29 96.23 
Zhao et al. (2022)  96.92 96.98 96.85 
NewRestNet34 98.61 98.63 98.59 

Bold values indicate that the result is the best in each experiment.

In Table 3, the improved ResNet34 model outperforms the other models in accuracy, precision, and recall. The accuracy, precision, and recall are as high as 98.16, 98.63, and 98.59%, respectively. The classification accuracy of the improved model is 1.85, 2.55, 1.85, 1.77, 2.3, and 1.69% higher than that of AlexNet, VGGNet, MobileNetv2, the traditional ResNet34 model, the SVM-based pipe detection algorithm proposed in Zhou et al. (2021), and the convolutional neural network-based approach proposed in Zhao et al. (2022), respectively, and the precision rate is improved by 1.8, 2.54, 1.89, 1.72, 2.34, and 1.65%, respectively, and recall rates increased by 1.89, 2.64, 1.83, 1.79, 2.63, and 1.74%, respectively. By optimizing the ResNet34 model on the basis of the ResNet34 model, the model can better capture the features of corrosion defects on the inner wall of the water pipe and improve the generalization ability of the model, thus performing well on the test set, which indicates that the model has a high reliability in practical applications.

The training phase focuses on the performance of the model on the training data, and the testing phase focuses on the performance of the model on the test data. The training accuracy of the algorithm in this paper is 99%, the testing accuracy is 98.61%, and the training and testing accuracies are similar. This indicates that the model has good generalization and excellent classification ability on different datasets.

To better showcase the capabilities of the newly developed water supply pipeline corrosion detection classification model, a comparison was conducted with the four traditional models mentioned above and two methods mentioned in the literature. The confusion matrix is a summary of the predictions for classification problems, and the results from each model are depicted in Figures 1117. The numbers of correct and incorrect predictions are summarized using count values and subdivided by each class. Table 1 shows that the number of corroded images of each type is 308, 320, 336, and 336, respectively. As can be seen in Figures 1117, the improved model developed for this study has the highest number of correct predictions for each class, with the number of correct predictions being 298, 314, 336, and 330, respectively, confirming the feasibility of the improved algorithm for classifying faults.
Figure 11

AlexNet.

Figure 12

VGGNet.

Figure 13

MobileNetv2.

Figure 14

ResNet34.

Figure 15

The SVM-based pipe detection algorithm proposed in Zhou et al. (2021).

Figure 15

The SVM-based pipe detection algorithm proposed in Zhou et al. (2021).

Close modal
Figure 16

The convolutional neural network-based approach proposed in Zhao et al. (2022).

Figure 16

The convolutional neural network-based approach proposed in Zhao et al. (2022).

Close modal
Figure 17

Classification model proposed in this paper.

Figure 17

Classification model proposed in this paper.

Close modal

To test the impact of the improvements proposed on the basic ResNet34 model, an ablation experiment was conducted. Table 4 displays various models and their respective modules. Model 1 is a ResNet34 model with an SE attention mechanism module; Model 2 uses the Leaky ReLU activation function instead of the previous one; Model 3 is a ResNet34 model with an MSFF module; Model 4 replaces the ReLU activation function in Model 1 with Leaky ReLU; in Model 5, an SE attention mechanism is added to Model 3; in Model 6, a Leaky RELU activation function is added to Model 3.

Table 4

Model name and the modules used

Model nameSELeaky ReLUMulti-scale feature fusion
√   
 √  
  √ 
√ √  
√  √ 
 √ √ 
Model nameSELeaky ReLUMulti-scale feature fusion
√   
 √  
  √ 
√ √  
√  √ 
 √ √ 

From Table 5, we can see the results of the ablation experiment, showing that an accuracy rate of 96.84%, a precision rate of 96.91%, and a recall rate of 96.80% can be achieved by using the original ResNet34, although with the improved ResNet34 model, all indicators have been significantly improved. The accuracy rate of the improved model is 98.61%, which is 1.77% higher than the original model. The precision rate is 98.63%, which is 1.72% higher, and the recall rate is 98.59%, which is an improvement of 1.79%.

Table 5

Ablation experimental results

ModelAcc (%)P (%)R (%)
ResNet34 96.84 96.91 96.80 
98.07 98.12 98.02 
97.15 97.25 97.10 
97.53 97.55 97.51 
98.30 98.31 98.28 
98.53 98.54 98.28 
97.45 97.54 97.39 
This work 98.61 98.63 98.59 
ModelAcc (%)P (%)R (%)
ResNet34 96.84 96.91 96.80 
98.07 98.12 98.02 
97.15 97.25 97.10 
97.53 97.55 97.51 
98.30 98.31 98.28 
98.53 98.54 98.28 
97.45 97.54 97.39 
This work 98.61 98.63 98.59 

Bold values indicate that the result is the best in each experiment.

The results illustrate that the improved ResNet34 model exhibits notable advancements in accuracy, precision, and recall, validating the efficacy of the method. These findings underscore the improved ResNet34 model's heightened generalization capability and robustness in the classification and recognition of defects on the inner walls of pipelines.

To verify the performance of the classification of the four different corrosion types for each model, their accuracies were compared for different sets of corrosion samples. The classification results are shown in Table 6.

Table 6

Classification accuracy of various defects (%)

ModelSlight corrosionPitting corrosionAreal corrosionFull corrosion
AlexNet 94.08 96.88 97.32 98.51 
VGGNet 93.42 91.88 98.81 99.70 
MobileNetv2 97.70 95.31 95.24 98.81 
ResNet34 95.39 96.25 97.02 98.51 
Zhou et al. (2021)  94.48 92.81 97.92 99.70 
Zhao et al. (2022)  95.45 93.75 99.40 98.81 
96.71 96.88 99.70 98.51 
95.72 96.25 97.62 98.81 
97.70 95.31 97.92 99.11 
98.03 96.88 99.70 98.51 
97.04 97.50 100 99.40 
96.05 95.31 98.21 100 
This work 98.03 98.12 100 98.21 
ModelSlight corrosionPitting corrosionAreal corrosionFull corrosion
AlexNet 94.08 96.88 97.32 98.51 
VGGNet 93.42 91.88 98.81 99.70 
MobileNetv2 97.70 95.31 95.24 98.81 
ResNet34 95.39 96.25 97.02 98.51 
Zhou et al. (2021)  94.48 92.81 97.92 99.70 
Zhao et al. (2022)  95.45 93.75 99.40 98.81 
96.71 96.88 99.70 98.51 
95.72 96.25 97.62 98.81 
97.70 95.31 97.92 99.11 
98.03 96.88 99.70 98.51 
97.04 97.50 100 99.40 
96.05 95.31 98.21 100 
This work 98.03 98.12 100 98.21 

Bold values indicate that the result is the best in each experiment.

The evaluation focuses on classification effectiveness of different corrosion types, including slight, pitting, areal, and complete corrosion (see Figures 6 and 7). The results indicate that the optimized classification model performs well in the classification of pipelines with slight corrosion, pitting corrosion, and areal corrosion, with an improved performance over other models. The classification accuracy rate of slight corrosion is 98.03%, that of pitting corrosion is 98.12%, and that of areal corrosion is 100%, indicating that the model used in this paper can completely judge the areal corrosion samples in this data set correctly, and the classification accuracy rate of complete corrosion is 98.21%. However, the classification effect of complete corrosion is slightly worse than the optimal algorithm among the seven models mentioned above. The improved ResNet34 model shows excellent performance in the classification of pipeline corrosion samples and provides practical classification methods for pipeline damage detection. Compared with other classification models, it can classify the inner wall corrosion defects more accurately and obtain excellent classification effect. Its superior performance brings prospects for practical applications in different corrosive environments, providing strong support for engineering practices in related fields.

An understanding of the corrosion defects in the inner walls of pipelines is of fundamental importance, in order to assess the health of the pipeline, to enable timely measures to be taken to repair or replace it, and to ensure the normal operation of the water supply system. An improved ResNet34 classification algorithm was proposed to identify corrosion defects on the inner wall of water pipes. By integrating the attention mechanism, the model directed more attention to useful information in the channel, thus improving its capability to extract image features from areas that were significantly degraded by corrosion while also suppressing irrelevant feature information. Meanwhile, capturing multi-scale information can enhance the ability of the network to express different scales. The Leaky ReLU function was used to improve the activity in negative intervals and to improve further the classification accuracy. According to the experimental results, the model achieved an accuracy of 98.61%, representing an improvement of 1.85, 2.55, 1.85, and 1.77% over AlexNet, VGGNet, MobileNetv2, and traditional ResNet34 models, respectively. The improved model showed remarkable results in accuracy and precision, demonstrating a significant advance over the original model and other conventional network models.

The improved model described in this paper introduces a new method for pipeline inner wall damage, which can more accurately identify the type of defects in the inner wall of the pipeline, reduce manual intervention in the process of identifying and classifying the damage in the inner wall of the pipeline, and improve efficiency. It provides a reliable basis for the scientific and rational operation of pipelines and the assessment of pipeline service life.

In future research, the severity of each corrosion defect will be assessed based on the classification results, which usually involves information including the depth, area, and location of the corrosion, so that the impact of the defect on the structural integrity of the pipeline can be better assessed. The performance of the model in other pipeline conditions may be affected due to differences in quality and between different pipeline systems. Therefore, the generalization ability of the model needs to be further verified in the following studies to ensure that it can be better applied to different pipeline systems.

Data cannot be made publicly available; readers should contact the corresponding author for details.

The authors declare there is no conflict.

Ahuja
S. K.
,
Shukla
M. K.
&
Ravulakollu
K. K.
2019
Surface corrosion grade classification using convolution neural network
.
International Journal of Recent Technology and Engineering (IJRTE)
8
(
3
),
7645
7649
.
Atha
D. J.
&
Jahanshahi
M. R.
2018
Evaluation of deep learning approaches based on convolutional neural networks for corrosion detection
.
Structural Health Monitoring
17
(
5
),
1110
1128
.
Barton
N. A.
,
Farewell
T. S.
,
Hallett
S. H.
&
Acland
T. F.
2019
Improving pipe failure predictions: Factors affecting pipe failure in drinking water networks
.
Water Research
164
,
114926
.
Chu
Z.
,
Jiang
Z.
,
Mao
Z.
,
Shen
Y.
,
Gao
J.
&
Dong
S.
2021
Low-power eddy current detection with 1-1 type magnetoelectric sensor for pipeline cracks monitoring
.
Sensors and Actuators A: Physical
318
,
112496
.
Gunatilake
A.
,
Piyathilaka
L.
,
Tran
A.
,
Vishwanathan
V. K.
,
Thiyagarajan
K.
&
Kodagoda
S.
2020
Stereo vision combined with laser profiling for mapping of pipeline internal defects
.
IEEE Sensors Journal
21
(
10
),
11926
11934
.
He
K.
,
Zhang
X.
,
Ren
S.
&
Sun
J.
2016
Deep residual learning for image recognition
. In:
Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition
, pp.
770
778
.
He
K.
,
Gkioxari
G.
,
Dollár
P.
&
Girshick
R.
2017
Mask r-cnn
. In:
Proceedings of the IEEE International Conference on Computer Vision
, pp.
2961
2969
.
Howard
A. G.
,
Zhu
M.
,
Chen
B.
,
Kalenichenko
D.
,
Wang
W.
,
Weyand
T.
,
Andreetto
M.
&
Adam
H.
2017
Mobilenets: Efficient convolutional neural networks for mobile vision applications. arXiv preprint arXiv:1704.04861
.
Hu
J.
,
Shen
L.
&
Sun
G.
2018
Squeeze-and-excitation networks
. In:
Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition
, pp.
7132
7141
.
Kannala
J.
,
Brandt
S. S.
&
Heikkilä
J.
2008
Measuring and modelling sewer pipes from video
.
Machine Vision and Applications
19
,
73
83
.
Krizhevsky
A.
,
Sutskever
I.
&
Hinton
G. E.
2012
Imagenet classification with deep convolutional neural networks
.
Advances in Neural Information Processing Systems
25
,
1097
1105
.
Lv
B.
,
Liu
Y. X.
,
Ye
S. Z.
&
Yan
Z.
2019
Convolutional-neural-network-based sewer defect detection in videos captured by CCTV
.
Bulletin of Surveying and Mapping
65
(
11
),
103
108
.
Mirboluki
A.
,
Mehraein
M.
,
Kisi
O.
,
Kuriqi
A.
&
Barati
R.
2024
Groundwater level estimation using improved deep learning and soft computing methods
.
Earth Science Informatics
17
(
3
),
2587
2608
.
Mukherjee
S.
,
Zhang
R.
,
Alzuhiri
M.
,
Rao
V. V.
,
Udpa
L.
&
Deng
Y.
2022
Inline pipeline inspection using hybrid deep learning aided endoscopic laser profiling
.
Journal of Nondestructive Evaluation
41
(
3
),
56
.
Nadimi
N.
,
Javidan
R.
&
Layeghi
K.
2021
Efficient detection of underwater natural gas pipeline leak based on synthetic aperture sonar (SAS) systems
.
Journal of Marine Science and Engineering
9
(
11
),
1273
.
Peng
X.
,
Anyaoha
U.
,
Liu
Z.
&
Tsukada
K.
2020
Analysis of magnetic-flux leakage (MFL) data for pipeline corrosion assessment
.
IEEE Transactions on Magnetics
56
(
6
),
1
15
.
Salkhordeh
M.
,
Mirtaheri
M.
&
Soroushian
S.
2021
A decision-tree-based algorithm for identifying the extent of structural damage in braced-frame buildings
.
Structural Control and Health Monitoring
28
(
11
),
e2825
.
Szegedy
C.
,
Liu
W.
,
Jia
Y.
,
Sermanet
P.
,
Reed
S.
,
Anguelov
D.
,
Erhan
D.
,
Vanhoucke
Vincent
&
Rabinovich
A.
2015
Going deeper with convolutions
. In:
Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition
, pp.
1
9
.
Wang
Y.
&
Zhang
R.
2014
In-pipe surface circular structured light 3D vision inspection system
.
Infrared and Laser Engineering
(
03
),
43
,
891
896
.
Wang
J. L.
,
Deng
Y. L.
,
Li
Y.
&
Zhang
X. G.
2020
A review on detection and defect identification of drainage pipeline
.
Science Technology and Engineering
20
(
33
),
13520
13528
.
Wang
D. C.
,
Tan
J. H.
,
Peng
S. G.
,
Zhong
Z. S.
,
Chen
G. Q.
&
Li
G. Q.
2021
Intelligent identification system of drainage pipelines defects based on deep learning model
.
Bulletin of Surveying and Mapping
67
(
10
),
141
145
.
Yeganeh
A.
,
Ahmadi
F.
,
Wong
Y. J.
,
Shadman
A.
,
Barati
R.
&
Saeedi
R.
2024
Shallow vs. deep learning models for groundwater level prediction: A multi-Piezometer data integration approach
.
Water, Air, & Soil Pollution
235
(
7
),
1
24
.
You
W. J.
,
Li
C.
&
Zhang
X. J.
2023a
Experimental research on concrete pipe joint defect inspection by using YOLOv5 machine learning model
.
Water & Wastewater Engineering
49
,
489
494
.
You
X. L.
,
Cai
Y. X.
,
Wang
H. A.
&
Yang
A. Q.
2023b
FEDDR: A practical intelligent detection system for underground drainage pipeline defects
.
Science Technology and Engineering
23
(
07
),
2932
2944
.
Zhou
F. Q.
,
Guo
S. Y.
&
Feng
J. Q.
2021
Pipeline video disease detection and monocular SLAM depth estimation research
.
Computer Knowledge and Technology
17
(
34
),
13
18
.
Zhou
Q. Q.
,
Liu
H. L.
,
Chen
W. F.
,
Teng
S.
&
Chen
G. F.
2022
Drainage pipeline defects detection and semantic segmentation based on deeplabv3 +
.
China Water & Wastewater
38
(
13
),
22
27
.
This is an Open Access article distributed under the terms of the Creative Commons Attribution Licence (CC BY 4.0), which permits copying, adaptation and redistribution, provided the original work is properly cited (http://creativecommons.org/licenses/by/4.0/).