Pipe weld defect identification method based on improved dense connection network
By improving the pipeline weld defect identification method by combining dense connection network and cross-entropy function with penalty term loss function, the problem of insufficient generalization ability in the existing technology is solved, and high-precision identification of weld defects of different sizes is achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- SOUTHWEST PETROLEUM UNIV
- Filing Date
- 2023-04-12
- Publication Date
- 2026-05-29
AI Technical Summary
Existing deep learning methods have poor generalization ability in pipeline weld defect identification, have limited feature parameters, and are difficult to effectively identify weld defects of various sizes.
An improved dense connection network is adopted, which combines multi-channel convolution stacking at different scales with cross-entropy function and penalty term loss function to construct a pipeline weld defect recognition model. Image preprocessing is performed by histogram mean and median filtering. Dense connection blocks and attention mechanism are designed to construct a multi-channel network connection structure. The model training is optimized by cross-entropy function and penalty function.
The model improved its accuracy in identifying weld defects of different sizes, addressed the problem of image sample imbalance, and enhanced its generalization ability and recognition accuracy.
Smart Images

Figure CN116402801B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of pipeline weld defect identification and deep learning, specifically to a pipeline weld defect identification method based on an improved dense connection network. Background Technology
[0002] With the widespread application of pipelines in industries such as oil and natural gas, there is a need to further improve existing methods for identifying pipeline weld defects. Oil and gas pipelines are mostly constructed by welding straight and curved pipes, and these welds are a high-risk area for pipeline defects. Therefore, weld defect detection is a crucial guarantee for the safe operation of pipelines. Traditional manual evaluation methods for pipeline welds are time-consuming, labor-intensive, inefficient, and heavily influenced by subjective human factors, making them inadequate for the increasing demand for pipeline weld defect detection.
[0003] The automatic identification method for pipeline weld defects based on deep learning can effectively solve the problems of time-consuming, labor-intensive, and inefficient manual image evaluation. The paper "Liu Han, Guo Runyuan. Detection and Recognition of Oil Pipe Weld Defects Based on X-ray Images and Convolutional Neural Networks [J]. Journal of Instrumentation, 2018, 39(04):247-256" proposes to automatically extract deep-level features of defects using convolutional neural networks, improving the time-consuming and labor-intensive problem of manual feature extraction while achieving automated classification. The paper "Jiang Hongquan, He Shuai, Gao Jianmin, et al. An Improved Convolutional Neural Network Model for Weld Defect Recognition [J]. Journal of Mechanical Engineering, 2020, 56(08):235-242" uses the random forest algorithm to improve the feature selection method of the CNN model, enhancing the parameter learning ability of the traditional CNN method. The paper "DA B, GM, MK P, et al. Automated defect classification of Aluminium 5083 TIG welding using HDR camera and neural networks [J]. Journal of Manufacturing" proposes to automatically extract deep-level features of defects using convolutional neural networks, improving the time-consuming and labor-intensive problem of manual feature extraction. The article "Processes, 2019, 45(C):603-613" utilizes a fully connected network architecture combined with convolutional neural networks to achieve accuracy rates of 70%, 85%, and 95% for identifying 6, 4, and 2 types of defects, respectively. This demonstrates that existing deep learning methods generally lack strong generalization ability, extract only a single feature parameter, and experience a significant decrease in model classification accuracy when faced with multiple defects. Summary of the Invention
[0004] To overcome the shortcomings of existing methods, a pipe weld defect identification method based on an improved dense connection network is proposed. This method effectively solves the deficiencies of traditional deep learning methods and improves the generalization ability and parameter diversity of the model.
[0005] To achieve the aforementioned objective, the provided technical solution is a method for identifying pipe weld defects based on an improved dense interconnection network, characterized by the following steps:
[0006] Step 1: Collect images of pipe weld defects and preprocess them. The specific processing method is as follows:
[0007] (1) Enhance the image by histogram mean normalization, perform median filtering for image denoising, and adjust the image to... Pixel size ;
[0008] (2) The processed defect images are classified according to the defect situation based on the reference materials provided by the weld defect identification staff, and the data images are divided into training set and test set;
[0009] Step 2: Construct a pipeline weld defect identification model based on an improved dense connection network. The specific processing method is as follows:
[0010] (1) Construct a densely connected block based on convolution stacking combined with an attention mechanism. The entire densely connected block consists of two stacked convolutions. It consists of convolution and attention mechanism modules, and the computational structure of stacked convolution is as follows:
[0011] ;
[0012] ;
[0013] In the formula, The input image representing the model. The output image represents the model. For size convolution, ;
[0014] The computational structure of the attention mechanism is as follows:
[0015] ;
[0016] ;
[0017] ;
[0018] In the formula, , Represents the width and height of the feature map. , The feature map representing the input image. , For the Sigmoid function, , These represent the weight matrices of the two fully connected layers, Represented as the ReLU activation function, This represents the feature map of the output image;
[0019] (2) Construct a multi-channel network connection structure, where the basic convolutions of each channel are respectively Adaptable to circular segments with a pixel size of d millimeters. , ; Adaptable to concave and burn-through structures with a pixel size of e millimeters. , ; Adaptable to defects, incomplete fusion, and cracks with a pixel size of f millimeters. , Finally, the channels are merged and output using the Concat feature fusion method. The Concat operation formula is as follows:
[0020] ;
[0021] In the formula, , Both are feature maps input through this densely connected channel structure, where k represents the number of channels in the input feature map X, and d represents the number of channels in the input feature map Y. , ;
[0022] (3) Construct the model loss function using the cross-entropy function and the penalty function. The loss function is:
[0023] ;
[0024] in, , The width and height of the weld image; Indicates the category of manually marked weld defects; This indicates that the model predicts the type of weld defect. Let L2 be the regularization penalty function. , , ;
[0025] Step 3: Input the training set into the pipeline weld defect identification model constructed in Step 2 for training. Select the model with the smallest loss function during the training process.
[0026] Step 4: Input the test set into the trained model to identify weld defects and obtain the defect identification results.
[0027] The innovation of this invention is reflected in:
[0028] (1) The defect identification method of the present invention uses multi-channel convolution stacking at different scales to extract the features of pipe weld defects of different sizes, thereby improving the identification rate of the network model for pipe weld defects of different sizes.
[0029] (2) The defect identification method of the present invention designs a cross-entropy function combined with a penalty term loss function to train the identification model;
[0030] Compared with the prior art, the present invention has the following beneficial effects:
[0031] (1) This invention studies the performance of deep learning recognition models when facing defects of different sizes, and proposes a multi-channel convolutional recognition model of different scales to recognize defects of different sizes, so that the recognition method proposed in this invention has a high recognition accuracy when facing defects of different sizes.
[0032] (2) The cross-entropy function proposed in this invention, combined with the penalty term loss function, can enhance the model's learning effect on weld seam image samples, improve the problem of imbalance in weld seam image samples, and increase the regularization effect. Attached Figure Description
[0033] Figure 1 This is a flowchart illustrating the specific implementation of the present invention;
[0034] Figure 2 This is a diagram of the improved dense network structure of the pipeline weld defect identification method.
[0035] Figure 3 This is a comparison of the confusion matrix of the defect identification method of the present invention with other defect identification methods. In the figure, (a) VGG model, (b) DenseNet model, (c) AlexNet model, and (d) the model of the present invention. Detailed Implementation
[0036] This invention is a method for identifying defects in pipe welds based on an improved dense interconnection network. The specific process is as follows: Figure 1 As shown, a method for identifying pipe weld defects based on an improved dense interconnection network is characterized by the following steps:
[0037] Step 1: Collect images of pipe weld defects and preprocess them. The specific processing method is as follows:
[0038] (1) Enhance the image by histogram mean normalization, perform median filtering for image denoising, and adjust the image to... Pixel size ;
[0039] (2) The processed defect images are classified according to the defect situation based on the reference materials provided by the weld defect identification staff, and the data images are divided into training set and test set;
[0040] Step 2: Construct a pipeline weld defect identification model based on an improved dense connection network. The specific processing method is as follows:
[0041] (1) Construct a densely connected block based on convolution stacking combined with an attention mechanism. The entire densely connected block consists of two stacked convolutions. It consists of convolution and attention mechanism modules, and the computational structure of stacked convolution is as follows:
[0042] ;
[0043] ;
[0044] In the formula, The input image representing the model. The output image represents the model. For size convolution, ;
[0045] The computational structure of the attention mechanism is as follows:
[0046] ;
[0047] ;
[0048] ;
[0049] In the formula, , Represents the width and height of the feature map. , The feature map representing the input image. , For the Sigmoid function, , These represent the weight matrices of the two fully connected layers, Represented as the ReLU activation function, This represents the feature map of the output image;
[0050] (2) Construct a multi-channel network connection structure, where the basic convolutions of each channel are respectively Adaptable to circular segments with a pixel size of d millimeters. , ; Adaptable to concave and burn-through structures with a pixel size of e millimeters. , ; Adaptable to defects, incomplete fusion, and cracks with a pixel size of f millimeters. , Finally, the channels are merged and output using the Concat feature fusion method. The Concat operation formula is as follows:
[0051] ;
[0052] In the formula, , Both are feature maps input through this densely connected channel structure, where k represents the number of channels in the input feature map X, and d represents the number of channels in the input feature map Y. , ;
[0053] (3) Construct the model loss function using the cross-entropy function and the penalty function. The loss function is:
[0054] ;
[0055] in, , The width and height of the weld image; Indicates the category of manually marked weld defects; This indicates that the model predicts the type of weld defect. Let L2 be the regularization penalty function. , , ;
[0056] Step 3: Input the training set into the pipeline weld defect identification model constructed in Step 2 for training. Select the model with the smallest loss function during the training process.
[0057] Step 4: Input the test set into the trained model to identify weld defects and obtain the defect identification results.
[0058] The effectiveness of the implementation method of this invention is demonstrated in Table 1 below, which shows the excellent effect of this invention on model recognition rate.
[0059] Table 1 Comparison of experimental results for each model
[0060] Table 1 Comparison of experimental results of each model /
[0061]
[0062] As shown in Table 1, the accuracy, recall, specificity, and F1 index of the weld defect identification model of this invention are 86.87%, 86.50%, 92.87%, and 86.68%, respectively, which are significantly better than other models.
[0063] In summary, this is merely a preferred embodiment of the recommended method for identifying defects in pipeline welds, and is not intended to limit the scope of this invention. All related modifications, equivalent substitutions, and improvements made within the spirit and principles of this invention should be included within the protection scope of this invention.
Claims
1. A method for identifying defects in pipe welds based on an improved dense interconnection network, characterized in that... Includes the following steps: Step 1: Collect images of pipe weld defects and preprocess them. The specific processing method is as follows: (1) Enhance the image by histogram mean normalization, perform median filtering for image denoising, and adjust the image to... Pixel size ; (2) The processed defect images are classified according to the defect situation based on the reference materials provided by the weld defect identification staff, and the data images are divided into training set and test set; Step 2: Construct a pipeline weld defect identification model based on an improved dense connection network. The specific processing method is as follows: (1) Construct a densely connected block based on convolution stacking combined with an attention mechanism. The entire densely connected block consists of two stacked convolutions. It consists of convolution and attention mechanism modules, and the computational structure of stacked convolution is as follows: ; ; In the formula, The input image representing the model. The output image represents the model. For size convolution, ; The computational structure of the attention mechanism is as follows: ; ; ; In the formula, , Represents the width and height of the feature map. , The feature map representing the input image. , For the Sigmoid function, , These represent the weight matrices of the two fully connected layers, Represented as the ReLU activation function, This represents the feature map of the output image; (2) Construct a multi-channel network connection structure. Each channel network consists of densely connected blocks composed of stacked convolutions combined with an attention mechanism. The basic convolutions of each channel are as follows: Adaptable to circular segments with a pixel size of d millimeters. , ; Adaptable to concave and burn-through structures with a pixel size of e millimeters. , ; Adaptable to defects, incomplete fusion, and cracks with a pixel size of f millimeters. , Finally, the channels are merged and output using the Concat feature fusion method. The Concat operation formula is as follows: ; In the formula, , Both are feature maps input through this densely connected channel structure, where k represents the number of channels in the input feature map X, and p represents the number of channels in the input feature map Y. , ; (3) Construct the model loss function using the cross-entropy function and the penalty function. The loss function is: ; in, , The width and height of the weld image; This indicates the category of manually marked weld defects; This indicates that the model predicts the type of weld defect. Let L2 be the regularization penalty function. , , ; Step 3: Input the training set into the pipeline weld defect identification model constructed in Step 2 for training. Select the model with the smallest loss function during the training process. Step 4: Input the test set into the trained model to identify weld defects and obtain the defect identification results.