Nuclear reactor pressure vessel inner surface defect identification method and system

By introducing the illumination angle attention mechanism into the YOLOv5 model, the problems of low detection efficiency and high miss detection rate in pressure vessel surface defect identification methods are solved, achieving high accuracy and stability under different lighting conditions, and is suitable for complex Industrial applications in the background.

CN118644758AActive Publication Date: 2024-09-13XIAN THERMAL POWER RES INST CO LTD

Patent Information

Application Number
CN202410680234.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-05-29
Publication Date
2024-09-13
Estimated Expiration
2044-05-29

AI Technical Summary

Technical Problem

Existing pressure vessel surface defect identification methods have low detection efficiency and high miss detection rate, especially under different lighting conditions. It is difficult to effectively identify defects.

Method used

The illumination angle attention mechanism is used to improve the YOLOv5 model. Through image preprocessing and feature extraction, a spatial attention map is generated to dynamically adjust the importance of each pixel to improve the accuracy and stability of defect recognition.

Benefits of technology

It improves the defect identification efficiency, reduces the missed detection rate and false detection rate, ensures high accuracy under different lighting conditions, and is suitable for industrial applications in complex backgrounds.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118644758A
    Figure CN118644758A
Patent Text Reader

Abstract

The invention discloses a nuclear reactor pressure vessel inner surface defect identification method and system. The method comprises the following steps: acquiring image data of the surface of a pressure vessel; constructing an illumination angle attention mechanism, establishing a feature map by using the image in the data set, and generating a spatial attention map according to the spatial relationship of the feature map; and improving a YOLOv5 model by using the illumination angle attention mechanism, and identifying the surface defects of the pressure vessel through the improved YOLOv5. The method has the characteristics of high defect identification efficiency, low omission ratio and the like. And common problems during defect detection under different illumination conditions can be effectively solved. The accurate defect positioning and identification capability is crucial for ensuring the safe operation of the pressure vessel, especially when regular maintenance and inspection are carried out.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of visual recognition technology, and in particular to a method and system for identifying inner surface defects of a nuclear reactor pressure vessel. Background Art

[0002] The inner surface inspection of pressure vessels often requires workers or machines to carry inspection instruments into the pressure vessels for inspection. At present, video and image inspection methods are mostly used for surface defect inspection. However, due to problems such as light and shooting angle, it is easy to miss inspections inside pressure vessels.

[0003] Pressure vessels are widely used equipment in industrial applications for storing media such as liquids and gases. These containers are often subjected to high pressure and harsh environments, which makes their surfaces prone to defects such as cracks, rust, and dents. If these defects are not discovered and handled in time, they may lead to serious safety accidents. Traditional defect detection methods rely on manual visual inspection and some basic automation tools, which are usually labor-intensive, inefficient, and susceptible to subjective judgment by operators. Summary of the invention

[0004] In view of the above-mentioned problems, the present invention is proposed.

[0005] Therefore, the technical problem solved by the present invention is that the existing pressure vessel surface defect recognition method has the problems of low detection efficiency and high missed detection rate.

[0006] In order to solve the above technical problems, the present invention provides the following technical solutions: A method for identifying inner surface defects of a nuclear reactor pressure vessel, comprising:

[0007] Collect image data of the pressure vessel surface;

[0008] Construct an illumination angle attention mechanism, use the images in the dataset to build feature maps, and generate spatial attention maps based on the spatial relationship of the feature maps;

[0009] The YOLOv5 model is improved using the illumination angle attention mechanism, and the surface defects of the pressure vessel are identified using the improved YOLOv5.

[0010] As a preferred solution of the method for identifying inner surface defects of a nuclear reactor pressure vessel of the present invention, the image data includes, after completing image acquisition, preprocessing the image and recording image specification data and image content data;

[0011] The image specification data includes the resolution and color depth of each pressure vessel surface image;

[0012] The image content data includes, according to a preset frequency of image acquisition, an image of the surface of the pressure vessel at each sampling node.

[0013] As a preferred solution of the method for identifying inner surface defects of a nuclear reactor pressure vessel of the present invention, the preprocessing includes decomposing the image into different levels using a Gaussian pyramid and applying different degrees of illumination compensation to each level;

[0014]

