Method for identifying defects in welds of end plugs of nuclear fuel rods by radiographic digital imaging

By employing an automated radiographic digital imaging defect identification method for nuclear fuel rod end plug welds, combined with deep learning and rule models, the high cost and false positive/false negative issues of manual visual inspection have been resolved, achieving efficient and accurate identification and non-destructive testing of minute defects.

CN122115302APending Publication Date: 2026-05-29CHINA NORTH NUCLEAR FUEL CO LTD +2

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
CHINA NORTH NUCLEAR FUEL CO LTD
Filing Date
2024-11-29
Publication Date
2026-05-29

AI Technical Summary

Technical Problem

In existing technologies, the detection of defects in the end plug welds of nuclear fuel rods relies on manual visual X-ray inspection, which is costly and carries a high risk of false positives and false negatives, making it difficult to achieve automated and efficient defect identification.

Method used

An automated method for identifying defects in nuclear fuel rod end plug welds using radiographic digital imaging is employed. This method includes data acquisition, single rod segmentation, evaluation area extraction, data augmentation, defect detection and localization. Combined with an improved YOLOX network and rule model, it enables automated processing and defect identification of X-ray images.

Benefits of technology

It achieves efficient and accurate detection of minute defects, reduces the cost of human intervention, has real-time non-destructive testing capabilities, and has good versatility and scalability, making it suitable for defect detection in other similar structures.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure BDA0005162423130000031
    Figure BDA0005162423130000031
  • Figure BDA0005162423130000041
    Figure BDA0005162423130000041
  • Figure BDA0005162423130000042
    Figure BDA0005162423130000042
Patent Text Reader

Abstract

The present disclosure belongs to the technical field of nuclear power and specifically relates to a kind of nuclear fuel rod end plug weld seam ray digital imaging defect identification method.The present disclosure uses automatic process throughout, greatly reduces the cost of human intervention;X-ray image is detected and identified with high accuracy for small defects, which can effectively detect the tiny defects in the fuel rod end plug weld seam;The processing speed of the algorithm of the present disclosure for X-ray image is fast, which can realize real-time nondestructive testing of nuclear fuel rod end plug weld seam;The present disclosure combines deep learning algorithm and rule model algorithm, has good universality and scalability, and can be widely applied to defect detection of other similar structures.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of nuclear power technology, specifically relating to a method for identifying defects in nuclear fuel rod end plug welds using radiographic digital imaging. Background Technology

[0002] Defects such as tungsten inclusions, porosity, gas expansion, and incomplete penetration may occur during the welding process of fuel rod end plug welds. Weld quality is a critical control point in fuel rod manufacturing. According to the quality assurance in the procurement, design, and manufacturing of HAF0409 nuclear fuel rods, the design specifications require 100% inspection of the nuclear fuel rod welds. Currently, the industry mainly uses X-ray inspection, ultrasonic inspection, and eddy current inspection for fuel rod defect detection. Among these, X-ray is the primary method for inspecting fusion weld end plug welds. X-ray inspection is widely used for welding defect detection due to its intuitive imaging in digital images and its ability to easily determine the size and internal location of defects. However, X-ray-based welding defect detection often relies on inspectors visually identifying defects in X-ray images, requiring significant manpower, resulting in high inspection costs. Furthermore, it is susceptible to subjective influence from inspectors, easily leading to missed or false detections. Therefore, there is an urgent need to develop an automated detection and identification method to achieve intelligent industrial upgrading. Summary of the Invention

[0003] To overcome the problems existing in related technologies, a method for defect identification of nuclear fuel rod end plug welds using radiographic digital imaging is provided, the method comprising:

[0004] Step 1, Data Acquisition: Obtain digital images of the weld seams at the end plugs of nuclear fuel rods;

[0005] Step 2, single-bar segmentation, includes:

[0006] Step 21: Perform image binarization on the original image to be segmented;

[0007] Step 22: Extract contours from the binarized image to obtain a contour image;

[0008] Step 23: Find all connected components with non-zero pixels in the binary image, and for each connected component, find the boundary contour of the connected component.

[0009] Step 24: Determine all contours, and find the one with the largest outer contour among all contours;

