Method and system for identifying internal surface defects of nuclear reactor pressure vessel, computer device, and computer-readable storage medium
By employing an illumination angle attention mechanism and an improved YOLOv5 model, the problems of low efficiency and high false negative rate in identifying surface defects of pressure vessels have been solved. This enables efficient and accurate identification under varying illumination environments, making it suitable for the safety inspection of nuclear reactor pressure vessels.
Patent Information
- Application Number
- PCT/CN2025/095316
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2024-05-29
- Filing Date
- 2025-05-16
- Publication Date
- 2025-12-04
AI Technical Summary
Existing methods for identifying surface defects in pressure vessels have low detection efficiency and a high rate of missed detections, especially under poor lighting and shooting angles.
By employing an illumination angle attention mechanism and an improved YOLOv5 model, deep learning techniques are combined with image preprocessing, feature map construction, and spatial attention map to identify surface defects in pressure vessels.
It improves the efficiency and accuracy of defect identification, reduces the missed detection rate, and can stably identify defects on the surface of pressure vessels under different lighting conditions, ensuring safety and reliability.
Smart Images

Figure CN2025095316_04122025_PF_FP_ABST
Abstract
Description
A method and system for identifying defects on the inner surface of a nuclear reactor pressure vessel, a computer device, and a computer-readable storage medium.
[0001] Cross-reference to related applications
[0002] This application claims priority to Chinese Patent Application No. 202410680234.9, filed on May 29, 2024, entitled "A Method and System for Identifying Inner Surface Defects of a Nuclear Reactor Pressure Vessel", the entire contents of which are incorporated herein by reference. Technical Field
[0003] This application relates to the field of safety intelligent detection and visual recognition technology, specifically a method and system for identifying defects on the inner surface of a nuclear reactor pressure vessel, a computer device, and a computer-readable storage medium. Background Technology
[0004] Surface inspection of pressure vessels often requires workers or machinery to enter the vessel with inspection instruments. Currently, video and image-based inspection methods are commonly used for surface defect detection. However, due to factors such as lighting and shooting angles, missed defects are prone to occur inside pressure vessels.
[0005] Pressure vessels are widely used equipment in industrial applications for storing liquids and gases. These vessels are often subjected to high pressure and harsh environments, making their surfaces prone to defects such as cracks, corrosion, and dents. If these defects are not detected and addressed in a timely manner, they can lead to serious safety accidents. Traditional defect detection methods rely on manual visual inspection and some basic automated tools. These methods are typically labor-intensive, inefficient, and susceptible to the subjective judgment of the operator. Summary of the Invention
[0006] In view of the aforementioned problems, this application is hereby filed.
[0007] Therefore, the technical problem solved by this application is that existing methods for identifying surface defects in pressure vessels have problems such as low detection efficiency and high false negative rate.
[0008] To solve the above-mentioned technical problems, this application provides the following technical solution: a method for identifying defects on the inner surface of a nuclear reactor pressure vessel, comprising:
[0009] Acquire image data of the pressure vessel surface;
[0010] Construct an illumination angle attention mechanism, build feature maps using images in the dataset, and generate spatial attention maps based on the spatial relationships of the feature maps;
[0011] The YOLOv5 model is improved using the aforementioned illumination angle attention mechanism, and the improved YOLOv5 is used to identify surface defects of pressure vessels.
[0012] As an optional solution to the method for identifying defects on the inner surface of a nuclear reactor pressure vessel as described in this application, the image data includes preprocessing the image after image acquisition and recording image specification data and image content data.
[0013] The image specification data includes the resolution and color depth of each pressure vessel surface image;
[0014] The image content data includes obtaining pressure vessel surface images at each sampling node according to a preset image acquisition frequency.
[0015] As an optional scheme of the method for identifying defects on the inner surface of a nuclear reactor pressure vessel as described in this application, the preprocessing includes decomposing the image into different levels using a Gaussian pyramid and applying different degrees of illumination compensation to each level.
[0016] Among them, I scale [k] represents the image after processing by the k-th Gaussian pyramid, and Gauss(I) represents the result of applying Gaussian filtering to the original image I. ↓ k This indicates that the image is downsampled k times; α k γ represents a layer-specific illumination compensation parameter. k This indicates a level-specific parameter for adjusting contrast.
[0017] CLAHE is applied to each level after multi-scale processing to enhance local features at all scales; enh [k] = CLAHE(I) scale [k])
[0018] Reconstruction using the Laplace pyramid, incorporating enhancement features across all scales, and applying a high-pass filter to highlight high-frequency details; I inv =HighPass(I lap ) / (1+Mean(I lap ))
[0019] Among them, ↑ k Indicates upsampling operation; CLAHE indicates contrast-limited adaptive histogram equalization; I enh [k] represents the k-th layer image after local contrast enhancement; I lapThis represents the image after merging all levels using the Laplacian pyramid processing; Laplace represents the Laplacian pyramid operation used to extract high-frequency details from each enhanced image level; I inv Indicates from I lap Extracted illumination-invariant feature image; HighPass represents a high-pass filter used to highlight high-frequency components in the image; Mean(I lap ) indicates that for I lap Local mean filtering of the image;
[0020] Use Gabor filters to extract orientation-sensitive texture features;
[0021] Among them, I gabor This 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.
[0022] As an optional scheme of the method for identifying internal surface defects of nuclear reactor pressure vessels described in this application, wherein: the illumination angle attention mechanism includes extracting direction-sensitive texture features from the image I gabor As input, a feature map is extracted from the image using a convolution operation, represented as:
[0023] Where I represents the input image, N represents the number of convolution kernels, and w i K represents the weight of the i-th convolutional kernel. i Let F(i) represent the i-th convolutional kernel, and F(i) represent the response of the feature map.
[0024] The spatial relationships between pixel locations in an image are represented using a distance matrix:
[0025] Where x and y represent two distinct pixel positions in the image, and σ represents the spatial distance decay parameter;
[0026] The spatial attention map is generated by combining feature maps, spatial relationships, and illumination angle encoding.
[0027] Where, F(I) xi F(I) represents the response of the feature map at position x. yiThe response of the feature map at position y is represented by M; the dimension of the feature map is represented by i; the index of the feature map is represented by A(x,y); the spatial attention map is represented by A(x,y), with a value range of [0,1], which shows 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], which represents the spatial similarity between positions x and y.
[0028] As an optional scheme of the method for identifying defects on the inner surface of a nuclear reactor pressure vessel as described in this application, the illumination angle attention mechanism further includes adjusting the pixel values of the original image using an attention map A(x,y); for each pixel x in the image, the pixel value of x is adjusted by the weights of other pixels y1 associated with x.
[0029] Among them, I adjusted I(x) represents the pixel value of position x in the weighted image; I(y) represents the original pixel value of position y; I(x) represents the original pixel value of position x.
[0030] As an optional solution to the method for identifying defects on the inner surface of a nuclear reactor pressure vessel as described in this application, the improved YOLOv5 includes adjusting each pixel to obtain an adjusted image I. input ; will I input As input to YOLOv5, the trained YOLOv5 is used for recognition, and the output is the recognized bounding box and the probability of the defect category.
[0031] The location of defects in the image is represented by bounding boxes. A confidence threshold of 0.5 is set, and the confidence score of each bounding box is checked. Bounding boxes with a confidence score below the threshold are discarded to obtain the defect location. The maximum value among the defect category probabilities is then selected to determine the classification of the defect location. pred =σ(CNN(I) input ))
[0032] Among them, I input denoted as the input image; CNN stands for Convolutional Neural Network, which extracts image features and predicts the classification and location of each anchor box; σ represents the Sigmoid activation function, used to transform the output to a more suitable range, obtaining a confidence level between 0 and 1.
[0033] As an optional solution to the method for identifying internal surface defects of nuclear reactor pressure vessels described in this application, the identification of surface defects of the pressure vessel includes visualizing the defect location and its classification onto the original image; and simultaneously displaying the confidence level and the probability of classification prediction in the edge box.
[0034] The visualized result images are sent for manual review, and the manually modified result images are included in the training set for continuous training of YOLOv5.
[0035] A nuclear reactor pressure vessel internal surface defect identification system employing the method described in this application, characterized in that:
[0036] The acquisition unit acquires image data of the pressure vessel surface;
[0037] The attention unit constructs an illumination angle attention mechanism, uses images from the dataset to build feature maps, and generates spatial attention maps based on the spatial relationships of the feature maps.
[0038] The identification unit uses the illumination angle attention mechanism to improve the YOLOv5 model, and uses the improved YOLOv5 to identify surface defects of the pressure vessel.
[0039] A computer device includes: a memory and a processor; the memory stores a computer program, wherein: when the processor executes the computer program, it implements the steps of the above-described method.
[0040] A computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the steps of the above-described method.
[0041] The beneficial effects of this application: The method and system for identifying defects on the inner surface of nuclear reactor pressure vessels provided in this application have the characteristics of high defect identification efficiency and low false negative rate. It can effectively address common problems encountered when detecting defects 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 changes in illumination on defect identification. This allows the model to maintain high accuracy in environments with varying light levels, from strong light to shadow, greatly improving the stability and reliability of detection. The improved YOLOv5 model, through the integration of an 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 suitable for industrial applications such as pressure vessels, where defect morphologies are diverse and often located in complex backgrounds. By strengthening the features of key areas and suppressing irrelevant or interfering information, the model can more quickly and accurately locate and identify potential defects. Since the model's attention to each area is dynamically adjusted according to actual lighting conditions and image content, it can effectively reduce false positives and false negatives caused by background noise or lighting effects. This precise ability to locate and identify defects is crucial for ensuring the safe operation of pressure vessels, especially during routine maintenance and inspections. Attached Figure Description
[0042] To more clearly illustrate the technical solutions of the embodiments of this application, the drawings used in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0043] Figure 1 is an overall flowchart of the method for identifying defects on the inner surface of a nuclear reactor pressure vessel provided in the first embodiment of this application. Detailed Implementation
[0044] To make the above-mentioned objectives, features, and advantages of this application more apparent and understandable, the specific embodiments of this application will be described in detail below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of them. Based on the embodiments in this application, all other embodiments obtained by those skilled in the art without inventive effort should fall within the scope of protection of this application.
[0045] Example 1
[0046] Referring to Figure 1, an embodiment of this application provides a method for identifying defects on the inner surface of a nuclear reactor pressure vessel, including:
[0047] S1: Acquire image data of the pressure vessel surface.
[0048] Optionally, the image data includes preprocessing the images after image acquisition and recording 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 acquiring pressure vessel surface images at each sampling node according to a preset image acquisition frequency.
[0049] It's important to know that preprocessing includes decomposing the image into different levels using a Gaussian pyramid and applying different levels of illumination compensation to each level.
[0050] Among them, I scale [k] represents the image after processing by the k-th Gaussian pyramid, and Gauss(I) represents the result of applying Gaussian filtering to the original image I. ↓ k This indicates that the image is downsampled k times; α k γ represents a layer-specific illumination compensation parameter. k This indicates a level-specific parameter for adjusting contrast.
[0051] CLAHE is applied 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 tiles called "tiles" and applies histogram equalization independently to each tile. Unlike traditional histogram equalization, CLAHE avoids noise amplification by limiting contrast enhancement. In image processing software or libraries (such as OpenCV), CLAHE is often provided as a callable function, allowing users to set different parameters to optimize the results.) enh [k] = CLAHE(I) scale [k])
[0052] Reconstruction using the Laplacian pyramid, incorporating enhancement features across all scales, and applying a high-pass filter to highlight high-frequency details. I inv =HighPass(I lap ) / (1+Mean(I lap ))
[0053] Among them, ↑ k Indicates upsampling operation; CLAHE indicates contrast-limited adaptive histogram equalization; I enh [k] represents the k-th layer image after local contrast enhancement; I lap This represents the image after merging all levels using the Laplacian pyramid processing; Laplace represents the Laplacian pyramid operation used to extract high-frequency details from each enhanced image level; I inv Indicates from I lap Extracted illumination-invariant feature image; HighPass represents a high-pass filter used to highlight high-frequency components in the image; Mean(I lap ) indicates that for I lap Local mean filtering is applied to the image.
[0054] Use Gabor filters to extract orientation-sensitive texture features;
[0055] Among them, I gabor This 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.
[0056] It is also important to know that α is involved in the above pretreatment process. k and γ k The determination of these parameters needs to be obtained through training. To effectively train the parameters (α) for illumination compensation and contrast adjustment... k and γ kThis is a learning-based method for automating parameter selection. Specific steps include:
[0057] Collect a large amount of image data under different lighting conditions.
[0058] The "ideal" processed results of these images were manually generated as labels, i.e., the alpha values were manually adjusted. k and γ k The image after the value.
[0059] Gaussian pyramid decomposition is used for each training image to extract image features at different levels.
[0060] Extract the lighting and contrast features of each layer, such as local brightness, contrast, and texture details.
[0061] Supervised learning methods, such as deep neural networks, are used where the input is multi-scale features of an image, and the output is the corresponding α. k and γ k Value. A regression model can be used to predict α for each level. k and γ k value.
[0062] During training, 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.
[0063] Model Evaluation and Optimization: Evaluate model performance on independent test sets to ensure generalization ability. Perform cross-validation and parameter tuning (such as learning rate, number of layers, number of nodes, etc.) to optimize model performance.
[0064] Model Deployment:
[0065] The trained model is then applied to the actual image processing workflow to automatically calculate α. k and γ k .
[0066] Implement a feedback mechanism to adjust model parameters based on user feedback or further performance monitoring.
[0067] Training process:
[0068] initialization:
[0069] Define the neural network architecture, such as a convolutional neural network (CNN) or a fully connected network.
[0070] Initialize network parameters and select appropriate activation functions and optimizers.
[0071] Training cycle:
[0072] The processed image and its hierarchical features are input into the network.
[0073] α of network output prediction k and γ k value.
[0074] Calculate the loss function value and update the network weights through backpropagation.
[0075] Verification and adjustment:
[0076] Regularly test model performance on the validation set to monitor for overfitting and other potential problems.
[0077] Adjust the learning rate and other hyperparameters based on the performance results.
[0078] Final assessment:
[0079] After all training cycles are completed, a final evaluation is performed on the test set.
[0080] The performance of the model was analyzed on images of different types and lighting conditions.
[0081] It's important to understand that Gaussian pyramid decomposition creates a series of downsampled images by progressively reducing the image resolution, with each layer being blurrier and smaller than the previous one. This process helps analyze images at multiple scales, capturing features from coarse to fine. Applying varying degrees of illumination compensation and contrast adjustment at each level optimizes visual performance based on the characteristics of the image at different scales. This ensures good visualization at all levels of detail. CLAHE enhances local contrast at each level by processing the image in blocks and limiting the contrast of histogram equalization to prevent excessive noise amplification. This method is highly effective in improving local visibility, especially in cases of uneven brightness. Using Laplacian pyramid reconstruction, combined with enhancement features across all scales, this step reconstructs the image, merging details and information from different scales to restore or enhance high-frequency details. High-pass filters are used to emphasize high-frequency components of the image, such as edges and details, helping to highlight important visual elements. Through this series of steps, the image processing workflow optimizes the illumination, contrast, and texture representation of an image at multiple levels, resulting in images with better visual quality and richer information, suitable for advanced image analysis tasks such as machine vision and automated image editing. The synergistic effect of this method is particularly suitable for handling complex scenes captured under different lighting and viewing angles.
[0082] S2: Construct an illumination angle attention mechanism, use images in the dataset to build feature maps, and generate spatial attention maps based on the spatial relationships of the feature maps.
[0083] The illumination angle attention mechanism includes extracting orientation-sensitive texture features from the image I. gaborAs input, a feature map is extracted from the image using a convolution operation, represented as:
[0084] Where I represents the input image, N represents the number of convolution kernels, and w i K represents the weight of the i-th convolutional kernel. i Let F(i) represent the i-th convolutional kernel, and F(i) represent the response of the feature map.
[0085] The spatial relationships between pixel locations in an image are represented using a distance matrix:
[0086] Here, x and y represent two distinct pixel positions in the image, and σ represents the spatial distance attenuation parameter. The spatial attention map is generated by combining the feature map, spatial relationships, and illumination angle encoding.
[0087] Where, F(I) xi F(I) represents the response of the feature map at position x. yi The response of the feature map at position y is represented by M; the dimension of the feature map is represented by i; the index of the feature map is represented by A(x,y); the spatial attention map is represented by A(x,y), with a value range of [0,1], which shows 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], which represents the spatial similarity between positions x and y.
[0088] Adjust the pixel values of the original image using the attention map A(x,y); for each pixel x in the image, adjust the pixel value of x by the weights of other pixels y1 associated with x.
[0089] Among them, I adjusted I(x) represents the pixel value of position x in the weighted image; I(y) represents the original pixel value of position y; I(x) represents the original pixel value of position x.
[0090] It's worth noting that lighting conditions have a significant impact on image recognition tasks, especially in practical applications such as pressure vessel inspection, where changes in lighting can significantly affect the visibility of defects. By incorporating lighting angle encoding, the model's response to different lighting conditions can be adjusted, thereby improving the model's accuracy and stability in various environments. Defects on the surface of pressure vessels, such as cracks and corrosion spots, often have a texture that is clearly distinct from the surrounding environment. Extracting these direction-sensitive texture features through convolutional operations can more effectively locate and identify these defects. By combining feature maps, spatial relationships, and lighting angle encoding, a spatial attention map can be constructed that dynamically adjusts the importance of each pixel's position. This allows the model to focus more on regions that are more critical to the detection task, thereby improving detection efficiency and reducing false positives.
[0091] S3: Improve the YOLOv5 model using the aforementioned illumination angle attention mechanism, and identify surface defects of pressure vessels using the improved YOLOv5.
[0092] By adjusting each pixel, the adjusted image I is obtained. input ; will I input As input to YOLOv5, the trained YOLOv5 is used for recognition, and the output is the recognized bounding box and the probability of the defect category.
[0093] The location of defects in an image is represented by bounding boxes. A confidence threshold of 0.5 is set, and the confidence score of each bounding box is examined. Bounding boxes with a confidence score below the threshold are discarded to obtain the defect location. The maximum value among the defect category probabilities is then selected to determine the classification of the defect location. pred =σ(CNN(I) input ))
[0094] Among them, I input denoted as the input image; CNN stands for Convolutional Neural Network, which extracts image features and predicts the classification and location of each anchor box; σ represents the Sigmoid activation function, used to transform the output to a more suitable range, obtaining a confidence level between 0 and 1.
[0095] The defect location and its classification are visualized on the original image; the confidence level and the probability of classification prediction are displayed on the edge box; the visualized image is sent for manual review, and the manually modified image is included in the training set for continuous training of YOLOv5.
[0096] The key point is that image quality is improved and potential defect areas are highlighted by adjusting each pixel of the input image (usually based on lighting angle attention mechanisms, etc.). This adjustment helps improve the sensitivity and accuracy of subsequent defect detection. The adjusted image more clearly displays defect features, reducing interference from irrelevant factors during model recognition. A trained YOLOv5 model is used to identify and predict the bounding boxes and class probabilities of defects from the adjusted image. The powerful feature extraction capabilities of deep learning models accurately locate defect positions in the image and predict their classes. An appropriate confidence threshold (e.g., 0.5) is set to ensure that only defects that the model is sufficiently confident in are further processed. Filtering out predictions with low confidence reduces the false positive rate, thereby improving the overall reliability of detection. The class with the highest probability from the model's output is selected as the final defect classification. This ensures that each identified defect location is correctly classified, providing accurate information for subsequent processing and decision-making.
[0097] Information such as defect location, classification, and confidence level is visualized onto the original image and then verified and corrected through manual review. Visualization allows operators to intuitively assess the accuracy of the detection, while manual review provides a means to correct potential misjudgments, and the corrected data is fed back into the training set. The YOLOv5 model is continuously trained and optimized using the manually reviewed and corrected data. Continuous model training enables the model to adapt to new or unforeseen defect types and changes in conditions, continuously improving its generalization ability and accuracy.
[0098] On the other hand, this embodiment also provides a nuclear reactor pressure vessel inner surface defect identification system, which includes:
[0099] The acquisition unit acquires image data of the pressure vessel surface.
[0100] The attention unit constructs an illumination angle attention mechanism, uses images from the dataset to build feature maps, and generates spatial attention maps based on the spatial relationships of the feature maps.
[0101] The identification unit uses the illumination angle attention mechanism to improve the YOLOv5 model, and uses the improved YOLOv5 to identify surface defects of the pressure vessel.
[0102] If the above functions are implemented as 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 this application, in essence, or the part that contributes to the prior art, or a part of the 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 to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0103] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as a sequenced list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by, or in conjunction with, an instruction execution system, apparatus, or device (such as a computer-based system, a processor-included system, or other system that can fetch and execute instructions from, an instruction execution system, apparatus, or device). For the purposes of this specification, "computer-readable medium" can be any means that can contain, store, communicate, propagate, or transmit programs for use by, or in conjunction with, an instruction execution system, apparatus, or device.
[0104] More specific examples of computer-readable media (a non-exhaustive list) include: electrical connections (electronic devices) having one or more wires, portable computer disk drives (magnetic devices), random access memory (RAM), read-only memory (ROM), erasable and editable read-only memory (EPROM or flash memory), fiber optic devices, and portable optical disc read-only memory (CDROM). Furthermore, computer-readable media 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 medium, followed by editing, interpreting, or otherwise processing as necessary, and then stored in computer memory.
[0105] It should be understood that various parts of this application can be implemented using hardware, software, firmware, or a combination thereof. In the above embodiments, multiple steps or methods can be implemented using software or firmware stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, it can be implemented using any one or a combination of the following techniques known in the art: discrete logic circuits having logic gates for implementing logical functions on data signals, application-specific integrated circuits (ASICs) having suitable combinational logic gates, programmable gate arrays (PGAs), field-programmable gate arrays (FPGAs), etc.
[0106] Example 2
[0107] The following is an embodiment of this application, which provides a method and system for identifying defects on the inner surface of a nuclear reactor pressure vessel, a computer device, and a computer-readable storage medium. In order to verify the beneficial effects of this application, scientific demonstration is carried out through economic benefit calculations and simulation experiments.
[0108] This experiment aims to verify the effectiveness of a modified YOLOv5 model and an illumination angle attention mechanism for detecting surface defects in pressure vessels. The goal 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 images of pressure vessels with and without defects, including but not limited to cracks, corrosion, and dents.
[0109] The experiment first involved image preprocessing, including simulating illumination angles. The robustness of the model was tested by varying the simulated illumination angles in the images. An improved YOLOv5 model was used, which integrates an illumination angle attention mechanism that adjusts its attention weights based on the illumination angles in the image to optimize the identification of defective regions.
[0110] In the experiment, each image was resized to a fixed size and normalized to meet the model input requirements. Then, a convolutional neural network was used to extract features from the resized images. A network structure containing multiple convolutional layers and a sigmoid activation function was used to predict the classification and location of each anchor box. Notably, the model output includes the location of the bounding box and the confidence score for the defect category. These outputs were filtered by setting a confidence threshold; only predictions with a confidence score higher than 0.5 were considered valid detections. Details are shown in Table 1.
[0111] Table 1 Data Record Table
[0112] The data demonstrates the performance of the improved YOLOv5 model in detecting surface defects on pressure vessels under different illumination angles. The data shows that the defect detection accuracy reaches its highest level (93.1%) as the illumination angle approaches perpendicularity (90°), proving that the illumination angle attention mechanism effectively improves the model's performance under various illumination conditions. Furthermore, the processing time shows a gradual decreasing trend with model optimization, decreasing from 0.35 seconds to 0.29 seconds, indicating an improvement in the model's computational efficiency.
[0113] The average confidence score varied significantly under different illumination angles, reaching a maximum of 0.82, which further confirms the high confidence output of the model under ideal illumination conditions. Specifically, the detection rates of cracks, corrosion, and dents all showed varying degrees of improvement with changes in illumination angle, with the detection rates of all three defects reaching or approaching 90% at a 90° illumination angle.
[0114] The invention demonstrates its effectiveness in practical applications and highlights its advantages over existing technologies, including higher detection accuracy, faster processing speed, and superior performance under varying lighting conditions. These innovations provide strong evidence supporting the commercial application and technology promotion of this application.
[0115] This application also provides a computer device, including: a memory and a processor; the memory stores a computer program, and the processor executes the computer program to implement the steps of the above-described method for identifying defects on the inner surface of a nuclear reactor pressure vessel.
[0116] In some alternative implementations, multiple processors and / or multiple buses can be used with multiple memories and multiple memory units, if desired. Similarly, multiple computer devices can be connected, each providing some of the necessary operations (e.g., as a server array, a group of blade servers, or a multiprocessor system).
[0117] The processor can be a central processing unit, a network processor, or a combination thereof. The processor may further include hardware chips. These hardware chips can be application-specific integrated circuits (ASICs), programmable logic devices (PLDs), or combinations thereof. The programmable logic devices can be complex programmable logic devices (CLPs), field-programmable gate arrays (FPGAs), general-purpose array logic (GDAs), or any combination thereof.
[0118] The memory stores instructions executable by at least one processor to enable the at least one processor to perform the method for identifying internal surface defects of a nuclear reactor pressure vessel as described in the above embodiments.
[0119] The memory may include a stored program area and a stored data area. The stored program area may store the operating system and applications required for at least one function; the stored data area may store data created based on the use of the computer device. Furthermore, the memory may include high-speed random access memory and non-transitory memory, such as at least one disk storage device, flash memory device, or other non-transitory solid-state storage device. In some alternative embodiments, the memory may include memory remotely located relative to the processor, which can be connected to the computer device via a network. Examples of such networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.
[0120] The memory may include volatile memory, such as random access memory; the memory may also include non-volatile memory, such as flash memory, hard disk or solid-state drive; the memory may also include a combination of the above types of memory.
[0121] The computer device also includes input and output devices. The processor, memory, input and output devices can be connected via a bus or other means.
[0122] Input devices can receive input numerical or character information, and generate key signal inputs related to user settings and function control of the computer device, such as touchscreens, keypads, mice, trackpads, touchpads, joysticks, one or more mouse buttons, trackballs, joysticks, etc. Output devices may include display devices, auxiliary lighting devices (e.g., LEDs), and haptic feedback devices (e.g., vibration motors). The aforementioned display devices include, but are not limited to, liquid crystal displays, light-emitting diodes, displays, and plasma displays. In some alternative embodiments, the display device may be a touchscreen.
[0123] The computer device also includes a communication interface for communicating with other devices or communication networks.
[0124] This application also provides a computer-readable storage medium in which the methods described in this application can be implemented in hardware or firmware, or implemented as recordable on a storage medium, or implemented as computer code originally stored on a remote storage medium or a non-transitory machine-readable storage medium and to be stored on a local storage medium after being downloaded over a network, so that the methods described herein can be stored on such software processing on a storage medium using a general-purpose computer, a special-purpose processor, or programmable or special-purpose hardware.
[0125] The storage medium can be a magnetic disk, optical disk, read-only memory, random access memory, flash memory, hard disk, or solid-state drive, etc.; furthermore, the storage medium can also include combinations of the above types of memory. It is understood that a computer, processor, microprocessor controller, or programmable hardware includes storage components capable of storing or receiving software or computer code, which, when accessed and executed by the computer, processor, or hardware, implements the methods shown in the above embodiments.
[0126] The above embodiments are only used to illustrate the technical solutions of the embodiments of this application, and are not intended to limit them. Although the embodiments of this application have been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application.
[0127] It should be noted that the above embodiments are only used to illustrate the technical solutions of this application and are not intended to limit it. Although this application has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can be made to the technical solutions of this application without departing from the spirit and scope of the technical solutions of this application, and all such modifications and substitutions should be covered within the scope of the claims of this application.
Claims
1. A method for identifying defects on the inner surface of a nuclear reactor pressure vessel, characterized in that, include: Acquire image data of the pressure vessel surface; Construct an illumination angle attention mechanism, build feature maps using images in the dataset, and generate spatial attention maps based on the spatial relationships of the feature maps; The YOLOv5 model is improved using the aforementioned illumination angle attention mechanism, and the improved YOLOv5 is used to identify surface defects of pressure vessels.
2. The method for identifying defects on the inner surface of a nuclear reactor pressure vessel as described in claim 1, characterized in that: The image data includes preprocessing the image after image acquisition and recording 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 obtaining pressure vessel surface images at each sampling node according to a preset image acquisition frequency.
3. The method for identifying defects on the inner surface of a nuclear reactor pressure vessel as described in claim 2, characterized in that: The preprocessing includes decomposing the image into different levels using a Gaussian pyramid and applying different levels of illumination compensation to each level. Among them, I scale [k] represents the image after processing by the k-th Gaussian pyramid, and Gauss(I) represents the result of applying Gaussian filtering to the original image I. ↓ k This indicates that the image is downsampled k times; α k γ represents a layer-specific illumination compensation parameter. k This indicates a level-specific parameter for adjusting contrast. CLAHE is applied to each level after multi-scale processing to enhance local features at all scales. I enh [k]=CLAHE(I scale [k]) Reconstruction using the Laplace pyramid, incorporating enhancement features across all scales, and applying a high-pass filter to highlight high-frequency details; Among them, ↑ k Indicates upsampling operation; CLAHE indicates contrast-limited adaptive histogram equalization; I enh [k] represents the k-th layer image after local contrast enhancement; I lap This represents the image after merging all levels using the Laplacian pyramid processing; Laplace represents the Laplacian pyramid operation used to extract high-frequency details from each enhanced image level; I inv Indicates from I lap Extracted illumination-invariant feature image; HighPass represents a high-pass filter used to highlight high-frequency components in the image; Mean(I lap ) indicates that for I lap Local mean filtering of the image; Use Gabor filters to extract orientation-sensitive texture features; Among them, I gabor This 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.
4. The method for identifying defects on the inner surface of a nuclear reactor pressure vessel as described in claim 3, characterized in that: The illumination angle attention mechanism includes extracting direction-sensitive texture features from the image I. gabor As input, a feature map is extracted from the image using a convolution operation, represented as: Where I represents the input image, N represents the number of convolution kernels, and w i K represents the weight of the i-th convolutional kernel. i Let F(i) represent the i-th convolutional kernel, and F(i) represent the response of the feature map. The spatial relationships between pixel locations in an image are represented using a distance matrix: Where x and y represent two distinct pixel positions in the image, and σ represents the spatial distance decay parameter; The spatial attention map is generated by combining feature maps, spatial relationships, and illumination angle encoding. Where, F(I) xi F(I) represents the response of the feature map at position x. yi The response of the feature map at position y is represented by M; the dimension of the feature map is represented by i; the index of the feature map is represented by A(x,y); the spatial attention map is represented by A(x,y), with a value range of [0,1], which shows 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], which represents the spatial similarity between positions x and y.
5. The method for identifying defects on the inner surface of a nuclear reactor pressure vessel as described in claim 4, characterized in that: The illumination angle attention mechanism further includes adjusting the pixel values of the original image using an attention map A(x,y); for each pixel x in the image, the pixel value of x is adjusted by the weights of other pixels y1 associated with x. Among them, I adjusted I(x) represents the pixel value of position x in the weighted image; I(y) represents the original pixel value of position y; I(x) represents the original pixel value of position x.
6. The method for identifying defects on the inner surface of a nuclear reactor pressure vessel as described in claim 5, characterized in that: The improved YOLOv5 includes adjusting each pixel to obtain an adjusted image I. input ; will I input As input to YOLOv5, the trained YOLOv5 is used for recognition, and the output is the recognized bounding box and the probability of the defect category. The location of defects in an image is represented by bounding boxes. A confidence threshold of 0.5 is set, and the confidence score of each bounding box is checked. Bounding boxes with a confidence score lower than the confidence threshold are discarded to obtain the defect location. The maximum value among the defect category probabilities is selected to determine the classification of the defect location. Y pred =σ(CNN(I input )) Among them, I input denoted as the input image; CNN stands for Convolutional Neural Network, which extracts image features and predicts the classification and location of each anchor box; σ represents the Sigmoid activation function, used to transform the output to a more suitable range, obtaining a confidence level between 0 and 1.
7. The method for identifying defects on the inner surface of a nuclear reactor pressure vessel as described in claim 6, characterized in that: The identification of surface defects on the pressure vessel includes visualizing the location and classification of defects onto the original image; and simultaneously displaying the confidence level and the 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 for continuous training of YOLOv5.
8. A nuclear reactor pressure vessel internal surface defect identification system employing the method described in any one of claims 1-7, characterized in that: The acquisition unit acquires image data of the pressure vessel surface; The attention unit constructs an illumination angle attention mechanism, uses images from the dataset to build feature maps, and generates spatial attention maps based on the spatial relationships of the feature maps. The identification unit uses the illumination angle attention mechanism to improve the YOLOv5 model, and uses the improved YOLOv5 to identify surface defects of the pressure vessel.
9. A computer device, comprising: A memory and a processor; the memory stores a computer program, characterized in that: when the processor executes the computer program, it implements the steps of the method according to any one of claims 1-7.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1-7.
Citation Information
Patent Citations
Abrasion surface topography luminosity three-dimensional reconstruction method and system fused with all-light-source image
CN116385520A
Steel surface defect detection algorithm based on deep learning
CN116664478A
Steel surface defect detection method and system and computer equipment
CN116664558A
Neural network system for 3D pose estimation
CN117677987A
Nuclear reactor pressure vessel inner surface defect identification method and system
CN118644758A
Cited By
Defect detection system and method based on multispectral analysis
CN121384818A
Visible light defect analysis method and system for photovoltaic module
CN121837285A
Electrified equipment defect diagnosis method, system and equipment based on sound heat and visible light data fusion
CN121899705A