A system and method for intelligent defect assessment of long-distance pipeline radiographic films

By designing a long-distance pipeline ray negative film intelligent defect assessment system, using deep learning technology and multiple image processing steps, the problems of low efficiency and subjectivity in the existing technology are solved, and efficient and accurate identification and evaluation of weld defects are achieved.

CN114511543BActive Publication Date: 2025-04-25SHENYANG PEDLIN TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210126866.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-02-11
Publication Date
2025-04-25
Estimated Expiration
2042-02-11

AI Technical Summary

Technical Problem

The assessment of existing pipeline ray negative film defects mainly relies on manual labor, and there are problems of subjectivity and inefficiency, making it difficult to effectively identify and evaluate complex defects and artifacts.

Method used

Design an intelligent defect assessment system for ray negative films in long-distance pipelines. Through the steps of correction, segmentation, OCR identification, quality review and defect identification of ray images, combined with deep learning technology, a defect recognition model and a weld bead recognition model are established to achieve automated defect positioning, qualitative and quantitative ratings.

Benefits of technology

It improves the efficiency and accuracy of weld quality evaluation, can effectively identify and evaluate complex shortcomings, reduces the subjectivity and error of manual evaluation, and provides more reliable weld quality evaluation results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114511543B_ABST
    Figure CN114511543B_ABST
Patent Text Reader

Abstract

The present invention relates to the technical field of pipeline weld quality assessment, and in particular to a system and method for intelligent defect assessment of long-distance pipeline radiographic films. The specific process is as follows: First, the original image to be assessed is corrected and the film quality analysis is performed based on a quality inspection model. Then, defects are intelligently identified for qualified films and the outer fusion line and root fusion line are extracted. Then, the wall thickness information and signature position information are determined through the OCR recognition model. The intelligently identified defect positions in the weld are quantitatively and comprehensively rated according to national standards, realizing intelligent weld quality assessment and greatly improving the assessment efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of pipeline weld quality assessment, and in particular to a long-distance pipeline radiographic film intelligent defect assessment system and method. Background Art

[0002] The petrochemical industry is the lifeblood of the national economy, and oil and gas pipelines are widely used in transportation projects. At present, pipeline leakage occurs from time to time, and the safety of oil and gas pipelines has attracted great attention from the country. Weld quality assessment is a key link in maintaining pipeline safety.

[0003] In the current weld quality assessment process, defect assessment mainly relies on manual experts. However, manual assessment has a lot of shortcomings. First, manual assessment is subjective, and second, manual assessment is inefficient. Therefore, it is of great value to design an intelligent defect assessment system.

[0004] The development of a complete defect intelligent identification system has many difficulties, such as the cumbersome assessment process, which includes operations such as fusion line extraction, radiographic image quality inspection, signature extraction, etc. in addition to defect intelligent identification. The core part of defect intelligent identification also includes the following challenges: there are many types of defects, the defect shapes vary greatly, the defect images are not clear, and the complex background of artifacts seriously interferes with the qualitative determination of defects. In view of the above challenges, the present invention aims to design a pipeline radiographic film defect intelligent comprehensive assessment system, which can include all the above functions and provide important reference value for weld quality assessment projects.

[0005] At present, deep learning technology is widely used in the industrial field, and data-driven model training has become the mainstream. Intelligent models can effectively avoid the shortcomings of manual assessment, greatly improve the assessment efficiency, and provide important technical support for quickly finding hazards and defects in high-consequence areas and high-risk areas. Summary of the invention

[0006] In view of the low efficiency of manual assessment of pipeline radiographic defects, the present invention proposes a system and method for intelligent defect assessment of long-distance pipeline radiographic films. The system includes the entire process of comprehensive evaluation of weld quality in accordance with national standards.

[0007] The specific technical solutions are as follows:

[0008] A system and method for intelligent defect assessment of long-distance pipeline radiographic films, specifically comprising the following steps:

[0009] Step 1: Correct the radiographic image to be evaluated according to the detection process;

[0010] Step 1-1: Determine the pixel width and height of the radiographic image, determine the vertical slice and the horizontal slice, and the horizontal slice is carried out downward. The vertical slice needs to be converted into a horizontal slice and then carried out downward;

