A digital radiographic defect recognition system

By designing a digital X-ray defect recognition system that combines image segmentation and convolutional neural networks, the system achieves automated identification, storage, and analysis of defects in X-ray images. This solves the problems of poor reliability and low automation in existing technologies, and improves detection efficiency and accuracy.

CN122312466APending Publication Date: 2026-06-30CHINA PETROLEUM PIPELINE ENG CO LTD +2
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
CHINA PETROLEUM PIPELINE ENG CO LTD
Filing Date
2024-12-30
Publication Date
2026-06-30

AI Technical Summary

Technical Problem

Existing technologies suffer from poor reliability and low automation in X-ray image defect assessment, and the defect rating process is time-consuming and labor-intensive, lacking intuitive statistical analysis tools.

Method used

Design a digital ray defect recognition system, including modules for image reading, preprocessing, defect annotation, text recognition, defect recognition, and level evaluation. Combine image segmentation algorithms, convolutional neural networks, and CRNN networks to achieve automated defect recognition and storage analysis.

Benefits of technology

It improves the accuracy and automation of defect detection, reduces the labor intensity of workers, provides defect statistical analysis functions, and significantly improves detection efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122312466A_ABST
    Figure CN122312466A_ABST
Patent Text Reader

Abstract

This invention belongs to the field of image target detection, specifically relating to a digital X-ray defect recognition system, aiming to solve the problems of high labor intensity and inconsistent judgment results in manual X-ray digital image defect assessment. The invention includes: an image preprocessing module, which divides the image into multiple small blocks, each containing a weld seam, and obtains a fourth image through gradient calculation; a text recognition module, used to distinguish text region features from background features based on dynamic thresholds, and to recognize text region features using a CRNN network architecture to obtain text recognition information; a defect recognition module, which performs perceptual fusion on defects in the fourth image based on a convolutional neural network, and marks the defect feature recognition box on the first image to output the defect recognition result; and a data storage module, used to store the defect recognition result and text recognition information. This invention forms a complete automatic defect detection process for weld seam images.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of image recognition, and specifically relates to a digital X-ray defect recognition system. Background Technology

[0002] Welding, as a traditional processing method, plays a vital role in national defense construction. X-ray imaging inspection is a key method for evaluating welding quality, but the resulting images require manual evaluation. Due to the heavy workload and visual fatigue of workers, misjudgments and omissions are prone to occur. Furthermore, worker experience can influence the evaluation of the same defect, leading to inconsistencies and ultimately compromising the reliability of the inspection results. In addition, defect rating relies on repeated manual review of standards, which is time-consuming and labor-intensive, and there are no intuitive statistical analysis tools for defect information in a batch of images. Therefore, this system is designed to achieve intelligent evaluation, storage, and analysis of defects in digital X-ray images. Summary of the Invention

[0003] To address the problems of poor reliability, low automation, and difficulty in data statistics in existing X-ray image defect assessment technologies, this invention provides a digital X-ray defect identification system, the system comprising:

[0004] The image reading module is used to read the ray image in DICODE format as the first image;

[0005] The image preprocessing module is used to annotate the first image with defects using the image annotation tool LabelImg to obtain a coarsely annotated image; remove the top and bottom edges of the coarsely annotated image to obtain a second image; divide the second image into multiple small blocks based on the image segmentation algorithm to obtain a third image, each small block containing the weld seam of the pipe; calculate the gradient distribution of the third image and perform conversion to obtain a fourth image;

[0006] The text recognition module is used to distinguish between text region features and background features in a fourth image based on a dynamic threshold; it uses a CRNN network architecture to recognize text region features to obtain text recognition information; the text recognition information includes project name, acquisition date, weld number, pipe diameter, and wall thickness.

[0007] The defect recognition module is used to perform perceptual fusion on defects in the fourth image based on a convolutional neural network to obtain defect features, and then mark the recognition boxes of the defect features on the first image to output the defect recognition results. The defect recognition results include defect type, defect location, defect length, and defect width.

[0008] The level evaluation module is used to rate the defect identification results and obtain the level evaluation results;

[0009] The data storage module is used to store the defect identification results, text information, and level evaluation results in the image, and to organize and statistically analyze them.

[0010] In a preferred embodiment, the process of calculating the gradient distribution of the third image and converting it to obtain the fourth image includes:

[0011] The third image is normalized to obtain the fourth image containing the weld seam.

[0012] In a preferred embodiment, the process of normalizing the third image to obtain a fourth image containing the weld portion includes:

[0013] First, the contrast of the third image is enhanced by histogram equalization to obtain a contrast-enhanced third image. Then, the vertical gray value distribution of the contrast-enhanced third image is calculated to obtain a gray value image. Next, the gray value gradient is calculated on the gray value image to obtain the gradient calculation result. Finally, the weld seam part is cropped based on the gradient calculation result to obtain the fourth image.

[0014] In a preferred embodiment, the process of distinguishing text region features from background features in a fourth image based on a dynamic threshold includes:

[0015] Differentiable thresholding is used to distinguish the text region from the background in the fourth image. The first feature is obtained by extracting features from the text region and center coordinates through Backbone network and FPN network. Then, the first feature is convolved to obtain the text detail feature. The dynamic threshold of the text detail feature is predicted based on the DB model. The text region feature and background feature are distinguished based on the dynamic threshold.

[0016] In a preferred embodiment, the convolutional neural network includes: an input layer, a convolutional layer, an activation function, a pooling layer, a fully connected layer, and an output layer.

[0017] In a preferred embodiment, the convolutional neural network performs perceptual fusion on the fourth image to obtain defect features, including:

[0018] The input layer is used to input a fourth image in PNG format;

[0019] The convolutional layer is used to perform convolution calculations on the fourth image to obtain convolutional features;

[0020] The activation function introduces the obtained convolutional defect features into nonlinear elements, and improves the feature dimension of the defects based on the nonlinear elements to obtain high-dimensional features.

[0021] The pooling layer uses SPP pooling to reduce the dimensionality of high-dimensional features, retaining key information about defects to obtain key features;

[0022] The fully connected layer and the output layer are used to globally integrate and classify key features, and the defect features obtained after integration and classification are output.

[0023] In a preferred embodiment, the level evaluation module specifically includes:

[0024] The evaluation rules are used to input defects, and the defect characteristics are rated based on the defect evaluation rules.

[0025] A second aspect of the present invention provides a digital X-ray defect identification method, based on the above-described digital X-ray defect identification system, the method comprising:

[0026] Read the ray image in dicode format as the first image;

[0027] The first image is labeled with defects using the image annotation tool LabelImg to obtain a coarsely annotated image; the top and bottom edges of the coarsely annotated image are removed to obtain the second image; the second image is divided into multiple small blocks based on the image segmentation algorithm to obtain the third image, each block containing the weld seam of the pipe; the gradient distribution of the third image is calculated and converted to obtain the fourth image;

[0028] The text region features and background features of the fourth image are distinguished based on dynamic thresholding; the text region features are recognized based on CRNN network architecture to obtain text recognition information; the text recognition information includes project name, collection date, weld number, pipe diameter, and wall thickness.

[0029] Based on the convolutional neural network, the defects in the fourth image are perceptually fused to obtain defect features, and the recognition boxes of the defect features are marked on the first image to output the defect recognition results; the defect recognition results include defect type, defect location, defect length, and defect width.

[0030] The defect identification results are rated to obtain the level evaluation result;

[0031] Store the defect identification results, text information, and level evaluation results in the image, and then organize and statistically analyze them.

[0032] The beneficial effects of this invention are:

[0033] (1) The system of the present invention integrates multiple modules such as image preprocessing, defect annotation, intelligent recognition and defect storage analysis, forming a complete weld defect detection process. Furthermore, by combining weld extraction algorithm and text recognition algorithm, the system can effectively process DR images, improve the accuracy of subsequent defect detection, reduce the labor intensity of workers, and provide defect statistical analysis functions.

[0034] (2) This system uses an improved image annotation tool that supports DICOM format images, improving the automation level and accuracy of annotation results. It also employs multi-scale feature fusion technology to enhance the ability to identify weld defects of different sizes, especially in small target detection. An adaptive weighted loss function is introduced to increase the focus of model training on small target defects, reducing the false negative rate.

[0035] (3) This system realizes automated batch recognition of a large number of weld images, which significantly improves the detection efficiency compared with manual evaluation. Attached Figure Description

