Pipeline welding seam ray image defect detection method and system based on deep learning

Through the deep learning-based pipeline weld ray image defect detection method, the problems of low efficiency and low accuracy of traditional detection methods are solved, efficient and accurate identification of weld defects are achieved, and the safety of the pipeline transportation system is improved.

CN120219285APending Publication Date: 2025-06-27SHANDONG UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510165778.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-02-14
Publication Date
2025-06-27

AI Technical Summary

Technical Problem

Traditional weld quality detection methods are inefficient and have low accuracy, making it difficult to meet the high standard demand of modern industry for large-scale pipeline inspection, especially when the aspect ratio of the pipeline weld ray image is extremely large.

Method used

The pipeline weld ray image defect detection method based on deep learning is adopted to achieve accurate identification and positioning of weld defects through steps such as feature enhancement, image segmentation, object detection and mapping reduction.

Benefits of technology

It improves the accuracy and efficiency of weld defect identification, and improves the safety and stability of the oil and natural gas pipeline transportation system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120219285A_ABST
    Figure CN120219285A_ABST
Patent Text Reader

Abstract

The invention belongs to the technical field of nondestructive testing, and provides a pipeline welding seam ray image defect detection method and system based on deep learning, and the technical scheme is as follows: obtaining a pipeline welding seam ray image; performing defect feature enhancement on the pipeline welding seam ray image to obtain a defect feature enhanced pipeline welding seam ray image; performing equal-height segmentation on the defect feature enhanced pipeline welding seam ray image, and performing complementation segmentation on the image after equal-height segmentation to obtain a plurality of segmented images; performing defect detection on each segmented image block to obtain a defect detection result; the recognized defect coordinates are restored to the original image coordinate system, defect detection results are selected and restrained, and a final weld defect detection result is obtained. And the accuracy of weld defect identification is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of non-destructive testing, and particularly relates to a method and system for detecting defects in pipeline weld ray images based on deep learning. Background Technique

[0002] The statements in this part only provide background technical information related to the present invention and do not necessarily constitute prior art.

[0003] As a basic energy source in modern society, the safety and stability of the pipeline transportation system of oil and gas are crucial for ensuring energy supply. The quality of pipeline welds is directly related to the safe operation of pipelines. Any minor defect may lead to leakage or even catastrophic accidents, resulting in energy supply interruption, environmental pollution, and huge economic losses. Therefore, efficient and accurate detection of oil and gas pipeline weld defects is a key technical link to ensure pipeline safety.

[0004] Traditional non-destructive testing techniques, such as X-ray, ultrasonic, eddy current, and magnetic particle testing, are widely used in weld quality detection. However, ray image analysis technology is particularly prominent in the field of automated non-destructive testing due to its high penetration and reliability. However, traditional manual analysis methods have limitations in terms of efficiency, accuracy, and consistency, and it is difficult to meet the high standards of modern industry for large-scale pipeline detection.

[0005] The grayscale images used for weld detection contain only luminance information at each pixel point and do not contain color information. In these images, the weld area is usually brighter than the base metal area because the density of the weld material is lower, resulting in a higher X-ray transmission intensity. Defects such as pores, slag inclusions, and cracks, due to their different densities from the surrounding materials, appear as darker areas in the X-ray images, forming a sharp contrast with the surrounding bright welds. The detection of circular pipelines results in extremely large aspect ratios of the obtained images, and traditional image processing and defect detection methods cannot adapt to this image characteristic, resulting in low accuracy and efficiency of defect detection. Summary of the Invention

[0006] In order to solve at least one of the technical problems existing in the above background technique, the present invention provides a method and system for detecting defects in pipeline weld ray images based on deep learning. In view of the characteristics of pipeline weld ray images, an automated method for detecting defects in pipeline weld ray images is proposed, which improves the accuracy of weld defect recognition.

[0007] To achieve the above object, the present invention adopts the following technical solutions:

[0008] The first aspect of the present invention provides a method for detecting defects in pipeline weld ray images based on deep learning, including the following steps:

[0009] Obtain the radiographic image of the pipeline weld;

[0010] Enhance the defect features of the radiographic image of the pipeline weld to obtain a radiographic image of the pipeline weld with enhanced defect features;

[0011] Perform equal-height segmentation on the radiographic image of the pipeline weld with enhanced defect features, and perform complementary segmentation on the image after equal-height segmentation to obtain multiple segmented images;

