A method and system for identifying defects on the inner surface of a nuclear reactor pressure vessel

By introducing the light angle attention mechanism in the YOLOv5 model, the problem of low efficiency and high leakage detection rate of surface defect recognition in pressure vessels under different lighting conditions is solved, and efficient and accurate defect recognition effect is achieved.

CN118644758BActive Publication Date: 2025-06-27XIAN THERMAL POWER RES INST CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

The existing surface defect identification methods for pressure vessels have low detection efficiency and high leakage detection rate, especially in different lighting conditions, it is difficult to effectively identify defects.

Method used

The YOLOv5 model is improved by using the lighting angle attention mechanism. By constructing feature maps and spatial attention maps, the importance of each pixel is dynamically adjusted to improve the accuracy and stability of defect recognition.

Benefits of technology

It realizes efficient defect identification under different lighting conditions, reduces missed detection rates and error detection rates, and improves the stability and reliability of detection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118644758B_ABST
    Figure CN118644758B_ABST
Patent Text Reader

Abstract

The present invention discloses a method and system for identifying inner surface defects of a nuclear reactor pressure vessel, including: collecting image data of the pressure vessel surface; constructing an illumination angle attention mechanism, establishing a feature map using the images in the dataset, and generating a spatial attention map according to the spatial relationship of the feature map; using the illumination angle attention mechanism to improve the YOLOv5 model, and identifying the surface defects of the pressure vessel through the improved YOLOv5. It has the characteristics of high defect identification efficiency and low missed detection rate. It can effectively address common problems encountered in defect detection under different illumination conditions. This precise defect positioning and identification ability is crucial for ensuring the safe operation of the pressure vessel, especially during regular maintenance and inspection.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

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

[0002] For the inspection of the inner surface of a pressure vessel, workers or machine equipment often need to carry inspection instruments into it for inspection. Currently, for the inspection of surface defects, video and image inspection methods are mostly used. However, due to problems such as light and shooting angle inside the pressure vessel, the phenomenon of missed detection is likely to occur.

[0003] Pressure vessels are widely used equipment in industrial applications for storing media such as liquids and gases. These containers often withstand high pressures and harsh environments, making it easy for their surfaces to generate defects such as cracks, rust, and dents. If these defects are not discovered and dealt with in a timely manner, serious safety accidents may occur. Traditional defect detection methods rely on manual visual inspection and some basic automation tools, and these methods are usually labor-intensive, inefficient, and easily affected by the subjective judgment of the operator. Summary of the Invention

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

[0005] Therefore, the technical problem solved by the present invention is that the existing methods for identifying surface defects of pressure vessels have problems such as low detection efficiency and high missed detection rate.

[0006] To solve the above technical problem, the present invention provides the following technical solution: A method for identifying defects on the inner surface of a nuclear reactor pressure vessel, including:

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

[0008] Constructing a lighting angle attention mechanism, using the images in the dataset to establish a feature map, and generating a spatial attention map according to the spatial relationship of the feature map;

[0009] Using the lighting angle attention mechanism to improve the YOLOv5 model, and identifying the surface defects of the pressure vessel through the improved YOLOv5;

[0010] The image data includes, after completing image acquisition, preprocessing the image, and recording the image specification data and image content data;

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

[0012] The image content data includes, according to the preset image acquisition frequency, obtaining the surface images of the pressure vessel at each sampling node;

[0013] 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] where I scale [k] represents the image after being processed by the k-th level Gaussian pyramid, Gauss(I) represents the result of applying Gaussian filtering to the original image I, and ↓ k represents downsampling the image k times; α k represents the level-specific illumination compensation parameter, and γ k represents the level-specific parameter for adjusting the contrast;

[0016] Apply CLAHE to 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 to combine the 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] where ↑ k represents the upsampling operation; CLAHE represents the process of contrast-limited adaptive histogram equalization; I enh [k] represents the k-th level image after local contrast enhancement; I lap represents the image after Laplacian pyramid processing to combine all levels; Laplace represents the Laplacian pyramid operation for extracting high-frequency details from each enhanced image; I inv represents the illumination-invariant feature image extracted from I lap ; HighPass represents a high-pass filter for highlighting the high-frequency part of the image; Mean(I lap ) represents local mean filtering performed on the I lap image;