[0015] Among them, I scale [k] represents the image after being processed by the k-th layer of Gaussian pyramid, Gauss(I) represents the result of applying Gaussian filtering to the original image I, ↓k represents downsampling the image k times; α k represents the level-specific illumination compensation parameter, γ k Represents level-specific parameters for adjusting contrast;

[0016] CLAHE is used for each level after multi-scale processing to enhance local features at all scales;

[0017] I enh [k] = CLAHE (I scale [k])

[0018] Use Laplacian pyramid reconstruction, combine enhanced features at all scales, and apply high-pass filtering to highlight high-frequency details;

[0019]

[0020] I inv =HighPass(I lap ) / (1+Mean(I lap ))

[0021] Among them, ↑ k represents the upsampling operation; CLAHE represents the contrast limited adaptive histogram equalization process; I enh [k] represents the k-th layer image after local contrast enhancement; I lap represents the image after merging all levels through Laplace pyramid processing; Laplace represents the Laplace pyramid operation, which is used to extract high-frequency details from each layer of enhanced image; I inv Indicates that from I lap The extracted illumination invariant feature image; HighPass represents a high-pass filter used to highlight the high-frequency part of the image; Mean(I lap ) indicates that I lap Local mean filtering of the image;

[0022] Use Gabor filter to extract direction-sensitive texture features;

[0023]

[0024] Among them, I gabor represents the image after Gabor filtering, which is used to extract direction-sensitive texture features; θ represents the direction variable; Θ represents the direction set of the Gabor filter.

[0025] As a preferred embodiment of the method for identifying inner surface defects of a nuclear reactor pressure vessel according to the present invention, the illumination angle attention mechanism includes extracting direction-sensitive texture features from the image I gabor As input, a convolution operation is used to extract feature maps from the image, represented as:

[0026]

[0027] Where I represents the input image, N represents the number of convolution kernels, and w i represents the weight of the i-th convolution kernel, K i represents the i-th convolution kernel, and F(I) represents the response of the feature map;

[0028] Use the distance matrix to represent the spatial relationship between the pixel positions in the image:

[0029]

[0030] Among them, x and y represent two different pixel positions in the image, and σ represents the attenuation parameter of the spatial distance;

[0031] Combining the feature map, spatial relationship and illumination angle encoding to generate the spatial attention map;

[0032]

[0033] Among them, F(I) xi represents the response of the feature map at position x; F(I) yi represents the response of the feature map at position y; M represents the dimension of the feature map; i represents the index of the feature map; A(x,y) represents the spatial attention map, with a value range of [0, 1], showing the attention weights at positions x and y; L(θ) = cos(θ), where θ represents the angle between the illumination and the image plane; S(x,y) represents the spatial relationship, with a value range of [0, 1], representing the spatial similarity between positions x and y.

[0034] As a preferred solution of the method for identifying inner surface defects of a nuclear reactor pressure vessel of the present invention, the illumination angle attention mechanism further comprises adjusting the pixel value of the original image using the attention map A(x, y); for each pixel x in the image, adjusting the pixel value of x by the weight of other pixels y1 related to x;

[0035]

[0036] Among them, I adjusted I(x) represents the pixel value of x in the weighted image; I(y) represents the original pixel value at position y; I(x) represents the original pixel value at position x.

[0037] As a preferred solution of the method for identifying inner surface defects of a nuclear reactor pressure vessel according to the present invention, the improved YOLOv5 includes adjusting each pixel to obtain an adjusted image I input ; will I input As the input of YOLOv5, the trained YOLOv5 is used for recognition, and the recognized bounding box and the probability of the defect category are output;

[0038] The position of the defect in the image is represented in the form of a bounding box, the confidence threshold is set to 0.5, the confidence score of each bounding box is checked, and the bounding boxes below the confidence threshold are discarded to obtain the defect position; the maximum value in the defect category probability is screened to determine the classification of the defect position;

[0039] Y pred =σ(CNN(I input ))

[0040] Among them, I input Represents the input image; CNN represents the convolutional neural network, which extracts image features and predicts the classification and position of each anchor box; σ represents the Sigmoid activation function, which is used to convert the output to a more appropriate range to obtain a confidence level between 0 and 1.