[0012] Perform defect detection on each segmented image block to obtain the defect detection result;

[0013] Restore the identified defect coordinates to the original image coordinate system, and perform selection and suppression on the defect detection result to obtain the final weld defect detection result.

[0014] Further, the enhancement of the defect features of the radiographic image of the pipeline weld to obtain a radiographic image of the pipeline weld with enhanced defect features, and the feature enhancement formula is:

[0015]

[0016]

[0017] A′ = A * h, b max = max{b i , i = 1...n}, b min = min{b i , i = 1...n},

[0018] In the formula, represents the obtained radiographic image matrix of the pipeline weld, h is a specific improvement matrix, Y is the output matrix of feature enhancement, X is the intermediate variable transition matrix, b max is b i 's maximum value, b min is b i 's minimum value, b i is the mean value of the rows of the A matrix, a ij is the value of the image matrix, n is the number of rows of the matrix, m is the number of columns of the matrix, i is the detection box variable, and j is the attribute value variable.

[0019] Further, the equal-height segmentation of the radiographic image of the pipeline weld with enhanced defect features includes:

[0020] If W / H is an integer, that is, W is divisible by H, then the original image is segmented into N square images with a width and height of H, where N = W / H;

[0021] If W / H is a decimal, that is, W is not divisible by H, then the original image is segmented into N + 1 square images with a width and height of H, where Denotes rounding down; W and H are the width and height of the image.

[0022] Furthermore, the completion segmentation of the equi-height segmented image includes removing image regions of half the height unit from both the left and right sides of the original image, cropping the remaining region, and filling it with black if the final image is not an integer to generate another set of image sequences of the same size.

[0023] Furthermore, performing defect detection on each segmented image block to obtain defect detection results, including:

[0024] Inputting the segmented image block into the Backbone part, and extracting the first feature map, second feature map, third feature map, fourth feature map, and fifth feature map layer by layer from bottom to top;

[0025] Processing the fifth feature map through the ELAN module and the SPPCSP-SE module to obtain the fifth intermediate feature map, fusing the fifth intermediate feature map and the fourth feature map to obtain the fourth intermediate feature map, and fusing the fourth intermediate feature map and the third feature map to obtain the third intermediate feature map;

[0026] Processing the third intermediate feature map through the ELAN module to obtain the third output feature map, fusing the third output feature, the fourth intermediate feature map, and the fourth feature map to obtain the fourth output feature map; fusing the fourth output feature map, the fifth intermediate feature map, and the fifth feature map to obtain the fifth output feature map;

[0027] Fusing the first feature map, second feature map, third output feature map, fourth output feature map, and fifth output feature map to obtain the final defect detection feature for defect detection to obtain the defect detection result.

[0028] Furthermore, restoring the identified defect coordinates to the original image coordinate system, specifically:

[0029] Restoring the coordinates of the cut image to the coordinate system on the original image:

[0030]

[0031] y_center = y_center_cutting,

[0032]

[0033] y_height = y_height_cutting,

[0034] Restoring the coordinates of the completed image to the coordinate system on the original image:

[0035]

[0036] y_center = y_center_filling,

[0037]

[0038] y_height = y_height_filling,

[0039] wherein, x_center is the horizontal center point of the detection box in the original coordinate system, x_center_cutting and x_center_filling are the horizontal center points of the detection box in the coordinate systems of the cut image and the filled image, y_center_cutting and y_center_filling are the vertical center points of the detection box in the coordinate systems of the cut image and the filled image, x_width is the width of the detection box in the original coordinate system, x_width_cutting and x_width_filling are the widths of the detection box in the coordinate systems of the cut image and the filled image, y_height is the height of the detection box in the original coordinate system, and y_height_cutting and y_width_filling are the heights of the detection box in the coordinate systems of the cut image and the filled image.

[0040] Further, the formula for selecting and suppressing the defect detection results is:

[0041]

[0042] wherein, D i1 represents the category, D i2 is the horizontal coordinate center point, D i3 is the vertical coordinate center point, D i4 is the width of the detection box, D i5 is the height of the detection box, D ij represents the j-th attribute value of the i-th detection box, I1 is the defect type for which the category belongs to unacceptable, I2 is the defect type that belongs to the same judgment rule but does not belong to unacceptable, I3 is the defect type that belongs to different judgment rules and does not belong to unacceptable, D k,1 is the category of the k-th detection box, D k+1 is the (k + 1)-th detection box, IoU1 is the area ratio of the intersection to the union, IoU2 is the area ratio of two regions, D k+1,1 is the category of the (k + 1)-th detection box.