[0022] Extract direction-sensitive texture features using Gabor filters;

[0023]

[0024] where Igabor Represents the image after Gabor filtering, which is used to extract direction-sensitive texture features; θ represents the direction variable; Θ represents the set of directions of the Gabor filter;

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

[0026]

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

[0028] The distance matrix is used to represent the spatial relationship between each pixel position 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 gabor ) xu Represents the response of the feature map at position x; F(I gabor ) yu Represents the response of the feature map at position y; M represents the dimension of the feature map; u represents the index of the feature map; A(x, y) represents the spatial attention map, with the value range [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 the value range [0, 1], representing the spatial similarity between positions x and y;

[0034] The illumination angle attention mechanism also includes using the attention map A(x, y) to adjust the pixel values of the original image; for each pixel x in the image, the pixel value of x is adjusted by the weights of other pixels y1 related to x;

[0035]

[0036] Among them, Iadjusted (x) represents the pixel value of x in the image with adjusted weights; 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, wherein: the improved YOLOv5 includes adjusting each pixel using a lighting angle attention mechanism to obtain an adjusted image I input ; Use I input as the input of YOLOv5, and use the trained YOLOv5 for identification to output the probability of the identified bounding box and defect category;

[0038] Represent the position of the defect in the image in the form of a bounding box, set the confidence threshold to 0.5, check the confidence score of each bounding box, and discard the bounding boxes with a confidence lower than the threshold to obtain the defect position; screen the maximum value in the defect category probability to determine the classification of the defect position;

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

[0040] Wherein, I input represents the input image; CNN represents a convolutional neural network that 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 between 0 and 1.

[0041] As a preferred solution of the method for identifying inner surface defects of a nuclear reactor pressure vessel according to the present invention, wherein: the identification of surface defects of the pressure vessel includes visualizing the defect position and its classification on the original image; and at the same time displaying the confidence and the probability of classification prediction on the edge box;

[0042] Send the visualized result image for manual review, and include the result image after manual modification in the training set to continuously train YOLOv5.

[0043] A nuclear reactor pressure vessel inner surface defect identification system using the method as described in the present invention, characterized in that:

[0044] A collection unit that collects image data on the surface of the pressure vessel;

[0045] An attention unit that constructs a lighting angle attention mechanism, uses the images in the dataset to establish a feature map, and generates a spatial attention map according to the spatial relationship of the feature map;

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

[0047] A computer device includes: a memory and a processor; the memory stores a computer program, wherein: when the processor executes the computer program, the steps of the method described in any one of the present invention are implemented.

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

[0049] Advantages of the present invention: The method for identifying inner surface defects of a nuclear reactor pressure vessel provided by the present invention has the characteristics of high defect identification efficiency and low missed detection rate. It can effectively address common problems in defect detection under different lighting conditions. The illumination angle attention map can dynamically adjust the importance of each pixel, reducing the impact of image quality fluctuations caused by lighting changes on defect identification. This enables the model to maintain high accuracy in diverse environments ranging from strong light to shadows, greatly improving the stability and reliability of detection. The improved YOLOv5 model, by integrating the attention mechanism, can not only identify the location of defects but also adjust its identification strategy according to changes in the illumination angle. This is particularly applicable to industrial applications such as pressure vessels, as the defect morphologies in these environments are diverse and often in complex backgrounds. By enhancing the features of key regions and suppressing irrelevant or interfering information, the model can more quickly and accurately lock in and identify potential defects. Since the attention of the model to each region is dynamically adjusted according to the actual lighting conditions and image content, it can effectively reduce false positives and false negatives caused by background noise or lighting effects. This precise defect localization and identification ability is crucial for ensuring the safe operation of pressure vessels, especially during regular maintenance and inspections. Description of the Drawings

[0050] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for the description of the embodiments will be briefly introduced below. Obviously, the drawings in the following description are only some embodiments of the present invention, and those of ordinary skill in the art can obtain other drawings without creative efforts based on these drawings.

[0051] Figure 1 It is the overall flowchart of the method for identifying inner surface defects of a nuclear reactor pressure vessel provided by the first embodiment of the present invention. Detailed Embodiments

[0052] To make the above objects, features, and advantages of the present invention more apparent and understandable, the following provides a detailed description of the specific embodiments of the present invention with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of the present invention, not all of them. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts shall fall within the scope of protection of the present invention.

[0053] Embodiment 1

[0054] Referring to Figure 1 , an embodiment of the present invention provides a method for identifying defects on the inner surface of a nuclear reactor pressure vessel, including:

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

[0056] Furthermore, the image data includes, after image acquisition is completed, 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 images at each sampling node.

[0057] It should be noted that the preprocessing includes decomposing the image into different levels using a Gaussian pyramid and applying different degrees 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 the 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, and γ k represents the level-specific parameter for adjusting the 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 over-amplifying background noise. It divides the image into small blocks called "tiles" and applies histogram equalization independently to each block. Different from 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(Iscale [k])

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

[0063]

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

[0065] where ↑ k denotes the upsampling operation; CLAHE represents the process of contrast-limited adaptive histogram equalization; I enh [k] represents the k-th layer image after local contrast enhancement; I lap represents the image after Laplacian pyramid processing and merging all levels; Laplace represents the Laplacian pyramid operation for extracting high-frequency details from each enhanced image; I inv represents the illumination-invariant feature image extracted from I lap ; HighPass represents a high-pass filter for highlighting the high-frequency part of the image; Mean(I lap ) represents the local mean filtering performed on the I lap image.

[0066] Extract orientation-sensitive texture features using Gabor filters;

[0067]

[0068] where I gabor represents the image after Gabor filtering, used to extract orientation-sensitive texture features; θ represents the orientation variable; Θ represents the set of orientations of the Gabor filter.

[0069] It should also be noted that in the above preprocessing process, the determination of α k and γ k needs to be obtained through training. To effectively train the parameters for illumination compensation and contrast adjustment (α k and γ k ), a learning-based method is used to automate parameter selection. The specific steps include:

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

[0071] Manually generate the "ideal" processing results of these images as labels, that is, the images after artificially adjusting the values of α k and γ k .

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

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

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

[0075] During the training process, use the mean squared error (MSE) or a similarity metric (such as SSIM, structural similarity index) as the loss function to optimize the model to minimize the difference between the output parameters and the labels.

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

[0077] Model deployment:

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

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

[0080] Training process:

[0081] Initialization:

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

[0083] Initialize the network parameters and select a suitable activation function and optimizer.

[0084] Training loop:

[0085] Input the processed image and its level features into the network.

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

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

[0088] Verification and adjustment:

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

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

[0091] Final evaluation:

[0092] After completing all training epochs, conduct a final evaluation on the test set.

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

[0094] It should be noted that Gaussian pyramid decomposition creates 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 the image at multiple scales and capture features from coarse to detailed. Applying different degrees of light compensation and contrast adjustment at each level can optimize the visual performance according to the characteristics of different scales of the image. This ensures good visualization of the image at all detail levels. CLAHE enhances the local contrast at each level by processing the image in blocks and restricting the contrast of histogram equalization to prevent excessive amplification of noise. This method is very effective in improving the local visibility of the image, especially in the case of uneven brightness. Using Laplacian pyramid reconstruction to combine the enhanced features of all scales, this step reconstructs the image, merging the details and information of different scales to restore or enhance the high-frequency details of the image. High-pass filters are used to emphasize the high-frequency parts of the image, such as edges and details, which helps highlight important visual elements. Through this series of steps, the image processing pipeline can optimize the lighting, 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. The synergistic effect of this method is particularly suitable for processing complex scenes captured under different lighting and perspectives.

[0095] S2: Build a lighting angle attention mechanism, use the images in the dataset to establish a feature map, and generate a spatial attention map based on the spatial relationship of the feature map.

[0096] The lighting angle attention mechanism includes using the image I gabor after extracting direction-sensitive texture features as the input, and using convolutional operations to extract the feature map from the image, expressed as:

[0097]

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

[0099] Use the distance matrix to represent the spatial relationship between each pixel position 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. Combine the feature map, spatial relationship, and illumination angle encoding to generate the spatial attention map.

[0102]

[0103] where F(I gabor ) xu represents the response of the feature map at position x; F(I gabor ) yu represents the response of the feature map at position y; M represents the dimension of the feature map; u 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], indicating the spatial similarity between positions x and y;

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