[0036] Other features, objects, and advantages of this application will become more apparent from the following detailed description of non-limiting embodiments with reference to the accompanying drawings:

[0037] Figure 1 This is a schematic diagram of the structure of a digital X-ray defect identification system according to an embodiment of the present invention;

[0038] Figure 2 The present invention employs a gradient reduction method to perform planning processing on two types of third images—uniform and non-uniform gray levels—to obtain a fourth image. This is a first schematic diagram.

[0039] Figure 3 This is a second schematic diagram of the present invention, which uses a gradient conversion method to perform planning processing on two types of third images, namely uniform gray level and non-uniform gray level, in order to obtain a fourth image.

[0040] Figure 4 This is a schematic diagram of the text region location recognition results according to an embodiment of the present invention;

[0041] Figure 5 This is a schematic diagram of the network structure for text recognition in an embodiment of the present invention;

[0042] Figure 6 This is a schematic diagram of the interface design of an embodiment of the present invention;

[0043] Figure 7 This is a schematic diagram illustrating the process of obtaining text recognition information through text recognition in an embodiment of the present invention;

[0044] Figure 8 This is a design diagram of the data storage and analysis module interface in an embodiment of the present invention. Detailed Implementation

[0045] The present application will now be described in further detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are for illustrative purposes only and are not intended to limit the invention. Furthermore, it should be noted that, for ease of description, only the parts relevant to the invention are shown in the accompanying drawings.

[0046] It should be noted that, unless otherwise specified, the embodiments and features described in this application can be combined with each other. This application will now be described in detail with reference to the accompanying drawings and embodiments.

[0047] This invention provides a digital X-ray defect identification system, the system comprising:

[0048] The image reading module is used to read the ray image in DICODE format as the first image;

[0049] The image preprocessing module is used to annotate the first image with defects using the image annotation tool LabelImg to obtain a coarsely annotated image; remove the top and bottom edges of the coarsely annotated image to obtain a second image; divide the second image into multiple small blocks based on the image segmentation algorithm to obtain a third image, each small block containing the weld seam of the pipe; calculate the gradient distribution of the third image and perform conversion to obtain a fourth image;

[0050] The text recognition module is used to distinguish between text region features and background features in a fourth image based on a dynamic threshold; it uses a CRNN network architecture to recognize text region features to obtain text recognition information; the text recognition information includes project name, acquisition date, weld number, pipe diameter, and wall thickness.

[0051] The defect recognition module is used to perform perceptual fusion on defects in the fourth image based on a convolutional neural network to obtain defect features, and then mark the recognition boxes of the defect features on the first image to output the defect recognition results. The defect recognition results include defect type, defect location, defect length, and defect width.

[0052] The level evaluation module is used to rate the defect identification results and obtain the level evaluation results;

[0053] The data storage module is used to store the defect identification results, text information, and level evaluation results in the image, and to organize and statistically analyze them.

[0054] To more clearly illustrate the digital X-ray defect identification system of the present invention, the following description is provided in conjunction with... Figure 1 The modules in the embodiments of the present invention will be described in detail below.

[0055] This invention proposes a digital radiography (DR) defect intelligent recognition system, which improves the automation and accuracy of weld defect detection through four functional modules: image preprocessing, defect annotation, intelligent defect recognition, and data storage and analysis. The system combines weld extraction and text recognition algorithms for preprocessing, uses annotation tools to mark defects, trains and predicts images using an improved YOLO model, and records defects through a data storage and analysis system, ultimately achieving efficient, intelligent batch recognition and statistical analysis of weld defects.

[0056] The digital X-ray defect identification system of the first embodiment of the present invention is described in detail below:

[0057] The image reading module is used to read the ray image in DICODE format as the first image;

[0058] The image preprocessing module is used to annotate the first image with defects using the image annotation tool LabelImg to obtain a coarsely annotated image; remove the top and bottom edges of the coarsely annotated image to obtain a second image; divide the second image into multiple small blocks based on the image segmentation algorithm to obtain a third image, each small block containing the weld seam of the pipe; calculate the gradient distribution of the third image and perform conversion to obtain a fourth image;

[0059] In this embodiment, the traditional graphical interface image annotation tool LabelImg does not support DICOM format images of pipe welds detected by DR. The following are the steps to improve LabelImg to support DICOM format images:

[0060] A library for handling DICOM images needs to be installed. Commonly used libraries in Python include pydicom and pillow. The LabelImg source code is written in Python, and DICOM format support is added by modifying the source code. Support for DICOM files is added to the file reading section of LabelImg. Logic for processing DICOM files is added. The pydicom library is used to read DICOM files and convert them to QImage objects for display in LabelImg. Ensure that the annotation results can be correctly saved as a txt file. The pydicom library is needed to modify DICOM metadata.

[0061] The image after defect annotation is stored in the data storage and analysis module, which provides a data source for data training and can also collect various information about the weld joint.

[0062] Specifically: The image is loaded using the OpenCV image processing library and subjected to a preliminary visual inspection to confirm its integrity and quality. This step is necessary because the quality and integrity of the image directly affect the effectiveness of subsequent processing. Image processing techniques are then used to identify and remove the top and bottom edges of the image. This typically involves boundary detection, which can be performed by analyzing the edge strength or using the image's histogram to determine edge locations. Once determined, these edge regions can be cropped. For large images, to improve processing efficiency and accuracy, the image is segmented into multiple smaller blocks. This step can be implemented using image segmentation algorithms, such as region growing or thresholding methods. Each block should contain the complete weld seam portion to facilitate subsequent local processing.

[0063] In this embodiment, the process of calculating the gradient distribution of the third image and converting it to obtain the fourth image includes: enhancing the local contrast brightness of the third image by enhancing local contrast to obtain a contrast-enhanced third image; smoothing the contrast-enhanced third image using a Gaussian filter to obtain a smoothed image; filtering the smoothed image using a filter to obtain a filtered image; and calculating the gradient distribution of the filtered image using the Sobel operator and converting it to obtain the fourth image. Specifically, the Sobel operator is used to calculate the gradient of the image to highlight the edges of the weld. Gradient calculation helps with subsequent edge detection and feature extraction. In some cases, if the contrast between the weld and the background is low, the visibility of the weld can be enhanced by inverting grayscale values. This step is achieved by simply replacing the grayscale value of each pixel with 255 minus the original grayscale value. A Gaussian filter is used to smooth the image and reduce the impact of noise. The choice of filter depends on the noise characteristics of the image and the processing requirements. Statistical analysis of the weld region is performed on each cut image block, including the width, length, and area of ​​the weld. This can be achieved through morphological operations and image analysis techniques. After completing all image processing steps, an overall weld area statistical analysis is performed to obtain the overall characteristics and quality assessment of the weld. This helps in evaluating the quality of the welding process. The processed image is saved as a standard PNG file for subsequent analysis and use.

[0064] The text recognition module is used to distinguish between text region features and background features based on dynamic thresholds; it uses a CRNN network architecture to recognize text region features to obtain text recognition information; the text recognition information includes project name, collection date, weld number, pipe diameter, and wall thickness; during text recognition, the position of the lead characters in the marking strip can also be obtained, thereby obtaining accurate defect location information.

[0065] Specifically, Figure 4 This is a schematic diagram illustrating the location of the text region in an embodiment of the present invention; as shown... Figure 5As shown, a deep learning model is used to detect and recognize the location of text information in pipe weld images to support image stitching and extract text information from the images. The process is divided into two main parts: character localization and character information extraction. First, the X-ray image is preprocessed, including geometric transformation, image enhancement, and deblurring, to improve image quality. Then, a segmentation-based text localization method is used, employing differentiable thresholding to distinguish text regions from the background, accurately locating the boundaries of text regions, and extracting the center coordinates of the text regions, providing correction support for image stitching. For text detection, a differentiable thresholding method based on segmentation is used. This method can dynamically distinguish text regions from the background. The input image first extracts features through a Backbone network and an FPN (Feature Pyramid Network), then convolves these features to generate probability maps and threshold maps of the text regions, and finally, post-processing through the network yields the text enclosing curve. The text detection method using the DB model is more effective than ordinary text detection algorithms. It predicts the threshold at each location of the text region in the image through a network, which can better separate the text information from the background image and help extract the features of the text information.