[0043] The second aspect of the present invention provides a pipeline weld ray image defect detection system based on deep learning, including:

[0044] An image acquisition module, which is used to acquire pipeline weld ray images;

[0045] A feature enhancement module, which is used to enhance the defect features of the pipeline weld radiographic image to obtain a pipeline weld radiographic image with enhanced defect features;

[0046] A feature segmentation module, which is used to perform contour segmentation on the pipeline weld radiographic image with enhanced defect features, and perform complementary segmentation on the image after contour segmentation to obtain multiple segmented images;

[0047] A defect detection module, which is used to detect defects in each segmented image block to obtain defect detection results;

[0048] Restore the identified defect coordinates to the original image coordinate system, select and suppress the defect detection results to obtain the final weld defect detection results.

[0049] The third aspect of the present invention provides a computer-readable storage medium.

[0050] A computer-readable storage medium, on which a computer program is stored, and when the program is executed by a processor, it implements the steps in the above-mentioned defect detection method for pipeline weld radiographic images based on deep learning.

[0051] The fourth aspect of the present invention provides a computer device.

[0052] A computer device, including a memory, a processor, and a computer program stored on the memory and executable on the processor. When the processor executes the program, it implements the steps in the above-mentioned defect detection method for pipeline weld radiographic images based on deep learning.

[0053] Compared with the prior art, the beneficial effects of the present invention are:

[0054] 1. The present invention constructs an automated weld defect detection technology framework. Through steps such as feature enhancement, image segmentation, object detection, mapping restoration, and bounding box selection and suppression, it realizes the accurate identification, positioning, and rating of weld defects, effectively improving the safety and stability of the oil and gas pipeline transportation system.

[0055] 2. The present invention designs a unique data enhancement scheme for the characteristics of pipeline weld radiographic image data. By introducing a specific improvement matrix, it is customized for the characteristics of high contrast, non-uniform illumination, and complex texture of weld images to enhance defect features and improve the clarity and detail information of weld defect images.

[0056] 3. The present invention designs an original drawing cutting and complementary cutting method for pipeline weld ray images. By performing equal-height segmentation on the ray images of pipeline welds with enhanced defect features, removing an image area of half a height unit from both the left and right sides of the original image, and cropping the remaining area. If the final image is not a whole number, it is filled with black to generate another set of image sequences of the same size, which solves the problem of weld images with a large aspect ratio in object detection and ensures the accuracy of defect recognition.

[0057] 4. Based on the detection model YOLOv7, the present invention designs a WCDF feature fusion mechanism, combined with the SE attention mechanism. The WCDF feature fusion mechanism enhances the model's learning ability for features of different scales, enabling the network to capture more subtle defect features while maintaining high-resolution features. The SE attention mechanism enhances the model's sensitivity to useful information and improves the accuracy of the deep neural network for object detection.

[0058] 5. The present invention designs a detectNMS non-maximum suppression method to replace the traditional NMS algorithm for selecting and suppressing defect bounding boxes, so as to remove duplicate boxes and retain the most suitable defects, improving the accuracy of weld defect recognition.

[0059] Advantages of additional aspects of the present invention will be partly given in the following description, partly will become apparent from the following description, or will be understood through the practice of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS

[0060] The accompanying drawings forming a part of this specification are used to provide a further understanding of the present invention. The schematic embodiments and descriptions thereof of the present invention are used to explain the present invention and do not constitute an improper limitation to the present invention.

[0061] Figure 1 is a flowchart of a method for detecting defects in pipeline weld ray images based on deep learning provided by an embodiment of the present invention;

[0062] Figure 2 is a schematic diagram of a method for detecting pipeline weld defects provided by an embodiment of the present invention;

[0063] Figure 3 is a structural diagram of an improved YOLOv7 model provided by an embodiment of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0064] The present invention will be further described below in conjunction with the accompanying drawings and embodiments.

[0065] It should be noted that the following detailed description is illustrative and is intended to provide further explanation of the present invention. Unless otherwise specified, all technical and scientific terms used herein have the same meaning as commonly understood by those of ordinary skill in the technical field to which the present invention belongs.

