Method and device for generating power transformation defect image
By generating defect images of substation equipment, the problem of insufficient number of defect samples of power equipment is solved, sample quality and model training efficiency are improved, and more efficient image recognition algorithm development is achieved.
Patent Information
- Application Number
- CN202411827440.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-12
- Publication Date
- 2025-05-30
AI Technical Summary
The number of defect samples of power equipment is insufficient and the distribution is uneven, resulting in poor model training results and low reliability of algorithms in complex scenarios.
By obtaining the contour lines of normal substation equipment, generating defect contour lines, and inputting the image of the defect substation equipment into the diffusion model for diffusion processing and noise reduction processing, the attention mechanism is used to embed the defect lines to generate defect images of substation equipment.
It solves problems such as low frequency of scarce samples, difficulty in collecting and single environment, improves the efficiency of sample collection and scarce samples acquisition, shortens the development cycle of image recognition model, and improves the accuracy of image recognition algorithms.
Smart Images

Figure CN120070304A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of image processing, and in particular, to a method and device for generating substation defect images. Background Art
[0002] Defects in power equipment are important causes leading to power system failures, which will cause serious economic losses and social hazards. In recent years, significant progress has been made in power equipment defect detection based on deep learning, but there are still some challenges. One of the more prominent problems is the insufficient number of power equipment defect samples and uneven distribution. The main reasons are as follows: 1) Power equipment usually operates in an environment of high voltage and high current. It is difficult to collect defect samples and there are certain safety risks. For example, when collecting data near high-voltage equipment, safety protection measures need to be taken to prevent electric shock accidents; 2) Some defects are of high criticality but occur infrequently, with insufficient sample numbers, which affects the training effect of the model; 3) The sample scenarios under different backgrounds and weather conditions are single, which affects the reliability of the algorithm in complex scenarios.
[0003] To solve the problem of insufficient power equipment defect samples, currently, multi-source methods of sample collection have been combined with artificial intelligence image generation technology to construct a more comprehensive defect feature sample library, and by simulating and amplifying samples under different backgrounds and weather conditions, the robustness of the algorithm is improved.
[0004] The Generative Adversarial Network (GAN) is a commonly used technology in the field of image generation in recent years. GAN consists of two networks, a generator and a discriminator, and learns to generate realistic images through adversarial training. However, there are problems such as the model being difficult to converge, requiring a large amount of data, and hundreds of images being needed for a single task. Summary of the Invention
[0005] In view of this, the present invention proposes a method and device for generating substation defect images, aiming to solve one or more of the technical problems mentioned in the above background art section.
[0006] In a first aspect, an embodiment of the present invention provides a method for generating substation defect images. The method includes: obtaining the contour line of a normal substation device; obtaining a defect contour line based on the contour line of the normal substation device; inputting a defective substation device image into a first diffusion model for diffusion processing and noise reduction processing, and using an attention mechanism to embed the defect contour line as guiding information into the noise reduction processing of the first diffusion model to generate a substation device defect image.
[0007] Further, the obtaining of the contour line of the normal substation equipment includes: obtaining an image of the normal substation equipment; identifying the equipment and components from the image of the normal substation equipment by using a normal component recognition model; and extracting the contour lines of the identified equipment and components by using an edge detection algorithm to obtain the contour line of the normal substation equipment.
[0008] Further, the normal component recognition model is obtained by training a CNN convolutional neural network with a sample set of images of normal substation equipment, wherein the sample of the image of the normal substation equipment is a sample of the image of the normal substation equipment with labeled equipment and components.
[0009] Further, based on the contour line of the normal substation equipment, obtaining a defect contour line includes: editing the contour line of the normal substation equipment to add defect prompt information to form a defect contour line.
[0010] Further, the first diffusion model is obtained in the following way in advance: obtaining a sample set of images of defective substation equipment; based on the sample set of images of defective substation equipment, performing diffusion processing on the sample images of defective substation equipment in the sample set of images of defective substation equipment by adding noise to obtain a complete noise data set of images of defective substation equipment; and training a U-net neural network with the complete noise data set of images of defective substation equipment and the sample set of images of defective substation equipment to obtain the first diffusion model.
[0011] Further, the obtaining of the sample set of images of defective substation equipment includes: obtaining a sample image of a defective substation equipment; labeling the equipment components and defective parts in the sample image of the defective substation equipment; and based on the labeled sample image of the defective substation equipment, extracting and integrating each defective feature in the labeled sample image of the defective substation equipment to form a feature vector as the sample set of images of defective substation equipment.
[0012] Further, the defective features include contour features, texture features, and color features. The extraction of the defective features includes: extracting the edge contour features in the sample image of the defective substation equipment by using an edge detection algorithm, extracting the texture features in the sample image of the defective substation equipment by using the gray-level co-occurrence matrix method, and extracting the color features in the sample image of the defective substation equipment by using color histogram analysis.
[0013] Further, the method further includes: on the basis of the generated image of the substation equipment defect, generating multiple scenarios based on a generative mask, generating the background part outside the defect image area in the image of the substation equipment defect by using a background generation model, and fusing the background part with the defect image area in the image of the substation equipment defect.
[0014] Further, the background generation model is obtained in advance in the following manner: acquiring normal substation equipment image samples with labeled devices and components; performing semantic segmentation on the normal substation equipment image samples with labeled devices and components to complete the regional division of the foreground and background in the normal substation equipment image samples with labeled devices and components, obtaining a background generation model sample set; training a second diffusion model with the background generation model sample set to obtain the background generation model.
[0015] Further, the method further includes: evaluating the authenticity of the generated substation equipment defect images based on expert evaluation.
[0016] In a second aspect, an embodiment of the present invention further provides a device for generating substation defect images, where the device includes: an acquisition unit configured to acquire the contour line of normal substation equipment; a processing unit configured to obtain a defect contour line based on the contour line of the normal substation equipment; a generation unit configured to input a defective substation equipment image into a first diffusion model for diffusion processing and noise reduction processing, and use an attention mechanism to embed the defect contour line as guiding information into the noise reduction processing of the first diffusion model to generate a substation equipment defect image.
[0017] Further, the acquisition unit is further configured to: acquire a normal substation equipment image; identify devices and components from the normal substation equipment image using a normal component recognition model; extract the contour lines of the identified devices and components using an edge detection algorithm to obtain the contour line of the normal substation equipment.
[0018] Further, the normal component recognition model is obtained by training a CNN convolutional neural network with a normal substation equipment image sample set, where the normal substation equipment image sample is a normal substation equipment image sample with labeled devices and components.
[0019] Further, the processing unit is further configured to: edit the contour line of the normal substation equipment to add defect prompt information to form a defect contour line.
[0020] Further, the first diffusion model is obtained in advance in the following manner: acquiring a defective substation equipment image sample set; based on the defective substation equipment image sample set, performing diffusion processing on the defective substation equipment image samples in the defective substation equipment image sample set by adding noise to obtain a defective substation equipment image complete noise data set; training a U-net neural network with the defective substation equipment image complete noise data set and the defective substation equipment image sample set to obtain the first diffusion model.
[0021] Further, the obtaining of the defective substation equipment image sample set includes: obtaining defective substation equipment image samples; annotating the equipment components and defective parts in the defective substation equipment image samples; based on the annotated defective substation equipment image samples, extracting and integrating various defective features in the annotated defective substation equipment image samples to form feature vectors as the defective substation equipment image sample set.
[0022] Further, the defective features include contour features, texture features, and color features. The extracting of the defective features includes: using an edge detection algorithm to extract the edge contour features in the defective substation equipment image samples, using the gray-level co-occurrence matrix method to extract the texture features in the defective substation equipment image samples, and using color histogram analysis to extract the color features in the defective substation equipment image samples.
[0023] Further, the device further includes a background unit for: based on the generated substation equipment defective images, generating multiple scenarios based on a generative mask, using a background generation model to generate the background part outside the defective image area in the substation equipment defective images, and fusing the background part with the defective image area in the substation equipment defective images.
[0024] Further, the background generation model is obtained in the following way in advance: obtaining normal substation equipment image samples with labeled equipment and components; semantically segmenting the normal substation equipment image samples with labeled equipment and components to complete the regional division of the foreground and background in the normal substation equipment image samples with labeled equipment and components, obtaining a background generation model sample set; training a second diffusion model with the background generation model sample set to obtain the background generation model.
[0025] Further, the device further includes an evaluation unit for: evaluating the authenticity of the generated substation equipment defective images based on expert evaluation.
[0026] In a third aspect, an embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the methods provided in the above embodiments are implemented.
[0027] In a fourth aspect, an embodiment of the present invention further provides an electronic device, including: a processor; a memory for storing executable instructions executable by the processor; the processor is configured to read the executable instructions from the memory and execute the instructions to implement the methods provided in the above embodiments.
[0028] The method and device for generating substation defect images provided by the embodiments of the present invention obtain the contour lines of normal substation equipment, obtain defect contour lines based on the contour lines of normal substation equipment, input the defect substation equipment images into a first diffusion model for diffusion processing and noise reduction processing, and use an attention mechanism to embed the defect contour lines as guiding information into the noise reduction processing of the first diffusion model to generate substation equipment defect images, solve problems such as low occurrence frequency, difficult collection, and single environment of scarce samples, create an efficient image generation sample augmentation ability, improve the efficiency of sample collection and acquisition of scarce samples, help shorten the R & D cycle of the image recognition model, and improve the accuracy of the image recognition algorithm. BRIEF DESCRIPTION OF THE DRAWINGS
[0029] Figure 1 FIG. shows an exemplary flowchart of a method for generating substation defect images according to an embodiment of the present invention; Figure 2 FIG. shows a schematic flowchart of a first diffusion model using an attention mechanism according to an embodiment of the present invention; Figure 3 FIG. shows a schematic structural diagram of a device for generating substation defect images according to an embodiment of the present invention. DETAILED DESCRIPTION
[0030] Now, exemplary embodiments of the present invention will be described with reference to the accompanying drawings. However, the present invention can be implemented in many different forms and is not limited to the embodiments described herein. These embodiments are provided to disclose the present invention in detail and completely, and to fully convey the scope of the present invention to those skilled in the art. The terms in the exemplary embodiments shown in the drawings are not limitations on the present invention. In the drawings, the same unit / element is denoted by the same reference numeral.
[0031] Unless otherwise specified, the terms (including scientific and technical terms) used herein have the ordinary meaning understood by those skilled in the art. In addition, it can be understood that the terms defined in a commonly used dictionary should be understood as having a meaning consistent with the context of their related fields, and should not be understood as idealized or overly formal meanings.
[0032] Figure 1 FIG. shows an exemplary flowchart of a method for generating substation defect images according to an embodiment of the present invention.
[0033] As Figure 1 shown, the method includes: Step S101: Obtain the contour lines of normal substation equipment.
[0034] Further, step S101 includes: Obtain the images of normal substation equipment; Use the normal component recognition model to identify devices and components from normal substation equipment images; Use the edge detection algorithm to extract the contour lines of the identified devices and components, obtaining the normal substation equipment contour lines.
[0035] Furthermore, the normal component recognition model is obtained by training a CNN convolutional neural network with a normal substation equipment image sample set. Among them, the normal substation equipment image samples are normal substation equipment images with labeled devices and components.
[0036] Specifically, collect normal substation inspection images from different substations, different equipment states, and different environmental conditions, and label the device and component areas to construct a normal substation equipment image sample set.
[0037] Specifically, construct a normal component recognition model. First, select a CNN convolutional neural network as the model architecture, and design network layers such as convolutional layers, pooling layers, and fully connected layers to extract image features and perform classification. Among them, use the ResNet pre-trained network as a feature extractor to improve the model performance.
[0038] Specifically, use the normal substation equipment image sample set to train the constructed normal component recognition model. First, define the loss function of the normal component recognition model. Use the cross-entropy loss function to measure the difference between the model prediction and the actual label of the normal component recognition model, and guide the training direction of the normal component recognition model. The cross-entropy loss function is defined as: Where y i is the true label, p i is the probability predicted by the model.
[0039] Secondly, select a model optimizer. Choose the Adam optimizer to adaptively adjust the learning rate and accelerate the convergence speed of the model. The update rule is expressed as: Where θ are the model parameters, is the learning rate, and are the estimated values of the first moment and the second moment respectively, is a very small constant.
[0040] After that, perform hyperparameter tuning on the model. Use the random search method to tune hyperparameters such as the learning rate, batch size, and regularization coefficient of the model to improve the model performance.
[0041] Finally, evaluate the optimized model using metrics such as accuracy, precision, and recall to ensure that the model can accurately identify and extract devices and corresponding components from normal inspection images.
[0042] Step S102: Based on the contour lines of normal substation equipment, obtain the defect contour lines.
[0043] Further, step S102 includes: Edit the contour lines of normal substation equipment to add defect prompt information to form defect contour lines.
[0044] Specifically, for different types of defects, different methods are used to edit the contour lines. For corrosion defects, based on the contour lines of normal substation equipment, a neural network is used to automatically generate the contours and textures of the corroded areas and add them to the parts of the normal equipment's contour lines where defects are likely to occur to form defect contour lines; among them, the neural network is pre-trained with the edge contour features and texture features extracted from the defect substation equipment image samples with labeled equipment components and defect parts. For deformation defects and abnormal oil level indication defects, the contour lines of normal substation equipment are stretched using image editing software at the parts where defects are likely to occur for guiding prompts to form defect contour lines.
[0045] Step S103: Input the defect substation equipment image into the first diffusion model for diffusion processing and noise reduction processing, and use the attention mechanism to embed the defect contour lines as guiding information into the noise reduction processing of the first diffusion model to generate substation equipment defect images.
[0046] Further, the first diffusion model is obtained in the following way in advance: Obtain a set of defect substation equipment image samples; Based on the set of defect substation equipment image samples, perform diffusion processing on the defect substation equipment image samples in the set by adding noise to obtain a complete noise dataset of defect substation equipment images; Use the complete noise dataset of defect substation equipment images and the set of defect substation equipment image samples to train a U-net neural network to obtain the first diffusion model.
[0047] Specifically, establish a defect image generation network based on the first diffusion model. Realize the denoising of the first diffusion model based on the extracted defect features, and embed guiding information such as contour lines into the model denoising process through the attention mechanism, so that the first diffusion model generates specified defect images according to the guiding information.
[0048] Specifically, Figure 2 shows a schematic flow diagram of the first diffusion model using the attention mechanism according to an embodiment of the present invention. As Figure 2As shown, a first diffusion model guided by contour lines is constructed, and the model architecture adopts a U-net network structure.
[0049] Specifically, train the first diffusion model. The diffusion process is achieved by adding noise, and the defective image samples are diffused into completely noisy images. In the reverse denoising process, the U-net neural network is trained using the noise change characteristics of the diffusion process and the defect characteristics extracted from the defective substation equipment image samples, enabling the model to generate defective images from completely noisy images.
[0050] Specifically, add guiding information to guide the model to generate specific defective images. By constructing a cross-attention network, the noise pattern in the reverse process of the first diffusion model is modified using the defective contour line information, enabling the model to generate defective equipment images according to the defective contour lines and realizing the embedding of guiding information.
[0051] Furthermore, obtain a set of defective substation equipment image samples, including: Obtain defective substation equipment image samples; Label the equipment components and defective parts in the defective substation equipment image samples; Based on the labeled defective substation equipment image samples, extract and integrate the defective features in the labeled defective substation equipment image samples to form feature vectors as the set of defective substation equipment image samples.
[0052] Furthermore, the defective features include contour features, texture features, and color features. Extracting the defective features includes: Adopt an edge detection algorithm to extract the edge contour features in the defective substation equipment image samples, adopt the gray-level co-occurrence matrix method to extract the texture features in the defective substation equipment image samples, and adopt color histogram analysis to extract the color features in the defective substation equipment image samples.
[0053] Specifically, a small number of typical defective images of substation equipment can be selected to construct a sample set for model training. The selected typical defective scenarios include capacitor bulging, loose grounding downlead, expander topping, and abnormal gas-oil level.
[0054] Specifically, analyze the characteristics of the defect scenarios and select the feature extraction algorithm. The bulging of the capacitor corresponds to the deformation defect. Under normal conditions, the capacitor is rectangular in shape. When a defect occurs, it expands and deforms due to overheating inside. The main feature of the defect is the contour feature. Equipment such as the grounding downlead and the breather is in the outdoor scenario. After long-term use, it is prone to rust, deformation, and the screws may loosen and fall off. It has significant contour, texture, and color characteristics. The gas oil level gauge is used to monitor the state of the transformer. Under normal conditions, the oil level gauge is in the full oil state. When the equipment overheats or partial discharge generates gas, which accumulates inside the equipment and causes the oil level to change, corresponding to the appearance of the oil level in the gas oil level gauge. It has significant contour features.
[0055] Specifically, extract the defect features and integrate them to form a feature vector for subsequent model training.
[0056] Among them, use the edge detection algorithm to extract the edge contour of the defect image. Specifically, use the Canny algorithm. First, perform Gaussian filtering on the input defect image to reduce the influence of image noise on edge detection. Then calculate the gradient magnitude and direction of the image, and obtain the edge intensity and direction of each pixel point in the image through gradient calculation. Next, perform non-maximum suppression on the gradient image to ensure that the edge is a single-pixel-wide line. Finally, by setting two thresholds, high and low, determine the strong edges and weak edges, and finally determine the edge contour of the image.
[0057] Among them, use the gray-level co-occurrence matrix method to achieve texture analysis. First, calculate the gray values of pixel pairs in the image to construct the gray-level co-occurrence matrix. Then extract statistical features from the gray-level co-occurrence matrix, such as energy, contrast, homogeneity, and correlation, which can describe the texture characteristics of the image. Finally, through feature clustering, identify the texture patterns in the image, including regularity, roughness, and directionality, etc.
[0058] Among them, through color histogram analysis, extract the color distribution features in the image. First, convert the image from the RGB color space to other color spaces more suitable for color analysis, such as the HSV or Lab color space. Then, in the selected color space, construct a histogram for each color channel and count the occurrence frequencies of each color value. Next, extract color distribution features from the histogram, such as the main color tone, color richness, and color contrast, etc. Finally, use the color features to identify the defect areas in the image.
[0059] Among them, integrate the above three feature vectors (contour, texture, color) into a complete feature vector for training the subsequent image generation model to assist the model in learning the structural information, texture information, and color information in the defect image.
[0060] Furthermore, the method also includes: Based on the generated substation equipment defect images, various scenarios are generated based on generative masks. A background generation model is used to generate the background part outside the defect image area in the substation equipment defect images, and the background part is fused with the defect image area in the substation equipment defect images.
[0061] Furthermore, the background generation model is obtained in the following way in advance: Obtain normal substation equipment image samples with labeled devices and components; Semantically segment the normal substation equipment image samples with labeled devices and components to complete the regional division of the foreground and background in the normal substation equipment image samples with labeled devices and components, and obtain a background generation model sample set; Use the background generation model sample set to train the second diffusion model to obtain the background generation model.
[0062] Specifically, generate diverse backgrounds for defective equipment. Outside the generated defect area, use regional division to generate various scenarios based on generative masks, covering various weather conditions and environmental brightness.
[0063] Specifically, the substation equipment defect image consists of a foreground defective equipment image and a background image.
[0064] Specifically, use a normal component recognition model to recognize all images in the normal substation equipment image sample set, and semantically segment the normal substation equipment images to complete the regional division of the foreground and background.
[0065] Specifically, train the background generation model. Use the semantically segmented image sample set to train the second diffusion model so that the model can generate background images according to semantics. Based on the previously generated substation equipment defect images, use the mask technology to enable the background generation model to generate the background part outside the defect equipment image area and accurately cover the non-defect area.
[0066] Specifically, adjust the weather and environmental brightness to form diverse backgrounds. Identify the environmental brightness by calculating the percentage of pixels with higher brightness in the image to the total number of pixels, and adjust the brightness level of the new background accordingly. Combine meteorological simulation tools, such as Ladybug Tools, to simulate the lighting and environmental effects under different weather conditions to form various weathers such as sunny, rainy, and cloudy.
[0067] Specifically, synthesize the foreground and background. Use image enhancement technology to fuse the generated diverse backgrounds with the defect area to ensure that the new background is consistent with the defect area in the original image in terms of lighting, shadow, and texture.
[0068] Furthermore, the method further includes: Evaluate the authenticity of the generated substation equipment defect images based on expert evaluation.
[0069] Specifically, a verification model combining expert evaluation and index evaluation can be established to evaluate and verify the authenticity of defect samples.
[0070] Specifically, based on work experience and the mechanism of defect occurrence, experts subjectively score the defects in the generated samples in terms of professional rationality, visual authenticity, etc.
[0071] Specifically, an objective evaluation index system is established to quantitatively evaluate the quality of the generated samples in terms of structural similarity index (SSIM), peak signal-to-noise ratio (PSNR), multi-scale structural similarity index (MS-SSIM), etc.
[0072] Specifically, a comprehensive verification model is constructed to calculate the weighted sum of the expert's subjective evaluation and the objective performance index to form a comprehensive score for evaluating the authenticity of the sample.
[0073] In the above embodiment, by obtaining the contour line of the normal substation equipment, based on the contour line of the normal substation equipment, obtaining the defect contour line, and inputting the defective substation equipment image into the first diffusion model for diffusion processing and noise reduction processing, and using the attention mechanism to embed the defect contour line as guiding information into the noise reduction processing of the first diffusion model to generate the substation equipment defect image, problems such as low occurrence frequency, difficult collection, and single environment of scarce samples are solved, an efficient image generation sample augmentation ability is created, the efficiency of sample collection and acquisition of scarce samples is improved, which helps to shorten the R & D cycle of the image recognition model and improve the accuracy of the image recognition algorithm.
[0074] Figure 3 The structural schematic diagram of the device for generating substation defect images according to an embodiment of the present invention is shown.
[0075] As Figure 3 shown, the device includes: An acquisition unit 301, configured to acquire the contour line of the normal substation equipment; A processing unit 302, configured to obtain the defect contour line based on the contour line of the normal substation equipment; A generation unit 303, configured to input the defective substation equipment image into the first diffusion model for diffusion processing and noise reduction processing, and use the attention mechanism to embed the defect contour line as guiding information into the noise reduction processing of the first diffusion model to generate the substation equipment defect image.
[0076] Further, the acquisition unit 301 is further configured to: Acquire the normal substation equipment image; Use the normal component recognition model to identify the equipment and components from the normal substation equipment image; The contour lines of the identified devices and components are extracted using an edge detection algorithm to obtain the contour lines of normal substation equipment.
[0077] Furthermore, the normal component recognition model is obtained by training a CNN convolutional neural network with a normal substation equipment image sample set, where the normal substation equipment image samples are normal substation equipment images with labeled devices and components.
[0078] Furthermore, the processing unit 302 is also used for: Editing the contour lines of normal substation equipment to add defect prompt information to form defect contour lines.
[0079] Furthermore, the first diffusion model is obtained in the following way in advance: Obtain a defective substation equipment image sample set; Based on the defective substation equipment image sample set, perform diffusion processing on the defective substation equipment image samples in the defective substation equipment image sample set by adding noise to obtain a complete noise data set of defective substation equipment images; Use the complete noise data set of defective substation equipment images and the defective substation equipment image sample set to train a U-net neural network to obtain the first diffusion model.
[0080] Furthermore, obtaining a defective substation equipment image sample set includes: Obtain defective substation equipment image samples; Label the equipment components and defective parts in the defective substation equipment image samples; Based on the labeled defective substation equipment image samples, extract and integrate the various defect features in the labeled defective substation equipment image samples to form a feature vector as the defective substation equipment image sample set.
[0081] Furthermore, the defect features include contour features, texture features, and color features. Extracting defect features includes: Use an edge detection algorithm to extract the edge contour features in the defective substation equipment image samples, use the gray-level co-occurrence matrix method to extract the texture features in the defective substation equipment image samples, and use color histogram analysis to extract the color features in the defective substation equipment image samples.
[0082] Furthermore, the device also includes a background unit for: Based on the generated substation equipment defect image, generate multiple scenarios based on a generative mask, generate the background part outside the defect image area in the substation equipment defect image using a background generation model, and fuse the background part with the defect image area in the substation equipment defect image.
[0083] Furthermore, the background generation model is obtained in advance in the following manner: Obtain normal substation equipment image samples of labeled equipment and components; Semantically segment the normal substation equipment image samples of labeled equipment and components to complete the regional division of the foreground and background in the normal substation equipment image samples of labeled equipment and components, and obtain a background generation model sample set; Train a second diffusion model using the background generation model sample set to obtain the background generation model.
[0084] Furthermore, the device further includes an evaluation unit for: Evaluate the authenticity of the generated substation equipment defect images based on expert evaluation.
[0085] In the above embodiment, by obtaining the contour line of normal substation equipment, based on the contour line of normal substation equipment, obtaining the defect contour line, and inputting the defective substation equipment image into the first diffusion model for diffusion processing and noise reduction processing, and using the attention mechanism to embed the defect contour line as guiding information into the noise reduction processing of the first diffusion model to generate substation equipment defect images, the problems of low occurrence frequency, difficult collection, and single environment of scarce samples are solved, an efficient image generation sample augmentation ability is created, the sample collection and the acquisition efficiency of scarce samples are improved, which helps to shorten the R & D cycle of the image recognition model and improve the accuracy of the image recognition algorithm.
[0086] It should be noted that when the device provided in the above embodiment realizes its functions, only the above-mentioned division of each functional module is used for illustration. In actual applications, the above functions can be allocated to different functional modules according to needs, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above. In addition, the device provided in the above embodiment and the method embodiment belong to the same concept, and the specific implementation process is detailed in the method embodiment, which will not be repeated here.
[0087] An embodiment of the present invention also provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the method for generating substation defect images provided in the above-mentioned embodiments is realized.
[0088] An embodiment of the present invention also provides an electronic device, including: a processor; a memory for storing processor-executable instructions; the processor is used to read the executable instructions from the memory and execute the instructions to realize the method for generating substation defect images provided in the above-mentioned embodiments.
[0089] The present invention has been described with reference to a few embodiments. However, as is well known to those skilled in the art, other embodiments equivalent to those disclosed above of the present invention equally fall within the scope of the present invention as defined by the appended patent claims.
[0090] Generally, all terms used in the claims are to be interpreted according to their ordinary meaning in the technical field, unless otherwise explicitly defined therein. All references to "a / the [device, component, etc.]" are to be construed openly as at least one instance of the device, component, etc., unless otherwise explicitly stated. The steps of any method disclosed herein need not be performed in the exact order disclosed, unless explicitly stated.
[0091] Those skilled in the art will appreciate that embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) having computer-usable program code embodied therein.
[0092] The present invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It should be understood that each flow and / or block in the flowchart illustrations and / or block diagrams, and combinations of flows and / or blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing device to produce a machine, such that the instructions executed by the processor of the computer or other programmable data processing device create means for implementing the functions specified in Figure 1 one or more of the flows Figure 1 or blocks or combinations of blocks.
[0093] These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means that implement the functions specified in Figure 1 one or more of the flows Figure 1 or blocks or combinations of blocks.
[0094] These computer program instructions can also be loaded onto a computer or other programmable data processing apparatus, so that a series of operation steps are executed on the computer or other programmable apparatus to produce a computer-implemented process, thereby providing instructions for implementing the functions specified in one process or a plurality of processes and / or blocks Figure 1 one process or a plurality of processes and / or blocks Figure 1 steps for the functions specified in one block or a plurality of blocks.
[0095] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and not to limit them. Although the present invention has been described in detail with reference to the above embodiments, those of ordinary skill in the art should understand that: modifications or equivalent replacements can still be made to the specific embodiments of the present invention. Any modification or equivalent replacement without departing from the spirit and scope of the present invention shall be covered by the protection scope of the claims of the present invention.
Claims
1. A method for generating a transformer defect image, characterized in that: The method comprises: Get the normal substation equipment outline; Based on the normal substation equipment contour line, a defect contour line is obtained; The defective substation equipment image is input into the first diffusion model for diffusion processing and noise reduction processing, and the defect contour line is embedded in the noise reduction processing of the first diffusion model as guiding information using an attention mechanism to generate a defective substation equipment image.
2. The method according to claim 1, characterized in that The obtaining of a normal substation equipment contour line includes: Obtain images of normal substation equipment; A normal component recognition model is used to identify equipment and components from normal substation equipment images; The edge detection algorithm is used to extract the contours of the identified equipment and components to obtain the contours of normal substation equipment.
3. The method according to claim 2, characterized in that The normal component recognition model is obtained by training a CNN convolutional neural network through a normal substation equipment image sample set, wherein the normal substation equipment image samples are normal substation equipment image samples with labeled equipment and components.
4. The method according to claim 1, characterized in that: Based on the normal substation equipment contour line, a defect contour line is obtained, including: The normal substation equipment contour line is edited to add defect prompt information to form a defect contour line.
5. The method according to claim 1, characterized in that The first diffusion model is obtained in advance in the following manner: Obtain a sample set of defective substation equipment images; Based on the defective substation equipment image sample set, a diffusion process is performed on the defective substation equipment image samples in the defective substation equipment image sample set by adding noise to obtain a defective substation equipment image complete noise data set; The U-net neural network is trained using the defective substation equipment image complete noise data set and the defective substation equipment image sample set to obtain a first diffusion model.
6. The method according to claim 5, characterized in that The step of obtaining a defective substation equipment image sample set comprises: Obtain defective substation equipment image samples; Marking equipment components and defective parts in the defective substation equipment image sample; Based on the labeled defective substation equipment image samples, each defect feature in the labeled defective substation equipment image samples is extracted and integrated to form a feature vector as a defective substation equipment image sample set.
7. The method according to claim 6, characterized in that The defect features include contour features, texture features and color features, and the extraction of defect features includes: The edge detection algorithm is used to extract the edge contour features in the defective substation equipment image samples, the gray level co-occurrence matrix method is used to extract the texture features in the defective substation equipment image samples, and the color histogram analysis is used to extract the color features in the defective substation equipment image samples.
8. The method according to claim 1, characterized in that The method further comprises: On the basis of the generated defective images of substation equipment, multiple scenes are generated based on generative masks, and the background generation model is used to generate the background part outside the defective image area in the defective image of substation equipment, and the background part is fused with the defective image area in the defective image of substation equipment.
9. The method according to claim 8, characterized in that The background generation model is obtained in advance in the following manner: Obtain normal substation equipment image samples with labeled equipment and components; Semantically segment the normal substation equipment image samples with labeled equipment and components to complete the foreground and background area division in the normal substation equipment image samples with labeled equipment and components, and obtain a background generation model sample set; The background generation model sample set is used to train the second diffusion model to obtain the background generation model.
10. The method according to claim 1, characterized in that The method further comprises: The authenticity of the generated substation equipment defect images was evaluated based on expert evaluation.
11. A device for generating a defect image of a transformer, characterized in that: The device comprises: An acquisition unit, used for acquiring the contour line of normal substation equipment; A processing unit, configured to obtain a defect contour line based on the normal substation equipment contour line; The generation unit is used to input the defective substation equipment image into the first diffusion model for diffusion processing and noise reduction processing, and adopt the attention mechanism to embed the defect contour line as guiding information into the noise reduction processing of the first diffusion model to generate the defective substation equipment image.
12. The device according to claim 11, characterized in that The acquisition unit is further used for: Obtain images of normal substation equipment; A normal component recognition model is used to identify equipment and components from normal substation equipment images; The edge detection algorithm is used to extract the contours of the identified equipment and components to obtain the contours of normal substation equipment.
13. The device according to claim 12, characterized in that The normal component recognition model is obtained by training a CNN convolutional neural network through a normal substation equipment image sample set, wherein the normal substation equipment image samples are normal substation equipment image samples with labeled equipment and components.
14. The device according to claim 11, characterized in that The processing unit is further used for: The normal substation equipment contour line is edited to add defect prompt information to form a defect contour line.
15. The device according to claim 11, characterized in that The first diffusion model is obtained in advance in the following manner: Obtain a sample set of defective substation equipment images; Based on the defective substation equipment image sample set, a diffusion process is performed on the defective substation equipment image samples in the defective substation equipment image sample set by adding noise to obtain a defective substation equipment image complete noise data set; The U-net neural network is trained using the defective substation equipment image complete noise data set and the defective substation equipment image sample set to obtain a first diffusion model.
16. The device according to claim 15, characterized in that The step of obtaining a defective substation equipment image sample set comprises: Obtain defective substation equipment image samples; Marking equipment components and defective parts in the defective substation equipment image sample; Based on the labeled defective substation equipment image samples, each defect feature in the labeled defective substation equipment image samples is extracted and integrated to form a feature vector as a defective substation equipment image sample set.
17. The device according to claim 16, characterized in that The defect features include contour features, texture features and color features, and the extraction of defect features includes: The edge detection algorithm is used to extract the edge contour features in the defective substation equipment image samples, the gray level co-occurrence matrix method is used to extract the texture features in the defective substation equipment image samples, and the color histogram analysis is used to extract the color features in the defective substation equipment image samples.
18. The device according to claim 11, characterized in that The device also includes a background unit, which is used for: On the basis of the generated defective images of substation equipment, multiple scenes are generated based on generative masks, and the background generation model is used to generate the background part outside the defective image area in the defective image of substation equipment, and the background part is fused with the defective image area in the defective image of substation equipment.
19. The device according to claim 18, characterized in that The background generation model is obtained in advance in the following manner: Obtain normal substation equipment image samples with labeled equipment and components; Semantically segment the normal substation equipment image samples with labeled equipment and components to complete the foreground and background area division in the normal substation equipment image samples with labeled equipment and components, and obtain a background generation model sample set; The background generation model sample set is used to train the second diffusion model to obtain the background generation model.
20. The device according to claim 11, characterized in that The device further comprises an evaluation unit for: The authenticity of the generated substation equipment defect images was evaluated based on expert evaluation.
21. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method described in any one of claims 1 to 10 is implemented.
22. An electronic device, comprising: processor; a memory for storing instructions executable by the processor; The processor is used to read the executable instructions from the memory and execute the instructions to implement the method according to any one of claims 1 to 10.
Citation Information
Patent Citations
Intelligent power grid insulator on-line monitoring, defect identification, early warning and sound production system
CN109120070A
Power transformation defect data small sample expansion method and system based on diffusion model
CN117115818A
Power transformation equipment image data enhancement method and system and remote intelligent patrol system
CN118942088A
Image denoising based on wavelets and multifractals for singularity detection and multiscale anisotropic diffusion
US7515763B1
Cited By
Power transmission line small sample abnormal data generation method and system based on diffusion model and feature migration
CN120673192A