Power image classification method and system based on conditional generative adversarial network
By using the conditional generation adversarial network in the power image classification task to generate high-quality images and expand the training set, the overfitting problem caused by insufficient data and noise in power image classification is solved, and the accuracy and robustness of the model are improved.
Patent Information
- Application Number
- CN202411772462.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-04
- Publication Date
- 2025-03-25
AI Technical Summary
In power systems, power images often face problems such as label imbalance, noise and blur, which makes it difficult for classification models to accurately identify different categories, and are prone to overfitting and critical feature extraction problems.
A method based on conditional generation adversarial network (cGAN) is adopted to generate high-quality power images through conditional labels and random noise as inputs, combining residual connections and adaptive instance normalization, expanding the training set, and training the classification model through dynamic thawing and early stop strategies.
It improves the accuracy and robustness of the model, and can make full use of existing knowledge in the case of insufficient data to quickly adapt to the power image classification task, reducing the deviation introduced by data enhancement.
Smart Images

Figure CN119693703A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of machine learning and computer vision technology, and in particular to a method and system for classifying electric power images based on a conditional generative adversarial network. Background Art
[0002] The statements in this section merely mention background art related to the present invention and do not necessarily constitute prior art.
[0003] With the rapid development of smart grid and automation technology, the analysis of power images plays an increasingly important role in the monitoring and management of power systems. These images are often used to detect equipment failures, monitor operating status, and optimize maintenance strategies. However, in power transmission business scenarios, power images often face problems such as label imbalance, noise, and fuzziness, which makes it difficult for the model to accurately identify different categories when classifying power images, and it is easy to have problems such as overfitting and difficulty in extracting key features.
[0004] In addition, the labeling of power image data is costly and time-consuming, resulting in a limited number of available training samples. As a result, traditional deep learning models will suffer from overfitting problems when faced with power image analysis, affecting the model's generalization ability and actual application effect.
[0005] At present, although data augmentation technology is widely used to improve model performance, in actual operation, existing augmentation methods may introduce bias in the process of generating new samples. This may not only cause the model to learn inaccurate features, but also reduce its performance in real scenarios. Therefore, relying solely on data augmentation technology to solve the problem of sample scarcity is not reliable. Summary of the invention
[0006] In order to address the deficiencies of the prior art, the present invention provides a method, system, electronic device, computer-readable storage medium and computer program product for power image classification based on a conditional generative adversarial network, which can improve the accuracy and robustness of the model, and can make full use of existing knowledge and quickly adapt to power image classification tasks when data is insufficient.
[0007] In a first aspect, the present invention provides a method for classifying electric power images based on a conditional generative adversarial network;
[0008] A method for classifying power images based on a conditional generative adversarial network, comprising:
[0009] Acquire the power image to be processed;
[0010] Input the power image to be processed into the trained classification model to obtain the power image classification result;
[0011] When training the classification model, conditional labels and random noise are used as input, and the real power image is processed by a conditional generative adversarial network. Combined with residual connection and adaptive instance normalization, a synthetic power image is obtained to expand the training set used for pre-training.
[0012] In some embodiments, the conditional generative adversarial network includes an embedding layer, a merging layer, a generator, and a discriminator connected in sequence;
[0013] The generator includes multiple layers of transposed convolutional networks connected in sequence, and each layer of the transposed convolutional network is followed by a residual connection and an adaptive instance normalization; the discriminator includes multiple layers of convolutional layers, a fully connected layer and an output layer connected in sequence.
[0014] In some embodiments, the loss function of the conditional generative adversarial network is a combination of adversarial loss and structural similarity loss.
[0015] In some embodiments, the classification model is trained using a dynamic thawing strategy based on preset dynamic thawing conditions.
[0016] In some embodiments, the classification model is trained using an early stopping strategy based on a preset patience value and training evaluation results.
[0017] In some embodiments, the classification model is an improved ResNet50 model.
[0018] In a second aspect, the present invention provides a power image classification system based on a conditional generative adversarial network;
[0019] A power image classification system based on conditional generative adversarial network, comprising:
[0020] The acquisition module is configured to: acquire the power image to be processed;
[0021] The power image classification module is configured to: input the power image to be processed into a trained classification model to obtain a power image classification result;
[0022] When training the classification model, conditional labels and random noise are used as input, and the real power image is processed by a conditional generative adversarial network. Residual connection and adaptive instance normalization are combined to obtain the generated power image to expand the training set used for pre-training.
[0023] In a third aspect, the present invention provides an electronic device;
[0024] An electronic device comprises a memory, a processor and a computer program stored in the memory, wherein the processor executes the computer program to implement the steps of the above-mentioned power image classification method based on conditional generative adversarial network.
[0025] In a fourth aspect, the present invention provides a computer-readable storage medium;
[0026] A computer-readable storage medium stores a computer program / instruction, which, when executed by a processor, implements the steps of the above-mentioned power image classification method based on conditional generative adversarial network.
[0027] In a fifth aspect, the present invention provides a computer program product;
[0028] A computer program product includes a computer program / instruction, which, when executed by a processor, implements the steps of the above-mentioned power image classification method based on conditional generative adversarial network.
[0029] Compared with the prior art, the present invention has the following beneficial effects:
[0030] 1. The technical solution provided by the present invention fully considers the particularity of power images and the requirements of the target tasks, and uses the conditional generative adversarial network (cGAN) to generate high-quality power images according to specific conditional labels (such as equipment type and operating status), so as to expand the training set to further train the Resnet network and improve the generalization ability of the model and the practical application effect.
[0031] 2. The technical solution provided by the present invention designs a composite loss function that combines adversarial loss and structural similarity loss (SSIM) to ensure that the generated image is highly consistent with the real image in quality and structure.
[0032] 3. The technical solution provided by the present invention uses the generated image and the original image as the input for model fine-tuning. By fine-tuning the pre-trained model, it can adapt to the characteristics of small sample data, thereby effectively reducing the deviation introduced by data enhancement. It can not only improve the accuracy and robustness of the model, but also make full use of existing knowledge in the case of insufficient data and quickly adapt to new power image analysis tasks. BRIEF DESCRIPTION OF THE DRAWINGS
[0033] The accompanying drawings in the specification, which constitute a part of the present invention, are used to provide a further understanding of the present invention. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute improper limitations on the present invention.
[0034] Figure 1 A schematic diagram of the training process of the classification model provided by an embodiment of the present invention;
[0035] Figure 2 A schematic diagram of the architecture of a small sample learning framework provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0036] It should be noted that the following detailed descriptions are exemplary and are intended to provide further explanation of the present invention. Unless otherwise specified, all technical and scientific terms used in the present invention have the same meanings as those commonly understood by those skilled in the art to which the present invention belongs.
[0037] It should be noted that the terms used herein are only for describing specific embodiments, and are not intended to limit exemplary embodiments according to the present invention. As used herein, unless the context clearly indicates otherwise, the singular form is also intended to include the plural form. In addition, it should be understood that the terms "include" and "have" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0038] In the absence of conflict, the embodiments of the present invention and the features of the embodiments may be combined with each other.
[0039] Embodiment 1
[0040] The data augmentation technology used in the existing expanded training set does not take the actual application scenarios into consideration during the sample generation process, which may introduce bias and reduce the accuracy of the trained model. Therefore, the present invention provides a power image classification method based on a conditional generative adversarial network, which combines the training set expansion based on the conditional generative adversarial network with model fine-tuning to improve the performance of the model in power image analysis tasks.
[0041] Next, combine Figure 1-Figure 2 , a method for classifying electric power images based on a conditional generative adversarial network disclosed in this embodiment is described in detail. The method for classifying electric power images based on a conditional generative adversarial network comprises the following steps:
[0042] S1. Obtaining a power image to be processed.
[0043] S2. Input the power image to be processed into the trained classification model to obtain the power image classification result.
[0044] In this embodiment, the classification model is an improved ResNet 50 model, which introduces an attention mechanism and a Leaky ReLU activation function, including a 7x7 initial convolutional layer, a normalization layer, a Leaky ReLU activation function, a 3x3 maximum pooling layer, multiple residual blocks, a global average pooling layer, a fully connected layer and a Softmax layer connected in sequence.
[0045] As an implementation manner, the image to be processed is an RGB image of 224x224 pixels, and S2 specifically includes:
[0046] S201, the initial convolution layer uses 64 7x7 convolution kernels with a stride of 2 to extract the preliminary features of the power image to be processed (such as edges and textures); the output of the initial convolution layer is batch normalized through the normalization layer to standardize the data to accelerate training and improve stability; the output of the quasi-normalization layer is processed by the Leaky ReLU activation function to increase nonlinearity, reduce the "neuron death" phenomenon, and maintain the learning ability of the network. Use a 3x3 maximum pooling layer with a stride of 2 to reduce the size of the output feature map while retaining important features.
[0047] S202: Process the output of the maximum pooling layer through multiple residual blocks.
[0048] Specifically, the processing flow of each residual block includes 1x1 convolution, 3x3 convolution, and 1x1 convolution. The feature map is processed by the first 1x1 convolution to reduce the number of channels and reduce the computational complexity; the features of the 1x1 convolution output feature map are extracted by 3x3 convolution; and the number of channels is restored by the second 1x1 convolution.
[0049] After the output of each residual block, a channel attention mechanism is applied. This module generates channel weights through global average pooling and fully connected layers, and applies these weights to feature maps to enhance the expressiveness of important features.
[0050] The input is directly added to the output to form a residual connection, which improves the flow of information in the network and solves the gradient vanishing problem. The Leaky ReLU activation function is applied to the output of each residual block again to ensure that the network has nonlinearity. After 16 residual blocks, a global average pooling layer is used to aggregate the spatial information of each channel of the feature map into a single value to generate a one-dimensional feature vector.
[0051] S203. After 16 residual blocks, a global average pooling layer is used to aggregate the spatial information of each channel of the feature map into a single value to generate a one-dimensional feature vector. After global average pooling, the feature vector is passed to the fully connected layer (Dense Layer), and the output is the probability value of each category. Use the Softmax activation function to output the probability distribution of each category. Softmax converts the output value into a probability so that the sum of the probabilities of all categories is 1. According to the output of Softmax, the category with the highest probability is selected as the final classification result.
[0052] Furthermore, before executing S2, the step further includes: training the classification model.
[0053] As an implementation method, the specific process of training the classification model is as follows:
[0054] Step 1: Obtain a real power image, take the conditional label and random noise as input, process the real power image through the conditional generative adversarial network, combine residual connection and adaptive instance normalization, and obtain a synthetic power image to expand the training set.
[0055] In this embodiment, the conditional generative adversarial network includes an embedding layer, a merging layer, a generator and a discriminator connected in sequence; the generator includes three layers of transposed convolutional networks connected in sequence, and each layer of the transposed convolutional network is followed by a residual connection and an adaptive instance normalization; the discriminator includes three layers of convolutional layers, a fully connected layer and an output layer connected in sequence.
[0056] Specifically, the real power image is processed by the conditional generative adversarial network, combined with residual connection and adaptive instance normalization, and the specific process of obtaining the synthetic power image is as follows:
[0057] Step 101: The generator receives a random noise vector z and condition information s, concatenates the random noise vector z and condition information s to form a new input vector, and converts the concatenated input vector into an initial feature map through a fully connected layer. This ensures that the generator can utilize the randomness in the latent space and adjust the generated image features according to the condition information.
[0058] Here, the random noise vector is sampled from a standard normal distribution and the conditioning information is the features or labels associated with the generated image, processed by the embedding layer.
[0059] Step 102: Process the input data through the generator to obtain a generated image. The generator includes a three-layer transposed convolutional network. The specific workflow is as follows:
[0060] The first layer of the transposed convolutional network uses 64 3x3 convolution kernels with a stride of 2. After this layer, the spatial dimension of the feature map is upsampled to 16x16. Specifically, first, a transposed convolution is applied to the input feature map for upsampling; then adaptive instance normalization (AdaIN) is applied to adjust the mean and standard deviation of the feature map according to the conditional information s; then, the activation function Swish is used to activate the feature map to increase nonlinearity. The input feature map is added to the output of the current layer to form a residual connection to ensure information flow.
[0061] The second layer of transposed convolutional network uses 128 3x3 convolution kernels with a stride of 2. Specifically, the feature map is upsampled to 32x32. Transposed convolution is applied to the output of the first layer, and adaptive instance normalization (AdaIN) is performed. The feature map is processed by the activation function and residual connections are added.
[0062] The third layer of transposed convolution network uses 256 3x3 convolution kernels with a stride of 2 to upsample the feature map to 64x64. Transposed convolution is applied to the output of the second layer, adaptive instance normalization (AdaIN) is performed, activation functions are used for processing, and residual connections are added.
[0063] Finally, a transposed convolution layer is used to map the 64x64 feature map to a 128x128 generated image. This layer generates an RGB image using 3 convolution kernels and applies a Sigmoid activation function to ensure that the output values are within the range. The generator returns a generated power image, which represents the generated high-quality image, ensuring that the generated image gradually builds up a high-resolution image while maintaining the conditional information.
[0064] Exemplarily, adaptive instance normalization mainly adjusts the image to generate a satisfying feature map through a conditional feature map, and the adjustment formula is as follows:
[0065]
[0066] in, represents the standard deviation of the conditional feature map s, Represents the normalized input feature map.
[0067] In summary, the generator uses three layers of transposed convolutional networks. The first layer of the transposed convolutional network uses 64 3x3 convolution kernels with a stride of 2 and outputs a 16x16 feature map; the second layer of the transposed convolutional network uses 128 3x3 convolution kernels with a stride of 2 and outputs a 32x32 feature map; the third layer of the transposed convolutional network uses 256 3x3 convolution kernels with a stride of 2 and outputs a 64x64 feature map. After each layer of the transposed convolutional network, residual connections are added to keep the information flowing, and adaptive instance normalization (AdaIN) is used to adjust the image features according to the conditional labels.
[0068] Finally, the output layer maps the feature map to a 128x128 generated power image.
[0069] The discriminator applies spectral normalization technology to enhance the stability of training when there is imbalance and noise in the power image dataset. Specifically, the discriminator receives real images or generated images and corresponding conditional labels as input. Its network structure includes three convolutional layers: the first layer uses 64 3x3 convolution kernels with a stride of 2 to extract features; the second layer uses 128 3x3 convolution kernels with a stride of 2 to further enhance features; the third layer uses 256 3x3 convolution kernels with a stride of 2 to extract deeper features. Next, the output of the convolutional layer is flattened and connected to the conditional label. It is then processed through a fully connected layer of 128 neurons, using the ReLU activation function. To ensure the stability of training, the output layer applies spectral normalization and finally outputs the value of a single neuron, which represents the probability of authenticity through the sigmoid activation function.
[0070] In this embodiment, adversarial loss is combined with structural similarity loss (SSIM) to further consider the specific requirements of power images in structure and details, ensuring that the generated image is structurally consistent with the real image, especially in the key features of power equipment, such as interfaces, logos, and colors, which are important information for power image classification.
[0071] Specifically, the loss function of the generator can be expressed as:
[0072] L G =-E z~pz (z)[log D(G(z,y),y)]+λ ssim L ssim (G(z,y),x);
[0073] It mainly includes adversarial loss, hoping that the generated image G(z,y) will be considered real by the discriminator D. SSIM loss L ssim Calculate the structural similarity between the generated image and the real image to ensure that the generated image is structurally similar to the real image, λ ssim Represents a hyperparameter used to adjust the weight of SSIM loss in the total loss.
[0074] The loss function of the discriminator can be expressed as:
[0075] L D =-E(x,y)~p data (x,y)[log D(x,y)]-E z~pz(z) [log(1-D(G(z,y),y))];
[0076] The real image loss is used to score the real image x, and the expected output is close to 1, and the generated image loss is used to score the generated image G(z,y), and the expected output is close to 0.
[0077] Exemplarily, the specific process of processing a real power image through a conditional generative adversarial network is as follows:
[0078] First, initialize the weights of the generator and discriminator randomly, set the random noise dimension of the generator input to 100, the dimension of the conditional label to 10, the training batch size to 64, the number of rounds to 100, and the learning rate to 0.002. The selection of these parameters will directly affect the training efficiency of the model and the quality of the generated images. In the training cycle, the real images and the corresponding conditional labels are randomly selected to ensure the randomness and diversity of the training samples. After generating a batch of images, the random noise and conditional labels are input into the generator. Then, update the discriminator and optimize the weights of the discriminator by calculating the loss of the real images and the generated images and performing back propagation.
[0079] Next, the generator is updated, the generator loss is calculated and back-propagated to improve the quality of the generated images. This training process is repeated until the loss function stabilizes and the generated image quality reaches the expected standard.
[0080] When evaluating the quality of generated images on the validation set, the Fréchet Inception Distance (FID) and Inception Score (IS) indicators are used to evaluate the similarity and diversity between the generated images and the real images. In addition, the authenticity and diversity of the generated images are visually judged to obtain qualitative evaluation results. According to the evaluation results, the model parameters (such as learning rate, batch size) can be appropriately adjusted, and different network architectures or loss functions can be tried to further improve the performance. Finally, a large number of power images are generated using the trained generator to expand the training set.
[0081] Step 2: Pre-train the classification model using the expanded training set.
[0082] Step 3: Using a training set consisting only of real power images, based on preset dynamic thawing conditions, preset patience values, and training evaluation results, the classification model is fine-tuned using a dynamic thawing strategy and an early stopping strategy. The specific process is as follows:
[0083] Step 201: Use a dynamic unfreezing strategy to gradually unfreeze different layers of the model according to the performance during training. In the initial stage, freeze most layers of the ResNet model and only train the last fully connected layer. As the model performance improves, gradually unfreeze the lower-level feature extraction layers. While keeping the features stable, introduce more complex feature learning to improve the adaptability of the model to specific tasks. The specific freezing method is as follows:
[0084] At the beginning of fine-tuning, freeze most of the layers of the ResNet model and train only the last fully connected layer. This helps to fully utilize the advantages of the pre-trained model and reduce the dependence on new data. In each training round, regularly evaluate the model on the validation set such as loss and accuracy. Dynamically decide whether to unfreeze more layers based on the performance of the validation set.
[0085] Phase 1: Freeze the first 48 layers (responsible for low-level feature extraction), unfreeze the last fully connected layer, and fine-tune according to the specific task of power image. Phase 2: Evaluate every 5 epochs of training. If the validation set loss continues to decrease in the past 5 epochs or the validation set accuracy increases in the past 5 epochs, the validation set loss has not changed significantly in the past 5 epochs, and the training loss is significantly lower than the validation loss, gradually unfreeze the second to last layer, the third to last layer, and so on, and continue training until the model reaches the best performance or the validation set loss no longer decreases.
[0086] For example, first load the pre-trained ResNet50 model through torchvision.models. The requires_grad attribute of all layers is initially set to False, freezing the model parameters and allowing only the last fully connected layer (output layer) to be trained in order to quickly adapt to the new task and retain the features learned in the pre-trained model. When adjusting the output layer, the number of output nodes in the last layer of the model is modified according to the number of categories in the original power image dataset to match the new classification task.
[0087] During the training process, as the model performance improves, the lower-level feature extraction layers are gradually unfrozen. While keeping the features stable, more complex feature learning is introduced to improve the adaptability of the model on specific tasks. To achieve this goal, a dynamic unfreezing rule is set, and an evaluation is performed every 5 epochs of training.
[0088] Specifically, the conditions for dynamic thawing include:
[0089] Loss Decreasing: If the validation set loss has been decreasing consistently (e.g., decreasing by more than 1%) over the past 5 epochs, unfreeze a layer.
[0090] Accuracy Improvement: If the validation set accuracy has increased over the past 5 epochs (e.g., increased by more than 2%), unfreeze a layer.
[0091] Loss is stable: If the validation set loss has not changed significantly in the past 5 epochs (e.g., the change is less than 0.01), consider unfreezing a layer.
[0092] Overfitting indication: If the training loss is significantly lower than the validation loss (e.g., the gap is more than 0.1), unfreeze a layer to increase the flexibility of the model.
[0093] After any of the above conditions are met, the layers are unfrozen sequentially, with the layers close to the output layer being unfrozen first, to gradually introduce more complex feature learning.
[0094] Step 202: Implement an early stopping strategy to prevent overfitting.
[0095] Specifically, at the end of each epoch, the validation set loss is monitored. If the validation loss does not improve within the set patience value (e.g., 5 epochs), the training is terminated early and the current best model parameters are saved. After the training is completed, torch.save is used to save the fine-tuned model weights for subsequent use and evaluation. Through this series of steps, the model is ensured to achieve the best performance in the small sample learning task of power images.
[0096] Embodiment 2
[0097] This embodiment discloses a power image classification system based on a conditional generative adversarial network, including:
[0098] The acquisition module is configured to: acquire the power image to be processed;
[0099] The power image classification module is configured to: input the power image to be processed into a trained classification model to obtain a power image classification result;
[0100] When training the classification model, conditional labels and random noise are used as input, and the real power image is processed by a conditional generative adversarial network. Residual connection and adaptive instance normalization are combined to obtain the generated power image to expand the training set used for pre-training.
[0101] It should be noted that the acquisition module and the power image classification module correspond to the steps in Embodiment 1, and the examples and application scenarios implemented by the modules and the corresponding steps are the same, but are not limited to the contents disclosed in Embodiment 1. It should be noted that the modules as part of the system can be executed in a computer system such as a set of computer executable instructions.
[0102] Embodiment 3
[0103] Embodiment 3 of the present invention provides an electronic device, including a memory and a processor, and computer instructions stored in the memory and executed on the processor. When the computer instructions are executed by the processor, the steps of the above-mentioned power image classification method based on conditional generative adversarial network are completed.
[0104] Embodiment 4
[0105] Embodiment 4 of the present invention provides a computer-readable storage medium for storing computer instructions. When the computer instructions are executed by a processor, the steps of the above-mentioned power image classification method based on conditional generative adversarial network are completed.
[0106] Embodiment 5
[0107] Embodiment 5 of the present invention provides a computer program product, including a computer program / instruction, which, when executed by a processor, implements the steps of the above-mentioned power image classification method based on conditional generative adversarial network.
[0108] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0109] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0110] These computer program instructions can also be loaded onto a computer or other programmable data processing device, and a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, so that the instructions executed on the computer or other programmable device provide for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.
[0111] The description of each embodiment in the above embodiments has different emphases. For parts not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0112] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. A power image classification method based on conditional generative adversarial network, characterized in that: include: Acquire the power image to be processed; Input the power image to be processed into the trained classification model to obtain the power image classification result; When training the classification model, conditional labels and random noise are used as input, and the real power images are processed through a conditional generative adversarial network. Residual connections and adaptive instance normalization are combined to obtain synthetic power images to expand the training set.
2. The power image classification method based on conditional generative adversarial network according to claim 1, characterized in that: The conditional generative adversarial network includes an embedding layer, a merging layer, a generator and a discriminator connected in sequence; The generator includes multiple layers of transposed convolutional networks connected in sequence, and each layer of the transposed convolutional network is followed by a residual connection and an adaptive instance normalization; the discriminator includes multiple layers of convolutional layers, a fully connected layer and an output layer connected in sequence.
3. The power image classification method based on conditional generative adversarial network according to claim 1, characterized in that: The loss function of the conditional generative adversarial network is a combination of adversarial loss and structural similarity loss.
4. The power image classification method based on conditional generative adversarial network according to claim 1, characterized in that: Based on the preset dynamic thawing conditions, the classification model is trained using a dynamic thawing strategy.
5. The power image classification method based on conditional generative adversarial network according to claim 1, characterized in that: Based on the preset patience value and the training evaluation result, the classification model is trained using an early stopping strategy.
6. The power image classification method based on conditional generative adversarial network according to claim 1, characterized in that: The classification model is an improved ResNet50 model.
7. The power image classification system based on conditional generative adversarial network is characterized by: include: The acquisition module is configured to: acquire the power image to be processed; The power image classification module is configured to: input the power image to be processed into a trained classification model to obtain a power image classification result; When training the classification model, conditional labels and random noise are used as input, and the real power image is processed by a conditional generative adversarial network. Residual connection and adaptive instance normalization are combined to obtain the generated power image to expand the training set used for pre-training.
8. An electronic device comprising a memory, a processor and a computer program stored in the memory, characterized in that: The processor executes the computer program to implement the steps of the power image classification method based on conditional generative adversarial network according to any one of claims 1 to 6.
9. A computer-readable storage medium having a computer program / instruction stored thereon, characterized in that: When the computer program / instruction is executed by a processor, the steps of the power image classification method based on conditional generative adversarial network described in any one of claims 1 to 6 are implemented.
10. A computer program product comprising a computer program / instructions, characterized in that When the computer program / instruction is executed by a processor, the steps of the power image classification method based on conditional generative adversarial network described in any one of claims 1 to 6 are implemented.
Citation Information
Cited By
Small sample learning optimization method and system for image classification, medium and equipment
CN120726373A