Method and system for identifying internal defects in a reactor pressure vessel, computer equipment and computer-readable storage medium
The improved YOLOv5 model with a light irradiation angle attention mechanism enhances defect identification in pressure vessels, addressing inefficiencies and miss rates by dynamically adjusting pixel importance, ensuring accurate and reliable defect detection.
Patent Information
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Filing Date
- 2025-05-16
- Publication Date
- 2026-07-10
AI Technical Summary
Conventional methods for identifying surface defects in pressure vessels suffer from low detection efficiency and high miss rates, particularly due to issues with lighting and camera angles, leading to potential safety hazards.
A method and system utilizing an improved YOLOv5 model with a light irradiation angle attention mechanism that enhances image processing through Gaussian pyramid decomposition, CLAHE, Laplacian pyramid reconstruction, Gabor filtering, and spatial attention maps to dynamically adjust pixel importance based on lighting conditions, enabling accurate defect identification.
The system achieves high defect identification efficiency with a low detection miss rate, effectively addressing lighting variations and improving detection accuracy and reliability in diverse environments, ensuring the safety of pressure vessels.
Smart Images

Figure 2026523018000001_ABST
Abstract
Description
[Technical Field]
[0001] This application claims priority to the Chinese patent application filed with the Chinese National Intellectual Property Office on May 29, 2024, with application number 202410680234.9, titled "Method and System for Identifying Internal Defects in a Nuclear Reactor Pressure Vessel," and all its contents are incorporated into this application by reference.
[0002] This application relates to the technical field of security intelligent detection and visual identification, and more specifically to a method and system for identifying internal defects in reactor pressure vessels, computer equipment, and computer-readable storage media. [Background technology]
[0003] Detecting the inner surface of a pressure vessel often requires a worker or machine to bring a detection device inside the vessel. Currently, video and image-based detection methods are primarily used for detecting surface defects. However, issues such as lighting and camera angles can easily lead to missed detections inside the pressure vessel.
[0004] Pressure vessels are widely used industrially for storing fluids such as liquids and gases. These vessels are often exposed to high pressure and harsh environments, making them susceptible to defects such as cracks, rust, and dents on their surfaces. 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 a few basic automated tools, which are typically labor-intensive, inefficient, and susceptible to the subjective judgment of workers. [Overview of the Initiative] [Problems that the invention aims to solve]
[0005] In light of the problems described above, this application is proposed.
[0006] Therefore, the technical problem that this application aims to solve is as follows: Conventional methods for identifying surface defects in pressure vessels have problems such as low detection efficiency and a high rate of missed detections. [Means for solving the problem]
[0007] To solve the above technical problems, this application provides the following technical solution: A method for identifying internal defects in a reactor pressure vessel, A step of collecting image data of the surface of a pressure vessel, The steps include constructing a light irradiation angle attention mechanism, creating a feature map using images in the dataset, and generating a spatial attention map based on the spatial relationships of the feature map, The method includes the steps of improving the YOLOv5 model using the aforementioned light irradiation angle attention mechanism and identifying surface defects in a pressure vessel using the improved YOLOv5.
[0008] In one arbitrary form of the method for identifying internal defects of a reactor pressure vessel described in this application, the image data includes image specification data and image content data recorded after the image acquisition is completed by preprocessing the image, The aforementioned image specification data includes the resolution and color depth of the surface image of each pressure vessel. The aforementioned image content data includes acquiring surface images of the pressure vessels at each sampling node based on a pre-set image acquisition frequency.
[0009] As one arbitrary form of the method for identifying internal defects in a reactor pressure vessel described in this application, the pretreatment involves using a Gaussian pyramid to decompose an image into various layers and applying different degrees of light irradiation compensation to each layer,
number
number
Number
Number
Number
Number
[0010] As an arbitrary form of the method for identifying inner surface defects of a reactor pressure vessel described in this application, the light irradiation angle attention mechanism takes the image \(I_{gabor}\) after extracting the orientation-aware texture features as input, and extracts the feature map from the image using a convolution operation, which is represented as follows:
Equation
Equation
Equation
[0011] As one arbitrary form of the method for identifying internal defects in a reactor pressure vessel described in this application, the light irradiation angle attention mechanism further includes adjusting the pixel values of the original image using an attention map A(x,y), and for each pixel x in the image, adjusting the pixel value of x by the weight of other pixels y1 associated with x,
number
[0012] As one arbitrary form of the method for identifying internal defects in a reactor pressure vessel described in this application, the improved YOLOv5 obtains an adjusted image I_input by adjusting each pixel, and uses a trained YOLOv5 to identify I_input as input to YOLOv5, outputting the probability of the identified bounding box and defect category. This includes: indicating the location of a defect in an image in the form of a bounding box, setting a confidence threshold of 0.5, detecting the confidence fraction of each bounding box, discarding bounding boxes with a confidence level lower than the confidence threshold to obtain the defect location, and selecting the maximum value among the probabilities of the defect category to determine the classification of the defect location.
number
[0013] As one arbitrary embodiment of the method for identifying internal defects in a reactor pressure vessel described in this application, the step of identifying surface defects in the pressure vessel includes visualizing the defect location and its classification on the original image, and displaying the confidence level and the probability of classification prediction in the edge box, This includes manually reviewing the visualized result images, adding the manually modified result images to the training set, and continuously training YOLOv5.
[0014] A system for identifying internal defects in a reactor pressure vessel using the method described in this application, A collection unit for collecting image data of the surface of a pressure vessel, An attention unit constructs a light irradiation angle attention mechanism, creates a feature map using images in a dataset, and generates a spatial attention map based on the spatial relationships of the feature map. The invention is characterized by including an identification unit that improves the YOLOv5 model using the light irradiation angle attention mechanism and identifies surface defects in a pressure vessel using the improved YOLOv5.
[0015] A computer device comprising memory and a processor, wherein a computer program is stored in the memory, and the processor, when executing the computer program, realizes the steps of the above method.
[0016] A computer-readable storage medium in which a computer program is stored, wherein the computer program, when executed by a processor, realizes the steps of the above method. [Effects of the Invention]
[0017] The beneficial effects of this application are as follows: The method and system for identifying internal defects in reactor pressure vessels according to this application are characterized by high defect identification efficiency and a low detection miss rate. It can effectively address common problems when performing defect detection under various light illumination conditions. The light illumination angle attention map can dynamically adjust the importance of each pixel, reducing the impact of image quality variations due to changes in light illumination on defect identification. This allows the model to maintain high accuracy in various environments, from strong light to shadow, significantly improving the stability and reliability of detection. The improved YOLOv5 model integrates an attention mechanism, which not only allows for the identification of defect locations but also allows for the adjustment of its identification strategy in response to changes in the light illumination angle. This is particularly applicable to industrial applications such as pressure vessels, where defects often have diverse forms and are located in complex backgrounds. By enhancing the features of important areas and suppressing irrelevant and interfering information, the model can find and identify potential defects more quickly and accurately. The model's attention to each region can be dynamically adjusted according to actual light illumination conditions and image content, effectively reducing false positives and false negatives caused by background noise and light illumination effects. This ability to accurately identify and distinguish defects is crucial for ensuring the safe operation of pressure vessels, especially during routine maintenance and inspections. [Brief explanation of the drawing]
[0018] To more clearly explain the technical solutions of the embodiments of this application, the drawings necessary for describing the embodiments will be briefly described below. However, the drawings in the following description are only a few embodiments of this application, and it will be obvious to those skilled in the art that other drawings can be obtained based on these drawings without any creative effort. [Figure 1] This is an overall flowchart of the method for identifying internal defects in a reactor pressure vessel according to the first embodiment of this application. [Modes for carrying out the invention]
[0019] To make the above-mentioned objectives, features, and advantages of this application clearer and easier to understand, specific embodiments of this application will be described below in detail with reference to the drawings of the specification, although it is clear that the embodiments described are only some, not all, embodiments of this application. All other embodiments that a person skilled in the art could obtain without creative effort based on the embodiments of this application should fall within the scope of protection of this application.
[0020] Example 1 Referring to Figure 1, an embodiment of the present application is shown, which provides a method for identifying internal defects in a reactor pressure vessel, comprising the following steps S1 to S3.
[0021] S1: Collect image data of the surface of the pressure vessel.
[0022] Optionally, the image data includes image specification data and image content data recorded after image acquisition is complete and the images have been preprocessed. The image specification data includes the resolution and color depth of the surface image of each pressure vessel. The image content data includes acquiring the surface image of the pressure vessel at each sampling node based on a preset image acquisition frequency.
[0023] The preprocessing involves decomposing the image into various layers using a Gaussian pyramid and applying different degrees of light illumination compensation to each layer.
number
number
number
number
number
number
Number
[0024] Also, the determination of \(\alpha\) k and \(\gamma\) k in the above preprocessing process needs to be obtained through training. To effectively train the parameters (\(\alpha\) k and \(\gamma\) k ) for light irradiation compensation and contrast adjustment, automate parameter selection using a learning-based method. The specific steps include the following.
[0025] Collect a large amount of image data with various light irradiation conditions.
[0026] Manually generate the "ideal" processing results of these images, that is, the images with the values of \(\alpha\) k and \(\gamma\) k manually adjusted as labels.
[0027] For each training image, use Gaussian pyramid decomposition to extract image features at various levels.
[0028] Extract the features of light irradiation and contrast at each level, such as local brightness, contrast, and texture details.
[0029] Using a supervised learning method such as a deep neural network, input the multi-scale features of the image, and output the corresponding values of \(\alpha\) k and \(\gamma\) k . The values of \(\alpha\) k and \(\gamma\) k at each level can be predicted using a regression model.
[0030] During training, the model is optimized to minimize the difference between output parameters and labels, using the mean squared error (MSE) or a similarity index (e.g., SSIM, Structural Similarity Index) as the loss function.
[0031] Model evaluation and optimization: Evaluate the model's performance on an independent test set to ensure its generalizability. Optimize the model's performance by performing cross-validation and parameter tuning (e.g., learning rate, number of layers, number of nodes).
[0032] Model development: The trained model is applied to the actual image processing process, and alpha k and gamma k It calculates automatically.
[0033] A feedback mechanism is implemented to adjust model parameters based on user feedback and further performance monitoring.
[0034] Training process: Initialization: This involves setting up neural network architectures such as convolutional neural networks (CNNs) and fully connected networks.
[0035] Initialize the network parameters and select the appropriate activation function and optimizer.
[0036] Training loop: The processed image and its hierarchical features are input into the network.
[0037] Alpha predicted by the network k and gamma k Output the value.
[0038] The loss function is calculated, and the network weights are updated through backpropagation.
[0039] Verification and adjustment: Regularly test the model's performance with a validation set and monitor for overfitting and other potential issues.
[0040] Adjust the learning rate and other hyperparameters based on the performance results.
[0041] Final rating: Once all training cycles are complete, perform a final evaluation on the test set.
[0042] We analyze the model's performance in images of various types and under different lighting conditions.
[0043] Gaussian pyramid decomposition involves progressively reducing the resolution of an image to create a series of downsampled images, 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 fine. By applying varying degrees of illumination compensation and contrast adjustment at each layer, the visual performance can be optimized according to the characteristics of the image at different scales. This ensures that the image has a good visualization effect at all levels of detail. CLAHE enhances local contrast at each layer, processes the image in blocks, and prevents excessive noise amplification by limiting the contrast for histogram equalization. This method is particularly effective in improving local visibility of an image when the brightness is uneven. The image is reconstructed using the Laplacian pyramid, combining the enhanced features at all scales, and integrating details and information at different scales to restore or enhance high-frequency details of the image. High-pass filters are used to highlight high-frequency parts of the image, such as edges and details, helping to emphasize important visual elements. Through these steps, the image processing process can optimize the illumination, contrast, and texture representation of the image at multiple layers. The resulting images offer improved visual quality and richer information, making them suitable for advanced image analysis tasks such as machine vision and automated image editing. The synergistic effects of this method make it particularly well-suited for processing complex scenes captured under various lighting conditions and viewpoints.
[0044] S2: Construct a light irradiation angle attention mechanism, create feature maps using images in the dataset, and generate spatial attention maps based on the spatial relationships of the feature maps. The light irradiation angle attention mechanism takes the image I_gabor, after the direction-sensing texture features have been extracted, as input and uses a convolution operation to extract a feature map from the image, which can be expressed as follows:
number
number
number
number
[0045] Furthermore, lighting conditions significantly impact image recognition tasks. In particular, in practical application scenarios such as pressure vessel detection, changes in lighting can greatly affect the visibility of defects. Combining this with encoding of the lighting angle allows for adjustment of the model's response to various lighting conditions, thereby improving the model's accuracy and stability in diverse environments. Defects such as cracks and corrosion spots on the surface of pressure vessels often have textures that differ significantly from the surrounding environment. By extracting these orientation-sensing texture features through convolutional operations, these defects can be more effectively identified and distinguished. By combining feature maps, spatial relationships, and lighting angle encoding, the constructed spatial attention map can dynamically adjust the importance of each pixel location. This allows the model to focus on areas more important to the detection task, improving detection efficiency and reducing false positives.
[0046] S3: The YOLOv5 model is improved using the light irradiation angle attention mechanism, and surface defects in the pressure vessel are identified using the improved YOLOv5.
[0047] By adjusting each pixel, an adjusted image I_input is obtained. This I_input is then used as input to YOLOv5, and a trained YOLOv5 is used to perform identification, outputting the probability of the identified bounding box and defect category.
[0048] The location of the defect in the image is indicated by a bounding box, the confidence threshold is set to 0.5, the confidence fraction of each bounding box is detected, bounding boxes with a confidence level lower than the confidence threshold are discarded to obtain the defect location, and the maximum value among the probabilities of the defect category is selected to determine the classification of the defect location.
number
[0049] The defect locations and their classifications are visualized on the original image, and confidence levels and classification prediction probabilities are displayed in edge boxes. The visualized result images are then manually reviewed, and the manually modified result images are added to the training set to continuously train YOLOv5.
[0050] Furthermore, by adjusting each pixel of the input image (usually based on a light illumination angle attention mechanism), image quality is improved and potentially defective areas are highlighted. Such adjustments help improve the sensitivity and accuracy of subsequent defect detection. Adjusted images can more clearly display defect features and reduce interference from irrelevant elements to the model during the identification process. A trained YOLOv5 model is used to identify and predict defect bounding boxes and category probabilities from the adjusted images. The powerful feature extraction capabilities of the deep learning model allow for accurate identification of defect locations within the image and prediction of their categories. An appropriate confidence threshold (e.g., 0.5) is set so that only defects that the model is sufficiently confident in are processed further. Excluding low-confidence predictions reduces the false positive rate and improves the overall reliability of detection. From the category probabilities output by the model, the category with the highest probability 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.
[0051] Information such as defect location, classification, and confidence level is visualized on the original image and verified and corrected through manual review. The visualized results allow operators to intuitively assess the accuracy of detection, while manual review provides a means to correct possible misjudgments and feed the corrected data 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 anticipated defect types and changes in conditions, continuously improving its generalization ability and accuracy.
[0052] In another embodiment, this embodiment is, A collection unit for collecting image data of the surface of a pressure vessel, An attention unit constructs a light irradiation angle attention mechanism, creates a feature map using images in a dataset, and generates a spatial attention map based on the spatial relationships of the feature map. Further providing is a system for identifying internal defects in a reactor pressure vessel, which includes an identification unit that improves the YOLOv5 model using the light irradiation angle attention mechanism and identifies surface defects in the pressure vessel using the improved YOLOv5.
[0053] The above functions may be implemented as software function units and, if sold or used as independent products, stored on a single computer-readable storage medium. Based on this understanding, the essential or prior art-contributing portion or part of the technical solution of this application may be embodied in the form of a software product, which is stored on a storage medium and includes several instructions for causing a computer device (which may be a personal computer, server, or network device, etc.) to perform all or part of the steps of the methods described in each embodiment of this application. On the other hand, the above storage medium includes various media capable of storing program code, such as USB memory, removable hard disks, read-only memory (ROM), random access memory (RAM), magnetic disks, and optical disks.
[0054] For example, logic and / or steps shown in a flowchart or otherwise described herein, which can be considered as a fixed sequence list of executable instructions for realizing a logical function, may be specifically implemented on any computer-readable medium for use with or in combination with instruction execution systems, devices, or equipment (e.g., computer-based systems, systems including processors, or other systems that can fetch instructions from instruction execution systems, devices, or equipment and execute those instructions). In this specification, “computer-readable medium” may be any device capable of storing, communicating, propagating, or transmitting programs for or for use with such instruction execution systems, devices, or equipment.
[0055] More specific examples (but not exhaustive) of computer-readable media include electrical connections with one or more wires (electronic devices), portable computer disk cartridges (magnetic devices), random access memory (RAM), read-only memory (ROM), erasable and editable read-only memory (EPROM or flash memory), optical fiber devices, and portable optical disc read-only memory (CDROM). Computer-readable media may also be paper or other suitable medium on which a program can be printed, for example, by optically scanning paper or other media, then editing, interpreting, or otherwise processing it in a suitable manner, thereby electronically acquiring the program and subsequently storing it in computer memory.
[0056] It is understood that each part of this application may be implemented by hardware, software, firmware, or a combination thereof. In the embodiments described above, a plurality of steps or methods may be implemented by software or firmware stored in memory and executed by an appropriate instruction execution system. For example, if implemented by hardware, as in other embodiments, it may be implemented using any or a combination of technologies known in the art, such as discrete logic circuits having logic gate circuits for implementing logic functions for data signals, special-purpose integrated circuits having appropriate combinational logic gate circuits, programmable gate arrays (PGAs), field-programmable gate arrays (FPGAs), etc.
[0057] Example 2 The following is an embodiment of the present application, providing a method and system for identifying internal defects in a reactor pressure vessel, a computer device, and a computer-readable storage medium. To verify the beneficial effects of the present application, scientific demonstration will be conducted through economic effect calculations and simulation experiments.
[0058] The experiment aims to verify the effectiveness of detecting surface defects in pressure vessels using an improved YOLOv5 model and a light irradiation angle attention mechanism. The objective of the experiment is to demonstrate that this method is superior to conventional defect detection techniques in terms of detection accuracy, light irradiation adaptability, and processing speed. The experimental setup involves performing defect detection using a standard pressure vessel image dataset under various light irradiation conditions. This image dataset includes images of defective and non-defective pressure vessels, and defects include, but are not limited to, cracks, rust, and dents.
[0059] In the experiment, image preprocessing, including simulation of the light illumination angle, is performed first, and the robustness of the model is tested by simulating variations in the light illumination angle within the image. To optimize the identification of defective regions, an improved YOLOv5 model is used that integrates a light illumination angle attention mechanism that can adjust attention weights according to the light illumination angle within the image.
[0060] In the experiment, each image was resized to a predetermined size and normalized to meet the model's input requirements. Then, a convolutional neural network was used to extract features from the resized images, and a network structure containing multiple convolutional layers and a sigmoid activation function was used to predict the classification and position of each anchor box. The model's output includes the bounding box position and the confidence level of the defect category. These outputs are filtered by setting a confidence threshold, and a detection is considered valid only if the predicted confidence level exceeds 0.5. This is shown in detail in Table 1.
[0061] [Table 1]
[0062] The data demonstrates the performance of an improved YOLOv5 model in detecting surface defects in pressure vessels at various light irradiation angles. The data shows that defect detection accuracy reaches its peak (93.1%) as the light irradiation angle approaches vertical (90°). This demonstrates that the light irradiation angle attention mechanism effectively improves the model's performance under various light irradiation conditions. Furthermore, processing time also shows a gradual decrease with model optimization, falling from 0.35 seconds to 0.29 seconds, indicating improved computational efficiency of the model.
[0063] The average confidence score varies significantly with the light irradiation angle, reaching a maximum of 0.82. This further demonstrates the high confidence output of the model under ideal light irradiation conditions. Regarding defect types, the detection rates for cracks, rust, and dents all improve to different degrees with changes in the irradiation angle. At an irradiation angle of 90°, the detection rates for all three defects reach or approach 90%.
[0064] The effectiveness of the invention has been demonstrated in practical applications, highlighting advantages such as higher detection accuracy, faster processing speed, and superior performance under various light illumination conditions compared to prior art. These innovations provide strong evidence to support the commercialization and dissemination of this application.
[0065] Embodiments of the present application further provide a computer device comprising a memory and a processor, wherein a computer program is stored in the memory, and the processor, upon execution of the computer program, implements the steps of the method for identifying internal defects in a reactor pressure vessel.
[0066] In some optional embodiments, multiple processors and / or multiple buses may be used along with multiple memories, as needed. Similarly, multiple computer devices may be connected, each providing a portion of the required operation (e.g., as a server array, a group of blade servers, or a multiprocessor system).
[0067] The processor may be a central processing unit, a network processor, or a combination thereof. The processor may further include hardware chips. The hardware chips may be special-purpose integrated circuits, programmable logic devices, or a combination thereof. The programmable logic devices may be complex programmable logic devices, field-programmable logic gate arrays, general-purpose array logic, or any combination thereof.
[0068] The memory stores instructions that can be executed by at least one processor, which in turn causes the at least one processor to execute the method for identifying internal defects in a reactor pressure vessel as described in the above embodiment.
[0069] The memory may include a program storage area and a data storage area, the program storage area being capable of storing an operating system and application programs required for at least one function, and the data storage area being capable of storing data created in accordance with the use of the computer equipment, etc. Furthermore, the memory may include high-speed random-access memory and non-temporary memory such as at least one magnetic disk memory device, flash memory device, or other non-temporary solid-state memory device. In some arbitrary embodiments, the memory may include memory located remotely from the processor, and these remote memories may be connected to the computer equipment via a network. Examples of the above-mentioned networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.
[0070] The memory may include volatile memory, such as random access memory. The memory may also include non-volatile memory, such as flash memory, hard disks, or solid-state drives. Furthermore, the memory may include a combination of the above types of memory.
[0071] The computer equipment further includes input and output devices. The processor, memory, input devices, and output devices may be connected by a bus or other means.
[0072] An input device can receive input numerical or character information and generate key signal inputs relating to user settings and function control of the computer equipment, and may include, for example, a touchscreen, keypad, mouse, trackpad, touchpad, pointing lever, one or more mouse buttons, trackball, joystick, etc. An output device may include a display device, auxiliary lighting device (e.g., LED), haptic feedback device (e.g., vibration motor), etc. The above-mentioned display devices include, but are not limited to, liquid crystal displays, light-emitting diodes, displays, and plasma displays. In some arbitrary embodiments, the display device may be a touchscreen.
[0073] The computer device further includes a communication interface for the computer device to communicate with other devices or communication networks.
[0074] Embodiments of this application further provide computer-readable storage media, and the methods described herein may be implemented in hardware, firmware, or as computer code that can be recorded on a storage medium or downloaded over a network, originally stored on a remote or non-temporary machine-readable storage medium, and also stored on a local storage medium, thereby enabling the methods described herein to be processed by such software stored on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware.
[0075] The storage medium may be a magnetic disk, optical disk, read-only memory, random-access memory, flash memory, hard disk, or solid-state drive. Furthermore, the storage medium may further include combinations of the above types of memory. A computer, processor, microprocessor, controller, or programmable hardware includes a storage component capable of storing or receiving software or computer code, and when the software or computer code is accessed and executed by the computer, processor, or hardware, the methods shown in the above embodiments can be realized.
[0076] The above embodiments are used solely 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 above embodiments, those skilled in the art should understand that it is still possible to modify the technical solutions described in each of the above embodiments or to replace some of their technical features with equivalent ones. However, these modifications or substitutions will not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of each embodiment of this application.
[0077] The above embodiments are used solely to illustrate and not limit the technical solutions of the present application. While the present 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 the present application without departing from the spirit and scope of the technical solutions, and all such modifications should be included within the claims of the present application.
Claims
1. A step of collecting image data of the surface of a pressure vessel, The steps include constructing a light irradiation angle attention mechanism, creating a feature map using images in the dataset, and generating a spatial attention map based on the spatial relationships of the feature map, A method for identifying internal defects in a reactor pressure vessel, comprising the steps of: improving the YOLOv5 model using the light irradiation angle attention mechanism, and identifying surface defects in the pressure vessel using the improved YOLOv5.
2. The aforementioned image data includes image specification data and image content data recorded after image acquisition is complete and the images have been preprocessed. The aforementioned image specification data includes the resolution and color depth of the surface image of each pressure vessel. The method for identifying internal defects in a reactor pressure vessel according to claim 1, characterized in that the image content data includes acquiring surface images of the pressure vessel at each sampling node based on a preset image collection frequency.
3. The aforementioned preprocessing involves decomposing the image into various layers using a Gaussian pyramid and applying different degrees of light illumination compensation to each layer, [Math 1] Here, I_scale[k] represents the image processed with the k-th layer of the Gaussian pyramid, and Gauss(I) represents the result of applying Gaussian filtering to the original image I. [Math 2] This represents downsampling the image k times, α_k represents the hierarchical light exposure compensation parameter, and γ_k represents the hierarchical parameter for adjusting contrast. Applying CLAHE to each layer after multi-scale processing enhances local features at all scales, [Math 3] This involves reconstructing using the Laplacian pyramid, combining features enhanced at all scales, and applying high-pass filtering to highlight high-frequency details. [Math 4] [Math 5] Here, [Math 6] 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 combining all layers by Laplacian pyramid processing, Laplace represents the Laplacian pyramid operation, used to extract high-frequency details from the enhanced images of each layer, I_inv represents the light-invariant feature image extracted from I_lap, HighPass represents the high-pass filter for enhancing the high-frequency portion in the image, and Mean(I_lap) represents the local mean filtering performed on the I_lap image. This involves extracting direction-sensing texture features using a Gabor filter. [Number 7] The method for identifying internal defects in a reactor pressure vessel according to claim 2, wherein I_gabor represents an image processed by Gabor filtering and is used to extract direction-sensing texture features, θ represents a direction variable, and Θ represents the direction set of the Gabor filter.
4. The aforementioned light irradiation angle attention mechanism takes the image I_gabor, after the direction-sensing texture features have been extracted, as input and extracts a feature map from the image using a convolution operation, which can be expressed as follows: [Number 8] Here, I represents the input image, N represents the number of convolutional kernels, w_i represents the weight of the i-th convolutional kernel, K_i represents the i-th convolutional kernel, and F(I) represents the feature map response. This involves using a distance matrix to represent the spatial relationship between the positions of each pixel in an image. [Number 9] Here, x and y represent two different pixel positions in the image, and σ represents the spatial distance attenuation parameter. The spatial attention map is generated by combining the encoding of feature maps, spatial relationships, and light irradiation angles, [Number 10] The method for identifying internal defects in a reactor pressure vessel according to claim 3, wherein F(I)_xi represents the response of the feature map at position x, F(I)_yi represents the response of the feature map at position y, M represents the dimensionality of the feature map, i represents the index of the feature map, A(x,y) represents a spatial attention map with a range of [0,1] and represents the attention weights at positions x and y, L(θ) = cos(θ) where θ represents the angle between the light irradiation and the image plane, and S(x,y) represents a spatial relationship with a range of [0,1] and represents the spatial similarity between positions x and y.
5. The aforementioned light irradiation angle attention mechanism adjusts the pixel values of the original image using attention map A(x,y), and for each pixel x in the image, it adjusts the other pixels y related to x. 1 This further includes adjusting the pixel values of x according to the weights of, [Math 11] The method for identifying internal defects in a reactor pressure vessel according to claim 4, characterized in that, here, 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, and I(x) represents the original pixel value at position x.
6. The improved YOLOv5 obtains an adjusted image I_input by adjusting each pixel, uses the trained YOLOv5 to identify I_input as input to YOLOv5, and outputs the probability of the identified bounding box and defect category. This includes: indicating the location of a defect in an image as a bounding box, setting a confidence threshold of 0.5, detecting the confidence fraction of each bounding box, discarding bounding boxes with a confidence level lower than the confidence threshold to obtain the defect location, and selecting the maximum value among the probabilities of the defect category to determine the classification of the defect location. [Math 12] The method for identifying internal defects in a reactor pressure vessel according to claim 5, wherein I_input represents an input image, CNN represents a convolutional neural network which extracts image features to predict the classification and position of each anchor box, and σ represents a sigmoid activation function which is used to convert the output to a more appropriate range to obtain a confidence score between 0 and 1.
7. The step of identifying surface defects in a pressure vessel involves visualizing the defect location and its classification on the original image, and displaying the confidence level and the probability of classification prediction in the edge box. A method for identifying internal defects in a reactor pressure vessel according to claim 6, comprising: manually reviewing visualized result images and continuously training YOLOv5 by placing the manually modified result images into a training set.
8. A system for identifying internal defects in a reactor pressure vessel using the method according to any one of claims 1 to 7, A collection unit for collecting image data of the surface of a pressure vessel, An attention unit constructs a light irradiation angle attention mechanism, creates a feature map using images in a dataset, and generates a spatial attention map based on the spatial relationships of the feature map. An identification system characterized by including an identification unit that improves the YOLOv5 model using the light irradiation angle attention mechanism and identifies surface defects in a pressure vessel using the improved YOLOv5.
9. A computer device comprising memory and a processor, wherein a computer program is stored in the memory, and the processor, when executing the computer program, realizes a step according to any one of claims 1 to 7.
10. A computer-readable storage medium in which a computer program is stored, wherein the computer program, when executed by a processor, realizes a step according to any one of claims 1 to 7.