[0011] Step 1-2: Image segmentation: Let the width and height of the original image be (w, h), and the segmentation method is as follows: the height of the image after segmentation is fixed to 648 pixels, and the width is scaled proportionally by bilinear interpolation according to the scaling ratio, where the scaling ratio t satisfies If t is an integer, the resolution of the scaled image is (w', h') = (t×w, 648). The overlapping image is cut using a square, the overlapping image width is determined to be γ, and the width is padded with zeros to ensure that the number of cut sub-images n is an integer. Here Where: ε is the width of the zero padding;

[0012] Step 2: Perform OCR recognition on the weld image to extract the signature;

[0013] Step 3: Conduct quality review of weld images according to national standards;

[0014] Step 4: Input the segmented sub-images into the defect recognition model in sequence for recognition, and output the defect pixel location information and preliminary qualitative information;

[0015] Step 5: Weld bead identification, identify the root fusion line and the outer surface fusion line in the film;

[0016] Step 6: Lack of precise determination and positioning, output precise determination and accurate positioning;

[0017] Step 7: Quantitative rating of defects. Conduct quantitative measurement and comprehensive rating of defects according to national standards, and output the defect hazard level.

[0018] The OCR recognition of the weld image for signature extraction described in step 2 specifically includes the following steps:

[0019] Step 2-1: First, create a label set for the signature, determine all types of characters and create a data set Each image Contains multiple instances

[0020] in, Represents a character instance, a total of n target characters, whose corresponding labels satisfy For each target character label It consists of two parts in is the position information of the target character, is the category information of the target character;

[0021] Step 2-2: Establish a deep learning model according to the above labels, select the cross-stage network CspDarknet53 as the backbone network, and perform classification and regression operations based on cross entropy loss and intersection-over-union loss respectively;

[0022] Step 2-3: Update the weights according to the gradient descent method. When the loss converges, stop training and obtain the OCR detection model M. ocr ;

[0023] Step 2-4: Logical post-processing operation, in order to ensure the accuracy of recognition, set the character extraction threshold to tre ocr =0.5, after all sub-images are inferred, image integration is performed to determine the long image signature information. For undetected characters, character completion and alignment are performed according to the logical order of the previous and next texts. The OCR recognition model can extract the ruler signature information and nominal thickness information. If the film wall thickness information is missing, the recognized wall thickness information is reused first, and then the default wall thickness information input during system initialization is used.

[0024] The quality review of the weld image according to the national standard described in step 3 specifically includes the following steps:

[0025] Step 3-1: Create image quality meter training labels based on key point annotations;

[0026] Step 3-2: Since the image quality meter features are cleaned and can be easily distinguished from the film background, a lightweight neural network is quickly trained to obtain an image quality meter recognition model with fast reasoning capabilities;

[0027] Step 3-2: Threshold selection: determine the image quality meter recognition area based on the confidence after inference. Since the shape of the image quality meter is roughly fixed and there is no blackness, it can be post-processed by image processing to ensure the accuracy of image quality meter recognition.

[0028] Step 3-3: Integrate the sub-images to determine the number of threads recognized by the image quality meter of the original radiographic image, and combine the wall thickness information determined in step 2 to check whether the thread number meets the requirements according to national standards; if it does, intelligent assessment can be performed, otherwise, no intelligent assessment is performed.

[0029] Step 4 of sequentially inputting the segmented sub-images into the defect recognition model for recognition, and outputting defect pixel location information and preliminary qualitative information, specifically includes the following steps:

[0030] Step 4-1: Establish a target defect training set, which includes the following categories: circular, bar, lack of fusion, burn-through, crack, lack of penetration and other defect label databases;

[0031] Step 4-2: Train the defect detection model based on the self-attention target detection algorithm. By constructing the attention mechanism, the model can better suppress the background and highlight the location of the defect. The specific implementation is as follows: first, the cut sub-graph is sent to the convolution backbone network to extract multi-level features; then the weight matrix Q, K, V~N (μ, σ) is initialized according to the Gaussian distribution, where μ = 0, σ = 1 from the Gaussian distribution with a mean of 0 and a variance of 1, and the obtained vector is used as the initial weight, and the weight of the value is obtained by using the Softmax function, so the output matrix is:

[0032] Step 4-3: Anchor prediction is performed based on the attention-oriented features, and the network parameters are trained through loss to obtain the detection model, where the loss includes the position loss of the detection box and the category loss of the detection target. Parameter training is performed by optimizing the following formula:

[0033]

[0034] Among them, FL(·) is the Focal classification loss function, CIoU(·) is the bounding box position regression loss function, and Represent the classification probability distribution and position regression probability distribution of the network predicted image, respectively. and Represents image y i The true category label and position label in;