[0066] A QT-based deployment method was used to deploy the trained model to real-world applications. This included converting the model to an intermediate representation, optimizing the network structure, and efficiently running the model on a hardware platform using a high-performance programming framework and inference engine. This approach enabled the integration and application of deep learning models in a real-world software environment, improving computational efficiency and ensuring the accuracy and reliability of the recognition results. The QT deployment method for the trained model is as follows: Figure 7 As shown.

[0067] The defect recognition module is used to perform perceptual fusion on defects in the fourth image based on a convolutional neural network to obtain defect features, and then mark the recognition boxes of the defect features on the first image to output the defect recognition results. The defect recognition results include defect type, defect location, defect length, and defect width.

[0068] The convolutional neural network includes: an input layer, a convolutional layer, an activation function, a pooling layer, a fully connected layer, and an output layer;

[0069] The convolutional neural network performs perceptual fusion on the fourth image to obtain defect features, including:

[0070] The input layer is used to input a fourth image in PNG format;

[0071] The convolutional layer is used to perform convolution calculations on the fourth image to obtain convolutional features;

[0072] The activation function introduces the obtained convolutional defect features into nonlinear elements, and improves the feature dimension of the defects based on the nonlinear elements to obtain high-dimensional features.

[0073] The pooling layer uses SPP pooling to reduce the dimensionality of high-dimensional features, retaining key information about defects to obtain key features;

[0074] The fully connected layer and the output layer are used to globally integrate and classify key features, and the defect features obtained after integration and classification are output.

[0075] In this embodiment, a multi-scale feature fusion mechanism is introduced into the lightweight CSP network structure.

[0076] In this embodiment, to address the issues of high labor intensity and inconsistent judgment results in manual assessment of digital image defects, the defect identification process specifically includes: This system has undergone customized improvements based on the traditional YOLO algorithm to enhance its adaptability and identification effectiveness in pipeline weld defect detection. Details are as follows:

[0077] To address the challenge of small target recognition in weld defect detection, the system employs an improved lightweight CSP (Cross-Stage Partial) network structure in the YOLO backbone. This improvement introduces a multi-scale feature fusion mechanism during feature extraction, enhancing the model's ability to perceive small targets while reducing the number of model parameters. Furthermore, the adaptive weight adjustment strategy in the CSP network further enhances the diversity of feature extraction, enabling the model to better capture complex defect shapes in welds.

[0078] In the Neck section, this system employs an enhanced Feature Pyramid Network (FPN) combined with a Spatial Pyramid Pooling (SPP) module for feature fusion processing. This design enables the model to maintain high feature resolution across different scales, exhibiting particularly high accuracy in detecting small defects such as weld holes and cracks. Simultaneously, the system utilizes an adaptive feature pooling strategy to automatically adjust the pooling window size based on the shape and size of weld defects in the image, ensuring effective representation of the feature maps.

[0079] To meet the real-time requirements of industrial scenarios, the system optimizes the Anchor strategy in the YOLO Head module, adopting an Anchor-Free design to avoid reliance on prior bounding boxes. This improved design can directly predict the center point and bounding box parameters of the target, simplifying the inference process and improving the detection efficiency of weld defects. Furthermore, the system introduces a specially optimized small target detection strategy, significantly improving the model's accuracy and recall when handling small targets such as weld defects.

[0080] To address the challenge of detecting small defects in weld seams, a custom weighted loss function is proposed. Building upon the traditional GIoU (Generalized Intersection over Union) loss, an improved weighted loss function is employed. This function dynamically adjusts the loss based on the defect's area, shape, and category, assigning higher weights to small defects such as weld holes and microcracks during model training, thereby improving detection accuracy. This improvement significantly reduces the false negative rate for small defects and also optimizes the model's bounding box regression.

[0081] To further improve detection accuracy and model adaptability, the system introduces an active learning mechanism. During model training, samples with low confidence are actively labeled to enhance the model's learning effect. This active learning strategy allows the system to continuously optimize model performance through human-computer collaboration, even in scenarios with scarce data. By automatically selecting uncertain samples for expert labeling, the system can iteratively improve the model's ability to detect specific defects, reducing missed detections.