[0010] Step 25: Perform vertical projection on the image after contour extraction and count the pixel distribution in the horizontal direction;

[0011] Step 26: Perform single-rod segmentation based on the segmented region to obtain a vertical projection image; according to the characteristics of the fuel rod image, select the minimum length L of consecutive pixel occurrences in the horizontal direction; on the vertical projection image, search from left to right, retain the intervals where pixels appear and the length of the consecutive interval is greater than L, and discard the other intervals; obtain the projection interval of the single-rod region in the horizontal direction.

[0012] Step 3, Evaluation region extraction: Preset template images of the upper and lower plugs, and perform template matching between each image after single-bar segmentation and the template images to extract the effective evaluation region;

[0013] Step 4: Perform data augmentation for each assessment area;

[0014] Step 5, Defect Detection and Localization: Obtain enhanced images of the end plugs of single-bar nuclear fuel rods; perform defect detection on the images using an improved YOLOX network; obtain the defect location and category;

[0015] Step 6: Optimize defect categories based on rule models.

[0016] In one possible implementation, step 21 includes:

[0017] Step 211: If the original image to be segmented is not a grayscale image, then convert the original image to a grayscale image.

[0018] Step 212: Smooth the grayscale image using a Gaussian filter;

[0019] Step 213: Convert the grayscale image to a binary image using a preset threshold. The choice of threshold is crucial; typically, an adaptive thresholding method is used to select a suitable preset threshold.

[0020] Step 214: Binarize the pixels of the image according to a preset threshold.

[0021] In one possible implementation, morphological operations are performed on the extracted contour image.

[0022] In one possible implementation, in step 4, various data augmentation methods are used for the evaluation area, including Mosaic, Copy and Paste, and Mixup.

[0023] In one possible implementation, step 5 involves the following steps to form an improved YOLOX network;

[0024] Step 51, network modification: The last three feature layers of the backbone network are passed through the collaborative attention module to generate the corresponding Neck layer network. For multi-scale prediction, the N3 layer, which fully integrates contextual information, is selected. After convolution and upsampling, the feature map size is enlarged and concatenated with the F4 layer, which contains a lot of detailed information. The features are then fully mixed through the basic building block CSP2_1 to output the feature map N4.

[0025] Step 52, Loss Improvement: The CIoU loss function is adopted as the bounding box regression loss. Combining the various IoU losses, the overall modified loss function is as follows:

[0026]

[0027] In one possible implementation, the types of defects appearing in the circumferential weld area in step 6 include porosity, gas expansion, incomplete penetration, and tungsten inclusion.

[0028] The following judgment rules apply to each defect type.

[0029] The defect type is porosity, and the defect characteristics are the appearance of gray-scale-increased round dots in the evaluation area. The vertical height of the dots is relatively consistent in the three images, and their horizontal position changes after rotation. The judgment rule is to combine the three images for comprehensive evaluation, and the defect must appear at least twice.

[0030] The defect type is air expansion. The defect characteristics are spots with increased grayness near the cladding side within 2mm below the weld centerline; and a band-shaped image with increased grayness in the transverse direction within 2mm below the weld centerline. The judgment rule is that if it appears once in 3 images, it is judged as air expansion.

[0031] The defect type is incomplete penetration. The defect characteristics are: a thin line with increased grayness on the weld centerline; a black dot at the intersection of the weld centerline and the extended line of the inner wall of the shell; and a vertical line on the weld centerline, located near the junction of the shell and the end plug. The judgment rule is that if the defect appears once in 3 images, it is judged as incomplete penetration.

[0032] The defect type is tungsten inclusion, and the defect characteristic is white spots with reduced grayness appearing in the evaluation area. The judgment rule is to combine the three images for comprehensive evaluation, and the defect must appear at least twice.

[0033] In one possible implementation, defect priority determination includes:

[0034] At the intersection of the centerline and the extended line of the inner wall of the casing, if there is a black spot at this location, it is considered to be incomplete welding. If a black spot appears at other locations on the centerline, it is considered to be a porosity.

[0035] If black dots appear on the extended inner wall of the casing within 2mm below the center line, they are primarily identified as air bulges. If black dots reappear at other image locations at the same elevation, they are identified as air holes.