[0066] It should be noted that the terms used herein are only for describing specific embodiments and are not intended to limit the exemplary embodiments according to the present invention. As used herein, unless the context clearly indicates otherwise, the singular forms are also intended to include the plural forms. In addition, it should also be understood that when the terms "comprising" and / or "including" are used in this specification, they specify the presence of features, steps, operations, devices, components, and / or combinations thereof.

[0067] Embodiment 1

[0068] As Figure 1 and Figure 2 shown, this embodiment provides a method for detecting defects in pipeline weld ray images based on deep learning, including the following steps:

[0069] Step 1: Obtain pipeline weld ray images;

[0070] Step 2: Enhance the defect features of the pipeline weld ray images to obtain pipeline weld ray images with enhanced defect features;

[0071] In this embodiment, the obtained pipeline weld ray images are represented in matrix form as A, and a specific improvement matrix h is introduced. This matrix h is customized for the characteristics of high contrast, non-uniform illumination, and complex texture of the weld images;

[0072] Based on the defect feature enhancement formula of the pipeline weld ray images, the output feature Y after feature enhancement is output, thereby realizing the enhancement of defect features, balancing the non-uniformity of overall illumination, and retaining the edge information of the image while reducing noise.

[0073] In this embodiment, the defect feature enhancement formula based on the pipeline weld ray images is:

[0074]

[0075]

[0076] A′ = A * h, b max = max{b i , i = 1...n}, b min = min{b i , i = 1...n},

[0077] In the formula, A represents the obtained pipeline weld ray image matrix, h is the specific improvement matrix, Y is the output matrix with enhanced features, X is the intermediate variable transition matrix, and b max is the maximum value of b i , b min is the minimum value of b iThe minimum value, b i Is the mean value of the rows of matrix A, a ij Is the value of the image matrix, n is the number of rows of the matrix, m is the number of columns of the matrix, i is a variable, and j is a variable.

[0078] This optimization process for the defect features of the weld image ensures that the weld images obtained under different conditions can achieve consistent optimization effects.

[0079] Step 3: Perform equal-height segmentation on the radiograph of the pipeline weld with enhanced defect features, and perform complementary segmentation on the image after equal-height segmentation to obtain multiple segmented images;

[0080] Since the aspect ratio of the image is very large, when directly performing object detection, the image will be compressed into a square to match the receptive field of computer vision, which will cause the defect graphics in the image to be severely compressed and difficult to be accurately recognized. To solve this problem, this embodiment adopts the method of image cutting. However, cutting may affect the recognition of defects appearing at the segmentation, so a cutting strategy for complementary content needs to be implemented to ensure the integrity of defect recognition. Let the width W and height H of the acquired image;

[0081] Specifically, it includes the following steps:

[0082] Step 301: Perform equal-height segmentation on the radiograph of the pipeline weld with enhanced defect features;

[0083] Cut the image into N or N + 1 square cutting images with side length H, N = int(W / H).

[0084] Specifically: If W / H is an integer, that is, W is divisible by H, then the original image is divided into N square images with width and height both being H, where N = W / H;

[0085] If W / H is a decimal, that is, W is not divisible by H, then the original image is divided into N + 1 square images with width and height both being H, where ( Indicates rounding down). The last square image will be filled with black to ensure that each block is a sequence of square images with width and height both being H;

[0086] Step 302: Remove half of the height unit image areas from the left and right sides of the original image, and crop the remaining area. If the final image is not an integer, fill it with black to generate another set of images with the same size.

[0087] When the image is divided into several segments, it will affect the recognition of position defects where the segmentation exists. It is necessary to complete the image and check this area to prevent missed detection. Specifically, to generate the completed image, cut off half of the width from the left side of the original image, and then cut off half of the remaining width from the right side, and then repeat the equal-width cutting process to obtain N - 1 or N square completed images with side length H.

[0088] Step 4: Perform defect detection on each segmented image block and the constructed defect detection model to obtain the defect detection result;

