Digital ray intelligent detection method and device for pipeline detection

CN122657041APending Publication Date: 2026-08-28HANGZHOU HONGAN TESTING TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610789608.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-06-03
Publication Date
2026-08-28

AI Technical Summary

Technical Problem

在图像质量判定环节依赖人工目视测量,效率低且一致性差

Benefits of technology

[0015] The present invention provides a digital radiographic intelligent inspection method and device for pipeline inspection. Through an automated image quality assessment and defect detection collaborative mechanism, it reduces reliance on manual labor and has the advantages of high automation, improved inspection efficiency, and enhanced result consistency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122657041A_ABST
    Figure CN122657041A_ABST
Patent Text Reader

Abstract

The application discloses a kind of digital ray intelligent detection method and device for pipeline detection, it is related to intelligent detection technical field, adopts double-wall single shadow radiographic mode, and the original image of steam pipeline weld is collected by X-ray equipment;Image quality characteristic parameters of original image are automatically extracted, and the comparison result with preset threshold value, output the quality state label of original image;When quality state label is unqualified, radiographic parameter adjustment suggestion is generated according to image quality characteristic parameters and triggers replay;When quality state label is qualified, output the image confirmed by quality and its corresponding quality confidence information;Based on multi-task visual inspection method, weld area segmentation and defect instance segmentation are carried out to the image confirmed by quality, output defect data, and output evaluation level according to defect data combined with quality confidence information.By automatic image quality evaluation and defect detection collaborative mechanism, it can reduce labor cost and improve detection efficiency and accuracy.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of intelligent inspection technology, specifically to a digital X-ray intelligent inspection method and device for pipeline inspection. Background Technology

[0002] Industrial steam pipelines are widely used in petrochemical, power, and heating industries to transport high-temperature, high-pressure steam media. The quality of their welded joints directly affects the operational safety and lifespan of the pipeline system. Currently, digital X-ray imaging technology is widely used for defect detection in steam pipeline welds, employing radiographic imaging to detect internal weld defects.

[0003] The digital radiographic inspection process for steam pipeline welds typically includes three main stages: image acquisition, image quality assessment, and defect identification and grading. The image quality assessment stage relies on manual visual measurement, which is inefficient and inconsistent. Furthermore, in the current process, quality assessment during image acquisition and subsequent defect evaluation are usually conducted independently in separate stages, sometimes even by different personnel at different times and locations. This disconnect between the two stages affects the consistency of the evaluation results and the accuracy of steam pipeline inspection. Summary of the Invention

[0004] The purpose of this invention is to overcome the shortcomings of the prior art. This invention provides a digital radiographic intelligent inspection method and device for pipeline inspection. Through an automated image quality assessment and defect detection collaborative mechanism, it can detect the weld position of steam pipelines. It has the advantages of high automation, low labor cost, and improved inspection efficiency and accuracy.

[0005] This invention provides a digital radiographic intelligent inspection method for pipeline inspection, the inspection method comprising: Step S10: Using a double-wall single-image radiography method, digital X-ray images of the steam pipe weld are acquired using X-ray equipment to obtain original images containing the weld area, image quality indicator area, and substrate area; Step S20: Automatically extract the image quality feature parameters of the original image, and output the quality status label of the original image based on the comparison result of the image quality feature parameters and the preset threshold. Step S30: When the quality status label is unqualified, generate a radiography parameter adjustment suggestion based on the image quality feature parameters and trigger a retake, then return to step S10; When the quality status label is qualified, output the quality-confirmed image and its corresponding quality confidence information; Step S40: Based on the multi-task visual inspection method, perform weld area segmentation and defect instance segmentation on the quality-confirmed image, output defect data, and output the evaluation level based on the defect data and the quality confidence information.

[0006] Furthermore, step S20 includes: Step S21: Locate the image quality indicator region in the original image using the target detection network, perform a one-dimensional scan along the gray-scale gradient direction within the image quality indicator region, identify the finest line pairs that can be distinguished, and automatically calculate the measured value of the image quality index. Step S22: Automatically select multiple regions of interest in the substrate region of the original image and calculate the normalized signal-to-noise ratio (SNRN); Step S23: Compare the measured value of the image quality index with the preset image quality index threshold, and compare the normalized signal-to-noise ratio (SNRN) with the SNRN threshold to obtain the comparison result; Step S24: Output the quality status label of the original image based on the comparison results.

[0007] Furthermore, step S24 also includes: When at least one of the measured image quality index and the normalized signal-to-noise ratio (SNRN) falls within the edge range of a preset threshold, the quality status label is output as conditional acceptance. The original image is then deblurred and enhanced using a generative adversarial network to obtain an enhanced image. The enhanced image and the conditional acceptance label are then output as quality confidence information.

[0008] Furthermore, step S21 includes: Extract the gray value matrix within the image quality meter region, and calculate the gray value gradient magnitude column by column along the direction perpendicular to the extension direction of the image quality meter line pair; Search for local maxima of the grayscale gradient magnitude, match the spacing between adjacent local maxima with the known line pair spacing of the image quality meter, and determine the pixel position corresponding to each line pair; Analyze the attenuation trend of grayscale gradient amplitude from the thinnest line pair to the thickest line pair, and determine the line pair preceding the line pair whose grayscale gradient amplitude first falls below the preset resolvable threshold as the resolvable thinnest line pair. Based on the number of the finest resolvable line pair obtained from the determination, the corresponding measured value of the image quality index is output.

[0009] Furthermore, step S22 includes: The weld area pre-segmentation method is used to extract the approximate location of the weld in the original image. Based on the approximate location of the weld, after offsetting to both sides by a preset safety distance, the left candidate area and the right candidate area are respectively delineated on the base material side. Within the left and right candidate regions, a sliding window of a preset size is used to traverse the region, calculate the average gray value of each window region, remove windows whose average gray value exceeds the preset substrate gray value range, and select the N windows with the smallest gray standard deviation among the remaining windows as regions of interest, where N is an integer greater than or equal to 2. Calculate the ratio of the mean gray level to the standard deviation of gray level for each region of interest, and take the average of all ratios for all regions of interest as the normalized signal-to-noise ratio (SNRN) of the original image.