[0036] In one possible implementation, the extracted defect features include:

[0037] Defect center location information, including its relative height characteristics with respect to the weld centerline and its distance from the edge of the cladding;

[0038] The location of the defect center is determined by the following formula:

[0039]

[0040] The aspect ratio is determined using the following formula;

[0041]

[0042] Where ε is the aspect ratio of the equivalent area of ​​the defect, L is the length of the defect, and W is the width of the defect;

[0043] The grayscale characteristics of the defect / difference with the background grayscale are determined by the following formula:

[0044]

[0045] Where e is the grayscale difference between the defect and the background, A is the average grayscale value of all pixels in the defect area, and B is the average grayscale value of all pixels in the background area.

[0046] The size of the defect area is determined by the following formula:

[0047] S = w * h

[0048] w is the width of the bounding rectangle of the defect, and h is the length of the rectangle, both in pixels.

[0049] The beneficial effects of this disclosure are as follows: the entire process is automated, greatly reducing the cost of human intervention; it has high accuracy in detecting and identifying small defects in X-ray images, effectively detecting minute defects in the weld seams of fuel rod end plugs; the algorithm of this disclosure processes X-ray images quickly, enabling real-time non-destructive testing of nuclear fuel rod end plug weld seams; and it combines deep learning algorithms and rule-based model algorithms, possessing good versatility and scalability, and can be widely applied to defect detection in other similar structures. Attached Figure Description

[0050] Figure 1 This is a flowchart illustrating a method for identifying defects in nuclear fuel rod end plug welds using radiographic digital imaging, according to an exemplary embodiment.

[0051] Figure 2This is a set of raw images of fuel rod rays.

[0052] Figure 3 This is a Gaussian binarized image of the fuel rods.

[0053] Figure 4 It is an image cropped after contour extraction.

[0054] Figure 5 It is the image after vertical projection.

[0055] Figure 6 This is the image effect after single-bar segmentation.

[0056] Figure 7a It is the extraction effect of the upper end plug evaluation area.

[0057] Figure 7b It is the upper end of the template image.

[0058] Figure 8 It is a data-enhanced image.

[0059] Figure 9 This is a diagram of the improved YOLOX algorithm architecture.

[0060] Figure 10 This is the network structure diagram of the collaborative attention module.

[0061] Figure 11 This is a schematic diagram of the center line of the end plug weld and the extension lines of the shells on both sides.

[0062] Figure 12 It is a defect rule tree model.

[0063] Figure 13 This is a graph showing the change in loss during the training process.

[0064] Figures 14a to 14d This is a diagram showing the results of defect identification. Detailed Implementation

[0065] The present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments.

[0066] Figure 1 This is a flowchart illustrating a method for identifying defects in nuclear fuel rod end plug welds using radiographic digital imaging, according to an exemplary embodiment. The method can be executed by a terminal device, which can be a computer, such as a server, desktop computer, laptop computer, tablet computer, etc. The terminal device can also be, for example, a user device, in-vehicle device, or wearable device. This disclosure does not limit the type of terminal device. Figure 1 As shown, the method includes:

[0067] Step 1, Data Acquisition.

[0068] The digital images of the end plug welds on the nuclear fuel rods are all digital radiography (DR) images, not from a public dataset, totaling 1000 fuel rod images. Figure 2 As shown, the sample is a CF3 fuel rod end plug. During the preparation process, a batch of defective samples were produced by adjusting the welding process parameters. After manual review, the sample defects included: porosity, gas expansion, tungsten inclusions, and incomplete penetration. X-ray irradiation parameters were adjusted, with a focal length of 900mm, tube voltage of 260kV, and image grayscale values ​​of 30000-40000. Double-wall double-image radiography was used on the end plug weld, with 120° × 3 times of radiography, resulting in a set of 3 original images. Images of the upper and lower end plugs are shown below. Figure 2 As shown.

[0069] Step 2, single-bar segmentation.

[0070] In actual testing, to improve testing efficiency, 5-10 fuel rods are typically irradiated with X-rays simultaneously on the production line. The single-rod segmentation process extracts the image of a single fuel rod to facilitate subsequent analysis and processing.

[0071] Step 21: Perform image binarization on the original image to be segmented.