[0035] Step 4-4: Weight update: Update the weights through back propagation to minimize the loss, take the loss as a function of the weight parameters, and use the stochastic gradient descent method to iteratively update the weights in the direction of the fastest gradient descent until the condition for stopping parameter update is met, and the defect intelligent recognition model M can be obtained. defect ;

[0036] Step 4-5: Image reasoning. After the training iteration stops, the position and category of image defects are identified based on the defect detection model, and the defect pixel location information and preliminary qualitative information are output.

[0037] The weld bead identification described in step 5 specifically includes the following steps:

[0038] Step 5-1: Since the fusion line has a changing trend, the rectangular frame cannot accurately identify the trend of the weld. In order to accurately locate it, the mask annotation under the key points is used to construct a data set. The data set contains two categories, the outer fusion line and the root fusion line;

[0039] Step 5-2: Establish a weld recognition model based on the instance segmentation model, select the backbone network Resnet50, and select the FPN+PAN model for the neck network to extract rich position features and semantic features through top-down and bottom-up fusion;

[0040] Step 5-3: Construct loss. In the three branch tasks of fusion line classification, mask generation and bounding box regression mentioned above, the error between the predicted value and the true value of the target area is minimized through the reverse propagation of the loss function L. The loss function L of the neural network is obtained as follows:

[0041] L=L cls +L mask +L box

[0042] Among them, L cls is the loss function for fusion line classification, which is the logarithmic loss between target and non-target, i.e., cross entropy loss; L mask The loss function for mask generation is that the neural network generates a mask for each class without competing with other classes. It relies on the class label predicted by the fusion line classification branch to select the output mask; L box It is the bounding box regression loss, which is calculated by IoU loss, that is, the loss is determined by judging the overlap between the predicted box and the real box;

[0043] Step 5-4: Obtain the weld extraction model M by adjusting the parameters through training loss fusion Then, logical operations are introduced to refine the position. The specific method is as follows: first, the weld mask position information is obtained based on the weld extraction model inference image. The mask information is a 0-1 matrix, where 1 represents the target weld area and 0 represents the background area. Since some fusion lines may be discontinuous during model inference, the discontinuous weld areas in the X-ray film detection results are connected based on cubic spline interpolation. Then, the Canny operator is used to extract the edges of the mask matrix, and the extracted edge key point information is saved. Finally, the edge key point information is drawn on the original film image to obtain the final weld positioning result display image.

[0044] The lack of accurate characterization and positioning described in step 6, outputting accurate characterization and precise positioning, specifically includes the following steps:

[0045] Step 6-1: According to the position of the outer surface fusion line, remove the false detection outside the heat affected zone of the weld; then locate the weld defect image to be tested and obtain the area between the two root fusion lines: Mask1, Mask2 = M fusion (X), where: Mask1 is the mask area at the weld, Mask2 is the mask area at the root; for the defect position, loc = M defect(X), according to the possible location of the defect, the defect area must be satisfied and then contained within the weld area, thus satisfying:

[0046] Step 6-2: For the unfused defects, it is necessary to further distinguish the root unfused, interlayer unfused, and outer surface unfused according to the location. According to the fusion line positioning, the root unfused defect area should be between the root fusion line areas, and the interlayer unfused area should be outside the root fusion line area.

[0047] Step 6-3: According to the ruler type position, output the actual ruler position corresponding to the pixel position; if the film type is correct or the recognition is wrong, the distance from the missing position to the film head will be returned.

[0048] The lack of fusion in step 4-1 includes root lack of fusion, interlayer lack of fusion or outer surface lack of fusion.

[0049] Compared with the prior art, the present invention has the following beneficial technical effects:

[0050] The present invention first corrects the original image to be evaluated and performs film quality analysis based on the quality inspection model. Then, the qualified film is intelligently identified for defects and the outer layer fusion line and the root fusion line are extracted. The wall thickness information and signature position information are then determined through the OCR recognition model. The intelligently identified defect positions in the weld are quantitatively and comprehensively rated according to national standards, realizing intelligent weld quality evaluation and greatly improving the evaluation efficiency. Intelligent defect identification can be realized, and the detection model based on this article is more accurate than the existing invention. The present invention completes the comprehensive rating system for weld quality, which is more comprehensive than other inventions. BRIEF DESCRIPTION OF THE DRAWINGS