[0082] To improve inspection efficiency and reduce manual intervention, a batch recognition function has been implemented, enabling automated defect identification of multiple welds. Through parallel processing, large amounts of data can be analyzed in a short time, significantly improving inspection efficiency and accuracy. First, the system receives a set of weld images, supporting DICOM format. Users only need to provide the folder path, and the module will automatically load all images for processing. The system performs preprocessing operations on each image, uses a pre-trained model for defect identification, and leverages GPU acceleration through parallel computing to achieve batch inference, labeling the recognition results for each image in the folder.

[0083] The level evaluation module is used to rate the defect identification results and obtain the level evaluation results;

[0084] The level evaluation module is specifically designed to input the evaluation rules for defects and to rate defects based on the defect characteristics according to the defect evaluation rules.

[0085] In this embodiment, defects are automatically rated according to industry standards. Currently, the system uses NB / T4109 and SY / T47013 standards, which can be switched between each other.

[0086] The data storage module is used to store the defect identification results, text information, and level evaluation results in the image, and to organize and statistically analyze them.

[0087] In this embodiment, a data storage and analysis module is used to store the marked defect information and text recognition information. The data storage and analysis module supports full-text search, enabling rapid searching and retrieval of image information. It also boasts superior read and write performance, making it suitable for real-time recording and querying of weld defect information.

[0088] It should be noted that the digital X-ray defect identification system provided in the above embodiments is only an example of the division of the above functional modules. In practical applications, the above functions can be assigned to different functional modules as needed, that is, the modules or steps in the embodiments of the present invention can be further decomposed or combined. For example, the modules in the above embodiments can be merged into one module, or further divided into multiple sub-modules to complete all or part of the functions described above. The names of the modules and steps involved in the embodiments of the present invention are only for distinguishing the various modules or steps and are not considered as an improper limitation of the present invention.

[0089] A digital X-ray defect identification method according to a second embodiment of the present invention, based on the above-described digital X-ray defect identification system, the method comprising:

[0090] Read the ray image in dicode format as the first image;

[0091] The first image is labeled with defects using the image annotation tool LabelImg to obtain a coarsely annotated image; the top and bottom edges of the coarsely annotated image are removed to obtain the second image; the second image is divided into multiple small blocks based on the image segmentation algorithm to obtain the third image, each block containing the weld seam of the pipe; the gradient distribution of the third image is calculated and converted to obtain the fourth image;

[0092] The text region features and background features of the fourth image are distinguished based on dynamic thresholding; the text region features are recognized based on CRNN network architecture to obtain text recognition information; the text recognition information includes project name, collection date, weld number, pipe diameter, and wall thickness.

[0093] Based on the convolutional neural network, the defects in the fourth image are perceptually fused to obtain defect features. The recognition boxes of the defect features are then marked on the first image to output the defect recognition results. The defect recognition results include defect type, defect location, defect length, and defect width.

[0094] The defect identification results are rated to obtain the level evaluation result;

[0095] Store the defect identification results, text information, and level evaluation results, and organize and statistically analyze them.

[0096] Although the steps in the above embodiments are described in the above order, those skilled in the art will understand that in order to achieve the effect of this embodiment, different steps do not need to be executed in such an order. They can be executed simultaneously (in parallel) or in a reverse order. These simple variations are all within the protection scope of this invention.

[0097] Those skilled in the art will understand that, for the sake of convenience and brevity, the specific working process and related descriptions of the system described above can be found in the corresponding processes in the foregoing method embodiments, and will not be repeated here.

[0098] The terms “first”, “second”, etc., are used to distinguish similar objects, not to describe or indicate a specific order or sequence.

[0099] The term "comprising" or any other similar term is intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus / device that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent in such process, method, article, or apparatus / device.

[0100] The technical solution of the present invention has been described above with reference to the preferred embodiments shown in the accompanying drawings. However, it will be readily understood by those skilled in the art that the scope of protection of the present invention is obviously not limited to these specific embodiments. Without departing from the principles of the present invention, those skilled in the art can make equivalent changes or substitutions to the relevant technical features, and the technical solutions after these changes or substitutions will all fall within the scope of protection of the present invention.

Claims