[0072] In step 21, Gaussian binarization can be used to process the original image to be segmented, resulting in a fuel rod image with clearer contours and less interference. Gaussian binarization is a local binarization method, also known as adaptive thresholding. It determines the status of a pixel by setting a region size and comparing the value of the pixel with the average value (or other features) of the pixels within that region.

[0073] Step 211: If the original image to be segmented is not a grayscale image, then convert the original image to a grayscale image.

[0074] Step 212: Smooth the grayscale image using a Gaussian filter. This helps reduce noise in the image and makes binarization more accurate.

[0075] Step 213: Convert the grayscale image into a binary image using a preset threshold. The choice of threshold is crucial; an adaptive thresholding method can typically be used to select a suitable preset threshold.

[0076] Step 214: Binarize the pixels of the image according to a preset threshold, such as... Figure 3 As shown, pixels larger than a preset threshold are set to white (255 or 1), and pixels smaller than a preset threshold are set to black (0).

[0077] Step 22: Extract contours from the binarized image to obtain a contour image. The original image has a resolution of 3008×2512 pixels and contains a large number of blank areas. Contour extraction is performed on the Gaussian-binded image to obtain the true, compact regions of the image.

[0078] In one possible implementation, morphological operations, such as dilation or erosion, can be performed on the contour image as needed to better separate the target region.

[0079] Step 23: Locate all connected components with non-zero pixels in the binary image. For each connected component, find its boundary contour. Different algorithms can be used to compute the contour, such as the Suzuki algorithm or the Ramirez algorithm.

[0080] Step 24, as follows Figure 4 As shown, determine all contours, and then find the one that determines the largest outer contour from all contours.

[0081] Step 25, as follows Figure 5 As shown, the image after contour extraction is vertically projected, and the pixel distribution in the horizontal direction is statistically analyzed. To reduce noise interference, the statistical results are truncated by a threshold. Positions with fewer than a threshold number of pixels in the vertical direction are marked to indicate that they are in areas separated by bars.

[0082] Step 26, as follows Figure 6 As shown, single-rod segmentation is performed based on the segmented region. A vertical projection image is obtained; based on the characteristics of the fuel rod image, the minimum length L of consecutive pixel occurrences in the horizontal direction is selected; in the vertical projection image, searching from left to right, intervals where pixels appear and the length of the consecutive interval is greater than L are retained, while other intervals are discarded; thus, the horizontal projection interval of the single-rod region is obtained.

[0083] Step 3, Evaluation Area Extraction

[0084] As shown in Figure 7, template images of the upper and lower plugs are preset. Each image after segmentation of a single rod is matched with the template images to extract the effective evaluation area. The purpose of template matching is to check whether the image meets the standard, whether there are any missing parts, and whether there are any fuel rods that are not fully inserted; it is also used to accurately match the area to be evaluated, thereby improving the efficiency of defect detection.

[0085] The TM_CCOEFF_NORMED method can be used, and its calculation method is as follows:

[0086]

[0087] Where T represents the template image and I represents the image to be matched. On the image to be detected, the image is traversed from left to right and from top to bottom, and the pixel matching degree between the template and the overlapping sub-images is calculated. The greater the matching degree, the greater the probability of them being the same. If the image to be matched is W×H and the template image is w×h, then the size of the resulting matrix is ​​(W-w+1)×(H-h+1).

[0088] The final relevance value is scaled to the range of [-1, 1]. The matching result is determined by taking the maximum value of the returned matching matrix. If the value is greater than the matching threshold, the image is considered to match the template.

[0089] Step 4, Data Augmentation

[0090] For small object detection, this disclosure employs several data augmentation methods, including Mosaic, Copy and Paste, and Mixup. The data augmentation effects are as follows: Figure 8 As shown.

[0091] Mosaic: Mosaic data augmentation is a novel data augmentation method that stitches four input images together to form a larger image. This method can effectively increase the number of images in the training set and improve the model's generalization ability.

[0092] Copy_and_Paste: The specific method is to first extract all the small targets for later use, and then copy these small targets onto the image, requiring that they do not overlap and that the copied positions do not exceed the boundaries of the image evaluation area.