[0051] Figure 1 This is a general structural diagram of a long-distance pipeline radiographic film intelligent defect assessment system and method provided in an embodiment of the present invention. DETAILED DESCRIPTION

[0052] The present invention is described in detail below in conjunction with the accompanying drawings and embodiments, but the protection scope of the present invention is not limited by the accompanying drawings and embodiments.

[0053] Embodiment 1:

[0054] The long-distance pipeline radiographic film intelligent defect assessment system and method of the present invention mainly includes the following parts: data acquisition part, image quality detection part, character extraction part, weld bead extraction part, defect intelligent recognition part, quantitative and comprehensive rating part, and the overall structure diagram is as follows: Figure 1 shown.

[0055] Step 1: Correct the radiographic image to be evaluated according to the detection process.

[0056] Step 1-1: Determine the pixel width and height of the X-ray image, determine the vertical slice and the horizontal slice, and the horizontal slice is carried out downward. The vertical slice needs to be converted into a horizontal slice and then carried out downward.

[0057] Step 1-2: Image segmentation: Let the width and height of the original image be (w, h), and the segmentation method is as follows: the height of the image after segmentation is fixed to 648 pixels, and the width is scaled proportionally according to a fixed ratio using bilinear interpolation, where the scaling ratio t satisfies If t is an integer, the resolution of the scaled image is (w', h') = (t×w, 648). The overlapping image is cut using a square, the overlapping image width is determined to be γ, and the width is padded with zeros to ensure that the number of cut sub-images n is an integer. Here where ε is the width of the zero padding.

[0058] Step 2: Perform OCR recognition on the weld image to extract the signature.

[0059] Step 2-1: First, create a label set for the signature, determine all types of characters and create a data set The label set contains multiple instance targets, i.e., multiple characters, for each image. in is a character in the above dataset, with a total of n target characters, and their corresponding labels satisfy For each target character label It consists of two parts in is the position information of the target character, is the category information of the target character.

[0060] Step 2-2: Establish a deep learning model according to the above labels, select the cross-stage network CspDarknet53 as the backbone network, and perform classification and regression operations based on cross entropy loss and intersection-over-union loss respectively.

[0061] Step 2-3: Update the weights according to the gradient descent method. When the loss converges, stop training and obtain the OCR detection model M. ocr

[0062] Step 2-4: Logical post-processing operation, in order to ensure the accuracy of recognition, set the character extraction threshold to tre ocr=0.5. After all sub-images are inferred, image integration is performed to determine the long image signature information. For undetected characters, character padding and alignment are performed according to the logical order of the previous and next texts. The OCR recognition model can extract the ruler signature information and nominal thickness information. If the film wall thickness information is missing, the recognized wall thickness information is reused first, and the default wall thickness information input during system initialization is used secondly.

[0063] Step 3: Conduct quality review of weld images in accordance with national standards.

[0064] Step 3-1: Create image quality meter training labels based on key point annotations.

[0065] Step 3-2: Since the image quality meter features are cleaned and can be easily distinguished from the film background, a fast training is performed according to a lightweight neural network to obtain an image quality meter recognition model with fast reasoning capabilities.

[0066] Step 3-2: Threshold selection, determine the image quality meter recognition area based on the confidence after reasoning. Since the shape of the image quality meter is roughly fixed and there is no black, it can be post-processed by image processing to ensure the accuracy of image quality meter recognition.

[0067] Step 3-3: Integrate the sub-images to determine the number of threads recognized by the image quality meter of the original radiographic image, and combine the wall thickness information determined in step 2 to check whether the thread number meets the requirements according to national standards; if it does, intelligent assessment can be performed, otherwise, no intelligent assessment is performed.

[0068] Step 4: Input the segmented sub-images into the defect recognition model for recognition. Output the defect pixel location information and preliminary qualitative information.

[0069] Step 4-1: Establish a target defect training set, which specifically includes the following categories: circular, bar, unfused (root unfused, interlayer unfused, outer surface unfused), burn-through, crack, incomplete penetration and other defect label databases.

[0070] Step 4-2: Train the defect detection model based on the self-attention target detection algorithm. By constructing the attention mechanism, the model can better suppress the background and highlight the location of the defect. The specific implementation is as follows. First, the cut sub-graph is sent to the convolutional backbone network to extract multi-level features. Then initialize the weight matrix according to the Gaussian distribution, Q, K, V~N (μ, σ), where μ = 0, σ = 1 from a Gaussian distribution with a mean of 0 and a variance of 1, and use the resulting vector as the initial weight, and obtain the weight of the value by using the Softmax function. Therefore, the output matrix is:

[0071] Step 4-3: Anchor prediction is performed based on the attention-oriented features, and the network parameters are trained through loss to obtain the detection model, where the loss includes the position loss of the detection box and the category loss of the detection target. Parameter training is performed by optimizing the following formula: Where FL(·) is the Focal classification loss function, CIoU(·) is the bounding box position regression loss function, and Represent the classification probability distribution and position regression probability distribution of the network predicted image, respectively. and Represents image y i The true category labels and position labels in .

[0072] Step 4-4: Weight update: The purpose of updating weights through back propagation is to minimize the loss. Taking the loss as a function of the weight parameter, CNN needs to calculate the partial derivative of the loss with respect to each weight parameter, and then use the stochastic gradient descent (SGD) method to iteratively update the weights in the direction of the fastest gradient descent until the condition for stopping parameter update is met. The defect intelligent recognition model M can be obtained. defect .

[0073] Step 4-5: Image reasoning. After the training iteration stops, the position and category of image defects are identified based on the defect detection model, and the defect pixel location information and preliminary qualitative information are output.

[0074] Step 5: Weld bead identification. Identify the root fusion line and the outer surface fusion line in the film.

[0075] Step 5-1: Since the fusion line has a trend of change, the rectangular frame cannot accurately identify the trend of the weld. In order to accurately locate it, the mask annotation under the key points is used to construct a data set. The data set contains two categories, the outer fusion line and the root fusion line.

[0076] Step 5-2: Establish a weld recognition model based on the instance segmentation model, select the backbone network Resnet50, and select the FPN+PAN model for the neck network to extract rich position features and semantic features through top-down and bottom-up fusion.

[0077] Step 5-3: Construct loss. In the three branch tasks of fusion line classification, mask generation and bounding box regression mentioned above, the error between the predicted value and the true value of the target area is minimized through the reverse propagation of the loss function L. The loss function L of the neural network is obtained as follows:

[0078] L=L cls +L mask +L box

[0079] Where L cls is the loss function for fusion line classification, which is the logarithmic loss between target and non-target, i.e., cross entropy loss; L mask The loss function for mask generation is that the neural network generates a mask for each class without competing with other classes. It relies on the class label predicted by the fusion line classification branch to select the output mask; L box It is the bounding box regression loss, which is calculated by IoU loss, that is, the loss is determined by judging the overlap between the predicted box and the real box.

[0080] Step 5-4: Obtain the weld extraction model M by adjusting the parameters through training loss fusion Then, logical operations are introduced to refine the position. The specific method is as follows: First, the weld bead mask position information is obtained based on the weld bead extraction model inference image. The mask information is a 0-1 matrix, where 1 represents the target weld bead area and 0 represents the background area. Since some fusion lines may be discontinuous during model inference, the discontinuous weld bead areas in the X-ray film detection results are connected based on cubic spline interpolation. Then, the Canny operator is used to extract the edge of the mask matrix, and the extracted edge key point information is saved. Finally, the edge key point information is drawn on the original film image to obtain the final weld bead positioning result display image.

[0081] Step 6: Lack of precision determination and positioning. Output precision determination and precise positioning.

[0082] Step 6-1: According to the position of the fusion line on the outer surface, remove the false detection outside the heat affected zone of the weld; Step 6-8: According to the fusion line test model obtained in step 6-7, locate the weld defect image to be tested, and obtain the area between the two root fusion lines: Mask1, Mask2 = M fusion (X), where Mask1 is the mask area at the weld, and Mask2 is the mask area at the root. For the defect position, loc = M defect (X), according to the possible location of the defect, the defect area must be contained within the weld area, so it satisfies:

[0083] Step 6-2: For the unfused defects, it is necessary to further distinguish the root unfused, interlayer unfused, and outer surface unfused according to the location. According to the fusion line positioning, the root unfused defect area should be between the root fusion line areas, and the interlayer unfused area should be outside the root fusion line area.

[0084] Step 6-3: According to the ruler type position, output the actual ruler position corresponding to the pixel position; if the film type is correct or the recognition is wrong, the distance from the missing position to the film head will be returned.

[0085] Step 7: Quantitative rating of defects. Quantitative measurement and comprehensive rating of defects are carried out according to national standards, and the defect hazard level is output.

