Pipe network defect classification method based on regularization
By adopting a regularization-based method in pipeline network defect classification, combining feature extraction and classification technology of CNN and ResNet101, the RegMixup data enhancement strategy was introduced, which solved the problem of insufficient accuracy of the existing semi-supervised learning algorithm on unlabeled data sets, and achieved higher classification accuracy and robustness.
Patent Information
- Application Number
- CN202510365104.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-26
- Publication Date
- 2025-06-17
AI Technical Summary
When used in completely unlabeled urban underground drainage network datasets, the existing semi-supervised learning algorithms are insufficient, the actual classification effect is not ideal, and it is difficult to promote and apply.
Using the regularization-based pipeline defect classification method, by constructing the image data set of urban underground drainage pipeline networks, using CNN for feature extraction, and extracting and classifying pipeline defect features through ResNet101, data enhancement and regularization strategies, such as RegMixup, are introduced to generate diversified synthetic samples to reduce overfitting.
Under the training of insufficient pipeline image data, the pipeline defects can be accurately classified, and the classification accuracy and robustness can be improved, especially when facing complex pipeline defects, which significantly improves the classification effect.
Smart Images

Figure CN120164040A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of pipeline network defect classification, and relates to a pipeline network defect classification method based on regularization. Background Art
[0002] With the rapid development of artificial intelligence, more and more fields have begun to apply deep learning algorithms to help solve more practical problems in life. The drainage pipeline network is the core of urban infrastructure, and its stable operation is crucial for the quality of urban life and the ecological environment. With the gradual aging of the sewer pipeline network and the acceleration of the urbanization process, structural and functional defects are likely to occur in the sewer pipes, threatening the drainage capacity and residential safety. Applying artificial intelligence technology to the defect classification of drainage pipeline networks can assist managers in quickly and accurately identifying, greatly reducing the workload, and having very important practical significance for the intelligent management of urban pipeline networks.
[0003] Marking a large amount of pipeline network image data requires huge labor costs. At present, the semi-supervised classification algorithms proposed for a large amount of unlabeled data are all experimented on public data sets. Some people have tried to apply semi-supervised learning algorithms to process a large amount of unlabeled urban pipeline network data sets. However, due to inappropriate operation methods, the accuracy of the actual classification results is insufficient, the classification effect is not ideal, and it is difficult to promote and apply. Summary of the Invention
[0004] The purpose of the present invention is to provide a pipeline network defect classification method based on regularization, which solves the problem that the existing semi-supervised learning algorithm has insufficient accuracy and unsatisfactory actual classification effect when actually applied to a completely unlabeled urban underground drainage pipeline network data set.
[0005] The technical solution adopted by the present invention is that the pipeline network defect classification method based on regularization is implemented according to the following steps: Step 1: Construct an image data set of urban underground drainage pipeline networks; Step 2: Use an image preprocessing module to complete the annotation of part of the data; Step 3: Input the unannotated data into a CNN for feature extraction, and map it to a feature space through a projection head to obtain a deep feature representation of pipeline network defects; Step 4: Use ResNet101 to extract and classify pipeline network defect features; Step 5: Introduce a data augmentation and regularization strategy to obtain the final pipeline network defect classification result.
[0006] The beneficial effects of the present invention are as follows. An improved drainage pipe network defect classification network RegMixup is adopted. This RegMixup generates diverse synthetic samples through the joint augmentation of labeled data and unlabeled data, which can not only reduce the overfitting problem but also enable the model to adapt to more different sample variations during the training process. Specifically, 1) based on the semi-supervised learning algorithm and combined with the regularization technique, the present invention can accurately classify the pipe network defects with insufficient training of pipe network image data, and complete the classification of sedimentation, misalignment, rupture, and obstacle defect types of pipe network defects, with good results; 2) the method of the present invention requires less labeled data for pipe network image classification and has better classification results than the current method. Especially when facing complex pipe defects, it can improve the classification accuracy and robustness. BRIEF DESCRIPTION OF THE DRAWINGS
[0007] Figure 1 is the principle block diagram of the pipe network defect classification method based on regularization of the present invention; Figure 2 is the block diagram of the CNN feature classification structure adopted in the method of the present invention; Figure 3 is the ResNet10 network structure block diagram of the backbone network adopted in the method of the present invention; Figure 4 is an original image of a pipe network defect adopted in the method of the present invention; Figure 5 is another original image of a pipe network defect adopted in the method of the present invention; Figure 6 is for the method of the present invention Figure 4 and Figure 5 hybrid processing image of the two original images. DETAILED DESCRIPTION OF THE INVENTION
[0008] The present invention will be described in detail below with reference to the drawings and specific embodiments.
[0009] The pipe network defect classification method based on regularization of the present invention is implemented according to the following steps: Step 1: Construct an image dataset of the urban underground drainage pipe network to provide a data basis. Specifically, it includes two parts of data (both of these two data are based on this modeling): One part is that, through the CCTV collected videos of 62.9 kilometers of defective drainage pipes in a southern city of China in 2020, defect images are extracted from these videos to construct a dataset, and finally 2,397 dataset images are collected; through the proportion analysis of the defect types of the dataset images, the defect types are determined to be four types: sedimentation, offset, rupture and obstacles. For the above-mentioned CCTV collected videos, due to the influence of lighting conditions, camera equipment performance and shooting angles, some images have problems such as insufficient brightness, noise interference or blurring and defocusing, and data screening is required to ensure the quality of model input. The image brightness threshold screening method is used to clean the data, the sum of RGB pixel values is calculated to evaluate the exposure situation, and the experimentally determined threshold T is set to filter out the images with insufficient brightness; in addition, histogram equalization is applied to enhance some images with relatively low brightness but still containing effective defect information, so as to improve the feature extraction ability of the deep learning model.
[0010] Another part is to use the publicly available Danish sewer defect dataset Sewer-ML. (It should be noted that although there are certain differences in the platform openness and data acquisition methods between Denmark and domestic defects, this invention mainly focuses on defect classification and hardly considers the differences.) The dataset Sewer-ML comes from 1.3 million high-quality images in 75,618 videos carefully collected by three Danish water companies over nine years, covering 17 carefully defined defect categories. The dataset Sewer-ML provides diverse samples for model training, significantly improving the generalization ability of the model in different environments, especially performing well in dealing with complex backgrounds and data imbalance.
[0011] Step 2: Adopt an image preprocessing module to standardize the data input and enhance the data diversity, thereby improving the robustness of the model. The specific process is as follows: The above image dataset is divided into a training set and a validation set according to the ratio of 7:3, including four typical defect types common in pipelines: namely sedimentation, rupture, obstacles and offset; in order to ensure the quality of the dataset, the images of each defect type are manually screened and labeled, called labeled data, to maintain the balance and representativeness of the samples; all processed images are uniformly adjusted to a resolution of 480×360 pixels; then the images are fused and superimposed, the value of each pixel in the two images is multiplied by 0.5, and then the corresponding points are added to output a new image as the input of the subsequent semi-supervised transfer learning framework.
[0012] This step not only reduces the computational complexity but also eliminates the input instability problem that may be caused by resolution differences.
[0013] Step 3: Input the unlabeled data into the CNN for feature extraction and map it to the feature space through a projection head. What is obtained is the deep feature representation of the pipeline network defects, rather than the direct defect classification result. These features can be used for subsequent classification, clustering, or further semi-supervised transfer learning. The specific process is as follows: Refer to Figure 2 , the architecture of the CNN consists of a convolutional layer, an activation layer, a pooling layer, and a fully connected layer, aiming to efficiently extract features from the input image and perform defect classification. The CNN gradually learns the spatial features in the image through a multi-level feature extraction process and finally outputs a vector for classification. Specifically, the convolutional layer can efficiently capture the spatial information in the pipeline defect image through the local receptive field and weight sharing mechanism. The convolution operation uses a set of local filters to transform the features of the input image, and the pooling layer further reduces the data dimension and computational complexity. In each convolution-pooling operation, the output of the previous layer is processed by the convolution kernel and a more concise feature map is generated through the pooling operation. The primary convolutional layer mainly captures low-level features such as edges and textures; as the network depth increases, subsequent layers can extract more complex high-order features, thus providing rich depth information for the fully connected layer.
[0014] The CNN has the advantage of end-to-end training and can adaptively learn the features of defects from the original image, thus significantly improving the recognition ability and generalization ability of the model. Especially in the detection and classification of pipeline network defects, the CNN can effectively distinguish different types of defects, such as sedimentation, misalignment, rupture, and obstacle types, avoiding the subjectivity and limitations of manual feature selection.
[0015] Step 4: Use ResNet101 to extract and classify the pipeline network defect features. To improve the accuracy of pipeline network defect detection and classification, this step uses ResNet101 as the backbone network to extract and classify the pipeline network defect features. ResNet101 is a deep residual network that achieves efficient feature extraction through a 101-layer hierarchical structure. In its design, a residual learning block is introduced, which effectively solves the problem of gradient disappearance in deep networks, thus ensuring the transmission and optimization of deep features. The specific process is as follows: 4.1) The input of the model is the original image containing defects. After the preliminary feature map is extracted by the convolutional layer in Step 3, the feature map is downsampled through a 3×3 max pooling layer to further compress the spatial dimension and enhance the computational efficiency; at the same time, the data to be measured is divided into labeled data and unlabeled data (the labeled data has been classified and labeled in Step 2), and the original defect images with classification labels are enhanced; The specific steps for enhancing the original defect images with classification labels are as follows: 4.1.1) Geometric transformation enhancement: Randomly rotate the defect image (rotation angle range ±10 - 30°), scale it (0.8 - 1.2 times), and perform affine transformation (perspective change ±10°) to enhance the model's adaptability to different angles and scales; 4.1.2) Color perturbation enhancement: Adjust the brightness (±20%), contrast, saturation, and color jitter of the defect image to simulate different lighting conditions and improve the model's robustness to color changes; 4.1.3) Noise interference enhancement: Add Gaussian noise, salt-and-pepper noise, or slight motion blur to simulate signal interference in the actual acquisition environment and improve the model's tolerance to noise; 4.1.4) Edge enhancement processing: Use sharpening filtering, histogram equalization, or adaptive threshold methods to highlight the edge features of the defect and improve the model's sensitivity to the defect morphology.
[0016] 4.2) In the following residual module (here, the residual module refers to the Residual Block used in the ResNet network structure), the network sequentially passes through the feature extraction layers of four stages (Conv2_x to Conv5_x), where each stage contains multiple convolutional layers and batch normalization (Batch Normalization, BN) layers to gradually deepen the feature expression ability. Skip connections are introduced in the residual block, allowing the input features to bypass the convolutional layer and be directly passed to the subsequent layer. The number of channels of the input features is the same as that of the output features, and the spatial size (H×W) remains unchanged, ensuring the effective transmission of important information and reducing information loss.
[0017] 4.3) The output of the last layer of the residual module passes through a fully connected layer or a classifier to generate predictions for the defect categories.
[0018] Step 5: Introduce data augmentation and regularization strategies, such as RegMixup, to significantly alleviate the overfitting phenomenon and improve the model's generalization ability for complex defect scenarios, obtaining the final classification results of pipeline network defects. The specific process is as follows: 5.1) Perform joint regularization data augmentation on the original defect images enhanced in Step 4.1) and unlabeled data. The joint regularization enhancement strategy for labeled and unlabeled data is as follows: 5.1.1) Random horizontal flip, probability p = 0.5; 5.1.2) Randomly rotate [-15°, 15°] and randomly crop. First, scale the long side proportionally to 293, and then randomly crop to 256×256 with the filling mode of reflect; 5.1.3) Color perturbation (brightness, contrast, and saturation are all ±20%), probability p = 0.5; 5.1.4) Add Gaussian noise (standard deviation of 0.15) or Cutout, randomly occlude a 32×32 area with a probability p = 0.5; 5.1.5) Perform MixUp operation, where the weight λ follows a Beta(0.4, 0.4) distribution with a probability p = 0.5; 5.2) Input the dataset enhanced in step 5.1) into the ResNet101 training model, referring to Figure 3 , this ResNet101 training model contains two branches: a pre-trained model and a target model; among them, the pre-trained model provides feature extraction capabilities, and the target model optimizes parameters through transfer learning and semi-supervised strategies to achieve pipeline defect classification; There is no contradiction between the "semi-supervised transfer learning framework" and the "semi-supervised learning strategy" here. The two are combined to form a hybrid method. Semi-supervised learning involves training using labeled and unlabeled data, while transfer learning utilizes a pre-trained model and applies it to a new task, thereby reducing the dependence on data; 5.3) During the training process of the RegSSL model, the network weights are optimized through the BackPropagation algorithm (as Figure 1 shown), and the backbone network updates the weights and bias terms according to the gradient information of the loss function, gradually reducing the error between the predicted value and the actual value; To enhance the generalization ability of the RegSSL model and prevent overfitting, regularization techniques such as L2 regularization or Dropout are introduced during the training process, effectively improving the robustness of the model in different pipeline defect scenarios. The fully connected layer of the CNN integrates the features extracted by the convolutional layer into a compact representation for the final classification task. This design not only effectively reduces the computational cost but also enhances the performance accuracy and robustness of the RegSSL model in the defect classification task. Through this backbone network, the RegSSL model can efficiently perform classification tasks in various pipeline defect scenarios, showing excellent automated defect classification performance.
[0019] 5.4) The initial value of the target model is set the same as the pre-trained model in step 4. The data in the test dataset to be tested is fed into the pre-trained model and the target model in batches of 16 each. The extracted features are regularized by AKC, and the parameters of the target model are updated. Then, through the ARC regularization term, the distributions of the unlabeled data and the labeled data are made similar, and the parameters of the target model are updated; 5.5) The number of iterations of the backbone network of RegSSL is set to 500 times. The batch size fed into the model each time is 32. The SGD optimizer is used with a learning rate of 0.001, a default weight decay of 0.001, and a momentum rate of 0.9. The RegMixup weight factor: λM = 1, consistency regularization weight: λ C = 50, unlabeled data threshold: 0.7; Use the trained RegSSL model to infer the test dataset and calculate the classification accuracy; 5.6) Introduce a CPL pseudo-label controller to optimize the semi-supervised learning process (i.e., utilize the aforementioned "semi-supervised transfer learning framework"). At the initial stage of training, the CPL pseudo-label controller sets a relatively high pseudo-label confidence threshold (0.95), allowing only high-confidence unlabeled data to participate in training; as the number of training iterations increases, the CPL pseudo-label controller gradually reduces the threshold to 0.7, enabling more unlabeled data to be assigned pseudo-labels and participate in model training, thus realizing a pseudo-label learning strategy from simple to complex; 5.7) Based on the RegMixup method already used in steps 5.1) and 5.2), further optimize the regularization effect, enabling the model to obtain stronger generalization ability in the pipeline defect classification task, and effectively improving the generalization performance and classification accuracy of the model.
[0020] RegMixup is an improved version of the Mixup data augmentation method, aiming to improve the generalization ability of deep learning models through a regularization mechanism, and becoming a means of data augmentation by generating new training samples through linear interpolation. Specifically, Mixup performs weighted averaging on two samples x i and x j as well as their labels y i and y j to generate a new sample pair, and the expression is: , (1) where λ is a hyperparameter sampled from the Beta distribution, usually set within the interval [0, 1]. This method enables the model to learn the interpolation features between different data points by generating new training samples, thereby effectively alleviating overfitting and improving the model's generalization ability for unseen data.
[0021] Although Mixup performs well in many tasks, it has a potential problem: that is, although the overfitting problem of the model is alleviated, in some specific tasks such as those with high data noise or high model complexity, there may still be a certain risk of overfitting. To address this issue, RegMixup, as an improved method of Mixup, combines regularization techniques and further constrains the model complexity by adding a regularization term to the original Mixup loss function, thereby further improving the model's generalization ability.
[0022] The core idea of the RegMixup method is to add a regularization term on the basis of the traditional Mixup method to constrain the learning process of the model and reduce the overfitting phenomenon on the training set. In the standard Mixup, the loss function expression of the network model being trained is as follows: (2) where LCE represents the cross-entropy loss, is the prediction of the model for the interpolated sample , is its label, and λ is the mixing coefficient generated through the Beta distribution; RegMixup further optimizes the training process by adding L2 regularization or gradient penalty to the original loss function. Its role is to penalize overly complex parameter configurations of the model and avoid overfitting; this additional regularization term is added to the loss function, and the final loss function expression is as follows: (3) where α is the regularization coefficient, is the L2 norm, representing the penalty for the model parameters. This regularization term helps to limit the complexity of the model and enables it to maintain strong robustness when facing new samples.
[0023] The reason for choosing RegMixup rather than other common methods (such as GAN data augmentation) in this step lies in its unique simplicity and efficiency. RegMixup generates synthetic samples through linear interpolation, significantly enhancing data diversity while maintaining a low computational complexity. Although the GAN method can generate complex samples, it usually requires higher computational resources and may introduce problems such as mode collapse.
[0024] Refer to Figure 4 , Figure 5 , Figure 6 , which is a schematic diagram of the action mechanism of RegMixup, Figure 4 and 5 are two original images of pipeline network defects, Figure 6It is a blended image of two original images. The purpose is to provide information on different defects and background features. By using the blended image as a training sample, it can enhance the model's ability to handle complex environments and data imbalance problems, thereby achieving a more stable and efficient defect recognition effect. The greatest advantage of RegMixup lies in its significantly enhancing the model's generalization ability for blurred or noisy inputs, forcing the model to learn a smoother decision boundary, thus effectively reducing the model's overfitting problem to noise and significantly improving the model's performance in semi-supervised learning. The proportion of synthetic samples in RegMixup is a key factor in enhancing the model's performance. Generally, setting the proportion of synthetic samples to 50% can achieve a balance between data diversity and training stability. The RegMixup method enhances the model's performance through synthetic samples (i.e., new samples generated by linearly interpolating two samples). Setting the proportion of synthetic samples to 50% is a reasonable choice because it effectively increases the diversity of the dataset, enabling the model to learn more transformations and features, thereby enhancing the model's generalization ability. A high proportion helps to enhance the learning ability of scarce class features, while too low a proportion may limit the model's exploration of the data distribution. A reasonable proportion setting makes the model exhibit higher robustness and generalization ability in classification tasks, especially showing significant advantages when dealing with defect classification tasks with imbalanced data and complex backgrounds.
[0025] To verify the effectiveness of the present invention, further improve the classification accuracy of pipeline network defect detection, and enhance the model's generalization ability, in combination with the overall steps of the present invention, six specific embodiments are referred to according to different experimental methods. Each embodiment includes experimental data or simulation data, and the influence of the key technologies of the present invention on the detection effect is analyzed through comparative experiments.
[0026] Embodiment 1 Implement according to the method step process of the present invention described above, and verify the influence of the RegMixup regularization data augmentation method adopted by the method of the present invention on the pipeline network defect classification model.
[0027] (1) Experimental background: In the pipeline network defect classification task, the labeled data is usually scarce, and data augmentation is an important means to improve the model's generalization ability. This experiment studied the RegMixup regularization data augmentation method and compared it with a baseline model without using RegMixup to verify the effectiveness of RegMixup in improving the classification accuracy.
[0028] (2) Experimental settings: 1) Dataset: Select the detection image data of a certain drainage pipeline network, including four typical defects: sedimentation, offset, rupture, and obstacle, with a total of 10,000 images, which are divided into a training set and a test set according to a ratio of 7:3; 2) Data augmentation strategy: On the basis of standard data augmentation (flipping, rotation, cropping), the RegMixup method is introduced to fuse labeled data and unlabeled data through linear interpolation; 3) Training model: Use ResNet-101 as the backbone network, adopt a semi-supervised transfer learning framework, train for 500 iterations, learning rate 0.001, optimizer SGD, momentum rate 0.9, L2 regularization coefficient 0.001; 4) Evaluation metrics: Use accuracy, recall, precision, and F1-score.
[0029] (3) Experimental results: The classification accuracy on the test set reaches 94.08%, significantly better than the comparison method. In addition, the RegMixup method can effectively improve the recognition ability of small-sample categories and reduce the impact of data imbalance problems, as shown in Table 1 below.
[0030] Table 1. Comparison of different experimental results in Example 1 of the present invention
[0031] Example 2 Implement according to the steps of the method of the present invention described above, and evaluate the role of the CPL pseudo-label control strategy adopted by the method of the present invention in semi-supervised learning.
[0032] (1) Experimental background: This experiment studies the influence of the CPL pseudo-label control strategy (Confidence-based PseudoLabeling, CPL) in semi-supervised learning. CPL gradually expands the training set by dynamically adjusting the confidence threshold to optimize the semi-supervised learning effect.
[0033] (2) Experimental settings: 1) Dataset: Use the same dataset as in Example 1.
[0034] 2) Training strategy: Introduce a CPL pseudo-label controller. At the beginning of training, set a relatively high confidence threshold (0.95), and only allow unlabeled data with high confidence to participate in training. Subsequently, gradually reduce the threshold to 0.7 to assign pseudo-labels to more unlabeled data.
[0035] 3) Experimental comparison: a. Without CPL pseudo-label controller: All unlabeled data are directly used for training; b. With CPL pseudo-label controller: Dynamically adjust the screening strategy of unlabeled data.
[0036] 4) Training parameters: backbone network ResNet-101, optimizer SGD, learning rate 0.001, training for 500 times.
[0037] (3) Experimental results: Without the CPL pseudo-label controller: the accuracy of the model on the test set is 85.23%, and the F1 value is 80.51%; With the CPL pseudo-label controller: the accuracy of the model is increased to 94.08%, and the F1 value is increased to 93.57%, as shown in Table 2 below.
[0038] Table 2. Comparison of different experimental results in Example 2 of the present invention
[0039] Example 3 Implement according to the steps of the method of the present invention described above, and analyze the influence of the method of the present invention and different data augmentation methods (MixUp, RegMixup, no augmentation) on model training.
[0040] (1) Experimental background: In deep learning classification tasks, data augmentation is an important means to improve the generalization ability of the model. This experiment compared the influence of different data augmentation strategies on model performance, including: 1) No data augmentation (Baseline); 2) Conventional data augmentation (flipping, rotating, cropping); 3) MixUp; 4) RegMixup.
[0041] (2) Experimental settings: 1) Dataset: Sewer-ML (including 4 types of typical defects, sedimentation, offset, rupture, obstacle), divided into training set and test set according to the ratio of 7:3; 2) Backbone network: ResNet-101; 3) Training parameters: Number of iterations: 500; Learning rate: 0.001; Batch size: 32; Use SGD optimizer (momentum 0.9, weight decay 0.001).
[0042] (3) Experimental results are shown in Table 3 below.
[0043] Table 3. Comparison of different experimental results in Example 3 of the present invention
[0044] (4) Conclusion: RegMixup has the best effect among data augmentation methods and improves the classification accuracy. It shows that this method can effectively utilize unlabeled data and improve the robustness of the model.
[0045] Example 4 Implement according to the steps of the method of the present invention described above, and verify the classification performance of the semi-supervised learning strategy (RegMixup+CPL) adopted by the method of the present invention in the case of limited labeled data.
[0046] (1) Experimental background: This experiment explores the influence of hyperparameters (learning rate, RegMixup weight λM) on the model performance and seeks the optimal parameter configuration.
[0047] (2) Experimental settings - Adjust hyperparameters: 1) Learning rate: 0.0005, 0.001, 0.002; 2) RegMixup weight λM: 0.5, 1, 2; 3) Evaluation criterion: Classification accuracy (Accuracy).
[0048] (3) Experimental results are shown in Tables 4 and 5 below.
[0049] Table 4. Comparison of different experimental results of Example 4 of the present invention
[0050] Table 5. Comparison of different experimental results of Example 4 of the present invention
[0051] (4) Conclusion: 1) The optimal performance is achieved with a learning rate of 0.001 and RegMixup λM = 1.
[0052] 2) It shows that appropriate selection of hyperparameters plays an important role in improving the model performance.
[0053] Example 5 Implement according to the steps of the method of the present invention described above, and verify the ablation experiment effect of the method of the present invention.
[0054] (1) Experimental background: To verify the contribution of each module to the model, this experiment conducts ablation experiments, removing different modules in turn and observing the performance changes.
[0055] (2) Experimental settings: 1) Baseline (complete model); 2) Remove the consistency regularization term; 3) Remove RegMixup; 4) Only use labeled data; 5) Remove multi-scale feature extraction.
[0056] (3) Experimental results are shown in Table 6 below.
[0057] Table 6. Comparison of experimental results between Example 5 of the present invention and existing methods
[0058] (4)Conclusion: Consistency regularization and RegMixup have a great impact on the model performance. The method of the present invention has the best performance in the complete configuration, proving the effectiveness of the synergistic effect of each module.
[0059] Example 6 Implement according to the steps of the method of the present invention described above, and compare the performance of the method of the present invention with other methods using different transfer learning strategies in pipeline defect detection.
[0060] (1)Experimental background: This experiment studies the role of semi-supervised transfer learning (SSL) in defect classification and compares it with traditional supervised learning.
[0061] (2)Experimental settings: 1) Dataset: 50% labeled data + 50% unlabeled data.
[0062] 2) Comparison methods: a. Only supervised learning (training only with labeled data); b. Semi-supervised learning (SSL); c. RegSSL (the method of the present invention).
[0063] 3) Training parameters: a. Number of iterations: 500; b. Learning rate: 0.001; c. Use SGD optimizer.
[0064] (3)Experimental results are shown in Table 7 below.
[0065] Table 7. Comparison of experimental results between Example 6 of the present invention and existing methods
[0066] (4)Conclusion: After adopting the semi-supervised learning framework, the classification performance has been greatly improved. The method of the present invention (RegSSL) is superior to traditional SSL and can make full use of unlabeled data.
Claims
1. A regularized pipeline network defect classification method, characterized in that: The implementation is carried out according to the following steps: Step 1, construct an image dataset of the urban underground drainage network; Step 2: Use the image preprocessing module to complete the labeling of some data; Step 3: Input the unlabeled data into CNN for feature extraction and map it to the feature space through the projection head to obtain the deep feature representation of the pipeline network defects; Step 4: Use ResNet101 to extract and classify pipeline network defect features; Step 5: Introduce data enhancement and regularization strategies to obtain the final pipeline network defect classification results.
2. The regularization-based pipeline network defect classification method according to claim 1 is characterized in that: In step 1, by analyzing the proportion of defect types in the data set, the defect types are divided into four types: deposition, dislocation, rupture and obstacle; The image brightness threshold screening method is used to clean the data. The sum of RGB pixel values is calculated to evaluate the exposure, and an experimentally determined threshold T is set to filter images with insufficient brightness. In addition, histogram equalization is applied to enhance some images with low brightness but still containing valid defect information.
3. The regularization-based pipeline network defect classification method according to claim 1 is characterized in that: In step 2, the specific process is: The image dataset obtained in step 1 is divided into a training set and a validation set in a ratio of 7:3, which contains four typical defect types commonly found in pipelines: deposition, rupture, obstruction, and misalignment. The images of each type of defect were manually screened and annotated to keep the samples balanced and representative; All processed images were uniformly resized to a resolution of 480 × 360 pixels; The images are then fused and superimposed, the value of each pixel in the two images is multiplied by 0.5, and the corresponding points are added together to output a new image as the input for the subsequent semi-supervised transfer learning framework.
4. The regularization-based pipeline network defect classification method according to claim 1 is characterized in that: In step 3, the specific process is: CNN gradually learns the spatial features in the image through a multi-level feature extraction process and finally outputs a vector for classification; the primary convolutional layer mainly captures low-level features; as the network depth increases, subsequent layers extract more complex high-order features, providing rich depth information for the fully connected layer.
5. The regularization-based pipeline network defect classification method according to claim 1 is characterized in that: In step 4, ResNet101 is used as the backbone network to extract and classify pipeline network defect features. The specific process is: 4.1) The model input is the original image containing defects. After the preliminary feature map is extracted by the convolution layer in step 3, the feature map is downsampled by the 3×3 maximum pooling layer. At the same time, the data to be tested is divided into labeled data and unlabeled data, and the original defect image with classification labels is enhanced. 4.2) In the following residual module, the network goes through four stages of feature extraction layers in sequence, each of which contains multiple convolutional layers and batch normalization layers; 4.3) The output of the last layer of the residual module passes through a fully connected layer or a classifier to generate a prediction of the defect category.
6. The regularization-based pipeline network defect classification method according to claim 5 is characterized in that: In step 4.1), the specific steps for enhancing the original defect image that has been classified and marked are: 4.1.1) Geometric transformation enhancement: random rotation, scaling and affine transformation of defect images; 4.1.2) Color perturbation enhancement: adjust the brightness, contrast, saturation and color jitter of the defect image to simulate different lighting conditions and improve the model's robustness to color changes; 4.1.3) Noise interference enhancement: Add Gaussian noise, salt and pepper noise or slight motion blur to simulate the signal interference in the actual acquisition environment and improve the model's tolerance to noise; 4.1.4) Edge enhancement processing: Use sharpening filtering, histogram equalization or adaptive threshold method to highlight the edge features of defects and improve the model's sensitivity to defect morphology.
7. The regularization-based pipeline network defect classification method according to claim 1 is characterized in that: In step 5, the specific process is: 5.1) performing joint regularization data enhancement on the defect original image enhanced in step 4.1) and the unlabeled data; 5.2) Input the enhanced data set in step 5.1) into the ResNet101 training model, which includes two branches: the pre-training model and the target model; 5.3) During the training process of the RegSSL model, the network weights are optimized through the back-propagation algorithm, and the backbone network updates the weights and bias terms according to the gradient information of the loss function, gradually reducing the error between the predicted value and the actual value; Regularization techniques were introduced during the training process; 5.4) The initial value of the target model is the same as the pre-trained model setting in step 4. The data in the test data set is fed into the pre-trained model and the target model in batches with a batch size of 16. The extracted features are regularized by AKC, and the parameters of the target model are updated. The distribution of the unlabeled data is similar to that of the labeled data through the ARC regularization term, and the parameters of the target model are updated. 5.5) The number of iterations of the backbone network of RegSSL is set to 500, the batch size fed into the model each time is 32, the SGD optimizer is used, the learning rate is 0.001, the weight decay defaults to 0.001, the momentum rate is 0.9, and the RegMixup weight factor is: λ M =1, consistency regularization weight: λ C =50, unlabeled data threshold: 0.7; use the trained RegSSL model to infer the test data set and calculate the classification accuracy; 5.6) The CPL pseudo-label controller is introduced to optimize the semi-supervised learning process. In the early stage of training, the CPL pseudo-label controller sets a higher pseudo-label confidence threshold and only allows high-confidence unlabeled data to participate in training; As the number of training iterations increases, the CPL pseudo-label controller gradually lowers the threshold, allowing more unlabeled data to be assigned pseudo-labels and participate in model training, thus achieving a pseudo-label learning strategy from simple to complex. 5.7) Based on the RegMixup method used in steps 5.1) and 5.2), the regularization effect is further optimized so that the model can obtain stronger generalization ability in the pipeline defect classification task, effectively improving the generalization performance and classification accuracy of the model.
8. The regularization-based pipeline network defect classification method according to claim 7 is characterized in that: In step 5.1), the joint regularization enhancement strategy for labeled data and unlabeled data is as follows: 5.1.1) Randomly flip left and right with probability p=0.5; 5.1.2) Randomly rotate [-15°, 15°] and randomly crop, first scale the long side to 293, then randomly crop to 256×256, and fill mode is reflect; 5.1.3) Color perturbation, including brightness, contrast, and saturation, with probability p=0.5; 5.1.4) Add Gaussian noise or Cutout with a standard deviation of 0.15 and randomly occlude a 32×32 area with a probability of p=0.5; 5.1.5) Perform MixUp operation, the weight λ follows Beta(0.4,0.4) distribution with probability p=0.5.