Method, system and equipment for comprehensive pipeline corridor disease identification based on PSPNet and Bayesian optimization
Through the PSPNet and Bayesian optimization method, a model for identifying integrated pipeline diseases was established, which solved the problem of inaccurate disease identification in the prior art, and achieved high-precision disease detection and positioning.
Patent Information
- Application Number
- CN202410013495.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-01-04
- Publication Date
- 2025-02-28
- Estimated Expiration
- 2044-01-04
AI Technical Summary
The prior art is difficult to accurately identify and locate diseases in the integrated pipeline corridor, and is easily disturbed by uneven light and on-site obstacles, resulting in unsatisfactory detection results.
The integrated pipeline disease recognition method based on PSPNet and Bayesian optimization is adopted to acquire and label disease image data, and a PSPNet-based recognition model UUTNet is established, and the model hyperparameters are optimized using Bayesian optimization algorithm to improve the accuracy of disease detection.
The accuracy of disease detection in comprehensive pipeline corridors is improved, and the location and area of diseases can be accurately measured, providing accurate disease data for subsequent structural safety assessment and maintenance.
Smart Images

Figure CN117808790B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of integrated pipe gallery defect identification, and specifically to an integrated pipe gallery defect identification method, system and equipment based on PSPNet and Bayesian optimization. Background Art
[0002] The utility corridor is an underground artificial structure that can accommodate and protect various pipelines and cables. In addition, the utility corridor also provides an artificial passage for inspection and maintenance. China has built nearly 80% of the world's utility corridors. As the service life of the utility corridors increases, the utility corridor structure will have defects under the action of load and material aging. If the disease detection and maintenance are not carried out in time, due to the existence of underground dangerous pipelines, the damage of the utility corridor structure is more likely to cause major accidents and secondary disasters. Therefore, regular inspection of the utility corridor and timely handling of defects are particularly important.
[0003] Although the utility tunnel has manual inspection channels, the manual inspection effect is not ideal. It cannot accurately outline the outline, size and location of the defect, making it difficult to conduct subsequent structural safety assessment and maintenance. Traditional image processing methods extract defects through pixel changes, lacking sufficient extraction of the background and features of defect information in the image. Therefore, in on-site inspections, they are easily affected by uneven lighting, excessive brightness, and on-site obstacles during image acquisition. To this end, we propose a utility tunnel defect recognition method, system and equipment based on PSPNet and Bayesian optimization. Summary of the invention
[0004] The purpose of the present invention is to provide a method, system and equipment for identifying defects in a comprehensive pipe corridor based on PSPNet and Bayesian optimization, which improves the detection accuracy of defects in the comprehensive pipe corridor, facilitates the accurate measurement of the location and area of the defects, and provides accurate defect data for the subsequent safety assessment and maintenance of the pipe corridor structure.
[0005] To achieve the above object, the present invention provides the following technical solution: a method for identifying pipeline corridor defects based on PSPNet and Bayesian optimization, comprising the following steps:
[0006] S1: Obtain images of the normal state and defects of the utility corridor to form a preliminary dataset of defective images of the utility corridor;
[0007] S2: Classify the diseases contained in the acquired preliminary disease image data set, and then perform semantic segmentation and annotation of disease pixels on the images containing the diseases to obtain an annotation file in JSON format;
[0008] S3: The obtained preliminary disease image dataset is divided into a training dataset, a validation dataset, and a test dataset in a ratio of 7:2:1. The images of the training dataset, validation dataset, and test dataset are all augmented using a unified data enhancement method to finally form a disease image dataset.
[0009] S4: Establish the integrated pipeline corridor disease identification model UUTNet based on PSPNet;
[0010] S5: Set the initial value of the hyperparameter combination of the UUTNet model, input the training data set and the validation data set obtained in S3 into the established UUTNet model for training, and obtain the hyperparameters that make the model training iterative converge. If it does not converge, modify the hyperparameter values until convergence;
[0011] S6: According to the hyperparameter combination value of the model training iteration convergence, set the hyperparameter optimization value range of Bayesian optimization; use the Bayesian optimization algorithm to optimize the hyperparameter value of the UUTNet model to obtain the optimal hyperparameter combination value that makes the model performance best;
[0012] S7: Reset the optimal combination value of the hyperparameters obtained in S6 as the hyperparameters of the UUTNet model, repeat S5, and obtain the model weight file;
[0013] S8: Using the model weight file obtained in S7, the test data set in the disease image data set obtained in S3 is input into the integrated pipeline corridor recognition model UUTNet model for analysis, and the disease recognition result M is obtained and recorded.
[0014] Furthermore, the defects in S2 are divided into three categories: cracks, corrosion and leakage.
[0015] Furthermore, S3 adopts a unified data enhancement method for data expansion, specifically: for each image in the training data set, the validation data set and the test data set, an image enhancement method including contrast enhancement, brightness enhancement, horizontal flipping, 180-degree rotation, salt and pepper noise and Gaussian noise is adopted to expand the number of images to seven times the original number.
[0016] Furthermore, in S4, a comprehensive pipeline corridor disease identification model UUTNet based on PSPNet is established, and the specific method is as follows:
[0017] (1) In the feature extraction module of the model skeleton PSPNet network, the pre-trained residual module ResNet50 is used to replace the CNN module, and the spatial-channel attention mechanism CBAM is added to the last layer of each bottleneck module of ResNet50;
[0018] (2) In the multi-scale feature extraction module of the model skeleton PSPNet network, the hybrid hole convolution module HDC is connected in parallel with the original pyramid pooling module PPM;
[0019] (3) The feature map output by the feature extraction module, the feature map output by the PPM module, and the feature map output by the HDC module are connected by channel, and finally the result map is output after 1×1 convolution;
[0020] (4) The loss function of the PSPNet-based integrated pipeline corridor disease identification model UUTNet adopts the cross entropy loss function;
[0021] loss(p t )=-α t (1-p t ) γ log(p t )
[0022] Among them, t represents different sample categories, α t Indicates that the corresponding category sample is taken as 0.25, γ is taken as 2, and p t Represents the probability value of the t-th class sample after softmax output;
[0023] (5) The evaluation indicators of the PSPNet-based integrated pipeline corridor defect identification model UUTNet include model mean intersection over Union (MIoU), accuracy, and F1-score.
[0024] Furthermore, the initial values of the hyperparameter combination of the UUTNet model are set in S5, as follows:
[0025] The initial value of the learning rate LR is 0.0001;
[0026] The learning rate decay Lr_decay_gamma value is 0.9;
[0027] The input model image size Image_size is 640;
[0028] Enter the batch size Batch as 4;
[0029] During the model training process, the ratios of neurons randomly dropped twice were 0.3 and 0.15, respectively;
[0030] The optimizer is Adam, the training epoch is set to 200, and the stop_epoch of the early stopping function is set to 30.
[0031] Furthermore, in S6, the Bayesian optimization algorithm is used to optimize the hyperparameter values of the UUTNet model. The specific method is as follows:
[0032] The stopping criterion of Bayesian hyperparameter optimization, that is, the number of iterations is set to 8, and the objective function of Bayesian optimization is the MIoU value of the validation set:
[0033] (1): Enter the stopping criteria of the optimization algorithm, for example, the number of iterations;
[0034] (2): Select the hyperparameter combination to be optimized;
[0035] (3): Initialize the sampling points and calculate the mean and variance;
[0036] (4): Establish a Gaussian process prior model;
[0037] (5): Obtain the maximum expected value of the objective function and extract related hyperparameters;
[0038] (6): Determine whether the stopping criteria are met. If not, repeat (4) to (6);
[0039] (7): Output the final hyperparameter and model weight files.
[0040] Furthermore, the hyperparameter combination that needs to be optimized in S6 includes the learning rate LR, the learning rate decay factor LR_decay, the input model image size Image_size, the input batch number Batch, and the ratio of neurons randomly dropped twice during the model training process Drop_rate_1 and Drop_rate_2.
[0041] Furthermore, the disease recognition result M in S8 includes the type of disease and the pixel distribution of the disease in the image.
[0042] According to one aspect of the present invention, the present invention provides a comprehensive pipe gallery disease identification system based on PSPNet and Bayesian optimization, comprising:
[0043] Acquisition unit: used to acquire images of the normal state and defects of the integrated pipe gallery, forming a preliminary dataset of images of defects in the integrated pipe gallery;
[0044] Classification and annotation unit: used to classify the diseases contained in the acquired preliminary data set of disease images, and then perform semantic segmentation and annotation of disease pixels on the images containing diseases to obtain an annotation file in JSON format;
[0045] Data segmentation and expansion unit: used to divide the acquired preliminary disease image data set into a training data set, a verification data set and a test data set in a ratio of 7:2:1, and use a unified data enhancement method to expand the images of the training data set, verification data set and test data set, and finally form a disease image data set;
[0046] Model building unit: used to establish the comprehensive pipeline corridor disease identification model UUTNet based on PSPNet;
[0047] Training unit: used to set the initial value of the hyperparameter combination of the UUTNet model, input the training data set and verification data set obtained in S3 into the established UUTNet model for training, and obtain the hyperparameters that make the model training iterative converge. If it does not converge, modify the hyperparameter values until convergence;
[0048] Optimization unit: used to set the hyperparameter optimization value range of Bayesian optimization according to the hyperparameter combination value of model training iteration convergence; use Bayesian optimization algorithm to optimize the hyperparameter value of UUTNet model to obtain the optimal hyperparameter combination value that makes the model performance best;
[0049] Weight file output unit: used to reset the optimal combination value of hyperparameters obtained in S6 as the hyperparameters of the UUTNet model, repeat S5, and obtain the model weight file;
[0050] Analysis unit: used to use the model weight file obtained by S7 to input the test data set in the disease image data set obtained by S3 into the integrated pipeline corridor recognition model UUTNet model for analysis, obtain the disease recognition result M and record it.
[0051] According to another aspect of the present invention, the present invention provides a terminal device, including a memory, a processor, and a computer program stored in the memory and capable of running on the processor, characterized in that the memory stores a computer program capable of running on the processor, and when the processor loads and executes the computer program, the method for identifying integrated pipe corridor defects based on PSPNet and Bayesian optimization is adopted.
[0052] The present invention has at least the following beneficial effects:
[0053] 1. The present invention provides an accurate and efficient disease identification method for integrated pipeline corridor diseases based on PSPNet and Bayesian optimization, which improves the detection accuracy of integrated pipeline corridor diseases, is conducive to the accurate measurement of disease location and area, and provides accurate disease data for subsequent safety assessment and maintenance of pipeline corridor structures.
[0054] 2. The ResNet-50 structure in the present invention replaces the original CNN feature extraction network of the PSPNet model, avoiding gradient vanishing and explosion, effectively increasing the network depth and improving the performance of the model.
[0055] 3. The present invention adds a spatial-channel attention mechanism to the last layer of each bottleneck module of ResNet, which can capture the distribution relationship between various diseases and enhance the feature extraction of image disease areas.
[0056] 4. The present invention adds a branch of a hybrid dilated convolution module after the feature extraction layer to further increase the global and local feature extraction in the receptive field enhancement feature map;
[0057] 5. The present invention uses the Bayesian optimization algorithm to obtain the optimal hyperparameter combination of the model, further improving the detection accuracy of pipeline corridor diseases.
[0058] Of course, any product implementing the present invention does not necessarily need to achieve all of the advantages described above at the same time. BRIEF DESCRIPTION OF THE DRAWINGS
[0059] Figure 1 is a flow chart of the identification method of the present invention;
[0060] Figure 2 A network structure diagram of the identification method of the present invention;
[0061] Figure 3 This is a schematic diagram of the comparison of the identification method of the present invention and the traditional identification method;
[0062] Figure 4 This is a schematic diagram of the test results of comparing the recognition method of the present invention with the traditional recognition method;
[0063] Figure 5 Schematic diagram of image data classification and labeling in an embodiment of the present invention. DETAILED DESCRIPTION
[0064] The following will be combined with the drawings in the embodiments of the present disclosure to clearly and completely describe the technical solutions in the embodiments of the present disclosure. Obviously, the described embodiments are only part of the embodiments of the present disclosure, rather than all the embodiments. Based on the embodiments in the present disclosure, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present disclosure.
[0065] See also Figure 1-5 , the present invention provides a technical solution: a comprehensive pipeline corridor disease identification method based on PSPNet and Bayesian optimization, including:.
[0066] S1: Use a high-resolution optical camera to inspect the power compartment, thermal compartment, water compartment and integrated compartment of the integrated pipe gallery and take photos of the internal and external defects of the corridor to obtain images of the integrated pipe gallery in normal state and with defects, forming the initial dataset of the integrated pipe gallery defect images;
[0067] S2: The defects contained in the preliminary dataset of defect images obtained in S1 are divided into three categories: cracks, corrosion, and leakage. Labelme software is used to perform semantic segmentation and annotation of defect pixels on the images containing the defects to obtain an annotation file in JSON format.
[0068] S3: The preliminary disease image dataset obtained in S2 is divided into a training dataset, a validation dataset, and a test dataset in a ratio of 7:2:1. The images of the training dataset, validation dataset, and test dataset are all expanded using a unified data enhancement method to finally form a disease image dataset.
[0069] For each image in the training data set, validation data set and test data set, image enhancement methods including contrast enhancement, brightness enhancement, horizontal flip, 180-degree rotation, salt and pepper noise and Gaussian noise were used to expand the number of images to seven times the original number.
[0070] S4: Establish the integrated pipeline corridor disease identification model UUTNet based on PSPNet. The specific method is as follows:
[0071] (1): The PSPNet-based integrated pipeline disease recognition model UUTNet uses a pre-trained residual module ResNet50 to replace the CNN module in the feature extraction module of the model skeleton PSPNet network, and adds a spatial-channel attention mechanism CBAM to the last layer of each bottleneck module of ResNet50;
[0072] (2): In the multi-scale feature extraction module of the model skeleton PSPNet network, the hybrid hole convolution module HDC is connected in parallel with the original pyramid pooling module PPM;
[0073] (3): The feature map output by the feature extraction module, the feature map output by the PPM module, and the feature map output by the HDC module are connected by channel, and finally the result map is output after 1×1 convolution;
[0074] (4): The loss function of the PSPNet-based integrated pipeline corridor disease identification model UUTNet adopts the cross entropy loss function;
[0075] loss(p t )=-α t (1-p t ) γ log(pt )
[0076] Among them, t represents different sample categories, α t Indicates that the corresponding category sample is taken as 0.25, γ is taken as 2, and p t Represents the probability value of the t-th class sample after softmax output;
[0077] (5): The evaluation indicators of the PSPNet-based integrated pipeline corridor disease identification model UUTNet include model mean intersection over Union (MIoU), accuracy, and F1-score.
[0078] S5: Set the initial value of the hyperparameter combination of the UUTNet model, input the training data set and the verification data set in the disease image data set obtained in S3 into the UUTNet model established in S4 for training, and obtain the hyperparameters that make the model training iterative converge. If it does not converge, modify the hyperparameter values until convergence;
[0079] Among them, the initial values of the hyperparameter combination of the UUTNet model are set according to experience, including the initial value of the learning rate LR is 0.0001, the learning rate decay Lr_decay_gamma is 0.9, the input model image size Image_size is 640, the input batch number Batch is 4, the proportion of neurons randomly dropped twice during the model training process Drop_rate_1 and Drop_rate_2 are 0.3 and 0.15 respectively, the optimizer is Adam, the training epoch is set to 200, and the cutoff stop_epoch of the early stopping function is set to 30;
[0080] S6: According to the hyperparameter combination value of the model training iteration convergence, set the hyperparameter optimization value range of Bayesian optimization; use the Bayesian optimization algorithm to optimize the hyperparameter value of the UUTNet model to obtain the optimal hyperparameter combination value that makes the model performance best;
[0081] The specific steps of the Bayesian optimization algorithm are as follows:
[0082] (1): Enter the stopping criteria of the optimization algorithm, for example, the number of iterations;
[0083] (2): Select the hyperparameter combination to be optimized;
[0084] (3): Initialize the sampling points and calculate the mean and variance;
[0085] (4): Establish a Gaussian process prior model;
[0086] (5): Obtain the maximum expected value of the objective function and extract related hyperparameters;
[0087] (6): Determine whether the stopping criteria are met. If not, repeat (4) to (6);
[0088] (7): Output the final hyperparameter and model weight files.
[0089] The stop annotation of Bayesian hyperparameter optimization, that is, the number of iterations is set to 8 times, and the objective function of Bayesian optimization is the MIoU value of the validation set; the hyperparameter combinations that need to be optimized include learning rate LR, learning rate decay factor LR_decay, input model image size Image_size, input batch number Batch, and the ratio of neurons randomly dropped twice during model training, Drop_rate_1 and Drop_rate_2;
[0090] S7: Reset the obtained optimal value of the best hyperparameter as the hyperparameter of the UUTNet model, repeat S5, and obtain the model weight file;
[0091] S8: Using the model weight file obtained in S7, the test data set in the disease image data set obtained in S3 is input into the integrated pipeline corridor recognition model UUTNet model for analysis, the disease recognition result M is obtained, and the disease result is recorded.
[0092] Furthermore, the disease recognition result M includes the type of disease and the pixel distribution of the disease in the image.
[0093] The specific embodiments are as follows:
[0094] In order to verify the effectiveness of this method, a total of 434 images of damage images of the power compartment, thermal compartment, water compartment and comprehensive compartment of the integrated pipeline corridor collected manually in a certain place were used, including three types of damages: cracks, corrosion and leakage. The images were annotated as follows: Figure 5 As shown in the figure, the image training data set, verification data set and test data set are divided in a ratio of 7:2:1; a unified data enhancement method is used to expand the data set, so that the training data set contains 2126 images, the verification data set contains 607 images, and the test data set contains 305 images, for a total of 3038 image data samples.
[0095] Furthermore, the initial value of the hyperparameter combination of the UUTNet model is set, and the images of the training data set and the verification data set are input into the PSPNet-based comprehensive pipeline corridor disease recognition model UUTNet to obtain the hyperparameters that make the model training iteration converge. If it does not converge, the hyperparameter values are modified until convergence;
[0096] Furthermore, according to the hyperparameter combination value of the model training iteration convergence, the hyperparameter optimization value range of the Bayesian optimization is set; the hyperparameter value of the UUTNet model is optimized by using the Bayesian optimization algorithm to obtain the optimal hyperparameter combination value that makes the model performance the best, as shown in Table 1;
[0097] Table 1 Bayesian hyperparameter optimization
[0098]
[0099] Further, the obtained optimal values of the best hyperparameters are reset as the hyperparameters of the UUTNet model, and S5 is repeated to obtain the model weight file;
[0100] Further, using the obtained model weight file, the test data set in the data set is input into the integrated pipe gallery recognition model UUTNet model for analysis to obtain the disease recognition result M, which includes the type of disease and the pixel distribution of the disease in the image; the disease result is recorded as follows: Figure 4 shown.
[0101] Experimental results show that the accuracy of the method of the present invention in measuring the defects of the integrated pipeline corridor reaches 0.981, the mean intersection and ratio reaches 0.762, and the F1-score reaches 0.801, which has the characteristics of high recognition accuracy.
[0102] To sum up, the technical solution of the present invention mainly targets the three common defects in the integrated pipeline corridor, namely cracks, corrosion and leakage. The proposed method improves the detection accuracy of the integrated pipeline corridor defects, is conducive to the accurate measurement of the defect location and area, and provides accurate defect data for the subsequent safety assessment and maintenance of the pipeline corridor structure.
[0103] According to one aspect of the present invention, the present invention provides a comprehensive pipe gallery disease identification system based on PSPNet and Bayesian optimization, comprising:
[0104] Acquisition unit: used to acquire images of the normal state and defects of the integrated pipe gallery, forming a preliminary dataset of images of defects in the integrated pipe gallery;
[0105] Classification and annotation unit: used to classify the diseases contained in the acquired preliminary data set of disease images, and then perform semantic segmentation and annotation of disease pixels on the images containing diseases to obtain an annotation file in JSON format;
[0106] Data segmentation and expansion unit: used to divide the acquired preliminary disease image data set into a training data set, a verification data set and a test data set in a ratio of 7:2:1, and use a unified data enhancement method to expand the images of the training data set, verification data set and test data set, and finally form a disease image data set;
[0107] Model building unit: used to establish the comprehensive pipeline corridor disease identification model UUTNet based on PSPNet;
[0108] Training unit: used to set the initial value of the hyperparameter combination of the UUTNet model, input the training data set and verification data set obtained in S3 into the established UUTNet model for training, and obtain the hyperparameters that make the model training iterative converge. If it does not converge, modify the hyperparameter values until convergence;
[0109] Optimization unit: used to set the hyperparameter optimization value range of Bayesian optimization according to the hyperparameter combination value of model training iteration convergence; use Bayesian optimization algorithm to optimize the hyperparameter value of UUTNet model to obtain the optimal hyperparameter combination value that makes the model performance best;
[0110] Weight file output unit: used to reset the optimal combination value of hyperparameters obtained in S6 as the hyperparameters of the UUTNet model, repeat S5, and obtain the model weight file;
[0111] Analysis unit: used to use the model weight file obtained by S7 to input the test data set in the disease image data set obtained by S3 into the integrated pipeline corridor recognition model UUTNet model for analysis, obtain the disease recognition result M and record it.
[0112] According to another aspect of the present invention, the present invention provides a terminal device, including a memory, a processor, and a computer program stored in the memory and capable of running on the processor, characterized in that the memory stores a computer program capable of running on the processor, and when the processor loads and executes the computer program, the method for identifying integrated pipe corridor defects based on PSPNet and Bayesian optimization is adopted.
[0113] Among them, the computer program can be stored in a computer-readable medium, the computer program includes computer program code, the computer program code can be in the form of source code, object code, executable file or certain middleware, etc. The computer-readable medium includes any entity or device that can carry the computer program code, recording medium, USB flash drive, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signal, telecommunication signal and software distribution medium, etc. It should be noted that the computer-readable medium includes but is not limited to the above-mentioned components.
[0114] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device.
[0115] For those of ordinary skill in the art, the specific meanings of the above terms in the present invention can be understood according to the specific circumstances. When an element is referred to as being "assembled on", "installed on", "fixed on" or "set on" another element, it can be directly on the other element or there can also be a centered element. When an element is considered to be "connected" to another element, it can be directly connected to the other element or there may be a centered element at the same time. The terms "vertical", "horizontal", "up", "down", "left", "right" and similar expressions used herein are only for illustrative purposes and are not intended to be the only implementation method.
[0116] Although embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present invention, and that the scope of the present invention is defined by the appended claims and their equivalents.
[0117] In the description of this specification, the description with reference to the terms "one embodiment", "example", "specific example", etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present disclosure. In this specification, the schematic representation of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described can be combined in any one or more embodiments or examples in a suitable manner.
Claims
1. The method for identifying pipeline corridor defects based on PSPNet and Bayesian optimization is characterized by: The following steps are involved: S1: Obtain images of the normal state and defects of the utility corridor to form a preliminary dataset of defective images of the utility corridor; S2: Classify the diseases contained in the acquired preliminary disease image data set, and then perform semantic segmentation and annotation of disease pixels on the images containing the diseases to obtain an annotation file in JSON format; S3: The obtained preliminary disease image dataset is divided into a training dataset, a validation dataset, and a test dataset in a ratio of 7:2:
1. The images of the training dataset, validation dataset, and test dataset are all augmented using a unified data enhancement method to finally form a disease image dataset. S4: Establish the integrated pipeline corridor disease identification model UUTNet based on PSPNet; S5: Set the initial value of the hyperparameter combination of the UUTNet model, input the training data set and the validation data set obtained in S3 into the established UUTNet model for training, and obtain the hyperparameters that make the model training iterative converge. If it does not converge, modify the hyperparameter values until convergence; S6: According to the hyperparameter combination value of the model training iteration convergence, set the hyperparameter optimization value range of Bayesian optimization; use the Bayesian optimization algorithm to optimize the hyperparameter value of the UUTNet model to obtain the optimal hyperparameter combination value that makes the model performance best; S7: Reset the optimal combination value of the hyperparameters obtained in S6 as the hyperparameters of the UUTNet model, repeat S5, and obtain the model weight file; S8: Using the model weight file obtained in S7, the test data set in the disease image data set obtained in S3 is input into the integrated pipeline corridor recognition model UUTNet model for analysis, and the disease recognition result M is obtained and recorded; In S4, a comprehensive pipeline corridor disease identification model UUTNet based on PSPNet is established. The specific method is as follows: (1) In the feature extraction module of the model skeleton PSPNet network, the pre-trained residual module ResNet50 is used to replace the CNN module, and the spatial-channel attention mechanism CBAM is added to the last layer of each bottleneck module of ResNet50; (2) In the multi-scale feature extraction module of the model skeleton PSPNet network, the hybrid hole convolution module HDC is connected in parallel with the original pyramid pooling module PPM; (3) The feature map output by the feature extraction module, the feature map output by the PPM module, and the feature map output by the HDC module are connected by channel, and finally the result map is output after 1×1 convolution; (4) The loss function of the PSPNet-based integrated pipeline corridor disease identification model UUTNet adopts the cross entropy loss function; loss(p t )=-α t (1-p t ) γ log(p t ) Among them, t represents different sample categories, α t Indicates that the corresponding category sample is taken as 0.25, γ is taken as 2, and p t Represents the probability value of the t-th class sample after softmax output; (5) The evaluation indicators of the PSPNet-based integrated pipeline corridor defect identification model UUTNet include model mean intersection over Union (MIoU), accuracy, and F1-score.
2. According to claim 1, the method for identifying defects in integrated pipe corridors based on PSPNet and Bayesian optimization is characterized in that: In S2, the defects are divided into three categories: cracks, corrosion and leakage.
3. The method for identifying pipeline corridor defects based on PSPNet and Bayesian optimization according to claim 2 is characterized in that: The S3 adopts a unified data enhancement method for data expansion, specifically: for each image in the training data set, the validation data set and the test data set, an image enhancement method including contrast enhancement, brightness enhancement, horizontal flipping, 180-degree rotation, salt and pepper noise and Gaussian noise is adopted to expand the number of images to seven times the original number.
4. The method for identifying pipeline corridor defects based on PSPNet and Bayesian optimization according to claim 3 is characterized in that: In S5, the initial values of the hyperparameter combination of the UUTNet model are set as follows: The initial value of the learning rate LR is 0.0001; The learning rate decay Lr_decay_gamma value is 0.9; The input model image size Image_size is 640; Enter the batch size Batch as 4; During the model training process, the ratios of neurons randomly dropped twice were 0.3 and 0.15, respectively; The optimizer is Adam, the training epoch is set to 200, and the stop_epoch of the early stopping function is set to 30.
5. The method for identifying pipeline corridor defects based on PSPNet and Bayesian optimization according to claim 1 is characterized in that: In S6, the Bayesian optimization algorithm is used to optimize the hyperparameter values of the UUTNet model. The specific method is as follows: The stopping criterion of Bayesian hyperparameter optimization, that is, the number of iterations is set to 8, and the objective function of Bayesian optimization is the MIoU value of the validation set: (1): Input the stopping criteria of the optimization algorithm, including the number of iterations; (2): Select the hyperparameter combination to be optimized; (3): Initialize the sampling points and calculate the mean and variance; (4): Establish a Gaussian process prior model; (5): Obtain the maximum expected value of the objective function and extract related hyperparameters; (6): Determine whether the stopping criteria are met. If not, repeat (4) to (6); (7): Output the final hyperparameter and model weight files.
6. The method for identifying defects in integrated pipe gallery based on PSPNet and Bayesian optimization according to claim 5 is characterized in that: The hyperparameter combination that needs to be optimized in S6 includes the learning rate LR, the learning rate decay factor LR_decay, the input model image size Image_size, the input batch number Batch, and the ratio of neurons randomly dropped twice during the model training process Drop_rate_1 and Drop_rate_2.
7. The method for identifying defects in integrated pipe gallery based on PSPNet and Bayesian optimization according to claim 6 is characterized in that: The disease recognition result M described in S8 includes the type of disease and the pixel distribution of the disease in the image.
8. A system for identifying defects in integrated pipe corridors based on PSPNet and Bayesian optimization, used to implement the method for identifying defects in integrated pipe corridors based on PSPNet and Bayesian optimization as claimed in any one of claims 1 to 7, characterized in that: include: Acquisition unit: used to acquire images of the normal state and defects of the integrated pipe gallery, forming a preliminary dataset of images of defects in the integrated pipe gallery; Classification and annotation unit: used to classify the diseases contained in the acquired preliminary data set of disease images, and then perform semantic segmentation and annotation of disease pixels on the images containing diseases to obtain an annotation file in JSON format; Data segmentation and expansion unit: used to divide the acquired preliminary disease image data set into a training data set, a verification data set and a test data set in a ratio of 7:2:1, and use a unified data enhancement method to expand the images of the training data set, verification data set and test data set, and finally form a disease image data set; Model building unit: used to establish the comprehensive pipeline corridor disease identification model UUTNet based on PSPNet; Training unit: used to set the initial value of the hyperparameter combination of the UUTNet model, input the training data set and verification data set obtained in S3 into the established UUTNet model for training, and obtain the hyperparameters that make the model training iterative converge. If it does not converge, modify the hyperparameter values until convergence; Optimization unit: used to set the hyperparameter optimization value range of Bayesian optimization according to the hyperparameter combination value of model training iteration convergence; use Bayesian optimization algorithm to optimize the hyperparameter value of UUTNet model to obtain the optimal hyperparameter combination value that makes the model performance best; Weight file output unit: used to reset the optimal combination value of hyperparameters obtained in S6 as the hyperparameters of the UUTNet model, repeat S5, and obtain the model weight file; Analysis unit: used to use the model weight file obtained by S7 to input the test data set in the disease image data set obtained by S3 into the integrated pipeline corridor recognition model UUTNet model for analysis, obtain the disease recognition result M and record it.
9. A terminal device, comprising a memory, a processor, and a computer program stored in the memory and capable of running on the processor, characterized in that: The memory stores a computer program that can be run on the processor. When the processor loads and executes the computer program, the method for identifying defects in an integrated pipe gallery based on PSPNet and Bayesian optimization as described in any one of claims 1 to 7 is adopted.
Citation Information
Patent Citations
Big data and Bayesian combined pedestrian re-identification method and device
CN111126249A
Corn disease image recognition method based on optimized convolutional neural network
CN114022678A