Claims

1. A system and method for intelligent defect assessment of long-distance pipeline radiographic films, characterized in that: The specific steps include: Step 1: Correct the radiographic image to be evaluated according to the detection process; Step 1-1: Determine the pixel width and height of the radiographic image, determine the vertical slice and the horizontal slice, and the horizontal slice is carried out downward. The vertical slice needs to be converted into a horizontal slice and then carried out downward; Step 1-2: Image segmentation: Let the width and height of the original image be (w, h), and the segmentation method is as follows: the image height after segmentation is fixed to 648 pixels, and the width is scaled proportionally by bilinear interpolation according to the scaling ratio, where the scaling ratio t satisfies If t is an integer, the resolution of the scaled image is (w', h') = (t×w, 648). The overlapping image is cut using a square, the overlapping image width is determined to be γ, and the width is padded with zeros to ensure that the number of cut sub-images n is an integer. Here Where: ε is the width of the zero padding; Step 2: Perform OCR recognition on the weld image to extract the signature; specifically, the steps include: Step 2-1: First, create a label set for the signature, determine all types of characters and create a data set Each image Contains multiple instances in, Represents a character instance, a total of n target characters, whose corresponding labels satisfy For each target character label It consists of two parts in is the position information of the target character, is the category information of the target character; Step 2-2: Establish a deep learning model according to the above labels, select the cross-stage network CspDarknet53 as the backbone network, and perform classification and regression operations based on cross entropy loss and intersection-over-union loss respectively; Step 2-3: Update the weights according to the gradient descent method. When the loss converges, stop training and obtain the OCR detection model M. ocr ; Step 2-4: Logical post-processing operation, in order to ensure the accuracy of recognition, set the character extraction threshold to tre ocr =0.5, after all sub-images are inferred, image integration is performed to determine the long image signature information. For undetected characters, character padding and alignment are performed according to the logical order of the preceding and following texts. The OCR recognition model can extract the ruler signature information and nominal thickness information. If the film wall thickness information is missing, the recognized wall thickness information is reused first, and then the default wall thickness information input during system initialization is used; Step 3: Review the quality of the weld image according to national standards; specifically including the following steps: Step 3-1: Create image quality meter training labels based on key point annotations; Step 3-2: Since the image quality meter features are cleaned and can be easily distinguished from the film background, a lightweight neural network is quickly trained to obtain an image quality meter recognition model with fast reasoning capabilities; Step 3-2: Threshold selection: determine the image quality meter recognition area based on the confidence after inference. Since the shape of the image quality meter is roughly fixed and there is no blackness, it can be post-processed by image processing to ensure the accuracy of image quality meter recognition. Step 3-3: Integrate the sub-images to determine the number of threads recognized by the image quality meter of the original radiographic image, and combine the wall thickness information determined in step 2 to check whether the thread number meets the requirements according to national standards; if it meets the requirements, intelligent assessment can be performed, otherwise, intelligent assessment will not be performed; Step 4: Input the segmented sub-images into the defect recognition model in sequence for recognition, and output the defect pixel location information and preliminary qualitative information; Step 5: Weld bead identification, identify the root fusion line and the outer surface fusion line in the film; Step 6: Lack of precise determination and positioning, output precise determination and accurate positioning; Step 7: Quantitative rating of defects. Conduct quantitative measurement and comprehensive rating of defects according to national standards, and output the defect hazard level.

2. The long-distance pipeline radiographic film intelligent defect assessment system and method according to claim 1 is characterized by: Step 4 of sequentially inputting the segmented sub-images into the defect recognition model for recognition, and outputting defect pixel location information and preliminary qualitative information, specifically includes the following steps: Step 4-1: Establish a target defect training set, which specifically includes the following categories: circular, bar, lack of fusion, burn-through, crack, and incomplete penetration defect label database; Step 4-2: Train the defect detection model based on the self-attention target detection algorithm. By constructing the attention mechanism, the model can better suppress the background and highlight the location of the defect. The specific implementation is as follows: first, the cut sub-graph is sent to the convolution backbone network to extract multi-level features; then the weight matrix Q, K, V~N (μ, σ) is initialized according to the Gaussian distribution, where μ = 0, σ = 1 from the Gaussian distribution with a mean of 0 and a variance of 1, and the obtained vector is used as the initial weight, and the weight of the value is obtained by using the Softmax function, so the output matrix is: Step 4-3: Anchor prediction is performed based on the attention-oriented features, and the network parameters are trained through loss to obtain the detection model, where the loss includes the position loss of the detection box and the category loss of the detection target. Parameter training is performed by optimizing the following formula: Among them, FL(·) is the Focal classification loss function, CIoU(·) is the bounding box position regression loss function, and Represent the classification probability distribution and position regression probability distribution of the network predicted image, respectively. and Represents image y i The true category label and position label in; Step 4-4: Weight update: Update the weights through back propagation to minimize the loss, take the loss as a function of the weight parameters, and use the stochastic gradient descent method to iteratively update the weights in the direction of the fastest gradient descent until the condition for stopping parameter update is met, and the defect intelligent recognition model M can be obtained. defect ; Step 4-5: Image reasoning. After the training iteration stops, the position and category of image defects are identified based on the defect detection model, and the defect pixel location information and preliminary qualitative information are output.