[0010] Furthermore, step S30 includes: The normalized signal-to-noise ratio (SNRN) is compared with a preset SNRN threshold to calculate the SNRN deviation value and the deviation direction. When the SNRN deviation value is less than zero and the deviation direction is below the threshold, the average gray value of the multiple regions of interest is extracted, and the ratio of the average gray value to the detector saturated gray value is used as the signal strength index. If the signal strength index is lower than the preset lower limit of signal strength, it is recommended to increase the output tube voltage or extend the exposure time. If the signal strength index is not lower than the preset lower limit of signal strength, then the gray standard deviation of the multiple regions of interest is extracted. When the gray standard deviation exceeds the preset upper limit of noise level, a suggestion to enhance the shielding of scattered lines is output. The generated adjustment suggestions are output as radiographic parameter adjustment suggestions, and a retake instruction is triggered, returning to step S10.

[0011] Furthermore, step S40 includes: Step S41: Use a semantic segmentation network to extract the weld seam region from the quality-confirmed image and output a weld seam region mask; Step S42: Within the mask of the weld area, an instance segmentation network is used for defect detection and segmentation, and the defect category label and pixel-level outline are output; Step S43: Based on the pixel-level contour, calculate the length, width and area of ​​the defect, and calculate the circumferential position of the defect with the weld centerline as the reference. Step S44: Based on the preset acceptance criteria, output the preliminary level judgment result according to the category label and size of the defect.

[0012] Furthermore, step S40 also includes: Read the quality confidence information and extract the confidence identifier contained therein; When the confidence level is identified as high confidence, the initial level assessment result is output as the final assessment level and marked as automatic assessment. When the confidence level is conditionally acceptable, the defect length and defect area are multiplied by a preset tolerance coefficient to obtain the magnified defect size. Based on the magnified defect size, the preset acceptance standard grade judgment table is queried again to obtain the corrected grade. The corrected grade is output as the final evaluation grade, and a manual review mark is added to the output final evaluation grade.

[0013] Furthermore, the detection method also includes a collaborative feedback step: Normalized signal-to-noise ratio (SNRN) values ​​corresponding to all digital radiographic images of unqualified steam pipeline welds in the same batch of inspection were collected to form an unqualified SNRN dataset. Calculate the statistical mean of the non-compliant SNRN dataset, and calculate the difference between the statistical mean and the preset SNRN threshold; When the difference is less than the preset tightening trigger difference and the number of elements in the unqualified SNRN dataset exceeds the preset number threshold, it is determined that the normalized signal-to-noise ratio (SNRN) of the unqualified image is concentrated in the lower edge range of the preset SNRN threshold. A threshold tightening suggestion is generated, and the preset SNRN threshold is updated to the sum of the statistical mean and the preset protection margin.

[0014] The present invention also provides a digital radiographic intelligent inspection device for pipeline inspection, the inspection device comprising: Image acquisition module: used to acquire digital radiographic images of steam pipe welds, obtaining raw images containing the weld area, image quality indicator area, and substrate area; Adaptive evaluation module: used to automatically extract image quality feature parameters of the original image, output quality status labels based on the comparison results of the image quality feature parameters and preset thresholds, and generate radiographic parameter adjustment suggestions when the quality status label is unqualified; Image enhancement module: When the quality status label is conditionally accepting, it performs deblurring and enhancement processing on the original image and outputs the enhanced image and conditional acceptance label as quality confidence information; Multi-task visual inspection module: used to segment weld areas and defect instances in images that have been quality verified, output defect type, defect size and defect location information, and output the final evaluation level in combination with quality confidence information.

[0015] The present invention provides a digital radiographic intelligent inspection method and device for pipeline inspection. Through an automated image quality assessment and defect detection collaborative mechanism, it reduces reliance on manual labor and has the advantages of high automation, improved inspection efficiency, and enhanced result consistency. Attached Figure Description

[0016] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0017] Figure 1 This is a flowchart of a digital radiographic intelligent inspection method for pipeline inspection in an embodiment of the present invention; Figure 2 This is a schematic diagram of the image quality status recognition method in an embodiment of the present invention; Figure 3 This is a schematic diagram of the multi-task visual detection method in an embodiment of the present invention; Figure 4 This is a schematic diagram of the pipeline detection status in an embodiment of the present invention; Figure 5 This is another perspective schematic diagram of the pipeline detection status in an embodiment of the present invention; Figure 6 This is a schematic diagram of a digital X-ray intelligent inspection device for pipeline inspection in an embodiment of the present invention. Detailed Implementation

[0018] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0019] Example 1: Please refer to Figures 1 to 5 This invention provides a digital radiographic intelligent inspection method for pipeline inspection, the inspection method comprising: Step S10: Using a double-wall single-image radiography method, digital X-ray images of the steam pipe weld are acquired using X-ray equipment to obtain original images containing the weld area, image quality indicator area, and substrate area; Specifically, the double-wall single-image radiography method is a geometric configuration suitable for radiographic inspection of cylindrical pipe workpieces. The X-ray source and detector are placed on opposite sides of the pipe, and the X-ray penetrates two layers of wall thickness to form a single-sided weld projection. The raw image acquired by the X-ray equipment refers to the initial digital X-ray image directly received and output by the digital flat panel detector, without any quality screening or defect identification processing. It necessarily contains the weld area reflecting the weld structure, the image quality indicator area used to assess spatial resolution, and the substrate area representing the pipe body material.

[0020] Furthermore, digital X-ray images are obtained using digital X-ray inspection technology to display the internal structure of an object. This method is commonly used in industrial non-destructive testing, such as the inspection of welds in steam pipes. These images typically contain grayscale information, reflecting variations in the material's density and thickness.

[0021] Step S20: Automatically extract the image quality feature parameters of the original image, and output the quality status label of the original image based on the comparison result of the image quality feature parameters and the preset threshold; An adaptive image quality assessment method is employed to automatically extract image quality feature parameters from the original image. Based on the comparison between these feature parameters and a preset threshold, a quality status label for the original image is output. This quality status label includes at least two categories: acceptable and unacceptable. The feature parameters can be extracted through manual grayscale statistics of a fixed, pre-defined region. For example, a region can be manually selected at a fixed location in the image, and the average grayscale value and standard deviation of that region can be calculated as feature parameters.

