Electrical equipment ultraviolet imaging automatic detection method and system based on diffusion model
Through the automatic detection method of ultraviolet imaging of electrical equipment based on diffusion model, the problems of traditional detection methods being susceptible to environmental interference and difficult to detect are solved, and efficient and accurate abnormal discharge detection and positioning are achieved, providing reliable technical support for the safe operation of electrical equipment.
Patent Information
- Application Number
- CN202411662870.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-20
- Publication Date
- 2025-03-14
AI Technical Summary
Traditional electrical equipment detection methods are susceptible to environmental interference, are difficult to detect and position, and cannot quickly and automatically identify discharge traces.
The automatic detection method of ultraviolet imaging of electrical equipment based on diffusion model is adopted. By designing an abnormality detection framework, including three stages: training model, fine-tuning model and inference model, efficient and accurate abnormal discharge detection and positioning are achieved.
It realizes efficient and accurate abnormal discharge detection and positioning, providing strong guarantees for the safe operation of electrical equipment.
Smart Images

Figure CN119624880A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of online monitoring of electric power metering, and in particular to an automatic detection method and system for ultraviolet imaging of electrical equipment based on a diffusion model. Background Art
[0002] With the continuous development of power systems, the operational safety and reliability of electrical equipment are particularly important. External insulation discharge of electrical equipment is one of the key factors affecting its safe operation. If it is not discovered and handled in time, it may cause equipment failure or even cause a large-scale power accident. Although the traditional detection method of ultrasonic partial discharge detection has been widely used, it is susceptible to environmental interference, difficult to detect, and difficult to locate.
[0003] Optical imaging is the most intuitive technical means to view discharge characteristics. Traditional ultraviolet imagers based on photon imaging judge the severity of discharge by the number of imaging spots, but cannot view discharge traces. Multi-layer photosensitivity-enhanced imaging can see discharge traces, but since the discharge process is extremely short, it is impossible to quickly and automatically identify discharge traces in complex backgrounds. Summary of the invention
[0004] In order to solve the shortcomings of the prior art, the present invention provides an automatic detection method and system for ultraviolet imaging of electrical equipment based on a diffusion model. By designing an abnormality detection framework, including three stages: training model, fine-tuning model and inference model, efficient and accurate abnormal discharge detection and positioning can be achieved, providing a strong guarantee for the safe operation of electrical equipment.
[0005] The present invention adopts the following technical solution.
[0006] A first aspect of the present invention provides an automatic detection method of ultraviolet imaging of electrical equipment based on a diffusion model, comprising the following steps:
[0007] For the electrical equipment to be tested, collect ultraviolet imaging image data under various normal scenes as the original input image x;
[0008] Noise the original input image x to obtain a noisy image, add the noisy image into the training set, and use the training set to train the diffusion model;
[0009] Collect ultraviolet images of the electrical equipment to be tested, input the diffusion model obtained through training, dynamically set the total time step T for denoising and reconstruction of the diffusion model, denoise and reconstruct the ultraviolet image to be tested, and generate a reconstructed denoised image;
[0010] The U-Net network is used to segment and locate abnormal areas of the reconstructed denoised image to identify abnormal areas of insulation discharge outside the electrical equipment.
[0011] Preferably, training the diffusion model comprises:
[0012] The original input image x is diffused into a series of noisy images, and the training set is constructed together with the target image y;
[0013] The U-Net network is trained with the constructed training set to learn the features of restoring the noise-free image from each noisy image.
[0014] Preferably, diffusing the obtained original input image x into a series of noisy images comprises:
[0015] According to the set total time step T, different levels of Gaussian noise are gradually added to the original input image x to form a series of noisy images x1, x2, ..., x t ,…,x T , forming a Markov chain, where x t represents the noisy image obtained after adding noise at the tth time step, t = 1, 2, ..., T, x T Represents a noisy image that is almost pure noise.
[0016] Preferably, training the U-Net network includes:
[0017] By comparing the reconstructed image with the target image y, the parameters of the U-Net network are continuously optimized, so that the U-Net network can learn the ability to restore the noise-containing noisy image to the noise-free normal image;
[0018] The score function is decomposed using the Bayesian formula to guide the noisy image x t Towards the noisy target image y t The direction evolution is expressed as follows:
[0019]
[0020] Where:
[0021] Indicates x t The gradient of t The direction of change of the logarithmic probability distribution is used to guide the model to update its state;
[0022] p θ represents the probability distribution controlled by the parameter θ, where θ represents the parameter of the model.
[0023] Preferably, during the U-Net network denoising process, a noisy image x with less noise is generated t-1 , expressed as the following formula (2):
[0024]
[0025] Where:
[0026] α t represents the decay coefficient at time step t;
[0027] σ t represents the noise intensity at time step t;
[0028] ∈ t represents the noise term generated at time step t;
[0029] represents the prediction noise at time step t through parameters θ.
[0030] Preferably, generating a reconstructed denoised image of the ultraviolet image to be measured comprises:
[0031] Perform noise evaluation on the input UV image to be tested to obtain the noise intensity σ;
[0032] Based on the obtained noise intensity σ, the total time step T of diffusion model denoising and reconstruction is dynamically set;
[0033] The input ultraviolet image to be tested is denoised with the obtained total time step T, and the denoising is terminated under the condition that the degree of similarity with the original image is satisfied.
[0034] Preferably, the dynamic total time step T is expressed by the following formula (3):
[0035]
[0036] Where:
[0037] α represents the sensitivity of the control step size change;
[0038] σ min represents the minimum noise threshold, σ max Indicates the maximum noise threshold.
[0039] Preferably, if the reconstructed denoised image x at the current time step t t The similarity S(x t ,x0) reaches the preset similarity threshold S threshold When , the denoising process is stopped and the reconstructed denoised image x is output. t As a final result, the similarity threshold S threshold It is expressed as the following formula (4):
[0040]
[0041] Where:
[0042] S max represents the maximum similarity target value,
[0043] β represents the speed at which the control threshold drops.
[0044] T represents the maximum step length,
[0045] t represents the current step number.
[0046] Preferably, the ultraviolet imaging automatic detection method further comprises: post-processing the segmented image and extracting contours to identify the boundaries and contours of the abnormal area.
[0047] The second aspect of the present invention provides an electrical equipment ultraviolet imaging automatic detection system based on a diffusion model, which runs an electrical equipment ultraviolet imaging automatic detection method based on a diffusion model according to the first aspect, comprising:
[0048] Ultraviolet imager, used to collect ultraviolet images of electrical equipment in normal scenes and ultraviolet images to be tested;
[0049] A storage module, used for storing UV images and trained diffusion models;
[0050] A data processing module is used to call the diffusion model trained by ultraviolet images of electrical equipment in normal scenarios, and during monitoring, call the trained diffusion model to implement segmentation and positioning of abnormal areas based on the ultraviolet images to be tested;
[0051] A display device is used to display the UV image and the annotation results output by the diffusion model.
[0052] Compared with the prior art, the beneficial effects of the present invention include at least: the combination of the U-Net structure and the dynamic diffusion model makes the present invention more efficient and accurate in detecting and segmenting abnormal areas, providing reliable technical support for the safe monitoring and maintenance of electrical equipment. BRIEF DESCRIPTION OF THE DRAWINGS
[0053] Figure 1 A diagram of the overall network architecture provided according to an embodiment of the present invention;
[0054] Figure 2 Schematic diagram of the workflow of the method of the present invention. DETAILED DESCRIPTION
[0055] In order to make the purpose, technical scheme and advantages of the present invention clearer, the technical scheme of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. The described embodiments are only embodiments of a part of the present invention, not all embodiments. Based on the spirit of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work belong to the protection scope of the present invention.
[0056] Embodiment 1 of the present invention provides an automatic detection method of ultraviolet imaging of electrical equipment based on a diffusion model, comprising the following steps:
[0057] Step 1: For the electrical equipment to be tested, collect ultraviolet imaging image data under various normal scenes as the original input image x.
[0058] It can be understood that the UV imaging image data captured by the UV imager under normal scenes at the electrical equipment to be monitored is used as the original input image x. The UV imaging technology uses the radiation generated by UV photons during the discharge process to detect the discharge phenomenon, and has the advantages of being able to detect both during the day and at night without being interfered by background light. By processing the UV image, quantitative analysis of the discharge spot area and discharge intensity can be achieved.
[0059] Step 2: Add noise to the original input image x obtained in step 1 to obtain a noisy image, add the noisy image into the training set, and use the training set to train the diffusion model.
[0060] The diffusion model first gradually adds noise to the original image to a state close to pure noise, and then gradually removes noise through the inverse process to restore the image.
[0061] During the training phase, the input image undergoes a diffusion process to generate images with different noise levels, which are then input into the U-Net network for denoising and reconstruction to generate a noise-free reconstructed image.
[0062] The training of the dynamic diffusion model aims to enable the model to learn how to denoise and reconstruct normal images at different noise levels. By gradually adjusting the noise level and controlling the denoising step size, the model can adapt to various complex scenes of ultraviolet imaging.
[0063] Preferably, but not limiting, step 2 comprises:
[0064] Step 2.1: Use the diffusion model to diffuse the original input image x obtained in step 1 into a series of noisy images and construct a training set together with the target image y.
[0065] Further preferably but not restrictively, according to the set total time step T, different levels of Gaussian noise are gradually added to the original input image x to form a series of noisy images x1, x2, ..., x t ,…,x T , forming a Markov chain, where x t represents the noisy image obtained after adding noise at the tth time step, t = 1, 2, ..., T, x T Represents a noisy image that is almost pure noise.
[0066] The UV imaging image data in a normal scene without noise is used as the target image y, and then the noisy image and the target image are used to construct a training set.
[0067] It can be understood that the original input image x obtained under the condition of no noise or acceptable noise can be used as the target image y, and different levels of noise are gradually added to each ultraviolet imaging image data under normal scenes to form a series of noisy images, which simulates the noise situation in the real environment.
[0068] Step 2.2: Using the training set constructed in step 2.1, train the U-Net network to learn the features of restoring the noise-free image from each noisy image.
[0069] Further preferably but not limiting, the noisy images x containing different noise levels are t Input the U-Net network for denoising and reconstruction to generate a noise-free reconstructed image x0.
[0070] It is worth noting that the U-Net network has a convolutional neural network structure. The present invention proposes the application of the conditional diffusion model in ultraviolet imaging, and introduces a control item in the process of unconditional generation. The key is to introduce conditional information in the generation process to control the characteristics of the generated data. The U-Net network learns how to recover the original data from the noise through step-by-step denoising, and generates a noise-free normal image close to the original input image guided by the conditional information (i.e., the input ultraviolet image). That is, by comparing the reconstructed image with the target image y, the parameters of the U-Net network are continuously optimized, so that the U-Net network can learn the ability to restore the noise-containing noisy image to the noise-free normal image.
[0071] Furthermore, the denoising process is guided by introducing information of the target image y: if the original input image x is similar to the target image y, then add the same information as the denoised image x to the target image y. t The same noise will make the noisy image x t Close to the noisy target image y t , and use the Bayesian formula to decompose the score function to guide the noisy image x t Towards the noisy target image y t This ensures that the generated image gradually approaches the target image at each step. The deviation correction is decomposed according to the Bayesian rule and expressed as the following formula (1):
[0072]
[0073] Where:
[0074] Indicates x t The gradient of x. In the context of diffusion models, this gradient usually refers to the gradient relative to x. tThe direction of change of the logarithmic probability distribution of , which is used to guide the model to update its state to maximize the transition probability towards the target distribution;
[0075] p θ represents a probability distribution controlled by parameters θ. In the diffusion model, θ represents the parameters of the model, which control the distribution p θ behavior, this distribution p θ (x t ∣y t ) describes the t When x is observed t , which is a key part of the diffusion model in which the target distribution is gradually approached.
[0076] Furthermore, in order to guide the generation process by introducing the target image y, we can As the noisy image x in each step of denoising t and the noisy target image y t By calculating the noise-added target image y t And the noisy image x t The difference t -x t , we can get the deviation and adjust the noise term where α t The influence of the control condition is then used to make new predictions using the adjusted noise term And generate a noisy image x with less noise through the denoising process t-1 , expressed as the following formula (2):
[0077]
[0078] Where:
[0079] α t Represents the attenuation coefficient of time step t, which is used to control the weight in the denoising process, α t-1 represents the attenuation coefficient at time step t-1;
[0080] σ t Represents the noise intensity at time step t, indicating the influence of the noise term at this step;
[0081] ∈ t represents the noise term generated at time step t, which is used to introduce randomness;
[0082] represents the prediction noise at time step t through parameters θ.
[0083] During the training process, by comparing the reconstructed image with the target image, calculating the loss function, and continuously optimizing the parameters of the U-Net network, the model can gradually learn to denoise and reconstruct images at different noise levels. After the training is completed, in the subsequent steps, the model can automatically adjust the denoising step size according to the noise intensity of the input image to obtain the best denoising effect. In other words, after the training is completed, the diffusion model containing the U-Net network has the ability to detect and denoise based on ultraviolet imaging image data, and can be used for anomaly detection in the actual reasoning stage of power equipment safety monitoring.
[0084] It is understandable that data augmentation techniques (such as rotation, scaling, flipping, etc.) can increase the diversity of image samples during training, thereby improving the generalization ability of the model. Multi-scale segmentation technology helps capture abnormal areas at different scales of the image and enhances the model's ability to process details. In addition, the introduction of the attention mechanism (CBAM module) can guide the network to focus on abnormal areas in the image and improve the ability to identify important areas. Through these technical optimizations, the U-Net network can more accurately mark the location and contours of abnormal areas, further improving the accuracy of image segmentation.
[0085] Step 3: If Figure 2 As shown, an ultraviolet image of the electrical equipment to be tested is collected, and the diffusion model obtained by training in step 2 is input to denoise and reconstruct the ultraviolet image to be tested to generate a reconstructed denoised image.
[0086] Preferably but not limiting, step 3 specifically comprises:
[0087] Step 3.1: Perform noise evaluation on the input UV image to obtain the noise intensity σ.
[0088] Specifically, before the denoising process begins, the noise intensity of the input UV image to be tested is evaluated to determine the noise level, and the noise intensity of the input UV image to be tested is represented by the noise intensity σ. In the subsequent steps, according to the evaluation results, a suitable dynamic maximum step size is selected to control the number of iterations of the subsequent denoising process.
[0089] Further preferably but not restrictively, the noise of the input image is evaluated based on the mean square error MSE, and an image of a normal scene is selected as a reference image. Let the input image be I(i) and the reference image be I(i) ref , the formula of mean square error (3) is as follows:
[0090]
[0091] Where:
[0092] N is the number of pixels in the image,
[0093] I(i) and I(i)ref Represent the intensity value of the i-th pixel of the input image and the reference image respectively;
[0094] The MSE value is converted into an estimated value of the noise intensity σ to obtain the noise intensity σ of the input image.
[0095] Step 3.2: Based on the noise intensity σ obtained in step 3.1, dynamically set the total time step T for diffusion model denoising and reconstruction.
[0096] It is understandable that during the diffusion process, the system selects the appropriate step size for denoising and reconstruction based on the results of noise evaluation. For high-noise images, the model will set a larger number of steps to gradually remove noise; for low-noise images, the number of steps is smaller to improve efficiency.
[0097] Further preferably but not limiting, in the dynamic diffusion model, the calculation of the total time step T can be dynamically adjusted based on the noise intensity σ of the input image to optimize the efficiency and effect of the denoising process, including: setting the minimum step T min and the maximum step length T max To constrain a range.
[0098] When the noise intensity is low, the step size is close to the minimum step size T min , to reduce computational overhead; when the noise intensity is high, the step size is close to the maximum step size T max , to ensure a more adequate denoising effect. In this way, the model can automatically adjust within the preset step size range according to the noise level, avoiding the compromise between efficiency and effect brought about by a fixed step size under different noise conditions.
[0099] Specifically, the dynamic total time step T is expressed as follows:
[0100]
[0101] Where:
[0102] α represents the sensitivity of the control step size change;
[0103] σ min represents the minimum noise threshold, σ max Indicates the maximum noise threshold.
[0104] This formula makes it possible to min and the highest threshold σ max When the dynamic total time step T changes between , it is also adjusted accordingly. Through this dynamic adjustment method, the denoising process is faster in low noise and more accurate in high noise, ensuring the optimal performance of the model under different noise conditions.
[0105] Step 3.3: De-noise the input UV image to be tested with the total time step T obtained in step 3.2, and terminate the denoising process when the similarity with the original image is satisfied.
[0106] Further preferably but not limitingly, the dynamic diffusion model generates a reconstructed denoised image x at each time step t t , and compare the similarity with the target image y.
[0107] According to the set similarity threshold, when reconstructing the denoised image x t When the similarity with the original image x0 reaches or exceeds the threshold, the denoising process ends and the current reconstructed denoised image x is output. t As the final denoising result. Specifically, it can be decided whether to stop the iteration early to optimize the denoising efficiency and ensure the output image quality. The similarity can be expressed as the inverse value of the structural similarity index (SSIM). If the reconstructed denoised image x at the current time step t t The similarity S(x t ,x0) reaches the preset similarity threshold S threshold When , the denoising process is stopped and the reconstructed denoised image x is output. t As the final result.
[0108] Further preferably but not restrictively, in order to achieve dynamic control, the similarity threshold S threshold It can be adjusted gradually with iterations and dynamically set using an asymptotic convergence formula, as shown in the following formula (5):
[0109]
[0110] Where:
[0111] S max represents the maximum similarity target value,
[0112] β represents the speed at which the control threshold drops.
[0113] T represents the maximum step length,
[0114] t represents the current step number.
[0115] Through formula (5), the dynamic diffusion model can stop denoising in time when a sufficiently high similarity is reached, thereby reducing the amount of calculation and ensuring high-quality reconstruction of the image.
[0116] Step 4: Use the U-Net network to segment and locate the abnormal area of the reconstructed denoised image obtained in step 3, and identify the abnormal area of insulation discharge outside the electrical equipment. The segmented results are directly used for detection and positioning, which improves the accuracy and reliability of detection.
[0117] It is worth noting that the U-Net network is used to segment the input reconstructed denoised image in order to mark abnormal areas and contours in the image.
[0118] Specifically, the reconstructed denoised image generated in step 3 and the original input image are input into the U-Net network. The U-Net network processes the image through its typical encoder-decoder architecture. The encoder part extracts low-level features of the image through a series of convolution and pooling operations and gradually reduces the spatial resolution; at the same time, the decoder part gradually restores the spatial resolution of the image through upsampling operations. The encoder and decoder use skip connections to fuse low-level features with high-level features to ensure effective recovery of detail information.
[0119] At the output layer of U-Net, after the convolution operation, a single-channel segmentation image is output, which represents whether each pixel is an abnormal area or a normal area. In order to obtain the final binary segmentation image, the Sigmoid activation function is used to map the output of the network to the [0,1] interval, and then through thresholding, the area with a probability value greater than the threshold is marked as an abnormal area.
[0120] It can be understood that the encoder part (downsampling path) of U-Net extracts low-level features of the image through multi-layer convolution and pooling operations, and gradually reduces the image size to capture global information. This can effectively distinguish the features of normal and abnormal areas and form a robust segmentation basis.
[0121] The core of U-Net's segmentation process lies in skip connections and upsampling. Skip connections merge the features in the downsampling path with the features in the upsampling path, so that high-resolution details can be retained in the process of restoring the image size. The upsampling path gradually restores the image size through a series of convolution and deconvolution operations, so that the segmented image output by the network retains high-resolution information, while clearly marking the location and contour of the abnormal area. The segmentation output image is binary or multi-classified, and intuitively shows the abnormal area of insulation discharge outside the electrical equipment.
[0122] Further preferably but not restrictively, the ultraviolet imaging automatic detection method further includes step 5: post-processing the image segmented in step 4, extracting contours to identify the boundaries and contours of the abnormal area, and further accurately marking the abnormal area.
[0123] The present invention performs post-processing operations after the segmentation output, including small area removal and morphological processing (such as expansion and corrosion) to remove artifacts and isolated noise points. Through these post-processing steps, the segmented image becomes clearer and more accurate, effectively reducing errors and making the segmentation results more stable.
[0124] Specifically, it includes thresholding, contour extraction, and morphological operations. Thresholding converts the segmented image into a binary image by setting an appropriate threshold value, and clearly distinguishes the abnormal area from the normal area. Contour extraction extracts the boundaries of the abnormal area from the binary image through an algorithm (`findContours`), helping to more accurately locate the shape and position of the abnormal area. Morphological operations (erosion, expansion, opening and closing operations) can further optimize the segmentation results, remove noise or fill gaps left over from the segmentation process, and improve the quality of the image and the smoothness of the boundaries. In addition, connected region analysis is used to identify and mark abnormal areas in the image, exclude small artifacts or noise areas, and remove unimportant small areas by setting the minimum area threshold. In order to improve the segmentation accuracy, the extracted boundaries are smoothed to reduce the jagged effect and make the boundaries of the abnormal areas more natural and smooth.
[0125] It is worth noting that in the present invention, the combination of the U-Net structure and the dynamic diffusion model makes the present invention more efficient and accurate in detecting and segmenting abnormal areas, providing reliable technical support for the safety monitoring and maintenance of electrical equipment. Specifically, in view of the limitations of supervised deep learning methods in dealing with anomaly detection tasks due to the scarcity of abnormal samples, the unsupervised learning method provided by the present invention demonstrates its unique advantages in anomaly detection, especially in the absence of abnormal samples.
[0126] The present invention uses the diffusion model as a generation model and introduces the diffusion model into the external insulation discharge detection of electrical equipment. By simulating the diffusion process of data, it can generate high-quality images and show excellent performance in tasks such as image enhancement, denoising and super-resolution.
[0127] Embodiment 2 of the present invention provides an electrical equipment ultraviolet imaging automatic detection system based on a diffusion model, and runs an electrical equipment ultraviolet imaging automatic detection method based on a diffusion model according to embodiment 1, including:
[0128] Ultraviolet imager, used to collect ultraviolet images of electrical equipment in normal scenes and ultraviolet images to be tested;
[0129] A storage module, used for storing UV images and trained diffusion models;
[0130] A data processing module is used to call the diffusion model trained by ultraviolet images of electrical equipment in normal scenarios, and during monitoring, call the trained diffusion model to implement segmentation and positioning of abnormal areas based on the ultraviolet images to be tested;
[0131] A display device is used to display the UV image and the annotation results output by the diffusion model.
[0132] Embodiment 3 of the present invention provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor. When the computer program is loaded into the processor, an automatic detection method for electrical equipment ultraviolet imaging based on a diffusion model according to Embodiment 1 is implemented.
[0133] Embodiment 4 of the present invention provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method for automatic detection of electrical equipment by ultraviolet imaging based on a diffusion model according to Embodiment 1 is implemented.
[0134] The present disclosure may be a system, a method and / or a computer program product. The computer program product may include a computer-readable storage medium carrying computer-readable program instructions for causing a processor to implement various aspects of the present disclosure.
[0135] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the above embodiments, ordinary technicians in the relevant field should understand that the specific implementation methods of the present invention can still be modified or replaced by equivalents, and any modifications or equivalent replacements that do not depart from the spirit and scope of the present invention should be covered within the scope of protection of the claims of the present invention.
Claims
1. A method for automatic detection of electrical equipment by ultraviolet imaging based on a diffusion model, characterized in that: The following steps are involved: For the electrical equipment to be tested, collect ultraviolet imaging image data under various normal scenes as the original input image x; Add noise to the original input image x to obtain a noisy image, add the noisy image into the training set, and use the training set to train the diffusion model; Collect ultraviolet images of the electrical equipment to be tested, input the diffusion model obtained through training, dynamically set the total time step T for denoising and reconstruction of the diffusion model, denoise and reconstruct the ultraviolet image to be tested, and generate a reconstructed denoised image; The U-Net network is used to segment and locate abnormal areas of the reconstructed denoised image to identify abnormal areas of insulation discharge outside the electrical equipment.
2. The method for automatic detection of electrical equipment by ultraviolet imaging based on a diffusion model according to claim 1 is characterized in that: Training the diffusion model includes: The original input image x is diffused into a series of noisy images, and the training set is constructed together with the target image y; The U-Net network is trained with the constructed training set to learn the features of restoring the noise-free image from each noisy image.
3. The method for automatic detection of electrical equipment by ultraviolet imaging based on a diffusion model according to claim 2 is characterized in that: The original input image x is diffused into a series of noisy images including: According to the set total time step T, different levels of Gaussian noise are gradually added to the original input image x to form a series of noisy images x1, x2, ..., x t ,…,x T , forming a Markov chain, where x t represents the noisy image obtained after adding noise at the tth time step, t = 1, 2, ..., T, x T Represents a noisy image that is almost pure noise.
4. The method for automatic detection of electrical equipment by ultraviolet imaging based on a diffusion model according to claim 3 is characterized in that: Training the U-Net network involves: By comparing the reconstructed image with the target image y, the parameters of the U-Net network are continuously optimized, so that the U-Net network can learn the ability to restore the noise-containing noisy image to the noise-free normal image; The score function is decomposed using the Bayesian formula to guide the noisy image x t Towards the noisy target image y t The direction evolution is expressed as follows: Where: Indicates x t The gradient of t The direction of change of the logarithmic probability distribution is used to guide the model to update its state; p θ represents the probability distribution controlled by the parameter θ, where θ represents the parameter of the model.
5. The method for automatic detection of electrical equipment by ultraviolet imaging based on a diffusion model according to claim 4 is characterized in that: During the U-Net network denoising process, a noisy image x with less noise is generated t-1 , expressed as the following formula (2): Where: α t represents the decay coefficient at time step t; σ t represents the noise intensity at time step t; ∈ t represents the noise term generated at time step t; represents the prediction noise at time step t through parameters θ.
6. An automatic detection method of electrical equipment by ultraviolet imaging based on a diffusion model according to any one of claims 1 to 5, characterized in that: Generating a reconstructed denoised image of the UV image to be tested includes: Perform noise evaluation on the input UV image to be tested to obtain the noise intensity σ; Based on the obtained noise intensity σ, the total time step T of diffusion model denoising and reconstruction is dynamically set; The input ultraviolet image to be tested is denoised with the obtained total time step T, and the denoising is terminated under the condition that the degree of similarity with the original image is satisfied.
7. The method for automatic detection of electrical equipment by ultraviolet imaging based on a diffusion model according to claim 6 is characterized in that: The dynamic total time step T is expressed as follows: Where: α represents the sensitivity of the control step size change; σ min represents the minimum noise threshold, σ max Indicates the maximum noise threshold.
8. The method for automatic detection of electrical equipment by ultraviolet imaging based on a diffusion model according to claim 7 is characterized in that: If the reconstructed denoised image x at the current time step t t The similarity S(x t ,x0) reaches the preset similarity threshold S threshold When , the denoising process is stopped and the reconstructed denoised image x is output. t As a final result, the similarity threshold S threshold It is expressed as the following formula (4): Where: S max represents the maximum similarity target value, β represents the speed at which the control threshold drops. T represents the maximum step length, t represents the current step number.
9. The method for automatic detection of electrical equipment by ultraviolet imaging based on a diffusion model according to claim 8, characterized in that: The ultraviolet imaging automatic detection method also includes: post-processing the segmented image and extracting contours to identify the boundaries and contours of the abnormal area.
10. An electrical equipment ultraviolet imaging automatic detection system based on a diffusion model, running an electrical equipment ultraviolet imaging automatic detection method based on a diffusion model according to any one of claims 1 to 9, characterized in that: include: Ultraviolet imager, used to collect ultraviolet images of electrical equipment in normal scenes and ultraviolet images to be tested; A storage module, used for storing UV images and trained diffusion models; A data processing module is used to call the diffusion model trained by ultraviolet images of electrical equipment in normal scenarios, and during monitoring, call the trained diffusion model to implement segmentation and positioning of abnormal areas based on the ultraviolet images to be tested; A display device is used to display the UV image and the annotation results output by the diffusion model.
Citation Information
Cited By
Physical prior and frequency domain attention mixed denoising method and system for ultraviolet imaging
CN121660913A