[0089] In this embodiment, the deep learning object detection algorithm is used to perform independent defect detection on each segmented image block. An improved network based on YOLOv7 is used for object detection. Based on YOLOv7, in view of the characteristics of image data, innovations and optimizations are made in feature fusion and convolution operations, that is, a WCDF (Weighted Cross-Domain Feature) feature fusion mechanism is designed to cooperate with the SE attention mechanism. The WCDF feature fusion mechanism further enhances the model's learning ability for different-scale features, enabling the network to capture more subtle defect features while maintaining high-resolution features. The SE attention mechanism enhances the model's sensitivity to useful information.

[0090] As Figure 3 shown, the improved network based on YOLOv7 includes three parts: the Backbone part, the Neck part, and the Head part;

[0091] The specific defect detection process is as follows:

[0092] First, input the segmented image block into the Backbone part. The input image passes through CBS with a stride of 1 and CBS with a stride of 2, and the feature map P1 is obtained after the first layer. Similarly, the feature map P2 is obtained after the third step. After passing through the ELAN and MP1 modules, the shallow feature map P3 with a size of 80x80x256 is obtained after 16 steps. After passing through the ELAN and MP1 modules again, the middle feature map P4 with a size of 40x40x512 is obtained after 29 steps. After passing through the ELAN and MP1 modules again, the deep feature map P5 with a size of 20x20x1024 is obtained after 42 steps.

[0093] Next, perform the first fusion of features in the Neck part. First, process the P5 feature map through the ELAN module and the SPPCSP module to obtain the intermediate feature map P5_td. Combine the intermediate feature map P5_td and the P4 feature map processed by the ELAN module and fuse them with the given weights to obtain the intermediate feature map P4_td; Based on the intermediate feature map P4_td and the P3 feature map processed by the ELAN module, fuse them with the given weights to obtain the intermediate feature map P3_td;

[0094] This embodiment proposes an improved WCDF feature fusion mechanism. In the FPN stage, connections with the features P3, P4, and P5 of the Backbone part are added, weight parameters are introduced, and calculations are performed using formula (1) to obtain the feature layers of the intermediate features P3′, P4′, and P5′.

[0095] F out1 = Conv(SiLU(w'1·F1 + w'2·F2)) (1),

[0096]

[0097] In the formula, F1 and F2 are input feature maps, F out1 is the output feature map of the first fusion process, w' is the normalized weight, w is the original weight, ∑w i is the sum of all weights, ε is a small positive number to avoid division by zero and serves as a smoothing effect.

[0098] Next, the second fusion of features is performed in the Neck part. First, the intermediate feature map P3_td is processed through the ELAN module to obtain the P3_out feature map. Then, the P3_out feature map is processed through MP2, and the P3_out feature map, the intermediate feature map P4_td, the P4 feature map processed through the ELAN module, and the assigned weights are fused to obtain the P4_out feature map; the features obtained by processing the P4_out feature map through the ELAN and MP2 modules, the intermediate feature map P5_td, and the deep feature map P5 are fused with weights to obtain the P5_out feature map.

[0099] In this embodiment, when performing the second fusion of feature maps, connections of the features of P4 and P5 are added, weight parameters are introduced for fusion, and calculations are performed using formula (2). Weight parameters are also added to the MP2 module; introducing weight parameters in the MP2 module further enhances the model's learning ability for features of different scales, enabling the network to capture more subtle defect features while maintaining high-resolution features.

[0100] F out2 = Conv(SiLU(temp + w'2·F2 + w'3·Conv(F3))) (2),

[0101]

