End plug welding seam ray digital image region-of-interest extraction method

By improving the Unet model network, combining image preprocessing, semantic annotation, residual module, attention mechanism and Focal loss loss function, the problem of large calculation amount, low accuracy and low efficiency in extracting the region of interest in end plug welding weld ray digital image is solved, and more efficient and accurate extraction of the region of interest is achieved.

CN119600270APending Publication Date: 2025-03-11CHINA NORTH NUCLEAR FUEL CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411715559.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-27
Publication Date
2025-03-11

AI Technical Summary

Technical Problem

When extracting the area of ​​interest of end plug welding weld ray digital image, traditional image processing methods are large in calculation, accuracy and efficiency.

Method used

The improved Unet model network is adopted to improve the efficiency and accuracy of the model through image preprocessing and enhancement, semantic annotation, introduction of residual modules and attention mechanisms, and the use of Focal loss loss function.

Benefits of technology

It effectively improves the extraction accuracy and efficiency of the region of interest, reduces the detection complexity, and significantly improves the segmentation effect of the region of interest.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119600270A_ABST
    Figure CN119600270A_ABST
Patent Text Reader

Abstract

The invention belongs to the technical field of end plug welding seam detection, and aims to solve the problems of large calculation amount, relatively low accuracy and efficiency and the like caused by directly processing an image by a traditional image processing method when a region of interest of an end plug welding seam ray digital image is extracted. The invention discloses an end plug welding seam ray digital image region-of-interest extraction method, which comprises the following steps: carrying out image preprocessing and image enhancement on an acquired image, then carrying out semantic annotation on the image, sending the image into an improved residual module network, introducing an attention mechanism, and using a cross entropy loss function to accelerate the calculation speed and improve the model efficiency. And the improved network model is trained and is used for testing a set observation effect. According to the method, the region of interest can be effectively and accurately extracted, the detection complexity is reduced, and the detection efficiency is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application belongs to the technical field of end plug weld detection, and in particular, relates to a method for extracting a region of interest in a digital radiographic image of an end plug weld. Background Art

[0002] Nuclear fuel elements are the core components of nuclear reactors and are key structures for achieving nuclear energy conversion. The manufacture of nuclear fuel elements involves multiple complex processes, and each manufacturing process requires strict quality control to ensure the reliability and safety of the elements. In the welding process of nuclear fuel elements, end plug welding is a common welding method. However, due to various factors, end plug welding welds may have some defects, such as incomplete penetration, cracks, etc., which will seriously affect product quality, so it is necessary to accurately identify the above defects.

[0003] At present, X-ray digital image detection is the main means of detecting end plug welding defects. X-ray digital images usually contain a lot of noise and irrelevant information, which will interfere with the accurate identification of defects. In practical applications, due to the imaging complexity of X-ray digital images, the area of ​​interest often only occupies a very small part of the image. Traditional image processing methods directly process images, which will face problems such as large amount of calculation, low accuracy and efficiency. Summary of the invention

[0004] The purpose of the present application is to provide a method for extracting the region of interest of a digital image of an end plug weld by radiography, so as to solve the problem that the traditional image processing method directly processes the image when extracting the region of interest of a digital image of an end plug weld, which faces the problems of large amount of calculation, low accuracy and efficiency.

[0005] In order to achieve the above objectives, this application provides the following technical solutions:

[0006] The present application provides a method for extracting regions of interest from digital radiographic images of end plug welds, performs image preprocessing and image enhancement on the collected images, then semantically annotates the images, sends them to an improved residual module network, introduces an attention mechanism, uses a cross entropy loss function to speed up the calculation, improves the model efficiency, and then trains the improved network model and uses it on a test set to observe the effect.

[0007] In some embodiments, the method specifically comprises:

[0008] S1: Collect a number of radiographic digital images of end plug welding seams, and perform image preprocessing and image enhancement;

[0009] S2: Annotate the region of interest in the digital image of the end plug weld to obtain a semantic segmentation dataset;

[0010] S3: Build a deep learning improved Unet model network for the semantic segmentation dataset obtained in S2, and replace the original convolution module in the Unet model network with the residual module ResNet;