[0105]

[0106] where I adjusted (x) represents the pixel value of x in the image after weight adjustment; I(y) represents the original pixel value at position y; I(x) represents the original pixel value at position x.

[0107] It should be noted that the lighting conditions have a great impact on image recognition tasks. Especially in practical application scenarios such as pressure vessel inspection, lighting changes can significantly affect the visibility of defects. By combining lighting angle encoding, the response of the model 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 points, often have obvious differences in texture 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 lighting angle encoding, the constructed spatial attention map can dynamically adjust the importance of each pixel position. This enables the model to focus more on those regions that are more critical to the detection task, thereby improving the detection efficiency and reducing false detections.

[0108] S3: Improve the YOLOv5 model using the described lighting angle attention mechanism, and identify the surface defects of pressure vessels through the improved YOLOv5.

[0109] Adjust each pixel to obtain the adjusted image I input ; Use I input as the input of YOLOv5, and use the trained YOLOv5 for recognition to output the probability of the recognized bounding box and defect category.

[0110] Represent the position of the defect in the image in the form of a bounding box, set the confidence threshold to 0.5, check the confidence score of each bounding box, and discard the bounding boxes with a confidence score lower than the threshold to obtain the defect position; screen the maximum value in the defect category probability to determine the classification of the defect position.

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