[0102] temp = [w'0·F0|w′1·F1] (4),

[0103] In the formula, temp is a temporary feature, which is formed by splicing the weighted feature maps F0 and F1 obtained previously according to their respective weights w'0 and w′1. w' is obtained through normalization calculation to ensure that the sum of all weights is 1. The feature maps F0, F1, F2, and F4 are gradually obtained during the forward propagation of the network. The feature map F out2 is the output feature map, which respectively represents feature information at different levels;

[0104] Finally, the feature maps P1, P2, P3_out, P4_out, and P5_out are fused, and the final defect detection features are used for defect detection to obtain the defect detection results.

[0105] Add the SE attention mechanism. In the Backbone stage and Neck, add the SE attention mechanism, namely Squeeze-and-Excitation Networks, to the ELAN module and SPPCSPC. By adding this channel attention mechanism, the channel-level feature responses can be adaptively recalibrated, and the representation ability of the network can be enhanced by explicitly modeling the interdependence between channels.

[0106] It should be noted that the ELAN module, SPPCSPC, MPL1, and MPL2 all adopt existing modules, and the structure of this embodiment will not be elaborated.

[0107] Step 5: Restore the identified defect coordinates to the original image coordinate system, keeping the type and confidence unchanged;

[0108] The position information of the multiple bounding boxes obtained by the object detection method is the local position relative to each segmented image. In order to accurately evaluate the defect level and determine its position in the original image, these results need to be restored to the coordinate system of the original image.

[0109] Specific mapping methods are designed for the cut image and the filled image respectively:

[0110] Restore the cut image to the coordinate system on the original image:

[0111]

[0112] y_center = y_center_cutting,

[0113]

[0114] y_height = y_height_cutting,

[0115] Restore the filled image to the coordinate system on the original image:

[0116]

[0117] y_center = y_center_filling,

[0118]

[0119] y_height = y_height_filling,

[0120] wherein, x_center is the horizontal center point of the detection box in the original coordinate system, x_center_cutting and x_center_filling are the horizontal center points of the detection box in the coordinate systems of the cut image and the filled image, y_center_cutting and y_center_filling are the vertical center points of the detection box in the coordinate systems of the cut image and the filled image, x_width is the width of the detection box in the original coordinate system, x_width_cutting and x_width_filling are the widths of the detection box in the coordinate systems of the cut image and the filled image, y_height is the height of the detection box in the original coordinate system, and y_height_cutting and y_width_filling are the heights of the detection box in the coordinate systems of the cut image and the filled image;

[0121] Accurately map and restore it to the original weld radiographic image to obtain the detection D as a data set, which contains n detection records, and each record has 6 parameters, D i1 represents the category, D i2 is the horizontal coordinate center point, D i3 is the vertical coordinate center point, D i4 is the width of the detection box, D i5 is the height of the detection box, ensuring that the defect annotation in the detection result can reflect its specific position in the actual physical image.

[0122] Step 6: Select and suppress the defect detection results to obtain the final weld defect detection results;

[0123] In this embodiment, the designed detectNMS algorithm is used to replace the traditional NMS algorithm to select and suppress the defect bounding boxes to remove duplicate boxes and retain the most suitable defects;

[0124] Due to the specific nature of pipeline weld radiographic images, which is different from traditional NMS and does not have three-dimensional relationships, that is, there is only a single type of defect in the same image area, and the desired results are highly related to the type and area of the defect. Therefore, for the innovatively improved nms algorithm, the segmented and complemented frames obtained in the above steps are passed through the non-maximum suppression rule detectNMS, and its important core formula is as follows:

[0125]

[0126] In the formula, D i1 represents the category, D i2 is the center point of the abscissa, D i3 is the center point of the ordinate, D i4 is the width of the detection frame, D i5 is the height of the detection frame, D ij represents the j-th attribute value of the i-th detection frame. I1 is the category belonging to unacceptable defect types (such as cracks, etc.), I2 belongs to the same judgment rules but not unacceptable defect types, I3 belongs to different judgment rules and neither belongs to unacceptable defect types, D k,1 is the category of the k-th detection frame, D k+1 is the k + 1-th detection frame, IoU1 is the area ratio of the intersection to the union, IoU2 is the area ratio of the two regions, D k+1,1 is the category of the k + 1-th detection frame;

[0127] Its pseudo-code is as follows:

[0128]

[0129]

[0130] Step 7: Classify and rate the defects according to the standards;

[0131] In this embodiment, according to the standard of "SY / T 4109-2020 Non-destructive Testing of Steel Pipelines for Oil and Gas", the detected defects are classified and rated. The defects are divided into two categories: one is the defects calculated according to the total area, such as circular and strip defects; the other is unacceptable defects, such as cracks. Once identified as a crack, its rating is the highest level.

[0132] Embodiment 2

[0133] This embodiment provides a pipeline weld radiographic image defect detection system based on deep learning, including:

[0134] An image acquisition module, which is used to acquire pipeline weld radiographic images;

[0135] A feature enhancement module, which is used to enhance the defect features of the pipeline weld radiographic image to obtain a pipeline weld radiographic image with enhanced defect features;

[0136] A feature segmentation module, which is used to perform equal-height segmentation on the pipeline weld radiographic image with enhanced defect features, and perform complementary segmentation on the image after equal-height segmentation to obtain multiple segmented images;

[0137] A defect detection module, which is used to detect defects in each segmented image block to obtain defect detection results;

[0138] Restore the identified defect coordinates to the original image coordinate system, select and suppress the defect detection results to obtain the final weld defect detection results.

[0139] Example Three

[0140] This embodiment provides a computer-readable storage medium, on which a computer program is stored, and when the program is executed by a processor, it implements the steps in the above-mentioned method for defect detection of pipeline weld radiographic images based on deep learning.

[0141] Example Four

[0142] This embodiment provides a computer device, including a memory, a processor, and a computer program stored on the memory and executable on the processor. When the processor executes the program, it implements the steps in the above-mentioned method for defect detection of pipeline weld radiographic images based on deep learning.

[0143] Those skilled in the art should understand that the embodiments of the present invention can be provided as a method, a system, or a computer program product. Therefore, the present invention can adopt the form of a hardware embodiment, a software embodiment, or an embodiment combining software and hardware aspects. Moreover, the present invention can adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage and optical storage, etc.) containing computer-usable program code.

