Deep learning-based nuclear rod end plug welding seam ray digital imaging defect identification method
By introducing a collaborative attention module and optimized loss function in the YOLOX network, the problem of manual judgment dependence and low detection accuracy in weld defect detection is solved, and efficient automatic identification of weld defects is achieved, which is suitable for the X-ray digital imaging detection of welds at the end plug of nuclear fuel rod.
Patent Information
- Application Number
- CN202411748531.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-02
- Publication Date
- 2025-03-25
AI Technical Summary
The prior art has problems such as manual judgment dependence, low detection accuracy, limited generalization ability and difficulty in detecting small defects in weld defects. In particular, there is a lack of effective automatic identification method in the X-ray digital imaging detection of welds at the end plug of nuclear fuel rods.
Using an improved YOLOX network based on deep learning, an improved YOLOX network is generated for weld defect detection by introducing a collaborative attention module and an optimized loss function. The method includes obtaining the end plug image of the nuclear fuel rod, performing defect detection through an improved YOLOX network, and obtaining defect locations and categories.
It improves the accuracy and speed of weld defect detection, enhances the ability to extract complex information of X-ray images, and can achieve excellent performance on industrially produced fuel rod X-ray defect target detection data sets.
Smart Images

Figure CN119693314A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of nuclear power technology, and in particular relates to a nuclear fuel rod end plug weld radiographic digital imaging defect recognition method based on deep learning. Background Art
[0002] Welding is an important manufacturing process used to join metals or other thermoplastic materials together. Welding quality directly affects product performance and safety. Defects in the weld, such as lack of penetration, porosity, tungsten inclusions, gas expansion, etc., can reduce the strength and reliability of the weld.
[0003] In order to ensure the quality of welding, it is generally necessary to use non-destructive testing technology to detect defects in welds without destroying the welded parts. X-ray testing is an important non-destructive testing method that can provide internal images of welds. With the help of a film viewing lamp or a display screen, the inspector evaluates the defects in the image. The results of manual judgment depend on the professional level of the inspector, and different inspectors have different understandings and implementations of the evaluation criteria. In addition, long-term, multi-batch testing work will cause eye fatigue and increase the probability of missed detection and misjudgment.
[0004] In addition to manual judgment, traditional image processing methods involve using various techniques such as edge detection, filtering, corrosion and expansion to extract the region of interest (ROI) and defect features in weld images. This requires clever design and adjustment and has limited generalization capabilities.
[0005] New image processing methods generally use deep learning methods, such as Faster-RCNN, SSD, YOLO, etc., which can directly detect and classify weld images without manual feature extraction. These methods work well for large target detection, but may require more data to deal with the problem of detecting small defects. X-ray images usually have problems such as low contrast, noise, lead interference, and high grayscale, which makes preprocessing complicated. Optimization and automation of preprocessing is a challenge. In addition, deep learning methods may also face challenges for the detection of small defects in welds, because small defects may be difficult to detect and require more data and more complex models to process. These technologies have not yet been applied to the automatic recognition of X-ray digital imaging inspection results of fuel rod end plug welds. Summary of the invention
[0006] In order to overcome the problems existing in the related technologies, a nuclear fuel rod end plug weld radiographic digital imaging defect recognition method based on deep learning is provided.
[0007] According to one aspect of an embodiment of the present disclosure, a method for identifying defects in a nuclear fuel rod end plug weld using radiographic digital imaging based on deep learning is provided, the method comprising:
[0008] Step 1, obtaining an image of a single nuclear fuel rod end plug;
[0009] Step 2: The image is subjected to defect detection using the improved YOLOX network;
[0010] Step 3, obtain defect location and category;
[0011] In step 2, the improved YOLOX network is generated using the following method;
[0012] The last three feature layers of the backbone network of the YOLOX network are respectively passed through the collaborative attention module (CA) to generate the corresponding Neck layer network. Among them, for multi-scale prediction, the additional prediction feature map N4 is constructed by direct addition. The N3 layer that fully integrates the context information is selected, and the feature map size is expanded after convolution operation and upsampling, and it is concatenated with the F4 layer containing a lot of detail information. After the basic building block CSP2_1 fully mixes the features, the feature map N4 is output.
[0013] In a possible implementation, step 2 includes:
[0014] Step 21, for a given input feature map: I∈R C×H×W , through two average pooling layers along different spatial dimensions, two feature vectors that aggregate information of different dimensions are obtained;
[0015] Step 22, concatenate the feature vectors of these two dimensions through dimensional conversion, and then perform channel expansion through 1×1 convolution to learn the position and association information captured by the two, highlight the area of interest, and finally obtain the feature vector size:
[0016] The parameter r is the ratio of the number of channels to be reduced, which can reduce the amount of calculation and the inference time. Then, it is split into two independent feature vectors along the spatial dimension and transformed into feature maps with the same number of channels through 1×1 convolution and activation function.
[0017] Step 23, multiply the feature vector by the input feature map element by element.
[0018] In a possible implementation, in step 2, the following method is used to perform Loss improvement;
[0019] The CIoU loss function is used as the bounding box regression loss:
[0020]
[0021] in,
[0022] Where IoU is the intersection over union ratio between the predicted box and the true box; ρ represents the Euclidean distance between two points; b and b gt Represent the center points of the predicted box and the real box respectively; c represents the diagonal distance between the predicted box and the minimum enclosing rectangle of the real box; α is the coordination ratio parameter; v is the parameter used to measure the aspect ratio of the box; w gt Indicates the width of the prediction box, h gt Represents the height of the predicted box, w represents the width of the real box, and h represents the height of the real box.
[0023] Furthermore, considering all IoU losses, the loss function is modified as follows:
[0024]
[0025] In one possible implementation, AP and mAP, commonly used evaluation indicators in the field of object detection, are used to evaluate the model accuracy, and FPS (the number of images that can be processed per second) is used to evaluate the algorithm speed.
[0026] In a possible implementation, in the evaluation indicator AP;
[0027] TP means that the predicted value is the same as the true value, and the predicted value is a positive sample;
[0028] TN means that the predicted value is the same as the true value, and the predicted value is a negative sample;
[0029] FP means that the predicted value is different from the true value, and the predicted value is a positive sample;
[0030] FN means that the predicted value is different from the true value, and the predicted value is a negative sample.
[0031] Precision is expressed as precision = TP / (TP+FP), and recall is expressed as recall = TP / (TP+FN).
[0032] In target detection, a model usually detects many kinds of objects. A PR curve can be drawn for each type of object, and then an AP value is calculated. The average of the AP values of multiple categories is mAP.
[0033] The beneficial effects of the present disclosure are: an improved nuclear fuel rod X-ray defect target detection algorithm based on YOLOX as the basic network framework is proposed, the network architecture is modified based on the single-stage target detection algorithm YOLOX, and a lightweight CA (collaborative attention) module is introduced, which is plug-and-play, greatly reduces the model weight, takes into account detection accuracy and speed, and improves the Loss loss function, thereby improving the algorithm's ability to extract complex information from X-ray images, and can achieve excellent performance on the industrially produced fuel rod X-ray defect target detection dataset. BRIEF DESCRIPTION OF THE DRAWINGS
[0034] Figure 1 It is a flow chart of a method for identifying defects in nuclear fuel rod end plug welds using radiographic digital imaging based on deep learning, as shown in an embodiment of the present disclosure.
[0035] Figure 2 This is the network structure diagram of the CA module.
[0036] Figure 3 It is the Loss change diagram during the training process.
[0037] Figure 4 It is a schematic diagram of the detection results of a nuclear fuel rod end plug weld radiographic digital imaging defect recognition method based on deep learning shown in an embodiment of the present disclosure. DETAILED DESCRIPTION
[0038] The present invention is further described in detail below with reference to the accompanying drawings and specific embodiments.
[0039] In the target detection task, the scheme based on deep neural network shows better performance than traditional methods. At present, typical target detection models can be divided into two categories: 1) One-stage detection algorithms represented by algorithms such as SSD and YOLO, which directly regress the input image and predict the target category and position coordinates. Although the detection speed is fast, the accuracy is low; 2) Two-stage detection algorithms represented by algorithms such as Faster R-CNN and Mask R-CNN, which first use the region proposal network to find the area that may contain the target, and then use the second network to classify the candidate area and predict the position. Its detection accuracy is high but the speed is slow. Nowadays, target detection algorithms based on deep neural networks have been successfully applied to various fields, including many attempts to detect X-ray defect targets. However, there are large differences between X-ray images of fuel rod defects and natural images, and the scale of defect targets is usually very small, which makes fuel rod defect target detection a difficult problem.
[0040] In order to balance the detection accuracy and speed of the algorithm, this paper proposes an improved fuel rod X-ray defect target detection algorithm based on YOLOX as the basic network framework. By modifying the original network structure and improving the algorithm's ability to extract complex information from X-ray images, it can achieve excellent performance on the industrial production fuel rod X-ray defect target detection dataset.
[0041] Figure 1 is a flow chart of a method for identifying defects in a nuclear fuel rod end plug weld using radiographic digital imaging based on deep learning, as shown in an embodiment of the present disclosure. Figure 1 As shown, the method includes:
[0042] Step 1, obtaining an image of a single nuclear fuel rod end plug.
[0043] Step 2: The image is subjected to defect detection using the improved YOLOX network;
[0044] Step 3: Get the defect location and category.
[0045] In step 2, the following method is used to generate an improved YOLOX network.
[0046] The last three feature layers of the backbone network of the YOLOX network are respectively passed through the collaborative attention module (CA) to generate the corresponding Neck layer network. Among them, for multi-scale prediction, the additional prediction feature map N4 is constructed by direct addition. The N3 layer that fully integrates the context information is selected, and the feature map size is expanded after convolution operation and upsampling, and it is concatenated with the F4 layer containing a lot of detail information. After the basic building block CSP2_1 fully mixes the features, the feature map N4 is output. Feature map N4 is more suitable for small target detection tasks because its receptive field is smaller and contains more detail information.
[0047] like Figure 2 As shown in the figure, the collaborative attention module is used to explore the relevance of existing data. It embeds position information into channel attention, which not only models the relationship between data channels, but also captures the dependency between position information and highlights important features. In addition, the module has a small amount of calculation and parameters, and the computational burden it brings can be ignored. It also supports hot plug-in and plug-and-play, which is very suitable for use in lightweight algorithms. The structure of the collaborative attention module is shown in the figure.
[0048] For a given input feature map: I∈R C×H×W , through two average pooling layers along different spatial dimensions [pooling kernel sizes are (1, W) and (H, 1] respectively], two feature vectors that aggregate information of different dimensions are obtained. Then, the feature vectors of these two dimensions are concatenated through dimension conversion, and then the channels are expanded through 1×1 convolution to fully learn the position and association information captured by the two, and accurately highlight the area of interest. In this way, not only the dependency of the current spatial direction is captured, but also the precise position information of the other spatial direction is retained. The size of the feature vector obtained in the end is:
[0049] Among them, the parameter r is the ratio of controlling the reduction of the number of channels, which can reduce the amount of calculation and the inference time; then, it is split into two independent feature vectors along the spatial dimension again, and transformed into a feature map with the same number of channels through 1×1 convolution and activation function; finally, it is multiplied element by element with the input feature map.
[0050] In step 2, the following method is used to improve the loss.
[0051] When using the IoU loss function as the bounding box regression loss, if overlap occurs, the accurate moving direction cannot be provided for the bounding box, resulting in poor performance in small target detection and positioning. The CIoU loss function is an improved version of the IOU loss function, which introduces the calculation of the center position and aspect ratio error: on the one hand, it solves the overlap problem with the target box; on the other hand, the consideration of the overlapping area, center point distance and aspect ratio makes the loss function converge faster. Therefore, this disclosure adopts the CIoU loss function as the bounding box regression loss:
[0052]
[0053] in,
[0054] Where IoU is the intersection over union ratio between the predicted box and the true box; ρ represents the Euclidean distance between two points; b and b gt Represent the center points of the predicted box and the real box respectively; c represents the diagonal distance between the predicted box and the minimum enclosing rectangle of the real box; α is the coordination ratio parameter; v is the parameter used to measure the aspect ratio of the box; w gt Indicates the width of the prediction box, h gt Represents the height of the predicted box, w represents the width of the real box, and h represents the height of the real box.
[0055] Furthermore, considering all IoU losses, the loss function is modified as follows:
[0056]
[0057] Experiments show that the effect is better when β=3.
[0058] In an application example, a dataset of 1,000 X-ray images of end plug weld defects includes four internal defects: porosity, bulging, incomplete penetration, and tungsten inclusion. After data enhancement using Mosaic, Mixup, and Copy_and_Paste, the dataset was expanded to 3,854 images, and the expanded dataset is diverse.
[0059] In Linux system, experiments are conducted based on Pytorch deep learning framework and combined with Python. Table 1 shows the hardware facilities.
[0060] Table 1 Hardware facilities
[0061] hardware Configuration CPU I7-13700 GPU NVIDIA V100*4 Memory / GB 32
[0062] The input image size during training is 640 pixels * 640 pixels, and batch_size is set to 64. The number of iterations (epochs, one round is one round after all samples are trained) is 500, and the early_stop strategy is set (if the model effect does not improve after 50 epochs, it will stop. For the convenience of comparison, the Adam optimizer is used to optimize the model parameters. Data enhancement is turned off in the last 15 epochs. Random scale adjustment is used during training to adapt to targets of different sizes. This strategy can improve the robustness of the model to changes in the scale of the input image.
[0063] The Loss changes during the training process are as follows Figure 3 shown.
[0064] This paper adopts the commonly used evaluation indicators AP (average accuracy) and mAP (mean Average Precision, the average value of AP in each category) in the field of target detection to evaluate the model accuracy, and uses FPS (the number of pictures that can be processed per second) to evaluate the algorithm speed.
[0065] Evaluation index AP:
[0066] TP (true positive): The predicted value is the same as the true value, and the predicted value is a positive sample (the true value is a positive sample);
[0067] TN (true negative): The predicted value is the same as the true value, and the predicted value is a negative sample (the true value is a negative sample);
[0068] 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);
[0069] FN (false negative): The predicted value is different from the true value, and the predicted value is a negative sample (the true value is a positive sample);
[0070] The precision is expressed as precision = TP / (TP+FP), and the recall is defined as recall = TP / (TP+FN).
[0071] The PR curve is the curve of precision and recall. When different thresholds are taken, different P and R values can be obtained. The PR curve is drawn as an image. AP is the area under the Precision-recall curve. The higher the AP value, the better the performance of the model.
[0072] In object detection, a model usually detects many kinds of objects, so a PR curve can be drawn for each category, and then an AP value can be calculated. The average of the AP values of multiple categories is mAP.
[0073] The results are shown in Table 2. Table 2 compares the AP, mAP@0.5, and detection speed of different models. It can be seen that compared with the original model, the modified YOLOX model has improved both the average precision and the mean average precision without significantly increasing the detection speed. This shows that the addition of the collaborative attention module to the network and the adoption of an updated loss function have effectively improved the detection accuracy level.
[0074] Sample test results Figure 4 As shown. Aiming at the problem of X-ray fuel rod end plug defect detection, based on the characteristics of extremely small defect targets, the deep learning network structure and optimized loss function are improved on the basis of the YOLOX target detection algorithm, and compared with the common deep learning target detection algorithm. The verification results on the actual industrial production data set show that the algorithm scheme proposed in this paper has significantly improved the recognition accuracy while maintaining a high recognition speed, meeting the production needs, and proving its effectiveness. This research method has laid a solid foundation for high-precision non-destructive testing of fuel rod end plugs in the future.
[0075] The embodiments of the present disclosure have been described above, and the above description is exemplary, not exhaustive, and is not limited to the disclosed embodiments. Many modifications and changes will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the described embodiments. The selection of terms used herein is intended to best explain the principles of the embodiments, practical applications, or improvements to the technology in the market, or to enable other persons of ordinary skill 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 based on deep learning, characterized in that: The method comprises: Step 1, obtaining an image of a single nuclear fuel rod end plug; Step 2: The image is subjected to defect detection using the improved YOLOX network; Step 3, obtain defect location and category; In step 2, the improved YOLOX network is generated using the following method; The last three feature layers of the backbone network of the YOLOX network are respectively passed through the collaborative attention module (CA) to generate the corresponding Neck layer network. Among them, for multi-scale prediction, the additional prediction feature map N4 is constructed by direct addition. The N3 layer that fully integrates the context information is selected, and the feature map size is expanded after convolution operation and upsampling, and it is concatenated with the F4 layer containing a lot of detail information. After the basic building block CSP2_1 fully mixes the features, the feature map N4 is output.
2. The method according to claim 1, characterized in that Step 2 includes: Step 21, for a given input feature map: I∈R C×H×W , through two average pooling layers along different spatial dimensions, two feature vectors that aggregate information of different dimensions are obtained; Step 22, concatenate the feature vectors of these two dimensions through dimensional conversion, and then perform channel expansion through 1×1 convolution to learn the position and association information captured by the two, highlight the area of interest, and finally obtain the feature vector size: The parameter r is the ratio of the number of channels to be reduced, which can reduce the amount of calculation and the inference time. Then, it is split into two independent feature vectors along the spatial dimension and transformed into feature maps with the same number of channels through 1×1 convolution and activation function. Step 23, multiply the feature vector by the input feature map element by element.
3. The method according to claim 1, characterized in that In step 2, the following method is used to improve the loss; The CIoU loss function is used as the bounding box regression loss: in, Where IoU is the intersection over union ratio between the predicted box and the true box; ρ represents the Euclidean distance between two points; b and b gt Represent the center points of the predicted box and the real box respectively; c represents the diagonal distance between the predicted box and the minimum enclosing rectangle of the real box; α is the coordination ratio parameter; v is the parameter used to measure the aspect ratio of the box; w gt Indicates the width of the prediction box, h gt Represents the height of the predicted box, w represents the width of the real box, and h represents the height of the real box. Furthermore, considering all IoU losses, the loss function is modified as follows:
4. The method according to claim 1, characterized in that: The AP and mAP, commonly used evaluation indicators in the field of target detection, are used to evaluate the model accuracy, and FPS (the number of images that can be processed per second) is used to evaluate the algorithm speed.
5. The method according to claim 4, characterized in that In the evaluation index AP; TP means that the predicted value is the same as the true value, and the predicted value is a positive sample; TN means that the predicted value is the same as the true value, and the predicted value is a negative sample; FP means that the predicted value is different from the true value, and the predicted value is a positive sample; FN means that the predicted value is different from the true value, and the predicted value is a negative sample. Precision is expressed as precision = TP / (TP+FP), and recall is expressed as recall = TP / (TP+FN). In target detection, a model usually detects many kinds of objects. A PR curve can be drawn for each type of object, and then an AP value is calculated. The average of the AP values of multiple categories is mAP.