[0041] As a preferred solution of the method for identifying inner surface defects of a nuclear reactor pressure vessel of the present invention, the identification of surface defects of the pressure vessel includes visualizing the defect location and its classification on the original image; and displaying the confidence and probability of classification prediction in the edge frame;

[0042] The visualized result images are sent for manual review, and the manually modified result images are included in the training set to continuously train YOLOv5.

[0043] A nuclear reactor pressure vessel inner surface defect recognition system using the method of the present invention is characterized by:

[0044] An acquisition unit, which acquires image data of the surface of the pressure vessel;

[0045] Attention unit, builds the illumination angle attention mechanism, uses the images in the dataset to build feature maps, and produces spatial attention maps based on the spatial relationship of the feature maps;

[0046] The recognition unit uses the illumination angle attention mechanism to improve the YOLOv5 model, and recognizes the surface defects of the pressure vessel through the improved YOLOv5.

[0047] A computer device comprises: a memory and a processor; the memory stores a computer program, wherein: the processor implements the steps of any one of the methods of the present invention when executing the computer program.

[0048] A computer-readable storage medium stores a computer program, wherein: when the computer program is executed by a processor, the steps of any one of the methods of the present invention are implemented.

[0049] Beneficial effects of the present invention: The method for identifying defects on the inner surface of a nuclear reactor pressure vessel provided by the present invention has the characteristics of high defect recognition efficiency and low missed detection rate. It can effectively deal with common problems in defect detection under different lighting conditions. The illumination angle attention map can dynamically adjust the importance of each pixel and reduce the impact of image quality fluctuations caused by illumination changes on defect recognition. This enables the model to maintain high accuracy in variable environments from strong light to shadows, greatly improving the stability and reliability of detection. The improved YOLOv5 model can not only identify the location of defects by integrating the attention mechanism, but also adjust its recognition strategy according to changes in illumination angles. This is particularly suitable for industrial applications such as pressure vessels, because the defects in these environments are diverse in form and often in complex backgrounds. By strengthening the features of key areas and suppressing irrelevant or interfering information, the model can lock and identify potential defects more quickly and accurately. Since the model's attention to each area is dynamically adjusted according to the actual illumination conditions and image content, it can effectively reduce false detections (false positives) and missed detections (false negatives) caused by background noise or illumination effects. This ability to accurately locate and identify defects is critical to ensuring the safe operation of pressure vessels, especially during regular maintenance and inspections. BRIEF DESCRIPTION OF THE DRAWINGS

[0050] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying creative work.

[0051] Figure 1 This is an overall flow chart of a method for identifying inner surface defects of a nuclear reactor pressure vessel provided in the first embodiment of the present invention. DETAILED DESCRIPTION

[0052] In order to make the above-mentioned purposes, features and advantages of the present invention more obvious and easy to understand, the specific implementation methods of the present invention are described in detail below in conjunction with the drawings of the specification. Obviously, the described embodiments are part of the embodiments of the present invention, but not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary persons in the art without creative work should fall within the scope of protection of the present invention.

[0053] Example 1

[0054] Reference Figure 1 , which is an embodiment of the present invention, provides a method for identifying inner surface defects of a nuclear reactor pressure vessel, comprising:

[0055] S1: Collect image data of the pressure vessel surface.

[0056] Further, the image data includes, after completing the image acquisition, preprocessing the image and recording the image specification data and image content data. The image specification data includes the resolution and color depth of each pressure vessel surface image. The image content data includes, according to the preset image acquisition frequency, obtaining the pressure vessel surface image of each sampling node.

[0057] It is important to know that preprocessing involves decomposing the image into different levels using a Gaussian pyramid and applying different levels of illumination compensation to each level.

[0058]

[0059] Among them, I scale [k] represents the image after being processed by the k-th layer of Gaussian pyramid, Gauss(I) represents the result of applying Gaussian filtering to the original image I, ↓ k Indicates downsampling the image k times; α k represents the level-specific illumination compensation parameter, γ k Represents a level-specific parameter for adjusting contrast.

[0060] Apply CLAHE to each level after multi-scale processing to enhance local features at all scales. (CLAHE is an improved histogram equalization algorithm used to enhance local image contrast without excessively amplifying background noise. It divides the image into small blocks called "tiles" and applies histogram equalization to each block independently. Unlike traditional histogram equalization, CLAHE avoids noise amplification by limiting contrast enhancement. In image processing software or libraries (such as OpenCV), CLAHE is usually provided as a callable function, and users can set different parameters to optimize the results.)