[0093] Mixup: The original Mixup method weighted and merged two images into one. Here, based on the characteristics of fuel rod defect images, and combined with copy_and_paste, the defective parts of different images are scaled and weighted before being merged into a single image.

[0094] Step 5, Defect Detection and Localization: Obtain enhanced images of the end plugs of a single nuclear fuel rod; perform defect detection on the images using an improved YOLOX network; obtain the defect location and category.

[0095] To balance detection accuracy and speed, this disclosure proposes an improved fuel rod X-ray defect target detection algorithm based on the YOLOX network framework. By modifying the original network structure, the algorithm's ability to extract complex information from X-ray images is improved, achieving excellent performance on industrial production fuel rod X-ray defect target detection datasets.

[0096] In step 5, the following steps are used to form an improved YOLOX network.

[0097] Step 51: Network modification. The last three feature layers of the backbone network are passed through a collaborative attention module (CA) to generate corresponding neck layers. For multi-scale prediction, referencing the FPN approach, an additional predictive feature map N4 is constructed by direct addition. Specifically, the N3 layer, which fully integrates contextual information, is selected, and its size is enlarged through convolution and upsampling. This enlarged feature map is then concatenated with the F4 layer, which contains a wealth of detailed information. After thorough feature mixing via the basic building block CSP2_1, feature map N4 is output. Feature map N4, with its smaller receptive field and greater detail, is more suitable for small object detection tasks. Figure 9 As shown.

[0098] The collaborative attention module is used to uncover the correlations in existing data. It embeds location information into channel attention, which not only models the relationships between data channels but also captures the dependencies between location information, highlighting important features. Furthermore, this module has low computational cost and few parameters, resulting in negligible computational burden. It is also hot-swappable, making it ideal for use in lightweight algorithms. The collaborative attention module structure is as follows: Figure 10 As shown.

[0099] Given an input feature map: I∈R C×H×W .

[0100] First, two average pooling layers along different spatial dimensions [with kernel sizes of (1,W) and (H,1)] are used to obtain two feature vectors that aggregate information from different dimensions. Then, these two feature vectors are concatenated through dimension transformation, and finally, a 1×1 convolution is used for channel expansion to fully learn the positional and relational information captured by both layers, accurately highlighting the region of interest. This not only captures the dependency relationship in the current spatial direction but also preserves the precise positional information in the other spatial direction. The final feature vector size is:

[0101]

[0102] Here, parameter r controls the reduction of the number of channels, which can reduce the amount of computation and the inference time. Next, it is divided into two independent feature vectors along the spatial dimension, and then transformed into feature maps with the same number of channels through 1×1 convolution and activation function. Finally, it is multiplied element-wise with the input feature map.

[0103] Step 52, Loss Improvement: When using the IoU loss function as the bounding box regression loss, if overlap occurs, it cannot provide accurate movement direction for the bounding box, resulting in poor performance in small target detection and localization. The CIoU loss function is an improved version of the IoU loss function, introducing the calculation of center position and aspect ratio errors: on the one hand, it solves the problem of overlap with the target box; on the other hand, the consideration of overlapping areas, center point distance, and aspect ratio makes the loss function converge faster. Therefore, this study uses the CIoU loss function as the bounding box regression loss.

[0104]

[0105] in,

[0106]

[0107] In the formula, IoU is the intersection-union ratio between the predicted box and the ground truth box; ρ represents the Euclidean distance between two points; b and bgt represent the center points of the predicted box and the ground truth box, respectively; c represents the diagonal distance between the minimum bounding rectangles of the predicted box and the ground truth box; α is the coordination scaling parameter; v is the parameter used to measure the aspect ratio of the box; wgt, w and hgt, h represent the width and height of the predicted box and the ground truth box, respectively.

[0108] Furthermore, by combining the various IoU losses, the loss function is modified as follows:

[0109]

[0110] Experiments have shown that the effect is better when β=3.

[0111] Step 6: Optimize defect categories based on rule models.

[0112] Based on the characteristics of actual fuel rod defect samples, and refined by human experts, rule features are generated to further identify the types of defects.

[0113] The types of defects that may occur in the circumferential weld area include porosity, gas expansion, incomplete penetration, and tungsten inclusion.