[0022] Specifically, step S20 includes: Step S21: Locate the image quality indicator region in the original image using the target detection network, perform a one-dimensional scan along the gray-scale gradient direction within the image quality indicator region, identify the finest resolvable line pairs, and automatically calculate the measured value of the image quality index. Furthermore, the object detection network is a deep learning model whose function is to automatically identify the category and location of specific objects in an image. In this embodiment, network architectures such as YOLO (You Only Look Once), Faster R-CNN, or SSD (Single Shot MultiBox Detector) can be used. By training on a large number of images with labeled data, it can accurately locate the image quality indicator region in the original image.

[0023] The image quality index (IQI) region is the area of ​​the image occupied by the IQI used to assess image quality. The IQI typically contains a series of line pairs with different line widths and spacings to measure the image's resolution. One-dimensional scanning along the grayscale gradient direction refers to sampling and analyzing pixel values ​​within the IQI region along the direction of the most dramatic change in grayscale value (usually perpendicular to the extension direction of the IQI line pairs). This can be achieved by calculating the image's gradient map and determining the direction of the largest gradient magnitude. By analyzing the grayscale profile curve obtained from the scan, it is determined which line pair in the IQI can be clearly distinguished. The measured IQI value is a quantitative index calculated according to relevant standards (such as ISO 17636-2) based on the number or size of the finest resolvable line pair, reflecting the spatial resolution of the image.

[0024] Step S22: Automatically select multiple regions of interest (ROIs) within the substrate region of the original image and calculate the normalized signal-to-noise ratio (SNRN). The substrate region refers to the area representing the pipe body material in the digital radiograph, excluding the weld area and the image quality indicator area. This region typically has a relatively uniform grayscale distribution, making it suitable for evaluating the noise level of the image. Automatically selecting multiple ROIs involves using image processing algorithms (e.g., based on grayscale histogram analysis, texture feature analysis, or preset geometric rules) to select several representative sub-regions within the substrate region. These regions should avoid containing obvious defects or structural features to ensure the accuracy of the noise assessment. The normalized signal-to-noise ratio (SNRN) is a metric for measuring image noise levels, typically defined as the ratio of signal strength to the noise standard deviation, after normalization. A higher SNRN indicates lower image noise and better image quality. The calculation method usually involves calculating the grayscale mean (as signal strength) and grayscale standard deviation (as noise) within the ROI, and then normalizing them according to a specific formula.

[0025] Step S23: Compare the measured value of the image quality index with the preset image quality index threshold, and compare the normalized signal-to-noise ratio (SNRN) with the SNRN threshold to obtain the comparison result; The preset image quality index threshold is a pre-set acceptable standard for image quality index based on testing standards, equipment performance, and application requirements. The preset SNRN threshold is a pre-set acceptable standard for normalized signal-to-noise ratio based on testing standards, equipment performance, and application requirements. Comparison refers to comparing the measured value with the preset threshold to determine whether the measured value meets or exceeds the threshold requirement.

[0026] Step S24: Output the quality status label of the original image based on the comparison results.

[0027] The measured image quality index (IQI) value reaches or exceeds the IQI threshold, and the normalized signal-to-noise ratio (SNRN) reaches or exceeds the SNRN threshold. Not meeting the preset threshold means that at least one of the measured IQI or SNRN value fails to meet the preset threshold requirement. Falling into the edge range of the preset threshold means that the measured value, while not fully reaching the acceptable threshold, is very close to it, or falls within an acceptable range that requires further confirmation.

[0028] Furthermore, a pass / fail threshold and a lower edge threshold can be set; when the measured value falls between the two, it is considered an edge region. Quality status labels are classification identifiers for the original image quality assessment results, including pass, fail, and conditionally acceptable. These labels guide subsequent processing procedures.

[0029] Specifically, when performing digital radiographic inspection on steam pipe welds, an original image is obtained. First, this original image is input into a pre-trained object detection network (e.g., a Faster R-CNN model based on a ResNet backbone). This network accurately identifies and locates the image quality indicator region in the image and outputs its bounding box coordinates. Next, within this image quality indicator region, the system calculates the grayscale gradient magnitude along a direction perpendicular to the extension direction of the image quality indicator line pairs. By analyzing the local maxima of the grayscale gradient magnitude and their spacing, and matching them with the known line pair spacing of the image quality indicator, the pixel position of each line pair is determined. The attenuation trend of the grayscale gradient magnitude is analyzed line by line from the thinnest line pair to the thickest line pair. The line pair preceding the line pair whose grayscale gradient magnitude first falls below a preset resolvable threshold (e.g., the peak-to-valley difference of the grayscale gradient magnitude is less than 5% of its maximum value) is identified as the resolvable thinnest line pair. Based on the number of this resolvable thinnest line pair, the measured image quality index value is output, for example, 7. Simultaneously, in the substrate area of ​​the original image, after excluding the weld seam area and the image quality indicator area through an image segmentation algorithm, the system automatically selects 10 non-overlapping regions of interest (ROIs), each 50x50 pixels in size. Within each ROI, its mean grayscale value and standard deviation are calculated, and the normalized signal-to-noise ratio (SNRN) is calculated according to a preset formula. The average of the 10 regions is then taken as the final SNRN, for example, 150. Subsequently, the measured image quality index (7) is compared with a preset image quality index threshold (6), and the SNRN 150 is compared with a preset SNRN threshold (120). If the measured image quality index (7) is greater than or equal to the threshold (6), and the SNRN 150 is greater than or equal to the threshold (120), the output quality status label is "qualified." If the measured image quality index (7) is less than the threshold, or the SNRN is less than the threshold, the output quality status label is "unqualified." If at least one of the measured quality index or normalized signal-to-noise ratio (SNRN) falls within the edge range of a preset threshold (e.g., SNRN between 100 and 120), the output quality status label is conditionally accepted.

