Search

CN-121982441-A - Power defect image generation method and system based on multi-factor guidance

CN121982441ACN 121982441 ACN121982441 ACN 121982441ACN-121982441-A

Abstract

The invention discloses a method and a system for generating an electric power defect image based on multi-factor guidance, wherein the method comprises the steps of obtaining electric power equipment defect data, classifying and marking pretreatment, and constructing an electric power equipment defect data set; the method comprises the steps of providing a multi-factor guided image generation model, designing a multi-factor guided generation module, a feedback optimization module and a loss function module, generating various power equipment defect images, and training the image generation model by using image graph and mask pairs in a power equipment defect data set and combining category labels as inputs to obtain a trained image generation model. The invention adopts the image generation model guided by various factors to accurately control the position, type, size and severity of the defects in the generation process, and covers various defect forms of the power equipment.

Inventors

  • SHI WEIHAO
  • WANG XIN
  • ZOU ZHIWEI
  • HU HAO
  • Huang Houzhu
  • RUAN ZHAOWEN
  • QIU RUJIA
  • SUN WEI

Assignees

  • 国网安徽省电力有限公司电力科学研究院

Dates

Publication Date
20260505
Application Date
20251204

Claims (10)

  1. 1. A multi-factor guidance-based power defect image generation method, comprising: acquiring the defect data of the power equipment, classifying and marking the defect data, and constructing a defect data set of the power equipment; Providing a multi-factor guided image generation model, and designing a multi-factor guided generation module, a feedback optimization module and a loss function module for generating a variety of power equipment defect images; And training an image generation model by using the image graph and mask pairs in the power equipment defect data set and combining the class labels as input to obtain a trained image generation model.
  2. 2. The multi-factor guidance-based power defect image generation method of claim 1, wherein the multi-factor guidance generation module includes a mask guidance and a category guidance; The mask guiding comprises the steps of diffusing a real power equipment defect image to generate a random noise image, merging the random noise image with a mask of the power equipment defect image on channels, inputting the mask into a U-Net network, matching the number of the input mask channels with each layer of the U-Net network by a mask encoder, extracting mask features by the U-Net network, reshaping and rearranging the size of the mask features, generating a layout mark, and injecting the layout mark into the back diffusion; The class guide converts the defect type information of the power equipment defect image into a high-dimensional class feature vector, and maps the high-dimensional class feature vector onto a layout mark aligned with the spatial semantics thereof through embedding.
  3. 3. The method for generating a power defect image based on multi-factor guidance according to claim 1, wherein the generated image generated by back diffusion of each time step under mask and category guidance is: ; In the formula, 、 For the generated image generated during the current and last time step back diffusion, The noise intensity which changes in the last time step; ; for the noise predicted for the current time step, For the image combined on the channel with the mask for the generation of the previous time step, In order to be a time step, the time step, In the case of a category label, Is that Is used for the average value of (a), Is that Is used for the average value of (a), For a real noise per time step, Is a multi-element standard gaussian distribution, Is an identity matrix.
  4. 4. The method of claim 2, wherein the multi-factor guided power defect image generation module includes a defect intensity guide, and wherein a defect intensity control coefficient characterizing the defect intensity guide is introduced during image generation model reasoning to generate more various defects, and wherein the generated images generated by back-diffusing each time step after combining the mask and the category guide are combined.
  5. 5. The method of generating a multi-factor guidance-based power defect image of claim 4, wherein the generated image generated by back diffusion at each time step after the defect intensity control factor is combined with the class guidance is characterized by the following formula: ; In the formula, To introduce the generated image generated during the back diffusion of the current time step generated under the influence of the defect intensity control coefficient, As a factor of control of the intensity of the defect, The noise intensity which changes in the last time step; ; for the noise predicted for the current time step, For the image combined on the channel with the mask for the generation of the previous time step, In order to be a time step, the time step, In the case of a category label, And generating a generated image for the back diffusion of the current time step under the guidance of the mask and the category.
  6. 6. The method for generating the power defect image based on the multi-factor guidance according to claim 1, wherein the guidance intensity control coefficient is introduced into the feedback optimization module, the multi-factor guidance generation module calculates two generation results under a set condition and under no condition according to the generated image in the process of generating the image by back diffusion of the current time step, and adjusts the guidance intensity control coefficient in the diffusion process of the next time step according to the generation results.
  7. 7. The method for generating a multi-factor guidance-based power defect image according to claim 6, wherein the guidance intensity control coefficient in the next time-step diffusion process is adjusted according to the generation result, expressed by the following formula: ; In the formula, To generate an image For the time step The guide intensity control coefficient when it is, Generating model parameters for an image The time step of diffusion is Generating an image The prior probability of the class constraint under the condition, For an a priori probability in the absence of conditions, In order to achieve a peripheral rate of the material, Is a category label.
  8. 8. The multi-factor guidance-based power defect image generation method of claim 1, wherein the loss function module includes an image reconstruction loss, a mask guidance loss, and a category guidance loss, and is expressed by the following formula: ; ; ; ; In the formula, 、 、 、 For image reconstruction loss, mask guide loss, category guide loss and total loss, As a real image of the object, As an average value of the values, For a real noise per time step, For the noise predicted for the current time step, Preserving coefficients for noise, in the (0, 1) range The increase is made and the decrease is made, In order to be a time step, the time step, In the case of a category label, For the label, 1 denotes a mask area, 0 denotes a background, Is the square of the norm of L 2 , For a specific condition The average value of the lower part of the total, In the case of a mask-type encoder, To generate an image of the object, In order to achieve cross-entropy, To generate an image for a pair The confidence of the predicted class is determined, To generate an image Is used for the purpose of determining the true class of (c), 、 The weight coefficients of the mask guide loss and the class guide loss, respectively.
  9. 9. The method for generating the power defect image based on the multi-factor guidance according to claim 1, wherein the method further comprises the steps of providing an evaluation system, evaluating the quality of the power equipment defect image generated by the trained image generation model according to the French starting distance, the starting score, the sample imbalance and the image repetition rate, and correspondingly optimizing the image generation model according to the evaluation result; wherein, the Frechet starting distance is used for measuring the similarity degree between the generated image and the real image, and the following formula is applied to the generated image: ; The starting score is used to measure the diversity of the generated image and is expressed using the following formula: ; In the formula, For the furthe start distance, In order to initiate the score of the score, Extracting a mean vector of features for the real image dataset, To generate a mean vector of features extracted from the image dataset, In order to be a norm, As a trace of the matrix, 、 Generating covariance matrices of image features for the real images respectively, As a function of the index of the values, As an average value of the values, In order to be of relative entropy, To true images Is a class prediction probability distribution of (1), Predicting a marginal distribution of probabilities for all generated image categories; Sample imbalance is calculated by calculating the number of images for each defect class for each power device, and the image repetition rate identifies highly repeated images by a hash algorithm and calculates their duty cycle.
  10. 10. A system for applying the multi-factor guidance-based power defect image generation method of any one of claims 1-9, comprising: The data set module is used for acquiring the defect data of the power equipment, classifying and marking the defect data, and constructing a defect data set of the power equipment; The model construction module is used for providing a multi-factor guided image generation model, and designing a multi-factor guided generation module, a feedback optimization module and a loss function module, and generating a variety of power equipment defect images; and the training application module is used for training the image generation model by using the image graph and mask pairs in the power equipment defect data set and combining the class labels as input to obtain a trained image generation model.