[0114] The judgment rules for each defect type are shown in the table below.

[0115]

[0116]

[0117] Defect priority determination includes:

[0118] At the intersection of the centerline and the extended line of the inner wall of the casing, if there is a black spot at this location, it is considered to be incomplete welding. If a black spot appears at other locations on the centerline, it is considered to be a porosity.

[0119] If black dots appear on the extended inner wall of the casing within 2mm below the center line, they are primarily identified as air bulges. If black dots reappear at other image locations at the same elevation, they are identified as air holes.

[0120] Based on the above-mentioned defect characteristics and combined with expert experience, the following defect feature quantities can be extracted:

[0121] Defect center location information, including its relative height characteristics with respect to the weld centerline and its distance from the edge of the cladding;

[0122] The formula for calculating the defect center location is:

[0123]

[0124] After determining the location of the defect center, first determine whether this location is on the weld centerline or the extended lines of the cladding on both sides. For example... Figure 11 As shown.

[0125] The aspect ratio is determined using the following formula.

[0126]

[0127] Where ε is the aspect ratio of the equivalent area of ​​the defect, L is the length of the defect, and W is the width of the defect.

[0128] Defect grayscale characteristics / difference between grayscale and background are used to determine whether there is tungsten inclusion or not;

[0129] The calculation formula is:

[0130]

[0131] Where e is the grayscale difference between the defect and the background, A is the average grayscale value of all pixels in the defect area, and B is the average grayscale value of all pixels in the background area.

[0132] The area of ​​the defect is calculated using the area of ​​its circumscribed rectangle. The formula is as follows:

[0133] S = w * h

[0134] w is the width of the bounding rectangle of the defect, and h is the length of the rectangle, both in pixels.

[0135] Finally, by combining the information from the three images, the samples are classified using an ensemble tree model (such as random forest or GBDT) to obtain the final defect classification information. Figure 12 This demonstrates a classification method using a rule tree model as an example, such as... Figure 12As shown, when the aspect ratio is not less than K, it is a strip-shaped defect and is judged as incomplete penetration. When the aspect ratio is not less than K, it is a circular defect. It is then determined whether the grayscale difference between the defect and the background is less than M. If the grayscale difference between the defect and the background is less than M, it is judged as tungsten inclusion. If the grayscale difference between the defect and the background is not less than M, it is further determined whether the defect appears in two consecutive images. If the defect appears in two consecutive images, it is judged as porosity. If the defect does not appear in two consecutive images, it is judged as gas expansion.

[0136] This disclosure employs a fully automated process, significantly reducing human intervention costs; it achieves high accuracy in detecting and identifying small defects in X-ray images, effectively detecting minute defects in fuel rod end plug welds; the algorithm of this disclosure processes X-ray images quickly, enabling real-time non-destructive testing of nuclear fuel rod end plug welds; this disclosure combines deep learning algorithms and rule-based model algorithms, exhibiting good versatility and scalability, and can be widely applied to defect detection in other similar structures.

[0137] In contrast, traditional manual visual inspection methods are not only inefficient but also prone to missed or false detections, while existing automatic detection algorithms are ineffective at detecting minute defects. This invention uses artificial intelligence image recognition algorithms to process X-ray images, improving detection accuracy while reducing the possibility of missed and false detections.

[0138] In summary, this invention provides an online automatic identification method for defects in nuclear fuel rod end plug welds using radiographic digital imaging. Based on radiographic digital imaging technology, this algorithm utilizes intelligent image recognition algorithms to detect and identify small defects in X-ray images, and has advantages such as high accuracy, fast processing speed, versatility, and scalability.

[0139] In one application example, a dataset of 1000 X-ray images of end plug weld defects was used. The weld defects included four types of internal defects: porosity, gas expansion, incomplete penetration, and tungsten inclusion. After data augmentation using Mosaic, Mixup, and Copy and Paste, the dataset was expanded to 3854 images, resulting in a more diverse dataset.

[0140] Experiments were conducted on a Linux system using the PyTorch deep learning framework and in conjunction with Python.