[0011] S4: Introduce the attention mechanism CBAM module into the original network structure, and introduce the CBAM module before each pooling layer in the encoder downsampling process;

[0012] S5: Replace the original cross entropy loss function in the Unet model network with Focal loss s Loss function;

[0013] S6: training using the model improved from S3 to S5;

[0014] S7: Input the digital image of the end plug weld to be tested for segmentation and extraction, obtain the region of interest, verify the effect of the model, and save the image after the region of interest is extracted.

[0015] In some embodiments, preprocessing of the image includes scaling, cropping, rotating, and filtering the image.

[0016] In some embodiments, the enhancement of the image includes contrast enhancement.

[0017] In some embodiments, the labelme tool is used to mark the region of interest in the end plug weld seam digital image to obtain a file in a json suffix format.

[0018] In some embodiments, the files obtained in the json suffix format are divided into a training set, a test set, and a validation set.

[0019] In some embodiments, the formula of the replaced residual module is:

[0020] y l =h(x l )+F(x l , W l )

[0021] x l+1 =f(y l )

[0022] in:

[0023] x l+1 =x l +F(x l , W l )

[0024]

[0025] Where h(·) represents direct mapping, f(·) represents activation function, and L represents the unit sum of features of each residual block.

[0026] In some embodiments, the CBAM module includes a CAM and a SAM.

[0027] In some embodiments, the introduced attention mechanism CBAM is implemented as follows:

[0028]

[0029] In the formula, F represents the feature map, M C and M S Represent channel-based and space-based attention mechanisms respectively, represents element-by-element multiplication, F' represents the output feature map after channel attention, and F" represents the output feature map after spatial attention;

[0030] First, perform channel-based average pooling and maximum pooling on the input feature map, concatenate the two feature maps based on the channel, and then perform convolution operation and sigmoid activation function on them to obtain the attention weight with the same feature map size as the input, which can be expressed as:

[0031]

[0032] In the formula, σ represents the sigmoid activation function, W0 and W1 represent two convolution operations, represents average pooling, represents the maximum pooling, f 7×7 The convolution kernel size of the convolution operation is 7×7.

[0033] In some embodiments, the alternative Focal loss function introduces the α coefficient as follows:

[0034] FL(p t )=-α t (1-p t ) γ log(p t )

[0035] In the formula, p t It represents the probability that the model predicts that the sample belongs to the target, αt represents the weight coefficient, and γ represents the adjustment parameter.

[0036] Compared with the prior art, the method for extracting the region of interest of the end plug welding weld radiographic digital image provided by the present application has the following beneficial effects:

[0037] The present invention provides a method for effectively and accurately extracting a region of interest, thereby reducing detection complexity and improving detection efficiency.

[0038] This application uses the improved Unet model to achieve the segmentation and extraction of the region of interest of the end plug weld X-ray digital image. The segmentation effect is significantly improved compared with the original Unet, which can make the extraction of the region of interest more accurate and efficient. At present, this algorithm has not been applied to the image recognition and region of interest extraction of the X-ray digital imaging of the end plug weld of the fuel rod. BRIEF DESCRIPTION OF THE DRAWINGS

[0039] In order to more clearly illustrate the technical solution of the present application, the following is a brief introduction to the drawings required for the technical description.

[0040] Figure 1 A flow chart of a method for extracting regions of interest from digital radiographic images of end plug welds provided in this application;

[0041] Figure 2 The original image and data enhancement effect image provided for this application;

[0042] Figure 3 The original Unet network model provided by the existing technology has the effect of extracting the region of interest;

[0043] Figure 4 This is the region of interest extraction effect of the improved Unet network model provided in this application. DETAILED DESCRIPTION

[0044] The following is further explained in detail through specific implementation methods.

[0045] like Figure 1 As shown, the present application provides a method for extracting the region of interest of a digital image of an end plug weld ray. The method is based on an improved Unet model, performs image preprocessing and image enhancement operations on the collected image, and then semantically annotates the image, and then sends it to an improved residual module network, introduces an attention mechanism, and then uses a cross entropy loss function to speed up the calculation speed and improve the model efficiency. The improved network model is then trained and used for the test set to observe the effect. The specific steps are as follows:

[0046] S1: Collect a large number of digital radiographic images of end plug welds, and perform image preprocessing and image enhancement, including image scaling, cropping, rotation, filtering, contrast enhancement, etc. Figure 2 shown.

[0047] S2: Use the labelme tool to annotate the regions of interest in the digital image of the end plug weld radiograph, obtain the file with the json suffix format and divide it into training set, test set and validation set to produce a semantic segmentation dataset in VOC format.

[0048] S3: Build a deep learning improved Unet model network for the semantic segmentation dataset obtained in S2, and replace the original convolution module in the Unet model network with the residual module ResNet. The residual module can realize linear combination of shallow and deep information, so that the information between layers can be integrated with each other, which can solve the gradient explosion problem caused by the deepening of the network layers.

[0049] In S3, the mathematical formula of the replaced residual module is:

[0050] y l =h(x l )+F(x l , W l )

[0051] x l+1 =f(y l )

[0052] In the formula, h(·) represents direct mapping, f(·) represents activation function;

[0053] in:

[0054] x l+1 =x l +F(x l , W l )

[0055]

[0056] Where L is the unit sum of the features of each residual block.

[0057] S4: Introduce the attention mechanism CBAM module into the original network structure. The CBAM module includes CAM and SAM. This application introduces the CBAM module before each pooling layer during the encoder downsampling process. CBAM allocates attention to two dimensions at the same time, which enhances the effect of the attention mechanism on the performance of the model network, enabling the network to better focus on important areas in the image and improve the extraction accuracy of the area of ​​interest.

[0058] In S4, the implementation of the introduced attention mechanism CBAM is as follows:

[0059]

[0060] In the formula, F represents the feature map, M C and M S Represent channel-based and space-based attention mechanisms respectively, represents element-by-element multiplication, F' represents the output feature map after channel attention, and F" represents the output feature map after spatial attention.

[0061] First, perform channel-based average pooling and maximum pooling on the input feature map, concatenate the two feature maps based on the channel, and then perform convolution operation and sigmoid activation function on them to obtain the attention weight with the same feature map size as the input, which can be expressed as:

[0062]

[0063] In the formula, σ represents the sigmoid activation function, W0 and W1 represent two convolution operations, represents average pooling, represents the maximum pooling, f 7×7 The convolution kernel size of the convolution operation is 7×7.

[0064] S5: Replace the original cross entropy loss function in the Unet model network with the Focal loss function. The Focal loss function can solve the problem of imbalanced foreground and background areas in the image, that is, most areas in the image to be detected do not contain the target, and only a small part of the area contains the target of interest that needs to be detected.

[0065] In S5, the replaced Focal loss function can solve the problem of target and background imbalance by introducing the α coefficient:

[0066] FL(p t )=-α t (1-p t ) γ log(p t )

[0067] In the formula, p t represents the probability that the model predicts that the sample belongs to the target, α t represents the weight coefficient, which can balance the number of targets and backgrounds, and γ represents the adjustment parameter.

[0068] S6: Training using the model improved by S3-S5.

[0069] S7: Input the digital image of the end plug weld to be tested for segmentation and extraction, obtain the region of interest, verify the effect of the model, achieve accurate extraction of the region of interest, and save the image after the extraction of the region of interest.

[0070] Through the method provided by this application, such as Figure 3 and Figure 4 As shown, the improved Unet network model used in this application has better region of interest extraction effect than the original Unet network model.

[0071] Traditional image processing methods face problems such as large amount of computation, low accuracy and efficiency in extracting regions of interest. This application improves detection efficiency by replacing the residual network module of Unet, adding an attention mechanism, replacing the loss function and other strategies.

[0072] This application replaces the original convolution module in the Unet model network with the residual network module ResNet, introduces the CBAM attention mechanism module before each pooling layer in the encoder downsampling process, replaces the original cross entropy loss function in the Unet model network with the Focal loss loss function, uses the improved Unet model for training to obtain training results, and uses the trained model to segment and extract the digital image of the end plug weld used for testing to obtain the region of interest.