[0030] Furthermore, by employing a target detection network to automatically locate the image quality indicator area and perform grayscale gradient scanning, the spatial resolution of the image can be accurately and objectively quantified, avoiding the subjectivity and inconsistency of manual interpretation. Simultaneously, by automatically selecting the region of interest in the substrate area and calculating the normalized signal-to-noise ratio (SNRN), a quantitative indicator of the image noise level is provided, making image quality assessment more comprehensive. This dual-indicator evaluation mechanism, combined with three quality status labels—"qualified," "unqualified," and "conditionally acceptable"—enables more refined judgment of image quality, effectively filtering out unqualified images for re-taking, and preventing low-quality images from entering subsequent defect detection processes, thereby significantly improving the accuracy and reliability of subsequent weld defect detection. In addition, the introduction of the "conditionally acceptable" status provides a basis for further processing or verification of images on the quality edge, reducing unnecessary retakes and improving detection efficiency and resource utilization.

[0031] Specifically, step S24 further includes: When at least one of the measured image quality index and the normalized signal-to-noise ratio (SNRN) falls within the edge range of a preset threshold, the quality status label is output as conditional acceptance. The original image is then deblurred and enhanced using a generative adversarial network to obtain an enhanced image. The enhanced image and the conditional acceptance label are then output as quality confidence information.

[0032] The original image is deblurred and enhanced using a Generative Adversarial Network (GAN), which consists of a generator network and a discriminator network. The generator network learns the distribution of real images and generates images similar to real images, while the discriminator attempts to distinguish between the generated images and real images. In this application, the generator can learn to transform a blurry or low-quality original image into a sharp, enhanced image, and the discriminator evaluates the realism and quality of the enhanced image.

[0033] Furthermore, deblurring and enhancement processes aim to restore image details and sharpness, and reduce noise, thereby improving image readability and the accuracy of subsequent analysis. Implementation methods may include, but are not limited to, using a generator based on the U-Net architecture, trained with a combination of perceptual loss and adversarial loss.

[0034] Specifically, step S21 includes: Extract the gray value matrix within the image quality meter region, and calculate the gray value gradient magnitude column by column along the direction perpendicular to the extension direction of the image quality meter line pair; Search for local maxima of the grayscale gradient magnitude, match the spacing between adjacent local maxima with the known line pair spacing of the image quality meter, and determine the pixel position corresponding to each line pair; Analyze the attenuation trend of grayscale gradient amplitude from the thinnest line pair to the thickest line pair, and determine the line pair preceding the line pair whose grayscale gradient amplitude first falls below the preset resolvable threshold as the resolvable thinnest line pair. Based on the number of the finest resolvable line pair obtained from the determination, the corresponding measured value of the image quality index is output.

[0035] By performing detailed gray-level gradient analysis on the image quality indicator area, the finest resolvable line pairs in digital ray images can be objectively and accurately identified. First, by extracting the gray-level matrix and calculating the gray-level gradient magnitude perpendicular to the line pair direction, the edge information of the line pairs is effectively captured. Then, by searching for local maxima and matching them with the known line pair spacing of the image quality indicator, precise pixel-level localization of each line pair is achieved. Crucially, this scheme automatically determines the resolvability of line pairs by analyzing the attenuation trend of the gray-level gradient magnitude and introducing a preset resolvability threshold, thus avoiding the subjectivity and instability of manual interpretation. This automated recognition method based on image features provides a reliable basis for subsequent calculation of the measured image quality index, significantly improving the accuracy and automation level of image quality assessment. It enables more accurate acquisition of the key parameter, the image quality index, during adaptive image quality assessment, thereby laying the foundation for the reliability of the overall detection method.

[0036] Furthermore, during digital radiographic inspection of steam pipe welds, an original image is acquired, and image processing algorithms are used to automatically locate the image quality meter region within the image. Within this region, the grayscale matrix is ​​extracted. To identify line pair edges, a directional filter (e.g., a vertical Sobel operator) is used to calculate the grayscale gradient magnitude column-by-column along the direction perpendicular to the line pair's extension (e.g., the vertical direction, i.e., the column direction, if the line pairs are horizontally aligned). These gradient magnitudes form a profile curve, where the edges of the line pairs exhibit distinct peaks.

[0037] Next, local maxima are searched on the profile curve; these points correspond to the centers or edges of line pairs. The pixel position of each line pair in the image is precisely determined by comparing the distances between these adjacent local maxima and matching them to the known standard line pair spacing of the image quality meter (e.g., pixel spacing corresponding to 0.1 mm, 0.2 mm, 0.3 mm, etc.). Then, starting with the thinnest line pair (e.g., line pair number 1) and moving towards the thickest line pair (e.g., line pair number 5), the grayscale gradient magnitude of each line pair is analyzed sequentially. For example, a preset resolvable threshold can be set; if the grayscale gradient magnitude of a line pair is less than 20% of its maximum possible magnitude, then the line pair numbered 2 is considered the thinnest resolvable line pair. If, during the analysis, the grayscale gradient magnitude of line pair number 3 first falls below this preset resolvable threshold, then line pair number 2 is determined to be the thinnest resolvable line pair. Finally, according to the image quality meter standard, if line pair number 2 corresponds to the image quality index "2T", then the measured value of the output image quality index is "2T".

[0038] Specifically, step S22 includes: The weld area pre-segmentation method is used to extract the approximate location of the weld in the original image. Based on the approximate location of the weld, after offsetting to both sides by a preset safety distance, the left candidate area and the right candidate area are respectively delineated on the base material side. The weld seam region is pre-segmented to dynamically adapt to the actual geometric distribution of the weld seam in each image. The process of roughly locating the weld seam center and boundary can be achieved through lightweight image processing algorithms (such as edge detection combined with morphological operations, or lightweight semantic segmentation networks). The purpose is to provide dynamic anchor points for subsequent selection of the substrate region, rather than precisely segmenting defects.

[0039] Furthermore, by offsetting the safety distance, interference from the heat-affected zone can be completely avoided, ensuring that the candidate area falls on a truly uniform base material side. The preset safety distance can be set according to the weld process parameters of common steam pipes, for example, set to 20 pixels, to ensure complete escape from the grayscale transition zone of the heat-affected zone.

