Small sample substation equipment visual defect detection method and system based on improved AnoGAN
By training and optimizing the discriminator with an improved AnoGAN, defect images with high similarity are generated. By combining similarity and convolutional classification networks, the problem of insufficient small sample data in substation equipment defect detection is solved, thereby improving detection accuracy and robustness.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-07-06
- Publication Date
- 2026-03-10
AI Technical Summary
Existing technologies for detecting defects in substation equipment suffer from problems such as insufficient small sample data and model overfitting, resulting in a high false negative rate and a large discrepancy between the generated data and the real data, lacking robustness.
An improved AnoGAN adversarial generative network is used to train normal device images to generate defective images with high similarity. These defective images are then detected by combining similarity classification and convolutional classification networks, and the discriminator is optimized to improve recognition accuracy.
It improves the accuracy and versatility of substation equipment defect detection, ensures high similarity between generated data and real data, and reduces the false negative rate.
Smart Images

Figure CN116862867B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of machine learning, in particular to a small sample visual defect detection method and system for substation equipment based on improved AnoGAN. BACKGROUND
[0002] With the development of artificial intelligence technology, intelligent inspection technology is increasingly applied in substations, which mainly replaces manual work to complete daily inspection of unattended substations. An effective way to realize intelligent inspection of substations is to combine existing video processing technology and image recognition technology to realize real-time monitoring of substation equipment defects.
[0003] The prior art usually adopts a general neural network to train a detection model for defect detection. However, due to the characteristics of the power field, it is difficult to obtain a large amount of real defect data, which cannot cover real scenarios, resulting in overfitting of the trained model and a high rate of missed detection in actual application. Through the use of an adversarial neural network for defect detection, a data set can be generated and trained in cooperation with the detection network, which can improve the accuracy of the generated data and increase the robustness of the detection network, and can well solve the problems of insufficient defect data and high rate of missed detection of the detection network.
[0004] Current visual defect detection methods are mostly based on traditional detection models, such as the YOLO series and MaskR-CNN. Such algorithms are not designed for defect detection and only treat defects as a type of detection. Therefore, the trained model has a high rate of missed detection for defect types outside the training set, and the model needs to be iterated to adapt to different application environments.
[0005] In addition, due to the characteristics of the power field, it is difficult to obtain real defect data in actual training, so the model needs to be optimized for small samples. Existing methods mostly use generative adversarial networks (GAN) as an auxiliary tool to generate artificial data sets to expand the data set, but in actual application, the data generated by GAN is quite different from the original data, and has less positive impact on the model. The existing GAN-CNN method can solve the problem of insufficient data set to some extent, but the GAN algorithm still cannot generate data sets of other types, and the network trained by this method lacks robustness, and in actual application, defects with a small proportion in the data set are prone to be missed. Figure One
[0006] Prior art solutions:
[0007] 1. A switchgear partial discharge fault pattern recognition method based on GAN-CNN Invention patent application number: CN202211659218
[0008] The application discloses a switch cabinet partial discharge fault mode recognition method based on a GAN-CNN, and comprises the following steps: S1, collecting PRPD pattern data of partial discharge of a switch cabinet of a transformer substation; S2, combining prior knowledge and real PRPD patterns, generating simulated PRPD partial discharge defect patterns that can be used for classification model learning based on a GAN network; S3, randomly extracting part of the real PRPD patterns as a test set, and inputting the simulated PRPD patterns and the remaining real PRPD patterns into a CNN network after being shuffled as a training set for training, to obtain a switch cabinet partial discharge fault mode recognition model; and S4, using the trained model to recognize the partial discharge mode of real-time PRPD patterns, to realize situation awareness and abnormal monitoring of the switch cabinet of the transformer substation. The application can analyze features of a large amount of PRPD patterns, and improve the accuracy of the recognition model by deep mining of the PRPD data while effectively solving the problem of scarcity of negative samples in the historical training set.
[0009] 2. A high-precision substation equipment defect recognition method based on a MaskR-CNN algorithm framework
[0010] The application discloses a high-precision substation equipment defect recognition method based on a MaskR-CNN algorithm framework, which comprises the following steps: collecting substation equipment defect image data sets; according to the actual situation of the substation site, summarizing the target substation equipment and the defect types of the target substation equipment, and obtaining a training data set; using a GAN network to increase the defect image data set, to fill the shortcomings of the insufficient training data set, and to obtain an expanded substation equipment defect pattern sample set; using an optimized GFPN network model of MaskR-CNN to train and learn the expanded substation equipment defect pattern sample set, to realize recognition of the substation equipment defects. The application extracts substation equipment defect features through deep vision technology, and makes a timely recognition classification result when a substation equipment defect is found in the monitoring or inspection process. The method provided by the application can greatly reduce the workload of substation equipment inspection, and can improve the inspection efficiency while ensuring the safety of power operation.
[0011] 3. A transformer substation equipment fault diagnosis method based on an integrated deep generation model
[0012] The application discloses a substation equipment fault diagnosis method based on an integrated deep generation model, and the method comprises the following steps: collecting substation equipment operation data, performing data preprocessing, and constructing a sample training data set and a random latent data set; an AMBI-GAN integrated deep generation model based on a bidirectional long short-term memory network and an attention mechanism is constructed; the AMBI-GAN integrated deep generation model is trained; test data is input into the trained model, and the total loss Ltest of the model is calculated; a discrimination score is obtained through 1-Ltest, and if the discrimination score exceeds a preset value, it is judged to be abnormal; the method has the advantage that the fault diagnosis performance is further improved by making full use of a small amount of labeled data. SUMMARY
[0013] The application aims to provide an efficient small-sample substation equipment visual defect detection method based on an improved AnoGAN.
[0014] To solve the above technical problems, the application provides a small-sample substation equipment visual defect detection method based on an improved AnoGAN, which comprises the following steps:
[0015] Obtaining training substation equipment images; the training substation equipment images comprise normal substation equipment images and defective substation equipment images;
[0016] Training an AnoGAN generative adversarial network according to the normal substation equipment images to obtain a trained AnoGAN generative adversarial network;
[0017] Inputting the defective substation equipment images into the trained AnoGAN generative adversarial network to output preprocessed defective substation equipment images;
[0018] Inputting the preprocessed defective substation equipment images into a pre-trained similarity classification network for classification to output a similarity classification result;
[0019] Inputting the preprocessed defective substation equipment images into a pre-trained convolution classification network for classification to output a convolution classification result;
[0020] Obtaining a defect detection result according to the similarity classification result and the convolution classification result.
[0021] Preferably, the AnoGAN generative adversarial network comprises a generator and a discriminator, the AnoGAN generative adversarial network is trained according to the normal substation equipment images to obtain the trained AnoGAN generative adversarial network, and the method comprises the following steps:
[0022] Inputting the normal substation equipment images into the generator of the AnoGAN generative adversarial network to obtain target substation equipment images;
[0023] inputting the normal substation equipment image and the target substation equipment image into a discriminator of the AnoGAN generative adversarial network to obtain a discrimination result;
[0024] optimizing the generator according to the discrimination result to obtain the AnoGAN generative adversarial network after training.
[0025] Preferably, inputting the normal substation equipment image and the target substation equipment image into a discriminator of the AnoGAN generative adversarial network to obtain a discrimination result, specifically comprising the following steps:
[0026] calculating the peak signal-to-noise ratio (PSNR) of each normal substation equipment image and target substation equipment image;
[0027] calculating the average PSNR of all normal substation equipment images and target substation equipment images as the discrimination result.
[0028] Preferably, optimizing the generator according to the discrimination result to obtain the AnoGAN generative adversarial network after training, specifically comprising the following steps:
[0029] optimizing the network parameters of the generator according to the average PSNR to obtain the optimized generator;
[0030] judging whether the average PSNR is greater than a first PSNR threshold value;
[0031] if the average PSNR is less than or equal to the first PSNR threshold value, retraining the AnoGAN generative adversarial network;
[0032] until the average PSNR is greater than the first PSNR threshold value, ending the optimization, and obtaining the AnoGAN generative adversarial network after training according to the optimized generator.
[0033] Preferably, the training method of the pre-trained similarity classification network is:
[0034] inputting a training set into the similarity classification network; the training set includes normal substation equipment images for training and defective substation equipment images for training;
[0035] calculating the peak signal-to-noise ratio (PSNR) of the normal substation equipment images for training and the defective substation equipment images for training;
[0036] setting a second PSNR threshold value according to the peak signal-to-noise ratio (PSNR) of the normal substation equipment images for training and the defective substation equipment images for training;
[0037] obtaining the pre-trained similarity classification network according to the second PSNR threshold value.
[0038] Preferably, the second PSNR threshold is less than or equal to the peak signal-to-noise ratio (PSNR) of 99% of the training normal substation equipment images and corresponding training defective substation equipment images in the training set.
[0039] Preferably, the pre-processed defective substation equipment image is input into the pre-trained similarity classification network for classification, and a similarity classification result is output, specifically including the following steps:
[0040] The normal substation equipment image and the pre-processed defective substation equipment image are input into the pre-trained similarity classification network.
[0041] The peak signal-to-noise ratio (PSNR) of the normal substation equipment image and the pre-processed defective substation equipment image is calculated.
[0042] It is judged whether the peak signal-to-noise ratio (PSNR) of the to-be-detected substation equipment image and the pre-processed defective substation equipment image is greater than the second PSNR threshold.
[0043] If the peak signal-to-noise ratio (PSNR) of the to-be-detected substation equipment image and the pre-processed defective substation equipment image is greater than or equal to the second PSNR threshold, it is judged that the to-be-detected substation equipment image is normal.
[0044] If the peak signal-to-noise ratio (PSNR) of the to-be-detected substation equipment image and the pre-processed defective substation equipment image is less than the second PSNR threshold, it is judged that the to-be-detected substation equipment image has a corresponding defect.
[0045] Preferably, the classification method of the pre-trained convolution classification network is:
[0046] The training set is input into the convolution classification network; the training set includes training normal substation equipment images and training defective substation equipment images.
[0047] Based on the supervised learning method, the convolution classification network is trained according to the normal substation equipment images and the training defective substation equipment images, and a pre-trained convolution classification network is obtained.
[0048] Preferably, according to the similarity classification result and the convolution classification result, a defect detection result is obtained, specifically including the following steps:
[0049] The intersection of the similarity classification result and the convolution classification result is taken as the defect detection result.
[0050] The application also provides a small sample substation equipment visual defect detection system based on an improved AnoGAN, comprising:
[0051] An acquisition module is configured to acquire training substation equipment images; the training substation equipment images include normal substation equipment images and defective substation equipment images.
[0052] AnoGAN generative adversarial network training module, configured to train an AnoGAN generative adversarial network according to normal substation equipment images, and obtain the AnoGAN generative adversarial network after training;
[0053] The preprocessing module is configured to input the defect substation equipment image into the AnoGAN generative adversarial network after training, and output a preprocessed defect substation equipment image;
[0054] The similarity classification network classification module is configured to input the preprocessed defect substation equipment image into the pre-trained similarity classification network for classification, and output a similarity classification result;
[0055] The convolution classification network classification module is configured to input the preprocessed defect substation equipment image into the pre-trained convolution classification network for classification, and output a convolution classification result;
[0056] The defect detection module is configured to obtain a defect detection result according to the similarity classification result and the convolution classification result.
[0057] Compared with the prior art, the present application has the following advantages:
[0058] In the present application, the AnoGAN generative adversarial network is used for training non-fault data, so it has natural recognition ability for all kinds of fault data, and multiple judgments on the generation effect of the AnoGAN generative adversarial network are added in the training process to ensure the similarity of the generated data and the real data. Secondly, in the present application, the AnoGAN generative adversarial network is part of the discriminant model and participates in the subsequent model joint debugging process, which helps to improve the recognition accuracy.
[0059] In the present application, the AnoGAN generative adversarial network does not participate in data enhancement, and under the premise of ensuring that the generated data has high similarity with the original data, the GAN data only participates in the preprocessing of the image, ensuring the effect of the subsequent model training data. Secondly, since the training network in the present method only trains normal data, the generation effect can distinguish all non-normal state equipment, and has high universality in practical application.
[0060] In the present application, the discriminator of the AnoGAN generative adversarial network is optimized in the field of images. The discriminator adopts a 4-fold down_block to compress the image size, and adopts a 1x1 convolution instead of the previous fully connected network to optimize the model. BRIEF DESCRIPTION OF DRAWINGS
[0061] The specific embodiments of the present application will be further described in detail below with reference to the accompanying drawings.
[0062] Figure 1 This is a flowchart illustrating the visual defect detection method in Example 1;
[0063] Figure 2 This is a schematic diagram of the network structure of the discriminator;
[0064] Figure 3 This is a flowchart illustrating a small-sample visual defect detection method for substation equipment based on an improved AnoGAN according to the present invention. Detailed Implementation
[0065] Numerous specific details are set forth in the following description to provide a full understanding of the invention. However, the invention can be practiced in many other ways different from those described herein, and those skilled in the art can make similar extensions without departing from the spirit of the invention. Therefore, the invention is not limited to the specific embodiments disclosed below.
[0066] The terminology used in one or more embodiments of this specification is for the purpose of describing particular embodiments only and is not intended to be limiting of the one or more embodiments of this specification. The singular forms “a,” “described,” and “the” as used in one or more embodiments of this specification and the appended claims are also intended to include the plural forms unless the context clearly indicates otherwise. It should also be understood that the term “and / or” as used in one or more embodiments of this specification refers to and includes any or all possible combinations of one or more associated listed items.
[0067] It should be understood that although the terms first, second, etc., may be used to describe various information in one or more embodiments of this specification, such information should not be limited to these terms. These terms are only used to distinguish information of the same type from one another. For example, first may also be referred to as second without departing from the scope of one or more embodiments of this specification, and similarly, second may also be referred to as first. Depending on the context, the word "if" as used herein may be interpreted as "when," "when," or "in response to a determination."
[0068] The present invention will now be described in further detail with reference to the accompanying drawings:
[0069] like Figure 3 As shown, this invention provides a small-sample visual defect detection method for substation equipment based on an improved AnoGAN, comprising the following steps:
[0070] Acquire training substation equipment images; the training substation equipment images include normal substation equipment images and defective substation equipment images;
[0071] The AnoGAN adversarial generative network is trained based on images of normal substation equipment to obtain the trained AnoGAN adversarial generative network.
[0072] The defective substation equipment image is input into the trained AnoGAN adversarial generative network, and the preprocessed defective substation equipment image is output.
[0073] The preprocessed images of defective substation equipment are input into a pre-trained similarity classification network for classification, and the similarity classification results are output.
[0074] The preprocessed images of defective substation equipment are input into a pre-trained convolutional classification network for classification, and the convolutional classification results are output.
[0075] Based on the similarity classification results and the convolution classification results, the defect detection results are obtained.
[0076] Preferably, the AnoGAN adversarial generative network includes a generator and a discriminator. The AnoGAN adversarial generative network is trained based on images of normal substation equipment to obtain the trained AnoGAN adversarial generative network. Specifically, the training includes the following steps:
[0077] The normal substation equipment image is input into the generator of the AnoGAN adversarial generative network to obtain the target substation equipment image;
[0078] The images of normal substation equipment and the target substation equipment are input into the discriminator of the AnoGAN generative adversarial network to obtain the discrimination results.
[0079] The generator is optimized based on the discrimination results to obtain the trained AnoGAN adversarial generative network.
[0080] Preferably, the images of normal substation equipment and the target substation equipment are input into the discriminator of the AnoGAN generative adversarial network to obtain the discrimination result, specifically including the following steps:
[0081] Calculate the peak signal-to-noise ratio (PSNR) for each normal substation equipment image and the target substation equipment image;
[0082] The average PSNR is calculated based on the peak signal-to-noise ratio (PSNR) of all normal substation equipment images and the target substation equipment images, and is used as the discrimination result.
[0083] Preferably, the generator is optimized based on the discrimination results to obtain the trained AnoGAN adversarial generative network, specifically including the following steps:
[0084] The network parameters of the generator are optimized based on the average PSNR to obtain the optimized generator;
[0085] Determine whether the average PSNR is greater than the first PSNR threshold;
[0086] If the average PSNR is less than or equal to the first PSNR threshold, then retrain the AnoGAN adversarial generative network.
[0087] The optimization ends when the average PSNR is greater than the first PSNR threshold. Based on the optimized generator, the trained AnoGAN adversarial generative network is obtained.
[0088] Preferably, the training method for the pre-trained similarity classification network is as follows:
[0089] The training set is input into the similarity classification network; the training set includes images of normal substation equipment and images of defective substation equipment used for training.
[0090] Calculate the peak signal-to-noise ratio (PSNR) of images of normal substation equipment used for training and images of defective substation equipment used for training;
[0091] A second PSNR threshold is set based on the peak signal-to-noise ratio (PSNR) of the training images of normal substation equipment and the training images of defective substation equipment.
[0092] Based on the second PSNR threshold, the pre-trained similarity classification network is obtained.
[0093] Preferably, the second PSNR threshold is less than or equal to the peak signal-to-noise ratio (PSNR) of 99% of the normal substation equipment images and corresponding defective substation equipment images in the training set.
[0094] Preferably, the preprocessed image of the defective substation equipment is input into a pre-trained similarity classification network for classification, and the similarity classification result is output. This specifically includes the following steps:
[0095] Input normal substation equipment images and preprocessed defective substation equipment images into a pre-trained similarity classification network;
[0096] Calculate the peak signal-to-noise ratio (PSNR) of normal substation equipment images and preprocessed defective substation equipment images;
[0097] Determine whether the peak signal-to-noise ratio (PSNR) of the image of the substation equipment to be inspected and the image of the defective substation equipment after preprocessing are greater than the second PSNR threshold.
[0098] If the peak signal-to-noise ratio (PSNR) of the substation equipment image to be inspected and the preprocessed defective substation equipment image is greater than or equal to the second PSNR threshold, then the substation equipment image to be inspected is judged to be normal.
[0099] If the peak signal-to-noise ratio (PSNR) of the substation equipment image to be inspected and the preprocessed defective substation equipment image is less than the second PSNR threshold, then it is determined that the substation equipment image to be inspected has a corresponding defect.
[0100] Preferably, the classification method of the pre-trained convolutional integral network is as follows:
[0101] The training set is input into the convolutional class network; the training set includes images of normal substation equipment and images of defective substation equipment for training.
[0102] Based on the supervised learning method, a convolutional integral network is trained using images of normal substation equipment and images of defective substation equipment for training, resulting in a pre-trained convolutional integral network.
[0103] Preferably, the defect detection result is obtained based on the similarity classification result and the convolution classification result, specifically including the following steps:
[0104] The intersection of similarity classification results and convolutional classification results is used as the defect detection result.
[0105] This invention also provides a small-sample visual defect detection system for substation equipment based on an improved AnoGAN, comprising:
[0106] The acquisition module is used to acquire images of training substation equipment; the training substation equipment images include images of normal substation equipment and images of defective substation equipment;
[0107] The AnoGAN adversarial generative network training module is used to train the AnoGAN adversarial generative network based on images of normal substation equipment, and obtain the trained AnoGAN adversarial generative network.
[0108] The preprocessing module is used to input the images of defective substation equipment into the trained AnoGAN adversarial generative network and output the preprocessed images of defective substation equipment.
[0109] The similarity classification network module is used to input the pre-processed defective substation equipment image into the pre-trained similarity classification network for classification and output the similarity classification result.
[0110] The convolutional class network classification module is used to input the pre-processed defective substation equipment image into the pre-trained convolutional class network for classification and output the convolutional class result.
[0111] The defect detection module is used to obtain defect detection results based on similarity classification results and convolution classification results.
[0112] To better illustrate the technical effects of the present invention, the present invention provides the following specific embodiments to illustrate the above technical process:
[0113] Example 1: A small-sample visual defect detection system for substation equipment based on improved AnoGAN. The monitoring model can be divided into three parts: an AnoGAN generation model for normal equipment images, a convolutional neural network for classifying the generated results, and a network for calculating the similarity between the generated image and the original image. The overall detection process of the system is as follows:
[0114] A method for detecting visual defects in substation equipment based on an improved AnoGAN in a small sample size includes the following steps:
[0115] Step 1: Divide the dataset into two categories based on actual needs: normal equipment and defective equipment (i.e., images of normal substation equipment and images of defective substation equipment). If it is necessary to identify defects in multiple types of equipment, the dataset needs to be further divided according to equipment type.
[0116] Step 2: Train the AnoGAN adversarial generative network using normal substation equipment images (defect-free equipment images). The network consists of a generator and a discriminator. The generator is responsible for generating artificial images (target substation equipment images) based on the dataset, and the discriminator is responsible for identifying the target substation equipment images from normal substation equipment images.
[0117] Step 3: After the adversarial generative network reaches equilibrium, calculate the peak signal-to-noise ratio (PSNR) of the target substation equipment image and the normal substation equipment image. If the average PSNR value is greater than 28, the network is considered usable. Otherwise, repeat step 2 training until the PSNR value meets the requirements.
[0118] Step 4: Fix the parameters of the generative adversarial network and use it as a sub-model of the defect detection algorithm;
[0119] Step 5: Construct a defect detection model, in which the adversarial generative network with fixed parameters in step 4 is used to preprocess the input image (the defective substation equipment image obtained in step 1), and the results are input into the classification model based on convolutional network and the classification model based on similarity calculation, respectively.
[0120] Step 6: Set the similarity calculation network parameters. The similarity calculation network calculates the PSNR of the target substation equipment image (the preprocessed image obtained in Step 5) and the normal substation equipment image. At this point, a PSNR threshold needs to be set. Images with a PSNR lower than the threshold will be judged as defective equipment, and those with a PSNR greater than or equal to the threshold will be judged as normal equipment. Select a test dataset of more than 10,000 images and calculate the PSNR value of the generated images for each. Set the PSNR threshold with a judgment accuracy of 99% as the limit. If the threshold is <15, the generation network in Step 2 needs to be retrained.
[0121] Step 7: Train the convolutional classification network. Using all the equipment data selected in Step 1 (images of normal substation equipment and images of defective substation equipment), train the classification network based on supervised learning. The network can then judge defects from the feature images output by the generated model.
[0122] Step 8: Integrate the detection network. The overall network first inputs the image into the adversarial generative network, then inputs the output of the generative network into the convolutional classification network and the similarity classification network respectively, and takes the intersection of the network output classification results as the final network judgment result.
[0123] Step 9: The system should extract images of normal and defective substation equipment detected every three months and use them to update the detection model to ensure the model's ability to judge new scene images.
[0124] This embodiment consists of three parts: an adversarial generative network for normal images, a convolutional classification network for the output of the adversarial network, and a network for calculating PSNR similarity.
[0125] This embodiment proposes a network training process for device defect detection using generative adversarial networks, and proposes key indicators for each step in the process to determine whether the current network is usable;
[0126] This embodiment proposes a network structure for a discriminator in a neural network for defect detection. The discriminator's downblock consists of a 3x3 convolutional layer and a normalization layer. Each time the image passes through the downblock, the image size is halved. After four downblock passes, the input image size changes from 128 to 8. An additional 1x1 convolutional layer is introduced into the traditional fully connected discriminative network to enhance its generalization ability and avoid a significant increase in the number of nodes due to the increased number of classifications in later stages. The significant compression of the neural network also improves its ability to extract feature data. Figure 2 As shown.
[0127] In the several embodiments provided by this invention, it should be understood that the disclosed apparatus and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative. For instance, the division of modules, units, or units is merely a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units, modules, or components may be combined or integrated into another device, or some features may be ignored or not executed.
[0128] The units may or may not be physically separate. The components shown as units can be one or more physical units, meaning they can be located in one place or distributed in multiple different locations. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0129] Furthermore, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.
[0130] In particular, according to embodiments disclosed in this invention, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of this disclosure include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via a communication component, and / or installed from a removable medium. When the computer program is executed by a central processing unit (CPU), it performs the functions defined in the methods of this invention. It should be noted that the computer-readable medium described above in this invention can be a computer-readable signal medium or a computer-readable storage medium, or any combination of the two. The computer-readable storage medium can be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof.
[0131] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of the present invention. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.
[0132] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any variations or substitutions within the technical scope disclosed in the present invention should be included within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.
Claims
1. A small sample substation equipment visual defect detection method based on improved AnoGAN, characterized in that, The method comprises the following steps: obtaining training substation equipment images; the training substation equipment images comprise normal substation equipment images and defective substation equipment images; inputting the normal substation equipment images into a generator of an AnoGAN generative adversarial network to obtain target substation equipment images; inputting the normal substation equipment images and the target substation equipment images into a discriminator of the AnoGAN generative adversarial network to obtain a discrimination result: calculating the peak signal-to-noise ratio (PSNR) of each normal substation equipment image and target substation equipment image; calculating the average PSNR of all normal substation equipment images and target substation equipment images as the discrimination result; optimizing the generator according to the discrimination result to obtain the trained AnoGAN generative adversarial network: optimizing the network parameters of the generator according to the average PSNR to obtain an optimized generator; determining whether the average PSNR is greater than a first PSNR threshold; if the average PSNR is less than or equal to the first PSNR threshold, retraining the AnoGAN generative adversarial network; until the average PSNR is greater than the first PSNR threshold, ending the optimization, and obtaining the trained AnoGAN generative adversarial network according to the optimized generator; inputting the defective substation equipment images into the trained AnoGAN generative adversarial network to output preprocessed defective substation equipment images; inputting the preprocessed defective substation equipment images into a pre-trained similarity classification network for classification to output a similarity classification result; the training method of the pre-trained similarity classification network comprises the following steps: inputting a training set into the similarity classification network; the training set comprises training normal substation equipment images and training defective substation equipment images; calculating the peak signal-to-noise ratio (PSNR) of the training normal substation equipment images and the training defective substation equipment images; setting a second PSNR threshold according to the peak signal-to-noise ratio (PSNR) of the training normal substation equipment images and the training defective substation equipment images; and obtaining the pre-trained similarity classification network according to the second PSNR threshold; inputting the preprocessed defective substation equipment images into a pre-trained convolution classification network for classification to output a convolution classification result; obtaining a defect detection result according to the similarity classification result and the convolution classification result.
2. The small sample substation equipment visual defect detection method based on the improved AnoGAN according to claim 1, wherein:
3. The method of claim 2, wherein the improved AnoGAN-based small sample substation equipment visual defect detection method is characterized by, the second PSNR threshold is less than or equal to the peak signal-to-noise ratio (PSNR) of 99% of the training normal substation equipment images and the corresponding training defective substation equipment images in the training set. The method comprises the following steps: inputting the normal substation equipment images and the preprocessed defective substation equipment images into the pre-trained similarity classification network; calculating the peak signal-to-noise ratio (PSNR) of the normal substation equipment images and the preprocessed defective substation equipment images; determining whether the peak signal-to-noise ratio (PSNR) of the normal substation equipment image and the preprocessed defect substation equipment image is greater than a second PSNR threshold value; if the peak signal-to-noise ratio (PSNR) of the normal substation equipment image and the preprocessed defect substation equipment image is greater than or equal to the second PSNR threshold value, determining that the preprocessed defect substation equipment image is normal; if the peak signal-to-noise ratio (PSNR) of the normal substation equipment image and the preprocessed defect substation equipment image is less than the second PSNR threshold value, determining that the preprocessed defect substation equipment image has a corresponding defect.
4. The method of claim 1, wherein the improved AnoGAN-based small sample substation equipment visual defect detection method is characterized by, The classification method of the pre-trained convolutional classification network is: inputting a training set into the convolutional classification network; the training set includes normal substation equipment images for training and defect substation equipment images for training; based on a supervised learning method, training the convolutional classification network according to the normal substation equipment images and the defect substation equipment images for training, to obtain the pre-trained convolutional classification network.
5. The method of claim 1, wherein the improved AnoGAN-based small sample substation equipment visual defect detection method is characterized by, According to the similarity classification result and the convolutional classification result, a defect detection result is obtained, specifically including the following steps: taking the intersection of the similarity classification result and the convolutional classification result as the defect detection result.
6. A small sample substation equipment visual defect detection system based on improved AnoGAN, for implementing the small sample substation equipment visual defect detection method based on improved AnoGAN according to any one of claims 1-5, characterized in that, It includes: an acquisition module for acquiring training substation equipment images; the training substation equipment images include normal substation equipment images and defect substation equipment images; an AnoGAN adversarial generation network training module for training an AnoGAN adversarial generation network according to the normal substation equipment images, to obtain the AnoGAN adversarial generation network after training; a preprocessing module for inputting the defect substation equipment images into the AnoGAN adversarial generation network after training, to output preprocessed defect substation equipment images; a similarity classification network classification module for inputting the preprocessed defect substation equipment images into the pre-trained similarity classification network for classification, to output a similarity classification result; a convolutional classification network classification module for inputting the preprocessed defect substation equipment images into the pre-trained convolutional classification network for classification, to output a convolutional classification result; a defect detection module for obtaining a defect detection result according to the similarity classification result and the convolutional classification result.
Citation Information
Patent Citations
Substation equipment fault diagnosis method based on integrated deep generative model
CN115392436B
Power transformation equipment defect high-precision identification method based on MaskR-CNN algorithm framework
CN115578338A
Photovoltaic module unsupervised defect detection method based on GAN improved algorithm
CN111340791A
Small sample image defect detection method based on cloud edge collaboration and deep learning
CN112837282A