[0073] The above description is only a specific implementation manner of the present application, but the protection scope of the present application is not limited thereto. Any changes or substitutions that can be easily conceived by any technician familiar with the technical field within the technical scope disclosed in the present application should be covered within the protection scope of the present application.

Claims

1. A method for extracting regions of interest from digital radiographic images of end plug welds, characterized in that: The collected images are preprocessed and enhanced, and then the images are semantically annotated and sent to the improved residual module network. The attention mechanism is introduced, and the cross entropy loss function is used to speed up the calculation and improve the model efficiency. The improved network model is then trained and used on the test set to observe the effect.

2. The method for extracting regions of interest from digital radiographic images of end plug welds according to claim 1 is characterized in that: Specifically include: S1: Collect a number of radiographic digital images of end plug welding seams, and perform image preprocessing and image enhancement; S2: Annotate the region of interest in the digital image of the end plug weld to obtain a semantic segmentation dataset; S3: Build a deep learning improved Unet model network for the semantic segmentation dataset obtained in S2, and replace the original convolution module in the Unet model network with the residual module ResNet; S4: Introduce the attention mechanism CBAM module into the original network structure, and introduce the CBAM module before each pooling layer in the encoder downsampling process; S5: Replace the original cross entropy loss function in the Unet model network with the Focal loss loss function; S6: training using the model improved from S3 to S5; S7: Input the digital image of the end plug weld to be tested for segmentation and extraction, obtain the region of interest, verify the effect of the model, and save the image after the region of interest is extracted.

3. The method for extracting regions of interest from digital ray images of end plug welding seams according to claim 2 is characterized in that: In S1, image preprocessing includes scaling, cropping, rotating, and filtering the image.

4. The method for extracting regions of interest from digital radiographic images of end plug welds according to claim 2, characterized in that: In S1, image enhancement includes contrast enhancement.

5. The method for extracting regions of interest from digital radiographic images of end plug welds according to claim 2, characterized in that: In S2, the labelme tool is used to annotate the region of interest in the end plug weld radiographic digital image to obtain a file with a json suffix format.

6. The method for extracting regions of interest from digital radiographic images of end plug welding seams according to claim 5 is characterized in that: Divide the files obtained in json format into training set, test set and validation set.

7. The method for extracting regions of interest from digital radiographic images of end plug welds according to claim 2, characterized in that: In S3, the formula of the replaced residual module is: y l =h(x l )+F(x l ,W l ) x l+1 =f(y l ) in: x l+1 =x l +F(x l ,W l ) Where h(·) represents direct mapping, f(·) represents activation function, and L represents the unit sum of features of each residual block.

8. The method for extracting regions of interest from digital radiographic images of end plug welding seams according to claim 2 is characterized in that: In S4, the CBAM module includes CAM and SAM.

9. The method for extracting regions of interest from digital radiographic images of end plug welding seams according to claim 8, characterized in that: The implementation of the introduced attention mechanism CBAM is as follows: In the formula, F represents the feature map, M C and M S Represent channel-based and space-based attention mechanisms respectively, represents element-by-element multiplication, F′ represents the output feature map after channel attention, and F″ represents the output feature map after spatial attention; First, perform channel-based average pooling and maximum pooling on the input feature map, concatenate the two feature maps based on the channel, and then perform convolution operation and sigmoid activation function on them to obtain the attention weight with the same feature map size as the input, which can be expressed as: In the formula, σ represents the sigmoid activation function, W0 and W1 represent two convolution operations, represents average pooling, represents the maximum pooling, f 7×7 The convolution kernel size of the convolution operation is 7×7.

10. The method for extracting regions of interest from digital radiographic images of end plug welds according to claim 2, characterized in that: In S5, the replaced Focal loss function introduces the α coefficient as follows: FL(p t )D-α t (1-p t )γlog(p t ) In the formula, p t represents the probability that the model predicts that the sample belongs to the target, α t represents the weight coefficient, and γ represents the adjustment parameter.