[0040] Within the left and right candidate regions, a sliding window of a preset size is used to traverse the region, calculate the average gray value of each window region, remove windows whose average gray value exceeds the preset substrate gray value range, and select the N windows with the smallest gray standard deviation among the remaining windows as regions of interest, where N is an integer greater than or equal to 2. Calculate the ratio of the mean gray level to the standard deviation of gray level for each region of interest, and take the average of all ratios for all regions of interest as the normalized signal-to-noise ratio (SNRN) of the original image.

[0041] By employing a sliding window traversal and executing elimination and filtering logic, windows with a grayscale mean exceeding the preset substrate grayscale range are first eliminated. This can eliminate interference from local areas with abnormal signal strength, ensuring that the remaining windows all come from the normal substrate body.

[0042] Step S30: When the quality status label is unqualified, generate a radiography parameter adjustment suggestion based on the image quality feature parameters and trigger a retake, then return to step S10; When the quality status label is qualified, output the quality-confirmed image and its corresponding quality confidence information; Specifically, step S30 includes: The normalized signal-to-noise ratio (SNRN) is compared with a preset SNRN threshold to calculate the SNRN deviation value and its direction. The measured SNRN is then compared with the preset SNRN threshold to calculate the SNRN deviation value (i.e., the measured value minus the threshold) and its direction (positive values ​​represent values ​​above the threshold, negative values ​​represent values ​​below the threshold). This calculation aims to quantify the gap between image quality and the standard, clarify the nature of the gap, and provide foundational data for subsequent binary branch diagnosis.

[0043] When the SNRN deviation value is less than zero and the deviation direction is below the threshold, the average gray level of the multiple regions of interest is extracted, and the ratio of the average gray level to the detector's saturated gray level is used as the signal strength index. The formula for calculating the signal strength index is: the average gray level of the region of interest divided by the detector's saturated gray level. This index essentially reflects the proportion of the effective radiation dose received by the detector to its maximum capacity, and can objectively assess the overall exposure level of the image and determine whether underexposure exists.

[0044] If the signal strength index is lower than the preset lower limit of signal strength, it is recommended to increase the output tube voltage or extend the exposure time. If the signal strength index is not lower than the preset lower limit of signal strength, then the gray standard deviation of the multiple regions of interest is extracted. When the gray standard deviation exceeds the preset upper limit of noise level, a suggestion to enhance the shielding of scattered lines is output. The generated adjustment suggestions are output as radiographic parameter adjustment suggestions, and a retake instruction is triggered, returning to step S10.

[0045] Step S40: Based on the multi-task visual inspection method, perform weld area segmentation and defect instance segmentation on the quality-confirmed image, output defect data, and output the evaluation level based on the defect data and the quality confidence information.

[0046] Specifically, step S40 includes: Step S41: The quality-confirmed image is processed using a semantic segmentation network to extract the weld seam region and output a weld seam region mask. The semantic segmentation network is a deep learning model that classifies each pixel in the image, thereby dividing the image into different semantic regions. Through training, this network can learn and recognize the features of the weld seam region in the image, accurately separating it from the background.

[0047] Furthermore, classic semantic segmentation architectures such as U-Net and DeepLabV3+ can be used, or a Transformer-based segmentation model can be employed. The purpose of weld region extraction is to precisely limit the detection range to the weld itself, avoiding interference from background noise and irrelevant areas on defect detection, thereby improving the targeting and efficiency of the detection.

[0048] The weld area mask is typically represented as a binary image, where the pixel value of the weld area is 1 and the pixel value of the non-weld area is 0. It serves as the effective area for subsequent defect detection.

[0049] Step S42: Within the mask of the weld area, an instance segmentation network is used for defect detection and segmentation, outputting the category label and pixel-level contour of the defect; it can identify the category of each defect in the image, and can also generate a pixel-level accurate contour for each independent defect instance, thereby distinguishing defects of the same category but in different locations.

[0050] Furthermore, instance segmentation models such as Mask R-CNN, YOLACT, and SOLO can be employed. The purpose of defect detection and segmentation is to automatically identify various defects (such as porosity, slag inclusions, and cracks) within a defined weld area and accurately delineate their boundaries, providing a basis for subsequent size quantization. Defect category labels are used to identify the specific type of detected defect, such as "porosity," "slag inclusion," and "crack," which is crucial for evaluation based on different defect types. Pixel-level contours are the precise boundary representation of defects in the image.

[0051] Step S43: Based on the pixel-level contour, calculate the length, width, and area of ​​the defect, and calculate the circumferential position of the defect using the weld centerline as a reference. This can be achieved by analyzing the geometric characteristics of the pixel-level contour, such as calculating the long and short sides of the minimum bounding rectangle of the defect as its length and width, or by directly counting the number of pixels within the contour to obtain the area; alternatively, a skeleton extraction algorithm can be used to obtain the skeleton length of the defect. The purpose of calculating the circumferential position of the defect using the weld centerline as a reference is to determine the specific spatial location of the defect on the weld, which is crucial for defect localization, tracking, and subsequent repair. Implementation methods may include, but are not limited to: first, determining the weld centerline using image processing methods (such as morphological operations, Hough transform, etc.) or deep learning methods; then, calculating the vertical distance or projected position from the geometric center point of the defect to the weld centerline; and finally, combining this with the geometric model of the weld (such as the circumferential unfolding of a pipe) to determine the circumferential position.

[0052] Step S44: Based on the preset acceptance criteria, and according to the defect category label and defect size, output the preliminary level judgment result. The conclusion, such as "qualified," "unqualified," or "requires further review," is derived after preliminary judgment based on the defect category label and calculated size information, compared with the preset acceptance criteria. Its function is to provide a preliminary, automated judgment basis for the final evaluation.

[0053] Specifically, step S40 further includes: Read the quality confidence information and extract the confidence identifier contained therein; When the confidence level is identified as high confidence, the initial level assessment result is output as the final assessment level and marked as automatic assessment. When the confidence level is conditionally acceptable, the defect length and defect area are multiplied by a preset tolerance coefficient to obtain the magnified defect size. Based on the magnified defect size, the preset acceptance standard grade judgment table is queried again to obtain the corrected grade. The corrected grade is output as the final evaluation grade, and a manual review mark is added to the output final evaluation grade.