[0061] I enh [k] = CLAHE (I scale [k])

[0062] Reconstruction is done using a Laplacian pyramid, combining enhanced features at all scales, and applying high-pass filtering to highlight high-frequency details.

[0063]

[0064] I inv =HighPass(I lap ) / (1+Mean(I lap ))

[0065] Among them, ↑ k represents the upsampling operation; CLAHE represents the contrast limited adaptive histogram equalization process; I enh [k] represents the k-th layer image after local contrast enhancement; I lap represents the image after merging all levels through Laplace pyramid processing; Laplace represents the Laplace pyramid operation, which is used to extract high-frequency details from each layer of enhanced image; I inv Indicates that from I lap The extracted illumination invariant feature image; HighPass represents a high-pass filter used to highlight the high-frequency part of the image; Mean(I lap ) indicates that I lap Local mean filtering of the image.

[0066] Use Gabor filter to extract direction-sensitive texture features;

[0067]

[0068] Among them, I gabor represents the image after Gabor filtering, which is used to extract direction-sensitive texture features; θ represents the direction variable; Θ represents the direction set of the Gabor filter.

[0069] It is also important to note that during the above preprocessing process, αk and γ k The determination of needs to be obtained through training. In order to effectively train the parameters of illumination compensation and contrast adjustment (α k and γ k ), is a learning-based approach to automate parameter selection. The specific steps include:

[0070] Collect a large amount of image data with different lighting conditions.

[0071] Manually generate the "ideal" processing results of these images as labels, that is, manually adjust the alpha k and γ k The image after the value.

[0072] Gaussian pyramid decomposition is used for each training image to extract image features at different levels.

[0073] Extract lighting and contrast features at each level, such as local brightness, contrast, texture details, etc.

[0074] Using supervised learning methods, such as deep neural networks, the input is the multi-scale features of the image, and the output is the corresponding α k and γ k A regression model can be used to predict the α of each level. k and γ k value.

[0075] During training, the mean squared error (MSE) or similarity metrics (such as SSIM, structural similarity index) are used as loss functions to optimize the model to minimize the difference between the output parameters and the labels.

[0076] Model evaluation and optimization: Evaluate model performance on an independent test set to ensure model generalization. Perform cross-validation and parameter adjustments (such as learning rate, number of layers, number of nodes, etc.) to optimize model performance.

[0077] Model deployment:

[0078] Apply the trained model to the actual image processing process and automatically calculate α k and γ k .

[0079] Implement feedback mechanisms to adjust model parameters based on user feedback or further performance monitoring.

[0080] Training process:

[0081] initialization:

[0082] Set the neural network architecture, such as convolutional neural network (CNN) or fully connected network.

[0083] Initialize network parameters and select appropriate activation functions and optimizers.

[0084] Training loop:

[0085] The processed image and its hierarchical features are input into the network.

[0086] The network outputs the predicted α k and γ k value.

[0087] Calculate the loss function value and update the network weights through back propagation.

[0088] Verification and adjustment:

[0089] Regularly test model performance on a validation set to monitor for overfitting and other potential problems.

[0090] Adjust the learning rate and other hyperparameters based on the performance results.

[0091] Final Assessment:

[0092] After all training cycles are completed, a final evaluation is performed on the test set.

[0093] Analyze the model's performance on images of different types and lighting conditions.

[0094] It is important to know that Gaussian pyramid decomposition is to create a series of downsampled images by gradually reducing the image resolution, with each layer being blurrier and smaller than the previous one. This process helps analyze images at multiple scales and capture features from coarse to fine details. Applying different degrees of illumination compensation and contrast adjustment at each level can optimize the visual representation based on the characteristics of the image at different scales. This ensures good visualization of the image at all levels of detail. CLAHE enhances local contrast at each level, processing the image in blocks and limiting the contrast of histogram equalization to prevent excessive amplification of noise. This method is very effective in improving the local visibility of images, especially in the case of uneven brightness. Using Laplacian pyramid reconstruction to combine enhanced features at all scales, this step reconstructs the image and merges details and information at different scales to restore or enhance high-frequency details of the image. High-pass filters are used to emphasize high-frequency parts of the image, such as edges and details, which helps to highlight important visual elements. Through this series of steps, the image processing pipeline is able to optimize the illumination, contrast, and texture representation of the image at multiple levels. The final generated image will have better visual quality and richer information, suitable for advanced image analysis tasks such as machine vision and automatic image editing. This synergistic effect of the approach is particularly well suited to handling complex scenes captured under different lighting and viewing angles.