[0112] where 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 the confidence between 0 and 1.

[0113] Visualize the defect position and its classification on the original image; at the same time, display the confidence and the probability of classification prediction on the bounding box; send the visualized result image for manual review, and include the result image after manual modification in the training set to continuously train YOLOv5.

[0114] That is to say, 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 adjustment helps to improve the sensitivity and accuracy of subsequent defect detection. The adjusted image can more clearly display the defect features and reduce the interference of irrelevant factors in the recognition process. The trained YOLOv5 model is used to identify and predict the bounding boxes and class probabilities of defects from the adjusted image. Through the powerful feature extraction ability of the deep learning model, the defect positions in the image are accurately located and their classes are predicted. A suitable confidence threshold (such as 0.5) is set to ensure that only the defects that the model is sufficiently confident about are further processed. By filtering out the prediction results with low confidence, the false positive rate is reduced, thereby improving the overall reliability of the detection. The class with the highest probability is selected from the class probabilities output by the model as the final defect classification. Ensure that each identified defect position is correctly classified to provide accurate information for subsequent processing and decision-making.

[0115] The information such as the defect positions, classifications, and confidences is visualized on the original image and verified and corrected through manual review. The visualization results enable the operator to intuitively evaluate the accuracy of the detection, and the manual review provides a means to correct possible misjudgments and feedback the corrected data to the training set. The YOLOv5 model is continuously trained and optimized using the data after manual review and correction. Continuous model training can enable 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] An acquisition unit that acquires image data of the pressure vessel surface.

[0118] An attention unit that constructs an illumination angle attention mechanism, uses the images in the dataset to establish a feature map, and generates a spatial attention map according to the spatial relationship of the feature map.

[0119] An identification unit that uses the illumination angle attention mechanism to improve the YOLOv5 model and identifies the pressure vessel surface defects 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, in essence, or the part that contributes to the prior art, or a part of this technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in various embodiments of the present invention. The aforementioned storage medium includes: various media that can store program codes, such as USB flash drives, mobile hard disks, read-only memories (ROM, Read-Only Memory), random access memories (RAM, Random Access Memory), magnetic disks, or optical discs.

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