[0054] Specifically, in the inspection of steam pipeline welds, after the digital radiographic image undergoes adaptive image quality assessment, its quality confidence information is marked as "conditionally acceptable." This may mean that the image has slight scattering interference or a signal-to-noise ratio slightly lower than the ideal value. Subsequently, the multi-task visual inspection method for weld defects identifies a suspected crack defect in the image, calculating its length as L and area as A through pixel-level contour calculation. According to the preset acceptance criteria, the initial judgment level of this defect is "Level I Qualified." Since the image quality is "conditionally acceptable," the system will not directly adopt the initial judgment result of "Level I Qualified." Instead, it will activate a correction mechanism, multiplying the defect length L and defect area A by a preset tolerance coefficient, such as 1.1. At this point, the defect length becomes 1.1L, and the area becomes 1.1A. The system will use these two magnified dimensions to re-query the preset acceptance criteria level judgment table. Assuming that under the new dimensions, the defect is judged as "Level II Unqualified," then the final assessment level will be output as "Level II Unqualified," and a "Manual Review Mark" will be explicitly added to the assessment result. This suggests to the inspectors that although the system has given a correction level of "Level II Unacceptable", due to the criticality of the original image quality, the result needs to be further reviewed and confirmed by human experts to ensure the accuracy of the final judgment.

[0055] Furthermore, by introducing quality confidence level indicators, this solution enables differentiated processing for different image quality conditions. For high-confidence images, automatic judgment is directly applied, improving detection efficiency. For conditionally acceptable images, a more cautious correction level is obtained by conservatively enlarging the defect size and re-checking the acceptance criteria, with a clear addition of a manual review mark. This not only avoids the risk of missed or misjudged defects due to image quality uncertainty, significantly improving the accuracy and security of detection results, but also provides clear guidance and basis for manual review, enabling the entire intelligent detection process to output a highly reliable and traceable final assessment level even when facing complex and varied image quality.

[0056] Specifically, the detection method further includes a collaborative feedback step: Normalized signal-to-noise ratio (SNRN) values ​​corresponding to all digital radiographic images of unqualified steam pipeline welds in the same batch of inspection were collected to form an unqualified SNRN dataset. Calculate the statistical mean of the non-compliant SNRN dataset, and calculate the difference between the statistical mean and the preset SNRN threshold; When the difference is less than the preset tightening trigger difference and the number of elements in the unqualified SNRN dataset exceeds the preset number threshold, it is determined that the normalized signal-to-noise ratio (SNRN) of the unqualified image is concentrated in the lower edge range of the preset SNRN threshold. A threshold tightening suggestion is generated, and the preset SNRN threshold is updated to the sum of the statistical mean and the preset protection margin.

[0057] The collaborative feedback step refers to a systematic, periodic, or event-driven mechanism designed to adaptively adjust key parameters within the system using historical detection data to optimize overall performance. Its role is to enable the detection system to learn and evolve, thereby improving its robustness and accuracy in complex and changing environments. This step can run as a standalone background service or be triggered under specific conditions.

[0058] The system collects the normalized signal-to-noise ratio (SNRN) values ​​corresponding to all digital radiographic images deemed unqualified during the same batch of steam pipeline weld inspections, forming an unqualified SNRN dataset. This involves the system automatically selecting all digital radiographic images judged as unqualified from historical inspection records, extracting the SNRN values ​​calculated during the quality assessment process, and aggregating these SNRN values ​​into a dedicated dataset. This process can be achieved through data querying, log analysis, or database retrieval. Calculating the statistical mean of the unqualified SNRN dataset involves performing an arithmetic average of all values ​​in the collected dataset to obtain the central tendency of the SNRN values ​​from these unqualified images.

[0059] Calculating the difference between the statistical mean and the preset SNRN threshold involves comparing the statistical mean of the substandard SNRN dataset with the current preset SNRN threshold used for image quality assessment, and calculating the numerical difference between the two. This difference indicates the degree and direction of deviation of the average SNRN value of substandard images from the current threshold.

[0060] When the difference is less than a preset tightening trigger difference and the number of elements in the unqualified SNRN dataset exceeds a preset threshold, the system determines that the normalized signal-to-noise ratio (SNRN) of the unqualified images is concentrated in the lower edge range of the preset SNRN threshold. This means the system makes a logical judgment based on two conditions: first, whether the difference between the statistical mean and the preset threshold is lower than a preset negative value (e.g., -0.1), indicating that the average SNRN of the unqualified images is significantly lower than the current threshold; second, whether the amount of data used for calculation is large enough (e.g., more than 50 samples) to ensure the reliability of the statistical results. If both conditions are met, it is inferred that the current threshold may be too lenient, causing a large number of "edge-unqualified" images to be judged as unqualified. Generating a threshold tightening suggestion, updating the preset SNRN threshold to the sum of the statistical mean and the preset protection margin, means that once the above judgment conditions are met, the system will automatically generate a suggestion to set the new SNRN threshold to the statistical mean of the unqualified SNRN dataset plus a preset, small positive value (e.g., 0.05). This protection margin aims to ensure that while the new threshold is tightened, it still provides a certain buffer space to avoid misjudgment due to over-tightening. Replacing the original preset SNRN threshold with the updated preset SNRN threshold means that the system automatically configures the calculated new threshold parameters into the image quality adaptive evaluation method, making it effective in subsequent image quality evaluations, thereby achieving dynamic updating of the threshold.

[0061] Example 2: Please refer to Figure 6 This invention provides a digital radiographic intelligent inspection device for pipeline inspection, the inspection device comprising: Image acquisition module 10: used to acquire digital radiographic images of steam pipe welds, and obtain original images containing the weld area, image quality indicator area and substrate area; The image acquisition module 10 is the physical signal input of the entire detection device, and its hardware mainly includes an X-ray machine and a digital flat panel detector. The X-ray machine acts as the radiation source, emitting a beam of radiation that penetrates the steam pipe according to the double-walled single-image radiography geometry. The digital flat panel detector acts as the image receiver, converting the intensity distribution of the penetrated radiation into a digital grayscale matrix, i.e., the original image. This module is not only responsible for acquiring the image of a single exposure, but also has the responsiveness to receive external re-exposure commands and re-execute the exposure action.