[0095] S2: Construct an illumination angle attention mechanism, use the images in the dataset to build feature maps, and produce spatial attention maps based on the spatial relationships of the feature maps.

[0096] The illumination angle attention mechanism includes extracting the direction-sensitive texture features from the image I gabor As input, a convolution operation is used to extract feature maps from the image, represented as:

[0097]

[0098] Where I represents the input image, N represents the number of convolution kernels, and w i represents the weight of the i-th convolution kernel, K i represents the i-th convolution kernel, and F(I) represents the response of the feature map.

[0099] Use the distance matrix to represent the spatial relationship between the pixel positions in the image:

[0100]

[0101] Where x and y represent two different pixel positions in the image, and σ represents the attenuation parameter of the spatial distance. The spatial attention map is generated by combining the feature map, spatial relationship and illumination angle encoding.

[0102]

[0103] Among them, F(I) xi represents the response of the feature map at position x; F(I) yi represents the response of the feature map at position y; M represents the dimension of the feature map; i represents the index of the feature map; A(x,y) represents the spatial attention map, with a value range of [0, 1], showing the attention weights at positions x and y; L(θ) = cos(θ), where θ represents the angle between the illumination and the image plane; S(x,y) represents the spatial relationship, with a value range of [0, 1], representing the spatial similarity between positions x and y.

[0104] The attention map A(x,y) is used to adjust the original image pixel values; for each pixel x in the image, the pixel value of x is adjusted by the weights of other pixels y1 related to x.

[0105]

[0106] Among them, I adjusted I(x) represents the pixel value of x in the weighted image; I(y) represents the original pixel value at position y; I(x) represents the original pixel value at position x.

[0107] It should be said that lighting conditions have a great impact on image recognition tasks, especially in practical application scenarios such as pressure vessel inspection, where changes in lighting can significantly affect the visibility of defects. By combining illumination angle encoding, the model's response to different lighting conditions can be adjusted, thereby improving the accuracy and stability of the model in different environments. Defects on the surface of pressure vessels, such as cracks and corrosion spots, often have textures that are significantly different from the surrounding environment. By extracting these direction-sensitive texture features through convolution operations, these defects can be more effectively located and identified. By combining feature maps, spatial relationships, and illumination angle encoding, the constructed spatial attention map can dynamically adjust the importance of each pixel position. This allows the model to focus more on areas that are more critical to the detection task, thereby improving detection efficiency and reducing false detections.

[0108] S3: The YOLOv5 model is improved using the illumination angle attention mechanism, and the surface defects of the pressure vessel are identified using the improved YOLOv5.

[0109] By adjusting each pixel, the adjusted image I is obtained input ; will I input As the input of YOLOv5, the trained YOLOv5 is used for recognition, and the recognized bounding box and the probability of the defect category are output.

[0110] The position of the defect in the image is represented in the form of a bounding box, the confidence threshold is set to 0.5, the confidence score of each bounding box is checked, and the bounding boxes below the confidence threshold are discarded to obtain the defect position; the maximum value in the defect category probability is screened to determine the classification of the defect position.

[0111] Y pred =σ(CNN(I input ))

[0112] Among them, I input Represents the input image; CNN represents the convolutional neural network, which extracts image features and predicts the classification and position of each anchor box; σ represents the Sigmoid activation function, which is used to convert the output to a more appropriate range to obtain a confidence level between 0 and 1.

[0113] The defect location and its classification are visualized on the original image. The confidence and probability of classification prediction are displayed in the edge box. The visualized result image is sent for manual review, and the result image after manual modification is included in the training set to continuously train YOLOv5.