1. A digital radiographic defect recognition system, characterized by, The system includes: The image reading module is used to read the ray image in DICODE format as the first image; The image preprocessing module is used to annotate the first image with defects using the image annotation tool LabelImg to obtain a coarsely annotated image; remove the top and bottom edges of the coarsely annotated image to obtain a second image; divide the second image into multiple small blocks based on the image segmentation algorithm to obtain a third image, each small block containing the weld seam of the pipe; calculate the gradient distribution of the third image and perform conversion to obtain a fourth image; The text recognition module is used to distinguish between text region features and background features in a fourth image based on a dynamic threshold; it uses a CRNN network architecture to recognize text region features to obtain text recognition information; the text recognition information includes project name, acquisition date, weld number, pipe diameter, and wall thickness. The defect recognition module is used to perform perceptual fusion on defects in the fourth image based on a convolutional neural network to obtain defect features, and then mark the recognition boxes of the defect features on the first image to output the defect recognition results; the defect recognition results include defect type, defect location, defect length, and defect width; The level evaluation module is used to rate the defect identification results and obtain the level evaluation results; The data storage module is used to store the defect identification results, text information, and level evaluation results in the image, and to organize and statistically analyze them.

2. A digital radiographic defect recognition system according to claim 1, wherein, The process of calculating the gradient distribution of the third image and converting it to obtain the fourth image includes: The third image is normalized to obtain the fourth image containing the weld seam.

3. A digital radiographic defect recognition system according to claim 2, wherein, The fourth image, which includes the weld seam portion, is obtained by applying a normalization method to the third image. First, the contrast of the third image is enhanced by histogram equalization to obtain a contrast-enhanced third image. Then, the vertical gray value distribution of the contrast-enhanced third image is calculated to obtain a gray value image. Next, the gray value gradient is calculated on the gray value image to obtain the gradient calculation result. Finally, the weld seam part is cropped based on the gradient calculation result to obtain the fourth image.

4. The digital radiographic defect recognition system of claim 1, wherein, The process of distinguishing text region features from background features in a fourth image based on dynamic thresholding includes: Differentiable thresholding is used to distinguish the text region from the background in the fourth image. The first feature is obtained by extracting features from the text region and center coordinates through Backbone network and FPN network. Then, the first feature is convolved to obtain the text detail feature. The dynamic threshold of the text detail feature is predicted based on the DB model. The text region feature and background feature are distinguished based on the dynamic threshold.

5. The digital radiographic defect recognition system of claim 1, wherein, The convolutional neural network includes: an input layer, a convolutional layer, an activation function, a pooling layer, a fully connected layer, and an output layer.

6. A digital radiographic defect recognition system according to claim 5, wherein, The convolutional neural network performs perceptual fusion on the fourth image to obtain defect features, including: The input layer is used to input a fourth image in PNG format; The convolutional layer is used to perform convolution calculations on the fourth image to obtain convolutional features; The activation function introduces the obtained convolutional defect features into nonlinear elements, and improves the feature dimension of the defects based on the nonlinear elements to obtain high-dimensional features. The pooling layer uses SPP pooling to reduce the dimensionality of high-dimensional features, retaining key information about defects to obtain key features; The fully connected layer and the output layer are used to globally integrate and classify key features, and the defect features obtained after integration and classification are output.

7. The digital radiographic defect recognition system of claim 1, wherein, The level evaluation module specifically includes: The evaluation rules are used to input defects, and the defect characteristics are rated based on the defect evaluation rules.

8. A digital X-ray defect identification method, based on the digital X-ray defect identification system according to any one of claims 1-7, characterized in that, The method includes: Read the ray image in dicode format as the first image; The first image is labeled with defects using the image annotation tool LabelImg to obtain a coarsely annotated image; the top and bottom edges of the coarsely annotated image are removed to obtain the second image; the second image is divided into multiple small blocks based on the image segmentation algorithm to obtain the third image, each block containing the weld seam of the pipe; the gradient distribution of the third image is calculated and converted to obtain the fourth image; The text region features and background features of the fourth image are distinguished based on dynamic thresholding; the text region features are recognized based on CRNN network architecture to obtain text recognition information; the text recognition information includes project name, collection date, weld number, pipe diameter, and wall thickness. Based on the convolutional neural network, the defects in the fourth image are perceptually fused to obtain defect features. The recognition boxes of the defect features are then marked on the first image to output the defect recognition results. The defect recognition results include defect type, defect location, defect length, and defect width. The defect identification results are rated to obtain the level evaluation result; Store the defect identification results, text information, and level evaluation results, and organize and statistically analyze them.