[0141] During training, the input image size was 640 pixels * 640 pixels, and the batch size was set to 64. The number of iterations (epochs, training all samples in one epoch) was 500, and an early-stop strategy was implemented (the model stopped if there was no improvement after 50 epochs). For ease of comparison, the Adam optimizer was used to optimize the model parameters. Data augmentation was disabled in the last 15 epochs. Random scaling was employed during training to accommodate targets of different sizes. This strategy improves the model's robustness to changes in the scale of the input image.

[0142] Loss changes during training, as follows Figure 13 As shown. This disclosure uses AP (mean accuracy) and mAP (mean average precision, i.e., the average AP of each category), commonly used evaluation metrics in the field of object detection, to evaluate the model accuracy, and FPS (frames per second) to evaluate the algorithm speed.

[0143] First, let's introduce the definition of AP. First, define:

[0144] TP (true positive): The predicted value is the same as the true value; the predicted value is a positive sample (the true value is a positive sample).

[0145] TN (true negative): The predicted value is the same as the true value; the predicted value is a negative sample (the true value is a negative sample).

[0146] FP (false positive): The predicted value is different from the true value; the predicted value is a positive sample (the true value is a negative sample).

[0147] FN (false negative): The predicted value is different from the true value; the predicted value is a negative sample (the true value is a positive sample).

[0148] Precision is defined as precision = TP / (TP+FP), and recall is defined as recall = TP / (TP+FN).

[0149] The PR curve is the curve representing precision and recall. Different threshold values ​​yield different P and R values, which are plotted as the PR curve. AP is the area under the precision-recall curve; a higher AP value indicates better model performance.

[0150] In object detection, a model typically detects many types of objects, and a PageRank (PR) curve can be plotted for each class, thus calculating an Access Point (AP) value. The average of the AP values ​​across multiple classes is the mean AP (maximum AP).

[0151] The table below compares the AP, mAP@0.5, and detection speed of different models. It can be seen that, compared to the original model, the modified YOLOX model improves both the mean accuracy and mean mean accuracy without a significant increase in detection speed. This indicates that adding a collaborative attention module and adopting an updated loss function effectively improves the detection accuracy. Detection result examples are shown below. Figures 14a to 14d As shown.

[0152]

[0153] To address the problem of X-ray fuel rod end plug defect detection, taking advantage of the extremely small size of the defect target, this paper improves the deep learning network structure and optimizes the loss function based on the YOLOX target detection algorithm, and compares it with common deep learning target detection algorithms. Validation results on a real industrial production dataset show that the proposed algorithm achieves significantly improved recognition accuracy while maintaining high recognition speed, meeting production requirements and proving its effectiveness. This research method lays a solid foundation for future high-precision non-destructive testing of fuel rod end plugs.

[0154] The various embodiments of this disclosure have been described above. These descriptions are exemplary and not exhaustive, nor are they limited to the disclosed embodiments. Many modifications and variations will be apparent to those skilled in the art without departing from the scope and spirit of the described embodiments. The terminology used herein is chosen to best explain the principles, practical application, or improvement of the technology in the market, or to enable others skilled in the art to understand the embodiments disclosed herein.

Claims

1. A method for identifying defects in nuclear fuel rod end plug welds using radiographic digital imaging, characterized in that, The method includes: Step 1, Data Acquisition: Obtain digital images of the weld seams at the end plugs of nuclear fuel rods; Step 2, single-bar segmentation, includes: Step 21: Perform image binarization on the original image to be segmented; Step 22: Extract contours from the binarized image to obtain a contour image; Step 23: Find all connected components with non-zero pixels in the binary image, and for each connected component, find the boundary contour of the connected component. Step 24: Determine all contours, and find the one with the largest outer contour among all contours; Step 25: Perform vertical projection on the image after contour extraction and count the pixel distribution in the horizontal direction; Step 26: Perform single-rod segmentation based on the segmented region to obtain the vertical projection image; according to the characteristics of the fuel rod image, select the minimum length L of continuous pixel occurrence in the horizontal direction; in the vertical projection image, search from left to right, retain the intervals where pixels appear and the continuous interval length is greater than L, and discard the other intervals; obtain the projection interval of the single rod region in the horizontal direction. Step 3, Evaluation region extraction: Preset template images of the upper and lower plugs, and perform template matching between each image after single-bar segmentation and the template images to extract the effective evaluation region; Step 4: Perform data augmentation for each assessment area; Step 5, Defect Detection and Localization: Obtain enhanced images of the end plugs of single-bar nuclear fuel rods; perform defect detection on the images using an improved YOLOX network; obtain the defect location and category; Step 6: Optimize defect categories based on rule models.