[0114] It is to say that by adjusting each pixel of the input image (usually based on the illumination angle attention mechanism, etc.), the image quality is improved and the possible defect areas are highlighted. Such adjustments help to improve the sensitivity and accuracy of subsequent defect detection. The adjusted image can show the defect features more clearly and reduce the interference of irrelevant factors on the model during the recognition process. The trained YOLOv5 model is used to identify and predict the bounding box and category probability of the defect from the adjusted image. Through the powerful feature extraction ability of the deep learning model, the defect position in the image is accurately located and its category is predicted. Set a suitable confidence threshold (such as 0.5) to ensure that only defects that the model is confident enough are further processed. By filtering out prediction results with low confidence, the false positive rate is reduced, thereby improving the overall reliability of the detection. Select the category with the highest probability from the category probability output by the model as the final defect classification. Ensure that each identified defect location is correctly classified to provide accurate information for subsequent processing and decision-making.

[0115] Visualize defect location, classification, and confidence information on the original image, and verify and correct it through manual review. The visualization results allow the operator to intuitively evaluate the accuracy of the inspection, and manual review provides a means to correct possible misjudgments and feed the corrected data back to the training set. Use the manually reviewed and corrected data to continuously train and optimize the YOLOv5 model. Continuous model training enables the model to adapt to new or unforeseen defect types and condition changes, and continuously improve its generalization ability and accuracy.

[0116] On the other hand, this embodiment also provides an improved YOLOv5 pressure vessel surface defect recognition system, which includes:

[0117] The acquisition unit acquires image data of the surface of the pressure vessel.

[0118] Attention unit, builds the illumination angle attention mechanism, uses the images in the dataset to establish feature maps, and produces spatial attention maps based on the spatial relationship of the feature maps.

[0119] The recognition unit uses the illumination angle attention mechanism to improve the YOLOv5 model, and recognizes the surface defects of the pressure vessel through the improved YOLOv5.

[0120] If the above functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program codes.

[0121] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as an ordered list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by an instruction execution system, device or apparatus (such as a computer-based system, a system including a processor, or other system that can fetch instructions from an instruction execution system, device or apparatus and execute instructions), or in conjunction with such instruction execution systems, devices or apparatuses. For the purposes of this specification, "computer-readable medium" can be any device that can contain, store, communicate, propagate or transmit a program for use by an instruction execution system, device or apparatus, or in conjunction with such instruction execution systems, devices or apparatuses.

[0122] More specific examples of computer-readable media (a non-exhaustive list) include the following: an electrical connection with one or more wires (electronic device), a portable computer disk case (magnetic device), a random access memory (RAM), a read-only memory (ROM), an erasable and programmable read-only memory (EPROM or flash memory), an optical fiber device, and a portable compact disk read-only memory (CDROM). In addition, the computer-readable medium may even be a paper or other suitable medium on which the program is printed, since the program may be obtained electronically, for example, by optically scanning the paper or other medium, followed by editing, deciphering or, if necessary, processing in another suitable manner, and then stored in a computer memory.

[0123] It should be understood that the various parts of the present invention can be implemented by hardware, software, firmware or a combination thereof. In the above-mentioned embodiments, a plurality of steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented by hardware, as in another embodiment, it can be implemented by any one of the following technologies known in the art or their combination: a discrete logic circuit having a logic gate circuit for implementing a logic function for a data signal, a dedicated integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.

[0124] Example 2

[0125] The following is an embodiment of the present invention, which provides a method for identifying defects on the inner surface of a nuclear reactor pressure vessel. In order to verify the beneficial effects of the present invention, scientific demonstration is carried out through economic benefit calculation and simulation experiments.

[0126] The experiment aims to verify the effect of pressure vessel surface defect detection through the improved YOLOv5 model and the illumination angle attention mechanism. The purpose of the experiment is to show the advantages of this method in detection accuracy, illumination adaptability, and processing speed compared with traditional defect detection techniques. The experimental setting includes defect detection under different illumination conditions using a standard pressure vessel image dataset. The image dataset contains images of pressure vessels with and without defects, including but not limited to cracks, rust, and dents.

[0127] The experiment first preprocessed the image, including the simulation of the illumination angle, and tested the robustness of the model by simulating the illumination angle in the image. An improved YOLOv5 model was used, which integrated an illumination angle attention mechanism that can adjust its attention weight according to the illumination angle in the image to optimize the recognition of defect areas.