[0062] Adaptive evaluation module 20: used to automatically extract image quality feature parameters of the original image, output quality status labels based on the comparison results of the image quality feature parameters and preset thresholds, and generate radiographic parameter adjustment suggestions when the quality status label is unqualified; The adaptive evaluation module 20 is the intelligent hub of the detection device, and its hardware carrier is usually a computing platform equipped with a high-performance CPU and GPU (such as an industrial control computer or an edge computing server). This module receives the raw image data packets transmitted from the image acquisition module 10, and automatically performs the calculation of the measured image quality index and the normalized signal-to-noise ratio (SNRN) through the internally deployed deep learning network and image processing algorithms, and outputs a quality status label based on the comparison results.

[0063] When the output quality status label is unqualified, the adaptive evaluation module 20 does not stop at the status label, but further generates radiographic parameter adjustment suggestions (such as tube voltage increase suggestions or scattered line shielding enhancement suggestions) through internal logic, and encapsulates the suggestions into control command data packets, which are transmitted back to the X-ray machine control console of the image acquisition module through the data interface to trigger the re-image command. This realizes the reverse triggering mechanism from the evaluation end to the acquisition end, which is the core of the closed-loop collaborative framework of this invention and reduces the risk of unqualified images flowing downstream.

[0064] Image enhancement module 30: When the quality status label is conditionally accepting, it performs deblurring enhancement processing on the original image and outputs the enhanced image and conditional acceptance label as quality confidence information; The image enhancement module 30 is a defensive processing unit for edge-quality images. Its hardware also relies on a GPU computing platform to support the high-intensity inference operations of the generative adversarial network (GAN). This module has a state monitoring interface with the adaptive evaluation module: when the quality state label output by the adaptive evaluation module is conditionally acceptable, the image enhancement module 30 is activated and receives the corresponding original image data.

[0065] Multi-task visual inspection module 40: Used to segment weld areas and defect instances in images that have been quality verified, output defect type, defect size and defect location information, and output the final evaluation level in combination with quality confidence information.

[0066] The multi-task visual inspection module 40 is the business output terminal of the inspection device, and its hardware carrier is a computing unit equipped with a dedicated GPU for deep learning inference. This module receives quality-confirmed images from the adaptive evaluation module 20 or the image enhancement module 30 (qualified images come directly from the adaptive evaluation module, and conditionally acceptable enhanced images come from the image enhancement module), along with quality confidence information transmitted with the images. Inside the module, a semantic segmentation network (such as U-Net) and an instance segmentation network (such as Mask R-CNN) are deployed sequentially to perform weld mask extraction and defect pixel-level contour segmentation, and to calculate the defect size and circumferential position.

[0067] Before outputting the final assessment level, this module must read and parse the confidence level indicator in the quality confidence information: if it is high confidence, the assessment level is directly output based on the defect size and marked as automatically determined; if it is conditionally acceptable, the tolerance correction mechanism is activated, the defect size is multiplied by a preset tolerance coefficient, and the corrected level is re-output by looking up the table, with an additional manual review mark. Through this deep data coupling between front-end quality assessment and back-end defect assessment, the multi-task visual inspection module ensures that the reliability of the final output result is not affected by fluctuations in the quality of the input image.

[0068] Through the design of the data interface and triggering relationship between the image acquisition module 10, adaptive evaluation module 20, image enhancement module 30, and multi-task visual inspection module 40, the inspection device in this embodiment not only realizes the hardware implementation of the method steps, but also constructs a complete closed-loop flow system from physical acquisition, intelligent evaluation, parameter feedback re-enhancing, edge enhancement to collaborative assessment. The modules are not isolated functional stacks, but rather form an organic, defensive collaborative architecture through the flow and triggering of key data packets such as quality status labels, radiographic parameter adjustment suggestions, and quality confidence information. This ensures the reliability of defect detection input data from the source and significantly improves the overall accuracy and consistency of digital radiographic intelligent inspection of steam pipelines.

[0069] Those skilled in the art will understand that all or part of the steps in the various methods of the above embodiments can be implemented by a program instructing related hardware. The program can be stored in a computer-readable storage medium, which may include: read-only memory (ROM), random access memory (RAM), magnetic disk or optical disk, etc.

[0070] Furthermore, the embodiments of the present invention have been described in detail above. Specific examples have been used to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only for the purpose of helping to understand the method and core ideas of the present invention. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of the present invention. Therefore, the content of this specification should not be construed as a limitation of the present invention.

Claims

1. A digital radiographic intelligent inspection method for pipeline inspection, characterized in that, The detection method includes: Step S10: Using a double-wall single-image radiography method, digital X-ray images of the steam pipe weld are acquired using X-ray equipment to obtain original images containing the weld area, image quality indicator area, and substrate area; Step S20: Automatically extract the image quality feature parameters of the original image, and output the quality status label of the original image based on the comparison result of the image quality feature parameters and the preset threshold; Step S30: When the quality status label is unqualified, generate a radiography parameter adjustment suggestion based on the image quality feature parameters and trigger a retake, then return to step S10; When the quality status label is qualified, output the quality-confirmed image and its corresponding quality confidence information; Step S40: Based on the multi-task visual inspection method, perform weld area segmentation and defect instance segmentation on the quality-confirmed image, output defect data, and output the evaluation level based on the defect data and the quality confidence information.

2. The digital radiographic intelligent inspection method for pipeline inspection according to claim 1, characterized in that, Step S20 includes: Step S21: Locate the image quality indicator region in the original image using the target detection network, perform a one-dimensional scan along the gray-scale gradient direction within the image quality indicator region, identify the finest line pairs that can be distinguished, and automatically calculate the measured value of the image quality index. Step S22: Automatically select multiple regions of interest in the substrate region of the original image and calculate the normalized signal-to-noise ratio (SNRN); Step S23: Compare the measured value of the image quality index with the preset image quality index threshold, and compare the normalized signal-to-noise ratio (SNRN) with the SNRN threshold to obtain the comparison result; Step S24: Output the quality status label of the original image based on the comparison results.

