Power transformation equipment local area defect generation method
By using the U-shaped architecture generator and local global consistency discriminator of the ADD-GAN model in the substation equipment, the problem of local defect characteristics being ignored in the prior art is solved, and high-quality local defect images are generated, which improves the Diversity and accuracy of substation equipment inspection.
Patent Information
- Application Number
- CN202411263368.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Priority Date
- 2023-12-18
- Filing Date
- 2024-09-10
- Publication Date
- 2024-12-13
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The existing method of generating defect data sets of substation equipment ignores the defect characteristics of local areas, and the generated image quality is low and unstable, which cannot effectively improve the diversity and accuracy of substation equipment detection.
Using the U-shaped architecture generator and local global consistency discriminator based on the ADD-GAN model, local defect images are generated through the training data set, and combined local and global features to generate realistic and rich defect images.
The generated high-quality local defect images can improve the diversity and accuracy of data sets for substation equipment detection, enhance the data sets for equipment surface defects, and improve the performance of defect classification and detection models.
Smart Images

Figure CN119131527A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of power system defect generation, and in particular to a method for generating local area defects of a transformer equipment. Background Art
[0002] Substations are an indispensable part of the power system. By transmitting electrical energy from power plants to the user end, the conversion between high voltage and low voltage is realized. In order to ensure the stable operation of the power grid, the operation status detection of substations is crucial. In the past, the detection of defects in substations, such as rust, oil leakage, dial damage, insulator rupture, etc., usually required a lot of time and manpower for manual inspection, which was time-consuming and laborious. However, with the continuous improvement of smart grid construction, unmanned and intelligent monitoring of substations has become imperative. With the help of deep learning-based image processing methods, defects in equipment images can be automatically detected, which not only avoids errors caused by subjective factors, but also improves the detection efficiency and intelligence level of substations. This is of great significance to ensure the stable operation of the power system.
[0003] In the process of constructing the surface defect dataset of substation equipment, there are indeed some problems, such as the majority of normal images and the minority of defective images, which leads to a large workload of manual screening and classification; the large difference in manual experience leads to poor quality of defect image acquisition, classification, and annotation; the limited dataset augmentation methods cannot fully utilize the image superpixel features, resulting in high dataset redundancy. In order to solve these problems, many studies have begun to apply data augmentation methods and conduct research on image generation methods based on superpixel features. Generative models such as autoencoders and adversarial generative networks are used to generate new images with complex backgrounds and diverse features, build richer training set images, and further improve the performance of defect classification and detection models. These methods can provide higher quality training data, thereby improving accuracy and performance.
[0004] However, there are several problems with defect data enhancement research based on image generation in the past, as described below: First, existing generation methods usually focus on the entire image, and the local area defect features on the substation equipment are easily ignored. In substation applications, the importance of local features is particularly prominent in defect generation tasks such as rust and oil stains. Second, the generated images are usually random and cannot be effectively controlled, lacking shape and position features similar to existing defect images. Therefore, the diversity of the training set enhanced in this way is difficult to improve. Finally, the quality of the generated images needs to be improved. During the training process of the generative adversarial network, mode collapse often occurs, resulting in a lack of details in the generated small defects. In addition, if the generated images are unrealistic and unstable, the connection between local anomalies and the global image will also appear obviously unnatural. Summary of the invention
[0005] The technical problem to be solved by the present invention is to provide a method for generating local area defects of a transformer equipment.
[0006] To solve the above problems, the technical solution adopted by the present invention is:
[0007] A method for generating local area defects of a power transformation device, the method comprising:
[0008] Step 1: Determine the possible defect categories on each target substation;
[0009] Step 2: for any target substation, obtain multiple normal substation images and multiple original defect images of the target substation to obtain a defect-normal image data set; wherein the normal substation image is an image of the target substation in a normal state, and the original defect image is an image of any substation containing at least one of the defect types;
[0010] Step three, the original ADD-GAN model is trained based on multiple defect-normal image data sets to obtain a trained ADD-GAN model, so that the trained ADD-GAN model can generate a local defective device image from any input normal substation device image and an original defective image containing any defect type; wherein the local defective device image is an image of the substation carrying the defect type; the original ADD-GAN model adopts a generator composed of a U-shaped encoding-decoding network, and local and global consistency discriminators.
[0011] As an implementation mode of the invention, in step one, when the target substation equipment is a transformer or a switch cabinet, the defect types include oil stains on the surface of components and metal rust; when the target substation equipment is an insulator, the defect types include insulator breakage; when the target substation equipment is an electric power meter, the defect types include meter breakage.
[0012] As an implementation mode of the present invention, in step 2, the plurality of normal substation equipment images and the plurality of original defective images are obtained by taking pictures during manual inspection and automatic inspection.
[0013] As an implementation mode of the invention, in the step 2, after obtaining a plurality of original defect images, defect image processing is performed on each original defect image by means of manual segmentation, expert hand-drawing, and random repositioning, rotation and scaling of defects.
[0014] As an implementation mode of the invention, in step 3, the generator adopts an encoder-decoder architecture with an input and an output of 256*256 size, wherein the input part also includes one-dimensional mask information, which includes an encoding path and a decoding path;
[0015] The encoding path is a convolutional neural network, and each structure in the convolutional neural network uses the function ConV-BN-ReLU-ConV-BN-ReLU to process the feature map on the path;
[0016] Each step of the decoding path first uses a deconvolution operation. After deconvolution, the deconvolution result is concatenated with the feature map of the corresponding size in the encoding path and propagated backward.
[0017] As an implementation mode of the invention, in step 3, the discriminator is set to 4, namely D1 def , D2 def , D1 norm , D2 norm ;
[0018] Each of the discriminators includes a local discriminator subnetwork and a global discriminator subnetwork, wherein the local discriminator subnetwork inputs an image with pixels of 64×64 pixels and outputs a single vector with a dimension of 1024, and is composed of four convolutional layers and a single fully connected layer;
[0019] The global discriminator subnetwork inputs an image with pixels of 512×512 pixels and outputs a single vector of dimension 1024. It consists of four convolutional layers and a single fully connected layer, and all convolutions use a 5×5 kernel with a stride of 2.
[0020] As an embodiment of the invention, in step 3, for the generator G that converts the defect-free image into the defective image norm2def And its corresponding discriminator D1 def , the loss function of the relevant global-aware adversarial loss is as follows:
[0021]
[0022] Among them, I norm represents the original defect-free overall image, I def Represents the original device defect area image, MI def represents the original mask defect area image, F def represents the generated defect overall image, MF def Represents the generated mask defect area image.
[0023] As an implementation method of the invention, in step 3, a local defect perception loss is designed in the generator part of the network, as shown in the following formula:
[0024] L aware (MI norm MF norm MI def MF def )
[0025] =L semantic [MF norm ,MI norm )]
[0026] +L semantic [MF def ,MI def )]
[0027] Where L semantic [MF norm ,MI norm )] is the difference loss between the defect-free part of the image generated within the segmented mask and the true defect-free image, and L semantic [MF def ,MI def )] is the difference loss between the part of the image defect generated within the segmented mask and the real defect image.
[0028] As an implementation method of the invention, in step 3, the cycle consistency loss is obtained using the following formula:
[0029]
[0030] The beneficial effects of adopting the above technical solution are:
[0031] The method for generating local area defects of substation equipment provided by the present invention determines the defect categories that may exist on each target substation equipment; for any target substation equipment, multiple normal substation equipment images and multiple original defect images of the target substation equipment are obtained to obtain a defect-normal image data set; wherein the normal substation equipment image is an image of the target substation equipment in a normal state, and the original defect image is an image of any substation equipment containing at least one defect type; based on the multiple defect-normal image data sets, the original ADD-GAN model is trained to obtain a trained ADD-GAN model, so that the trained ADD-GAN model can generate a local defective equipment image from the normal substation equipment image of any input substation equipment and the original defect image containing any defect type; wherein the local defective equipment image is an image of the substation equipment carrying a defect type; the original ADD-GAN model adopts a generator composed of a coding-decoding network with a U-shaped architecture, and a local and global consistency discriminator. This method can not only segment the equipment area without changing the global image features and generate relevant defects in the local area, but also take into account the overall quality of the image and the fusion consistency of the global image and the local defect image, thereby generating high-quality equipment defect images with rich image features and high realism, greatly increasing the data in the substation equipment surface defect dataset. BRIEF DESCRIPTION OF THE DRAWINGS
[0032] Figure 1 It is a flow chart of the steps of a method for generating local area defects of substation equipment.
[0033] Figure 2 This is the structure diagram of the ADD-GAN model.
[0034] Figure 3 It is a generator based on the U-shaped network structure.
[0035] Figure 4 It is a global and local adversarial consistency discriminator.
[0036] Figure 5 This is the effect diagram of defect image generation based on the ADD-GAN model; (a) normal equipment, (b) metal rust, (c) generated rust; (d) normal equipment, (e) oil leakage, (f) generated oil leakage. DETAILED DESCRIPTION
[0037] In order to make the objectives, technical solutions and advantages of the present invention more clear, the present invention is clearly and completely described below in conjunction with specific embodiments.
[0038] An embodiment of the present invention provides a method for generating local area defects of a substation, the method comprising:
[0039] Step S1: determine the possible defect type of each target substation.
[0040] Different target substation equipment has different defect types. For example, when the target substation equipment is a transformer or switch cabinet, the defect types include oil stains on the surface of the components and metal corrosion; when the target substation equipment is an insulator, the defect types include insulator damage; when the target substation equipment is an electric meter, the defect types include meter damage. Therefore, for any substation equipment, it is necessary to first determine the corresponding defect type.
[0041] Of course, the above defect types can be further subdivided according to defect location, manifestation characteristics, etc., and the specific implementation process can be classified as needed.
[0042] Step S2: for any target substation equipment, a plurality of normal substation equipment images and a plurality of original defective images of the target substation equipment are acquired to obtain a defect-normal image data set.
[0043] The normal substation equipment image is an image of the target substation equipment in a normal state, and the original defect image is an image of any substation equipment containing at least one of the defect types;
[0044] In this step, a plurality of normal substation equipment images and a plurality of original defect images are obtained by taking pictures during manual inspection and automatic inspection. In addition, the original defect images can also be obtained from a public network, such as a public web page.
[0045] Under normal circumstances, the most normal substation equipment images are obtained during the inspection process, and the overall number of defective images is relatively small. In order to increase the number of defective images, the present invention takes into account that for any type of defect, it is not necessarily limited to existing in a certain fixed substation equipment, and may also exist in other substation equipment. Therefore, it will also obtain images of other substation equipment. It is only necessary to ensure that the substation equipment has the same defect type as determined in step S1. There may be only one type of defect or there may be multiple types. The embodiment of the present invention does not make specific limitations on this, thereby increasing the number of original defective images obtained.
[0046] The embodiment of the present invention takes surface oil leakage and metal corrosion of substation equipment as an example, and obtains 600 images of appearance defects of substation equipment through field scene collection, including 300 images of surface oil leakage and 300 images of metal corrosion, and 1000 images of normal equipment are collected.
[0047] After obtaining multiple original defect images, defect image processing is performed on each original defect image by means of manual segmentation, expert hand-drawing, and random repositioning, rotation, and scaling of defects.
[0048] Since the shape, scale and spatial position of defect images are different, the defect elements in the original defect image can be obtained through manual segmentation and expert hand-drawing. In order to ensure the rationality of the expert hand-drawn defect image, weak constraints are added in the expert hand-drawing process. For example: for surface oil leakage defects with relatively uniform color, experts only need to deepen the color of the area on the surface of the equipment; for metal rust defects with complex textures, experts can generate new defect images by drawing rust textures and coloring the areas separately.
[0049] After generating new defect images, an expert evaluation method is used to measure their rigor and rationality. Ten experts score each defect image, and the average score is used as the final score of each image. The top 10% of hand-drawn defect images will be retained, that is, multiple extracted defect images are obtained.
[0050] Furthermore, in order to increase the number and diversity of new samples, the defect images can be randomly repositioned, rotated and scaled. In addition, different defect elements can be randomly combined to increase the number of defects in a single image. Of course, this can reduce the workload of drawing.
[0051] The embodiment of the present invention performs defect image enhancement and equalization processing on the basis of the 600 defect images of the substation equipment appearance acquired in the above-mentioned collection, and obtains 1000 extracted defect images for any type of defect.
[0052] Step S3, training the original ADD-GAN model based on the multiple defect-normal image data sets to obtain a trained ADD-GAN model, so that the trained ADD-GAN model can generate a local defective device image from a normal substation device image of any input substation device and an original defective image containing any defect type.
[0053] ADD-GAN model Figure 2 As shown in the figure, the principle can be summarized as converting one type of image into another type of image, that is, there are two sample spaces, X and Y, representing the sample set of normal equipment images and the sample set of oily and rusted images, respectively. It is expected that the samples in the X space will be converted into samples in the Y space. Therefore, the purpose of ADD-GAN is to learn the mapping function G from X to Y. G corresponds to the generator in the ADD-GAN network model, and G can generate the image x in the space X into the image F(x) in the Y space. For the generated image F(x), the discriminator D in ADD-GAN is also required. YTo determine whether it is a real picture, thereby forming an adversarial neural network. The ADD-GAN model can realize the mutual conversion between normal images and defective images. The embodiment of the present invention mainly uses the conversion of normal substation equipment images into defective equipment images.
[0054] like Figure 2 As shown, the ADD-GAN model consists of two parts: a generative model (the generative model in the figure, i.e., the generator) and a discriminative model (the discriminative model in the figure, i.e., the discriminator). The generator captures the distribution of the sample data and generates a sample similar to the real training data with a noise z that obeys a certain distribution (uniform distribution, Gaussian distribution, etc.). The purpose of the generator is to generate samples that are increasingly similar to real samples. The discriminator is a binary classifier used to estimate the probability that a sample comes from training data rather than generated data. If the sample comes from real training data, the discriminator outputs a high probability, otherwise the discriminator outputs a low probability. During the training process, the GAN model fixes one of the generator G and the discriminator D, updates the neural network weights of the other, and updates alternately and iteratively. The formula is as follows:
[0055]
[0056] where p data (x) represents the distribution of the real sample x, p z (z) represents the distribution of random sample z. V(D,G) represents p data (x) and p z The purpose of the generator is to minimize V(D,G) while keeping the discriminator fixed, and the purpose of the discriminator is to maximize V(D,G) while keeping the generator fixed. During the training process, both the generator and the discriminator continuously optimize their own networks, thus forming a competitive goal until both parties reach a Nash equilibrium. At this point, the generator can generate samples with the same distribution as the real data, while the discriminator has an accuracy of 50% for the generated samples. The final generative model is used to generate the required data.
[0057] At present, the image generation method based on the GAN network usually focuses on the texture conversion of the entire image, and rarely pays attention to the defect features of small areas. That is to say, not only will defective images be generated on the surface of the substation equipment, but the style of the entire image will also change. In order to solve these problems, this patent designs a local area defect generation network in the image generation stage. The defect generation area is first segmented by the image segmentation method, and then the local style conversion and defect generation work are performed on the area. This change enables ADD-GAN to perform well in the generation of small area defect semantic features. Below, the present invention is explained for the generator and the discriminator respectively.
[0058] 1. Generator
[0059] The generator of the present invention adopts an encoder-decoder architecture with an input and an output of 256*256 size, wherein the input part also includes one-dimensional mask information, which includes an encoding path and a decoding path;
[0060] The encoding path is a convolutional neural network, and each structure in the convolutional neural network uses the function ConV-BN-ReLU-ConV-BN-ReLU to process the feature map on the path;
[0061] Each step of the decoding path first uses a deconvolution operation. After deconvolution, the deconvolution result is concatenated with the feature map of the corresponding size in the encoding path and propagated backward.
[0062] The generator is described in detail below.
[0063] like Figure 3 As shown, the present invention adopts a coding-decoding network based on a U-shaped architecture to form a generator (specifically a local area defect generator model). The U-shaped network is improved based on a fully convolutional neural network. It is named because the network shape resembles a capital letter U. It consists of a coding path and a decoding path, wherein the coding path is a typical convolutional neural network, consisting of a repeated function structure. Each structure uses a combination function of batch normalization (Batch normalization, BN), rectified linear units (rectified linear units, ReLU), and convolution (ConV) ConV-BN-ReLU-ConV-BN-ReLU to process the feature map on the path. The number of feature channels doubles after each downsampling. Deconvolution (ConvTranspose) operation is first used in each step of the decoding path. After each deconvolution, the size of the feature map doubles and the number of feature channels is halved. After deconvolution, the result of the deconvolution is spliced with the feature map of the corresponding size in the coding path and propagated backward. This feature splicing in the encoding and decoding processes enables a better fusion of shallow pixel position features and deep pixel category features, improves the utilization rate of image features, and helps to improve the image generation effect.
[0064] The generation principle of the local area defect generator model is as follows. Figure 3As shown in the figure, the input to the generator is not only the defect-free device image, but also the one-dimensional mask information. This information is preset and can be manually annotated or automatically generated by the image segmentation method based on deep learning. In the process of image generation, the original image and the mask information are sent to the generation model together. The generation model uses the mask information to first segment the local area of the device where the defect needs to be generated in the original image, and then generates the required defects in the segmented area. After the defect generation is completed, the output result replaces the mask area on the original image to complete the generation of the defect image. This method can not only retain the advantages of the GAN model style transfer, but also limit the image range of its style conversion and control it to the desired local area, greatly improving the realism of the generated defect image.
[0065] 2. Discriminator
[0066] There are two main evaluation indicators for the quality of the generated image. First, whether the image as a whole meets the image characteristics of the substation equipment; second, whether the generated defects meet the image characteristics of oil leakage and rust defects. Therefore, in this patent, local and global consistency discriminators are designed to distinguish whether the global image and the local defect area are real. Each discriminator has two subnetworks, namely the local subnetwork and the global subnetwork. The discriminator compresses the image into a small feature vector. The outputs of the two subnetworks are fused together through the cascade layer to predict the true probability of the image, thereby improving the quality of regional abnormal defect generation.
[0067] In a possible implementation, the discriminator is set to 4, namely D1 def , D2 def , D1 norm , D2 norm ;
[0068] Each of the discriminators includes a local discriminator subnetwork and a global discriminator subnetwork, wherein the local discriminator subnetwork inputs an image with pixels of 64×64 pixels and outputs a single vector with a dimension of 1024, and is composed of four convolutional layers and a single fully connected layer;
[0069] The global discriminator subnetwork inputs an image with pixels of 512×512 pixels and outputs a single vector of dimension 1024. It consists of four convolutional layers and a single fully connected layer, and all convolutions use a 5×5 kernel with a stride of 2.
[0070] The following is a detailed description of the discriminator.
[0071] The structure of the discriminator in the embodiment of the present invention is as follows: Figure 4 As shown. The four discriminators in ADD-GAN (D1 def , D2 def , D1norm , D2 norm ) have the same structure. In general, the local subnet scales the input image (local segmentation area image) to 64×64 pixels as input. The local subnet consists of four convolutional layers (Conv) and a single fully connected layer (FC), which outputs a single vector of dimension 1024, which represents the local semantic features within the cropped abnormal area. The global subnet follows the same pattern and uses the entire image (512×512 pixels) as input. Given that the resolution of the input image is 8 times that of the local defect area, the global discriminator subnet has more convolutional layers than the local discriminator subnet. The output is also a 1024-dimensional vector representing the global context. All convolutions use a 5×5 kernel with a stride of 2.
[0072] The two 1024-dimensional vectors output by the local discriminator subnet and the global discriminator subnet are concatenated together to form a single 2048-dimensional vector. This aggregated feature is then processed by a fully connected layer and a sigmoid layer to output a scalar to identify real and fake images. The scalar value is distributed in the range [0,1] and represents the probability of the image being real based on local and global representations.
[0073] Of course, the ADD-GAN loss function contains three parts, namely, global perception adversarial loss, local defect perception loss, and cycle consistency loss. Global perception adversarial loss helps ADD-GAN generate defects with high image quality and rich diversity. Local defect perception loss can make the details and semantic features of generated defects more realistic. Cycle consistency loss enables ADD-GAN to generate abnormal images by learning image features of a small number of defective device images and a rich set of defect-free device images. The present invention also improves the loss function.
[0074] 1) Globally Perceptual Adversarial Loss
[0075] Most GAN models are often affected by mode collapse, generating images with poor quality and diversity. To solve this problem, this patent uses D2 adversarial loss to stabilize model training and improve the feature diversity of generated images. Given that the discriminator of this patent needs to judge the authenticity of local defects and global texture of generated images at the same time, this patent designs a locally aware D2 adversarial loss based on D2 adversarial loss. The improved adversarial loss helps to improve the quality of generated regional defect images.
[0076] For the generator G that converts a defect-free image into a defective image norm2def And its corresponding discriminator D1 def , the loss function of the relevant global-aware adversarial loss is as follows:
[0077]
[0078] Among them, I norm represents the original defect-free overall image, I def Represents the original device defect area image, MI def represents the original mask defect area image, F def represents the generated defect overall image, MF def represents the generated mask defect area image. The above formula is essentially to maximize D1 def And minimize G norm2def D1 def (I def ,MI def ) is closer to 1, the more accurately the discriminator can identify real samples. def (F def ,MF def ) is closer to 0, the less accurate the discriminator is in distinguishing the generated defective samples. During the training phase, the discriminator is fixed. If G norm2def The function is stronger, then the discriminator will make a wrong judgment and misjudge the generated image as the original image, thereby increasing D1 def (I def ,MI def ), so that the second half of the formula approaches 0, thus reducing the loss.
[0079] 2) Local defect perception loss
[0080] Since device surface defects often only exist in a small part of the segmentation mask, in order to further focus on the quality of generated defects, this patent designs a local defect perception loss in the generator part of the network, as shown in the following formula:
[0081] L aware (MI norm MF norm MI def MF def )
[0082] =L semantic [MF norm ,MI norm )]
[0083] +L semantic [MF def ,MI def )]
[0084] Where L semantic [MF norm ,MI norm)] is the difference loss between the defect-free part of the image generated within the segmented mask and the true defect-free image, and L semantic [MF def ,MI def )] is the difference loss between the defective part of the generated image within the segmented mask and the real defective image. The purpose of this loss is to ensure the quality of both defective and non-defective areas within the mask during the generator training process. The smaller the loss, the better the quality of the image inside the mask.
[0085] 3) Cycle consistency loss
[0086] If the number of defect training samples is sufficient, the locally perceived D2 adversarial loss can ensure the quality and diversity of the generated device surface defect images. However, the actual number of defect images is small, while the number of normal images is sufficient, which will result in the situation where the generated defect images have relatively monotonous features. Therefore, this patent introduces the cycle consistency loss to prevent this from happening and achieve the goal of generating feature-rich abnormal images using normal images. The cycle consistency loss method assumes a mapping H def 2 norm The generated defective image can be converted into an image in the defect-free sample image space, thereby establishing a one-to-one mapping relationship between the normal sample image and the defective sample image space, avoiding the problem of monotonous features of the generated defective sample image. The cycle consistency loss can be expressed as follows:
[0087]
[0088] This patent completes the design of the ADD-GAN model by designing three loss functions: global perceived adversarial loss, local defect perceived loss, and cycle consistency loss.
[0089] Of course, after building the ADD-GAN model, this patent conducted relevant experiments. The experiment used an IW4210-8G server, the operating system used Ubuntu18.04, and the other configurations of the server are shown in Table 1. The GPU was used to train the ADD-GAN model.
[0090] Table 1 IW4210-8G server configuration
[0091]
[0092] After completing the data set construction, this patent will form two sets of training data sets with defect-free images and images of two types of defects, and put them into the ADD-GAN model for training. 800 images are randomly selected from multiple normal substation equipment images to form the trainA data set (normal training set), and the remaining 200 images form the testA data set (normal test set); 800 images are randomly selected from 1000 images of a certain type of defect image to form the trainB data set (defect training set), and the remaining 200 images form the testB data set (defect test set). After training the generator model, the defect-free images are put into the generator, and the generated images are as follows: Figure 5 shown.
[0093] Figure 5 (a)(d) are the acquired images of the device without defects. Figure 5 (b) is the collected metal corrosion image of the substation equipment. Figure 5 (e) The collected oil leakage image, Figure 5 (c) is the generator model of ADD-GAN. Figure 5 (a) The converted image of the device with corrosion defects. Figure 5 (f) is the generator model of ADD-GAN. Figure 5 (d) The converted equipment image with oil leakage defect. According to expert evaluation, the generated equipment defect image has a high degree of restoration with the real image and can be added to the defect detection training dataset based on deep learning.
[0094] The method for generating local area defects of substation equipment provided by the present invention determines the defect categories that may exist on each target substation equipment; for any target substation equipment, multiple normal substation equipment images and multiple original defect images of the target substation equipment are obtained to obtain a defect-normal image data set; wherein the normal substation equipment image is an image of the target substation equipment in a normal state, and the original defect image is an image of any substation equipment containing at least one defect type; based on the multiple defect-normal image data sets, the original ADD-GAN model is trained to obtain a trained ADD-GAN model, so that the trained ADD-GAN model can generate a local defective equipment image from the normal substation equipment image of any input substation equipment and the original defect image containing any defect type; wherein the local defective equipment image is an image of the substation equipment carrying a defect type; the original ADD-GAN model adopts a generator composed of a coding-decoding network with a U-shaped architecture, and a local and global consistency discriminator. This method can not only segment the equipment area without changing the global image features and generate relevant defects in the local area, but also take into account the overall quality of the image and the fusion consistency of the global image and the local defect image, thereby generating high-quality equipment defect images with rich image features and high realism, greatly increasing the data in the substation equipment surface defect dataset.
Claims
1. A method for generating local area defects of substation equipment, It is characterized in that The method comprises: Step 1: Determine the possible defect categories on each target substation; Step 2: for any target substation, obtain multiple normal substation images and multiple original defect images of the target substation to obtain a defect-normal image data set; wherein the normal substation image is an image of the target substation in a normal state, and the original defect image is an image of any substation containing at least one of the defect types; Step three, the original ADD-GAN model is trained based on multiple defect-normal image data sets to obtain a trained ADD-GAN model, so that the trained ADD-GAN model can generate a local defective device image from a normal substation device image of any input substation device and an original defective image containing any defect type; wherein the local defective device image is an image of the substation device carrying the defect type; the original ADD-GAN model adopts a generator composed of a U-shaped encoding-decoding network, and local and global consistency discriminators.
2. A method for generating local area defects of a substation according to claim 1, It is characterized in that In step one, when the target substation equipment is a transformer or a switch cabinet, the defect types include oil stains on the surface of components and metal corrosion; when the target substation equipment is an insulator, the defect types include insulator damage; when the target substation equipment is an electric power meter, the defect types include meter damage.
3. A method for generating local area defects of substation equipment according to claim 1, It is characterized in that In step 2, the plurality of normal substation equipment images and the plurality of original defect images are obtained by taking pictures during manual inspection and automatic inspection.
4. A method for generating local area defects of substation equipment according to claim 1, It is characterized in that In the step 2, after obtaining a plurality of original defect images, defect image processing is performed on each original defect image by means of manual segmentation, expert hand-drawing, and random repositioning, rotation, and scaling of defects.
5. A method for generating local area defects of a substation according to claim 1, It is characterized in that In step 3, the generator adopts an encoder-decoder architecture with an input and an output of 256*256 size, wherein the input part also includes one-dimensional mask information, which includes an encoding path and a decoding path; The encoding path is a convolutional neural network, and each structure in the convolutional neural network uses the function ConV-BN-ReLU-ConV-BN-ReLU to process the feature map on the path; Each step of the decoding path first uses a deconvolution operation. After deconvolution, the deconvolution result is concatenated with the feature map of the corresponding size in the encoding path and propagated backward.
6. A method for generating local area defects of substation equipment according to claim 5, It is characterized in that In step 3, the discriminator is set to 4, namely D1 def , D2 def , D1 norm , D2 norm ; Each of the discriminators includes a local discriminator subnetwork and a global discriminator subnetwork, wherein the local discriminator subnetwork inputs an image with pixels of 64×64 pixels and outputs a single vector with a dimension of 1024, and is composed of four convolutional layers and a single fully connected layer; The global discriminator subnetwork inputs an image with pixels of 512×512 pixels and outputs a single vector of dimension 1024. It consists of four convolutional layers and a single fully connected layer, and all convolutions use a 5×5 kernel with a stride of 2.
7. A method for generating local area defects of substation equipment according to claim 1, It is characterized in that In step 3, for the generator G that converts the defect-free image into the defective image norm2def And its corresponding discriminator D1 def , the loss function of the relevant global-aware adversarial loss is as follows: Among them, I norm represents the original defect-free overall image, I def Represents the original device defect area image, MI def represents the original mask defect area image, F def represents the generated defect overall image, MF def Represents the generated mask defect area image.
8. A method for generating local area defects of a substation according to claim 1, It is characterized in that In step 3, a local defect-aware loss is designed in the generator part of the network, as shown in the following formula: L aware (MID norm ;MF norm ;MID def ;MF def ) =L semantic [MF norm ,MID norm )]+L semantic [MF def ,MID def )] Where L semantic [MF norm ,MI norm )] is the difference loss between the defect-free part of the image generated within the segmented mask and the true defect-free image, and L semantic [MF def ,MI def )] is the difference loss between the part of the image defect generated within the segmented mask and the real defect image.
9. A method for generating local area defects of substation equipment according to claim 1, It is characterized in that In step 3, the cycle consistency loss is obtained using the following formula:
Citation Information
Patent Citations
Multi-target image data enhancement method based on adversarial neural network
CN114519798A