[0128] In the experiment, each image was resized to a fixed size and normalized to meet the model input requirements. After that, a convolutional neural network was used to extract features from the resized image, and a network structure containing multiple convolutional layers and Sigmoid activation functions was used to predict the classification and position of each anchor box. It is particularly important to note that the output of the model includes the position of the bounding box and the confidence of the defect category. These outputs are filtered by setting a confidence threshold. Only when the predicted confidence is higher than 0.5, it is considered a valid detection. The details are shown in Table 1.

[0129] Table 1 Data record table

[0130]

[0131] The data shows the performance of the improved YOLOv5 model in pressure vessel surface defect detection under different lighting angles. From the data, it can be seen that as the lighting angle approaches vertical (90°), the defect detection accuracy reaches the highest (93.1%), which proves that the lighting angle attention mechanism effectively improves the performance of the model under different lighting conditions. In addition, the processing time also shows a gradual reduction trend as the model is optimized, from 0.35 seconds to 0.29 seconds, indicating that the computational efficiency of the model has also been improved.

[0132] The average confidence value varies significantly under different lighting angles, up to 0.82, which further confirms the high confidence output of the model under ideal lighting conditions. Specifically for defect types, the detection rates of cracks, rust, and dents all show different degrees of improvement with changes in lighting angle, and the detection rates of the three defects at a 90° lighting angle are all at or close to 90%.

[0133] The invention demonstrates its effectiveness in practical applications and highlights its advantages over existing technologies, including higher detection accuracy, faster processing speed, and excellent performance under variable lighting conditions. These innovations provide strong evidence to support the commercial application and technology promotion of the invention.

[0134] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solutions of the present invention may be modified or replaced by equivalents without departing from the spirit and scope of the technical solutions of the present invention, which should all be included in the scope of the claims of the present invention.

Claims

1. A method for identifying inner surface defects of a nuclear reactor pressure vessel, characterized in that: include: Collect image data of the pressure vessel surface; Construct an illumination angle attention mechanism, use the images in the dataset to build feature maps, and generate spatial attention maps based on the spatial relationship of the feature maps; The YOLOv5 model is improved using the illumination angle attention mechanism, and the surface defects of the pressure vessel are identified using the improved YOLOv5.

2. The method for identifying inner surface defects of a nuclear reactor pressure vessel according to claim 1, characterized in that: The image data includes, after completing the image acquisition, preprocessing the image and recording the image specification data and image content data; The image specification data includes the resolution and color depth of each pressure vessel surface image; The image content data includes, according to a preset frequency of image acquisition, an image of the surface of the pressure vessel at each sampling node.

3. The method for identifying inner surface defects of a nuclear reactor pressure vessel according to claim 2, characterized in that: The preprocessing includes decomposing the image into different levels using a Gaussian pyramid and applying different degrees of illumination compensation to each level; Among them, I scale [k] represents the image after being processed by the k-th layer of Gaussian pyramid, Gauss(I) represents the result of applying Gaussian filtering to the original image I, ↓ k Indicates downsampling the image k times; α k represents the level-specific illumination compensation parameter, γ k Represents level-specific parameters for adjusting contrast; CLAHE is used for each level after multi-scale processing to enhance local features at all scales; I enh [k]=CLAHE(I scale [k]) Use Laplacian pyramid reconstruction, combine enhanced features at all scales, and apply high-pass filtering to highlight high-frequency details; I inv =HighPass(I lap ) / (1+Mean(I lap )) Among them, ↑ k represents the upsampling operation; CLAHE represents the contrast limited adaptive histogram equalization process; I enh [k] represents the k-th layer image after local contrast enhancement; I lap represents the image after merging all levels through Laplace pyramid processing; Laplace represents the Laplace pyramid operation, which is used to extract high-frequency details from each layer of enhanced image; I inv Indicates that from I lap The extracted illumination invariant feature image; HighPass represents a high-pass filter used to highlight the high-frequency part of the image; Mean(I lap ) indicates that I lap Local mean filtering of the image; Use Gabor filter to extract direction-sensitive texture features; Among them, I gabor represents the image after Gabor filtering, which is used to extract direction-sensitive texture features; θ represents the direction variable; Θ represents the direction set of the Gabor filter.