Description

Power defect image generation method and system based on multi-factor guidance Technical Field The invention relates to the technical field of image processing and image generation, in particular to a power defect image generation method and system based on multi-factor guidance. Background Image generation techniques can construct images from zero, but at an early stage have problems of blurred details and inconsistent styles. Therefore, the advanced algorithm is combined to optimize the image generation, so that virtual contents can be produced efficiently, and the sense of reality and fineness of the image can be improved. The diffusion model is an image generation technology based on probability generation, is one of core methods in the field of generation type artificial intelligence, and is widely applied to scenes such as high-fidelity image generation, image restoration, style migration and the like. Early generation of countermeasure networks (GAN) is prone to pattern collapse and insufficient diversity of the generated images. The diffusion model is relatively slow in generation speed, but is better in image resolution and detail reduction degree. Therefore, the diffusion model is combined with the efficient sampling algorithm, so that the advantage of high generation quality of the diffusion model can be maintained, the image generation efficiency can be effectively improved, and more real-time requirements can be met. Exemplary defects of classical equipment in the power domain are shown in table 1 below: Table 1 classical device defects in the electrical field In the research of equipment defect detection and analysis in the electric power field, the quality and the integrity of a data set directly determine the model performance of tasks such as downstream image detection, semantic segmentation and the like. However, the construction of power plant defect datasets presents a real challenge, often leaving only a small number of samples through historical fault records, and making it difficult to support adequate learning of the model. In addition, the environment scene of the existing data set is generally single, and most of the environment scene is concentrated on ideal working conditions such as sunny days and the like, so that generalization capability of the downstream model in the real scene is greatly reduced. In order to solve the problems, the generation countermeasure network can realize a certain degree of sample generation, but the inherent training instability is extremely easy to generate a 'mode collapse' phenomenon, and the image detail has insufficient authenticity, so that the defect of a data set cannot be effectively overcome. Meanwhile, the traditional diffusion model lacks guidance in the process of generating noise by back diffusion, can not realize customized and high-diversity defect image generation, is difficult to solve the problems of defect position deviation and structural distortion, and can not adapt to various fault scenes in the power field. Disclosure of Invention Aiming at the generation of the defects of the power image, the technical problem to be solved by the invention is that the current scheme cannot adapt to various fault scenes in the power field. In order to solve the technical problems, the invention provides the following technical scheme: a multi-factor guidance-based power defect image generation method, comprising: acquiring the defect data of the power equipment, classifying and marking the defect data, and constructing a defect data set of the power equipment; Providing a multi-factor guided image generation model, and designing a multi-factor guided generation module, a feedback optimization module and a loss function module for generating a variety of power equipment defect images; And training an image generation model by using the image graph and mask pairs in the power equipment defect data set and combining the class labels as input to obtain a trained image generation model. In this embodiment, the multi-factor guidance generation module includes a mask guidance and a category guidance; The mask guiding comprises the steps of diffusing a real power equipment defect image to generate a random noise image, merging the random noise image with a mask of the power equipment defect image on channels, inputting the mask into a U-Net network, matching the number of the input mask channels with each layer of the U-Net network by a mask encoder, extracting mask features by the U-Net network, reshaping and rearranging the size of the mask features, generating a layout mark, and injecting the layout mark into the back diffusion; The class guide converts the defect type information of the power equipment defect image into a high-dimensional class feature vector, and maps the high-dimensional class feature vector onto a layout mark aligned with the spatial semantics thereof through embedding. In this embodiment, the generated image generated by back