2. The method according to claim 1, characterized in that, Step 21 includes: Step 211: If the original image to be segmented is not a grayscale image, then convert the original image to a grayscale image. Step 212: Smooth the grayscale image using a Gaussian filter; Step 213: Convert the grayscale image into a binary image using a preset threshold; the selection of the threshold is crucial, and an adaptive threshold selection method is usually used to select a suitable preset threshold. Step 214: Binarize the pixels of the image according to a preset threshold.

3. The method according to claim 1, characterized in that, Perform morphological operations on the extracted contour image.

4. The method according to claim 1, characterized in that, In step 4, various data augmentation methods are used for the assessment area, including Mosaic, Copy and Paste, and Mixup.

5. The method according to claim 1, characterized in that, In step 5, the following steps are used to form an improved YOLOX network; Step 51, network modification: The last three feature layers of the backbone network are passed through the collaborative attention module to generate the corresponding Neck layer network. For multi-scale prediction, the N3 layer, which fully integrates contextual information, is selected. After convolution and upsampling, the feature map size is enlarged and concatenated with the F4 layer, which contains a lot of detailed information. The features are then fully mixed through the basic building block CSP2_1 to output the feature map N4. Step 52, Loss Improvement: The CIoU loss function is adopted as the bounding box regression loss. Combining the various IoU losses, the overall modified loss function is as follows:

6. The method according to claim 1, characterized in that, The types of defects that appear in the circumferential weld area in step 6 include porosity, gas expansion, incomplete penetration, and tungsten inclusion; The following judgment rules apply to each defect type; The defect type is porosity, and the defect characteristics are the appearance of gray-scale-increased round dots in the evaluation area. The vertical height of the dots is relatively consistent in the three images, and their horizontal position changes after rotation. The judgment rule is to combine the three images for comprehensive evaluation, and the defect must appear at least twice. The defect type is air expansion. The defect characteristics are spots with increased grayness near the cladding side within 2mm below the weld centerline; and a band-shaped image with increased grayness in the transverse direction within 2mm below the weld centerline. The judgment rule is that if it appears once in 3 images, it is judged as air expansion. The defect type is incomplete penetration. The defect characteristics are: a thin line with increased grayness on the weld centerline; a black dot at the intersection of the weld centerline and the extended line of the inner wall of the shell; and a vertical line on the weld centerline, located near the junction of the shell and the end plug. The judgment rule is that if the defect appears once in 3 images, it is judged as incomplete penetration. The defect type is tungsten inclusion, and the defect characteristic is white spots with reduced grayness appearing in the evaluation area. The judgment rule is to combine three images for comprehensive evaluation, and the defect must appear at least twice.

7. The method according to claim 6, characterized in that, Defect priority determination includes: At the intersection of the centerline and the extended line of the inner wall of the casing, if there is a black spot at this location, it is considered to be incomplete welding. If a black spot appears at other locations on the centerline, it is considered to be a porosity. If black dots appear on the extended inner wall of the casing within 2mm below the center line, they are primarily identified as air bulges. If black dots reappear at other image locations at the same elevation, they are identified as air holes.

8. The method according to claim 6, characterized in that, The extracted defect features include: Defect center location information, including its relative height characteristics with respect to the weld centerline and its distance from the edge of the cladding; The location of the defect center is determined by the following formula: The aspect ratio is determined using the following formula; Where ε is the aspect ratio of the equivalent area of ​​the defect, L is the length of the defect, and W is the width of the defect; The grayscale characteristics of the defect / difference with the background grayscale are determined by the following formula: Where e is the grayscale difference between the defect and the background, A is the average grayscale value of all pixels in the defect area, and B is the average grayscale value of all pixels in the background area. The size of the defect area is determined by the following formula: S = w * h w is the width of the bounding rectangle of the defect, and h is the length of the rectangle, both in pixels.