3. The digital radiographic intelligent inspection method for pipeline inspection according to claim 2, characterized in that, Step S24 further includes: When at least one of the measured image quality index and the normalized signal-to-noise ratio (SNRN) falls within the edge range of a preset threshold, the quality status label is output as conditional acceptance. The original image is then deblurred and enhanced using a generative adversarial network to obtain an enhanced image. The enhanced image and the conditional acceptance label are then output as quality confidence information.

4. The digital radiographic intelligent inspection method for pipeline inspection according to claim 2, characterized in that, Step S21 includes: Extract the gray value matrix within the image quality meter region, and calculate the gray value gradient amplitude column by column along the direction perpendicular to the extension direction of the image quality meter line pair; Search for local maxima of the grayscale gradient magnitude, match the spacing between adjacent local maxima with the known line pair spacing of the image quality meter, and determine the pixel position corresponding to each line pair; Analyze the attenuation trend of grayscale gradient amplitude from the thinnest line pair to the thickest line pair, and determine the line pair preceding the line pair whose grayscale gradient amplitude first falls below the preset resolvable threshold as the resolvable thinnest line pair. Based on the number of the finest resolvable line pair obtained from the determination, the corresponding measured value of the image quality index is output.

5. The digital radiographic intelligent inspection method for pipeline inspection according to claim 2, characterized in that, Step S22 includes: The weld area pre-segmentation method is used to extract the approximate location of the weld in the original image. Based on the approximate location of the weld, after offsetting to both sides by a preset safety distance, the left candidate area and the right candidate area are respectively delineated on the base material side. Within the left and right candidate regions, a sliding window of a preset size is used to traverse the region, calculate the average gray value of each window region, remove windows whose average gray value exceeds the preset substrate gray value range, and select the N windows with the smallest gray standard deviation among the remaining windows as regions of interest, where N is an integer greater than or equal to 2. Calculate the ratio of the mean gray level to the standard deviation of gray level for each region of interest, and take the average of all ratios for all regions of interest as the normalized signal-to-noise ratio (SNRN) of the original image.

6. The digital radiographic intelligent inspection method for pipeline inspection according to claim 2, characterized in that, Step S30 includes: The normalized signal-to-noise ratio (SNRN) is compared with a preset SNRN threshold to calculate the SNRN deviation value and the deviation direction. When the SNRN deviation value is less than zero and the deviation direction is below the threshold, the average gray value of the multiple regions of interest is extracted, and the ratio of the average gray value to the detector saturated gray value is used as the signal strength index. If the signal strength index is lower than the preset lower limit of signal strength, it is recommended to increase the output tube voltage or extend the exposure time. If the signal strength index is not lower than the preset lower limit of signal strength, then the gray standard deviation of the multiple regions of interest is extracted. When the gray standard deviation exceeds the preset upper limit of noise level, a suggestion to enhance the shielding of scattered lines is output. The generated adjustment suggestions are output as radiographic parameter adjustment suggestions, and a retake instruction is triggered, returning to step S10.

7. The digital radiographic intelligent inspection method for pipeline inspection according to claim 1, characterized in that, Step S40 includes: Step S41: Use a semantic segmentation network to extract the weld seam region from the quality-confirmed image and output a weld seam region mask; Step S42: Within the mask of the weld area, an instance segmentation network is used to perform defect detection and segmentation, and the defect category label and pixel-level outline are output; Step S43: Based on the pixel-level contour, calculate the length, width and area of ​​the defect, and calculate the circumferential position of the defect with the weld centerline as the reference. Step S44: Based on the preset acceptance criteria, output the preliminary level judgment result according to the category label and size of the defect.

8. The digital radiographic intelligent inspection method for pipeline inspection according to claim 7, characterized in that, Step S40 further includes: Read the quality confidence information and extract the confidence identifier contained therein; When the confidence level is identified as high confidence, the initial level assessment result is output as the final assessment level and marked as automatic assessment. When the confidence level is conditionally acceptable, the defect length and defect area are multiplied by a preset tolerance coefficient to obtain the magnified defect size. Based on the magnified defect size, the preset acceptance standard grade judgment table is queried again to obtain the corrected grade. The corrected grade is output as the final evaluation grade, and a manual review mark is added to the output final evaluation grade.

9. The digital radiographic intelligent inspection method for pipeline inspection according to claim 1, characterized in that, The detection method further includes a collaborative feedback step: Normalized signal-to-noise ratio (SNRN) values ​​corresponding to all digital radiographic images of unqualified steam pipeline welds in the same batch of inspection were collected to form an unqualified SNRN dataset. Calculate the statistical mean of the non-compliant SNRN dataset, and calculate the difference between the statistical mean and the preset SNRN threshold; When the difference is less than the preset tightening trigger difference and the number of elements in the unqualified SNRN dataset exceeds the preset number threshold, it is determined that the normalized signal-to-noise ratio (SNRN) of the unqualified image is concentrated in the lower edge range of the preset SNRN threshold. A threshold tightening suggestion is generated, and the preset SNRN threshold is updated to the sum of the statistical mean and the preset protection margin.

10. A digital radiographic intelligent inspection device for pipeline inspection, characterized in that, The detection device includes: Image acquisition module: used to acquire digital radiographic images of steam pipe welds, obtaining raw images containing the weld area, image quality indicator area, and substrate area; Adaptive evaluation module: used to automatically extract image quality feature parameters of the original image, output quality status labels based on the comparison results of the image quality feature parameters and preset thresholds, and generate radiographic parameter adjustment suggestions when the quality status label is unqualified; Image enhancement module: When the quality status label is conditionally accepting, it performs deblurring and enhancement processing on the original image and outputs the enhanced image and conditional acceptance label as quality confidence information; Multi-task visual inspection module: used to segment weld areas and defect instances in images that have been quality verified, output defect type, defect size and defect location information, and output the final evaluation level in combination with quality confidence information.