4. The method for identifying inner surface defects of a nuclear reactor pressure vessel according to claim 3, characterized in that: The illumination angle attention mechanism includes extracting the direction-sensitive texture features from the image I gabor As input, a convolution operation is used to extract feature maps from the image, represented as: Where I represents the input image, N represents the number of convolution kernels, and w i represents the weight of the i-th convolution kernel, K i represents the i-th convolution kernel, and F(I) represents the response of the feature map; Use the distance matrix to represent the spatial relationship between the pixel positions in the image: Among them, x and y represent two different pixel positions in the image, and σ represents the attenuation parameter of the spatial distance; Combining the feature map, spatial relationship and illumination angle encoding to generate the spatial attention map; Among them, F(I) xi represents the response of the feature map at position x; F(I) yi represents the response of the feature map at position y; M represents the dimension of the feature map; i represents the index of the feature map; A(x,y) represents the spatial attention map, with a value range of [0, 1], showing the attention weights at positions x and y; L(θ) = cos(θ), where θ represents the angle between the illumination and the image plane; S(x,y) represents the spatial relationship, with a value range of [0, 1], representing the spatial similarity between positions x and y.

5. The method for identifying inner surface defects of a nuclear reactor pressure vessel according to claim 4, characterized in that: The illumination angle attention mechanism also includes adjusting the original image pixel value using the attention map A(x,y); for each pixel x in the image, adjusting the pixel value of x by the weights of other pixels y1 related to x; Among them, I adjusted I(x) represents the pixel value of x in the weighted image; I(y) represents the original pixel value at position y; I(x) represents the original pixel value at position x.

6. The method for identifying inner surface defects of a nuclear reactor pressure vessel according to claim 5, characterized in that: The improved YOLOv5 includes adjusting each pixel to obtain an adjusted image I input ; will I input As the input of YOLOv5, the trained YOLOv5 is used for recognition, and the recognized bounding box and the probability of the defect category are output; The position of the defect in the image is represented in the form of a bounding box, the confidence threshold is set to 0.5, the confidence score of each bounding box is checked, and the bounding boxes below the confidence threshold are discarded to obtain the defect position; the maximum value in the defect category probability is screened to determine the classification of the defect position; Y pred =σ(CNN(I input )) Among them, I input Represents the input image; CNN represents the convolutional neural network, which extracts image features and predicts the classification and position of each anchor box; σ represents the Sigmoid activation function, which is used to convert the output to a more appropriate range to obtain a confidence level between 0 and 1.

7. The method for identifying inner surface defects of a nuclear reactor pressure vessel according to claim 6, characterized in that: The identification of surface defects of the pressure vessel includes visualizing the defect location and its classification on the original image; and displaying the confidence and probability of classification prediction in the edge box; The visualized result images are sent for manual review, and the manually modified result images are included in the training set to continuously train YOLOv5.

8. A nuclear reactor pressure vessel inner surface defect recognition system using the method according to any one of claims 1 to 7, characterized in that: An acquisition unit, which acquires image data of the surface of the pressure vessel; Attention unit, builds the illumination angle attention mechanism, uses the images in the dataset to build feature maps, and produces spatial attention maps based on the spatial relationship of the feature maps; The recognition unit uses the illumination angle attention mechanism to improve the YOLOv5 model, and recognizes the surface defects of the pressure vessel through the improved YOLOv5.

9. A computer device comprising: Memory and processor; The memory stores a computer program, characterized in that the processor implements the steps of any method of claims 1-7 when executing the computer program.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.

Citation Information

Patent Citations

  • Gray fabric defect positioning and classifying method, system and equipment and storage medium

    CN115731220A

  • Metal surface defect semantic segmentation network based on data driving and training method

    CN116152498A

  • Human body attribute recognition method and device, equipment and storage medium

    CN116229508A

  • Fault prediction method and device based on solar data and storage medium

    CN116955965A

  • Target detection method under low illumination based on pyramid enhanced network

    CN117058019A

Cited By

  • Endoscope sampling clamp full-process defect detection method based on machine vision

    CN120013951A

  • Full-process Defect Detection Method for Endoscopic Sampling Forceps Based on Machine Vision

    CN120013951B

  • Method and system for identifying internal surface defects of nuclear reactor pressure vessel, computer device, and computer-readable storage medium

    WO2025246969A1