[0144] The present invention is described with reference to the flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to the embodiments of the present invention. It should be understood that each flow and / or block in the flowchart and / or block diagram, as well as the combination of flows and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to the processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing devices to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing devices generate for implementing in the process Figure 1 each process or multiple processes and / or blocks Figure 1means for the functions specified in one or more boxes.

[0145] These computer program instructions can also be stored in a computer-readable memory that can direct a computer or other programmable data processing device to work in a specific manner, such that the instructions stored in the computer-readable memory produce a manufacture including an instruction means that implements the functions specified in one Figure 1 process or more processes and / or boxes Figure 1 means for the functions specified in one or more boxes.

[0146] These computer program instructions can also be loaded onto a computer or other programmable data processing device, such that a series of operational steps are performed on the computer or other programmable device to produce a computer-implemented process, and thus the instructions executed on the computer or other programmable device provide steps for implementing the functions specified in one Figure 1 process or more processes and / or boxes Figure 1 means for the functions specified in one or more boxes.

[0147] Those of ordinary skill in the art can understand that all or part of the processes of implementing the methods of the above embodiments can be completed by instructing relevant hardware through a computer program. The said program can be stored in a computer-readable storage medium, and when the program is executed, it can include the processes of the embodiments of the above methods. Among them, the said storage medium can be a magnetic disk, an optical disc, a read-only memory (ROM), or a random access memory (RAM), etc.

[0148] The above are only the preferred embodiments of the present invention and are not used to limit the present invention. For those skilled in the art, the present invention can have various changes and modifications. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principle of the present invention shall be included within the protection scope of the present invention.

Claims

1. A pipeline weld radiographic image defect detection method based on deep learning, characterized in that: The steps include: Obtain radiographic images of pipeline welds; Enhance the defect features of the pipeline weld radiographic image to obtain a pipeline weld radiographic image with enhanced defect features; Performing contour segmentation on the pipeline weld radiographic image with enhanced defect features, and performing complementary segmentation on the contour segmented image to obtain multiple segmented images; Perform defect detection on each segmented image block to obtain a defect detection result; The identified defect coordinates are restored to the original image coordinate system, and the defect detection results are selected and suppressed to obtain the final weld defect detection results.

2. The pipeline weld radiographic image defect detection method based on deep learning according to claim 1, characterized in that: The pipeline weld radiographic image defect feature enhancement is performed to obtain a pipeline weld radiographic image with enhanced defect features. The feature enhancement formula is: A′=A*h,b max =max{b i ,i=1...n},b min =min{b t ,i=1...n}, i=1...n, Where A represents the acquired pipeline weld radiographic image matrix, h is the specific improvement matrix, Y is the output matrix of feature enhancement, X is the intermediate variable transition matrix, and b max for b i The maximum value of b min for b i The minimum value of b i is the mean of the rows of matrix A, a ij is the value of the image matrix, n is the number of matrix rows, m is the number of matrix columns, i is the detection box variable, and j is the attribute value variable.

3. The pipeline weld radiographic image defect detection method based on deep learning according to claim 1, characterized in that: The contour segmentation of the pipeline weld radiographic image with enhanced defect features comprises: If W / H is an integer, that is, W is divisible by H, then the original image is divided into N square images with width and height H, where N = W / H; If W / H is a decimal, that is, W cannot be divided by H, the original image is divided into N+1 square images with width and height H, where Indicates rounding down; W and H are the width and height of the image.