[0122] More specific examples (non-exhaustive list) of computer-readable media include the following: an electrical connection part with one or more wirings (electronic device), a portable computer disk cartridge (magnetic device), random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber device, and portable compact disc read-only memory (CDROM). Additionally, the computer-readable medium can even be paper or other suitable media on which the program can be printed, because the program can be obtained electronically, for example, by optically scanning the paper or other media, then editing, interpreting, or processing it in other suitable ways as necessary, and then storing it 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 embodiments, multiple 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, any one or a combination of the following techniques well known in the art can be used: discrete logic circuits with logic gate circuits for implementing logical functions on data signals, application-specific integrated circuits with suitable combinational logic gate circuits, programmable gate arrays (PGAs), field-programmable gate arrays (FPGAs), etc.

[0124] Embodiment 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 defect detection on the pressure vessel surface through the improved YOLOv5 model and the illumination angle attention mechanism. The purpose of the experiment is to demonstrate the advantages of this method over traditional defect detection techniques in terms of detection accuracy, illumination adaptability, and processing speed. The experimental setup includes defect detection using a standard pressure vessel image dataset under different illumination conditions. The image dataset contains pressure vessel images with and without defects, and the defects include but are not limited to cracks, rust, and depressions.

[0127] The experiment first performs preprocessing of the images, including simulation of the illumination angle. By changing the simulation of the illumination angle in the images, the robustness of the model is tested. The improved YOLOv5 model is used, which integrates an illumination angle attention mechanism that can adjust its attention weights according to the illumination angle in the image to optimize the recognition of defect areas.

[0128] In the experiment, each image is adjusted to a fixed size and normalized to meet the requirements of the model input. Then, a convolutional neural network is used to extract features from the adjusted images, and a network structure containing multiple convolutional layers and Sigmoid activation functions is used to predict the classification and position of each anchor box. It should be noted that the output of the model includes the position of the bounding box and the confidence of the defect category, and these outputs are screened by setting a confidence threshold. Only when the predicted confidence is higher than 0.5 is it regarded as a valid detection. Specifically, as shown in Table 1.

[0129] Table 1 Data Record Table

[0130]

[0131] The data shows the performance of the improved YOLOv5 model in the detection of surface defects of pressure vessels under different lighting angles. It can be seen from the data 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 gradually decreasing trend with the optimization of the model, from 0.35 seconds to 0.29 seconds, indicating that the operation efficiency of the model has also been improved.

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

[0133] It demonstrates the effectiveness of the invention content in practical applications and also highlights its advantages over the prior art, including higher detection accuracy, faster processing speed, and excellent performance under variable lighting conditions. These innovative points provide strong evidence to support the commercial application and technical 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 and not to limit them. Although the present invention has been described in detail with reference to the preferred embodiments, those of ordinary skill in the art should understand that the technical solutions of the present invention can be modified or equivalently replaced without departing from the spirit and scope of the technical solutions of the present invention, and they should all be covered by 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 surface of the pressure vessel; 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 by using the illumination angle attention mechanism, and the surface defects of the pressure vessel are identified by using the improved YOLOv5; 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, obtaining a surface image of the pressure vessel at each sampling node; 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; 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: Among them, I gabor 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, F(I gabor ) 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 gabor ) xu represents the response of the feature map at position x; F(I gabor ) yu represents the response of the feature map at position y; M represents the dimension of the feature map; u 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; The illumination angle attention mechanism also includes adjusting the original image pixel value using the attention map A(x, y); adjusting the pixel value for each pixel in the image by the weight of other pixels y related to it; Among them, I adjusted I(x) represents the pixel value at position x in the image after weight adjustment; I(y) represents the original pixel value at position y; I(x) represents the original pixel value at position x.

2. The method for identifying inner surface defects of a nuclear reactor pressure vessel according to claim 1, characterized in that: The improved YOLOv5 includes adjusting each pixel using the illumination angle attention mechanism to obtain the 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.

3. The method for identifying inner surface defects of a nuclear reactor pressure vessel according to claim 2, 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.

4. A nuclear reactor pressure vessel inner surface defect recognition system using the method according to any one of claims 1 to 3, 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.

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

6. 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 3 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