3. The long-distance pipeline radiographic film intelligent defect assessment system and method according to claim 2 is characterized by: The weld bead identification described in step 5 specifically includes the following steps: Step 5-1: Since the fusion line has a changing trend, the rectangular frame cannot accurately identify the trend of the weld. In order to accurately locate it, the mask annotation under the key points is used to construct a data set. The data set contains two categories, the outer fusion line and the root fusion line; Step 5-2: Establish a weld recognition model based on the instance segmentation model, select the backbone network Resnet50, and select the FPN+PAN model for the neck network to extract rich position features and semantic features through top-down and bottom-up fusion; Step 5-3: Construct loss. In the three branch tasks of fusion line classification, mask generation and bounding box regression mentioned above, the error between the predicted value and the true value of the target area is minimized through the reverse propagation of the loss function L. The loss function L of the neural network is obtained as follows: L=L cls +L mask +L box Among them, L cls is the loss function for fusion line classification, which is the logarithmic loss between target and non-target, i.e., cross entropy loss; L mask The loss function for mask generation is that the neural network generates a mask for each class without competing with other classes. It relies on the class label predicted by the fusion line classification branch to select the output mask; L box It is the bounding box regression loss, which is calculated by IoU loss, that is, the loss is determined by judging the overlap between the predicted box and the real box; Step 5-4: Obtain the weld extraction model M by adjusting the parameters through training loss fusion Then, logical operations are introduced to refine the position. The specific method is as follows: first, the weld mask position information is obtained based on the weld extraction model inference image. The mask information is a 0-1 matrix, where 1 represents the target weld area and 0 represents the background area. Since some fusion lines may be discontinuous during model inference, the discontinuous weld areas in the X-ray film detection results are connected based on cubic spline interpolation. Then, the Canny operator is used to extract the edges of the mask matrix, and the extracted edge key point information is saved. Finally, the edge key point information is drawn on the original film image to obtain the final weld positioning result display image.

4. The long-distance pipeline radiographic film intelligent defect assessment system and method according to claim 3 is characterized by: The lack of accurate characterization and positioning described in step 6, outputting accurate characterization and precise positioning, specifically includes the following steps: Step 6-1: According to the position of the outer surface fusion line, remove the false detection outside the heat affected zone of the weld; then locate the weld defect image to be tested and obtain the area between the two root fusion lines: Mask1, Mask2 = M fusion (X), where: Mask1 is the mask area at the weld, Mask2 is the mask area at the root; for the defect position, loc = M defect (X), according to the possible location of the defect, the defect area must be satisfied and then contained within the weld area, thus satisfying: Step 6-2: For the unfused defects, it is necessary to further distinguish the root unfused, interlayer unfused, and outer surface unfused according to the location. According to the fusion line positioning, the root unfused defect area should be between the root fusion line areas, and the interlayer unfused area should be outside the root fusion line area. Step 6-3: According to the ruler type position, output the actual ruler position corresponding to the pixel position; if the film type is correct or the recognition is wrong, the distance from the missing position to the film head will be returned.

5. The long-distance pipeline radiographic film intelligent defect assessment system and method according to claim 4 is characterized by: The lack of fusion in step 4-1 includes root lack of fusion, interlayer lack of fusion or outer surface lack of fusion.

Citation Information

Patent Citations

  • Method for measuring submerged arc welding steel pipe weld welding deviator parameter based on CCD

    CN108645865A

  • Welding seam image processing method and device, terminal equipment and storage medium

    CN111275659A