4. The pipeline weld radiographic image defect detection method based on deep learning according to claim 1, characterized in that: The completion segmentation of the image after equal-height segmentation includes removing the image area of ​​half the height unit from the left and right sides of the original image, and cropping the remaining area. If the final image is not whole, fill it with black to generate another set of equal-sized image sequences.

5. The pipeline weld radiographic image defect detection method based on deep learning according to claim 1, characterized in that: The defect detection is performed on each segmented image block to obtain a defect detection result, including: The segmented image blocks are input into the Backbone part, and the first feature map, the second feature map, the third feature map, the fourth feature map and the fifth feature map are extracted layer by layer from bottom to top; Process the fifth feature map through the ELAN module and the SPPCSP-SE module to obtain a fifth intermediate feature map, fuse the fifth intermediate feature map with the fourth feature map to obtain a fourth intermediate feature map, and fuse the fourth intermediate feature map with the third feature map to obtain a third intermediate feature map; Processing the third intermediate feature map through the ELAN module to obtain a third output feature map, fusing the third output feature, the fourth intermediate feature map and the fourth feature map to obtain a fourth output feature map; fusing the fourth output feature map, the fifth intermediate feature map and the fifth feature map to obtain a fifth output feature map; The first feature map, the second feature map, the third output feature map, the fourth output feature map and the fifth output feature map are fused to obtain a final defect detection feature for performing defect detection to obtain a defect detection result.

6. The pipeline weld radiographic image defect detection method based on deep learning according to claim 1, characterized in that: The identified defect coordinates are restored to the original image coordinate system, specifically: The cut image is restored to the coordinate system of the original image: y_center=y_center_cutting, y_height=y_height_cutting, The complemented image is restored to the coordinate system of the original image: y_center=y_center_filling, y_height=y_height_filling, Wherein, x_center is the horizontal center point of the detection box in the original coordinate system, x_center_cutting and x_center_filling are the horizontal center points of the detection box in the coordinate systems of the cut image and the completed image, y_center_cutting and y_center_filling are the vertical center points of the detection box in the coordinate systems of the cut image and the completed image, x_width is the width of the detection box in the original coordinate system, x_width_cutting and x_width_filling are the widths of the detection box in the coordinate systems of the cut image and the completed image, y_height is the height of the detection box in the original coordinate system, y_height_cutting and y_width_filling are the heights of the detection box in the coordinate systems of the cut image and the completed image.

7. The pipeline weld radiographic image defect detection method based on deep learning according to claim 1, characterized in that: The formula for selecting and suppressing defect detection results is: Where D i1 Indicates category, D i2 is the center point of the horizontal axis, D i3 is the vertical coordinate center point, D i4 is the detection box width, D i5 is the detection box height, D ij represents the jth attribute value of the i-th detection box, I1 is the defect type that belongs to the unacceptable category, I2 is the defect type that has the same evaluation rules but does not belong to the unacceptable category, I3 is the defect type that has different evaluation rules and does not belong to the unacceptable category, D k,1 is the category of the kth detection box, D k+1 is k+1 detection boxes, IoU1 is the area ratio of the intersection and the union, IoU2 is the area ratio of the two regions, D k+1,1 are the categories of the k+1 detection boxes.

8. Pipeline weld radiographic image defect detection system based on deep learning, characterized in that: include: An image acquisition module, which is used to acquire a pipeline weld radiographic image; A feature enhancement module, which is used to enhance the defect features of the pipeline weld radiographic image to obtain a pipeline weld radiographic image with enhanced defect features; A feature segmentation module is used to perform contour segmentation on the pipeline weld radiographic image with enhanced defect features, and to perform complementary segmentation on the contour segmented image to obtain multiple segmented images; A defect detection module is used to perform defect detection on each segmented image block to obtain a defect detection result; The identified defect coordinates are restored to the original image coordinate system, and the defect detection results are selected and suppressed to obtain the final weld defect detection results.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the steps in the pipeline weld radiographic image defect detection method based on deep learning as described in any one of claims 1 to 7 are implemented.

10. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the program, the steps in the pipeline weld radiographic image defect detection method based on deep learning as described in any one of claims 1 to 7 are implemented.