A data enhancement method for intelligent gateway of distribution station based on generative adversarial model
By using a generative adversarial model in an unattended distribution room, the warning event is embedded in an empty shot and more training samples are generated, which solves the problem of scarcity of monitoring data and improves the stability and accuracy of the intelligent monitoring algorithm.
Patent Information
- Application Number
- CN202210825138.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-07-14
- Publication Date
- 2024-11-26
- Estimated Expiration
- 2042-07-14
AI Technical Summary
In unattended distribution rooms, the frequency of early warning events in the monitoring data is extremely low, resulting in the lack of effective data for the intelligent monitoring algorithm, resulting in poor algorithm stability and low accuracy.
Using a method based on the generation of adversarial models, early warning events are embedded in the empty camera of the monitoring video, and more training samples are generated through interleaving training of the generative model and the discriminant model to improve the stability and accuracy of the algorithm.
By expanding the data set, the stability and detection accuracy of the intelligent monitoring algorithm are improved, and the performance of the intelligent early warning algorithm of the distribution station is significantly improved.
Smart Images

Figure CN115131629B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of data processing technology, relates to video processing technology, and specifically relates to a data enhancement method for a distribution station intelligent gateway based on a generative adversarial model. Background Art
[0002] At present, in power distribution rooms, especially unmanned power distribution rooms, electronic patrol equipment and security monitoring equipment based on surveillance cameras are important auxiliary equipment to ensure the safety and reliability of such equipment, and they are used in large quantities. In the process of developing intelligent monitoring algorithms, existing algorithms often need to collect a large amount of data and combine artificial intelligence algorithms for statistical training, but the frequency of early warning events in monitoring data is very low, which will lead to a lack of effective data in algorithm development, which in turn leads to problems such as poor algorithm stability and low accuracy. Summary of the invention
[0003] To solve the above problems, the present invention discloses a data enhancement method for a distribution station intelligent gateway based on a generative adversarial model. It utilizes long-term monitoring of empty footage and combines a small number of real warning events to embed warning events into easily available empty footage, so as to obtain more training samples, increase the effective data in the distribution station intelligent warning algorithm, enhance the poor stability of the algorithm, and improve the accuracy.
[0004] To achieve the above object, the technical solution of the present invention is as follows:
[0005] A data enhancement method for a distribution station intelligent gateway based on a generative adversarial model comprises the following steps:
[0006] Step 1: Train the Generative Adversarial Model
[0007] (1) Randomly capture empty shots of surveillance videos as background dataset Z i , intercept the warning event footage as the real data set X i ; The generative model Generator is a deep neural network model whose input and output are both images; the adversarial model Discriminator is a deep neural network model whose input and output are image authenticity; Z i and X i At the same time, input the generative model Generator to get the generated image X g , X g As a negative sample, X i As a positive sample, the adversarial model Discriminator is trained, and its loss matrix is L d ;
[0008] (2) The loss L of the adversarial model Discriminator dCombined with the Generator, we get the Generator loss matrix L g ;
[0009] (3) L d , L g Used to optimize the Discriminator and Generator models. The specific steps are as follows:
[0010] a. When the Generator model LossL appears g When it cannot be reduced for a long time, use MSE loss to reduce X i Add L as supervision information g In, at this time
[0011]
[0012] b. When the Discriminator model Loss L appears d When there is no change for a long time, we can reduce overfitting by adding dropout after the convolutional layer in the Discriminator model, or randomly replace some weights in the Discriminator model with random numbers.
[0013] c. When the intermediate encoding features of the Generator model are too concentrated, a loss function is added, and the numerical distribution of the intermediate encoding features and the KL divergence of the standard normal distribution are used as supervision for training. The optimization goal is:
[0014]
[0015] P(x) is the sample distribution of the intermediate encoding feature, Q(x) is the standard normal distribution, and the loss function is
[0016]
[0017] Among them, var is the variance of the intermediate coding feature, mean is the mean of the intermediate coding feature, and e is the natural logarithm;
[0018] d. When the intermediate encoding features of the Generator model are too concentrated, triplet loss is added as a supplement. Its loss function is described as follows:
[0019]
[0020] Among them, anchor is the encoding feature of the training sample, sample1 is the encoding feature 1 of the sample with noise added, sample2 is the encoding feature 2 of the sample with noise added, and margin is the interval adjustment parameter;
[0021] (4) Repeat (2)-(4) several times to obtain the model Discriminator and Generator; the Discriminator and Generator are trained alternately;
[0022] Step 2: Generate intelligent algorithm training samples
[0023] (1) Randomly capture empty shots of surveillance videos as background dataset Z i , intercept the warning event footage as the real data set X i , the generative model Generator is a deep neural network model whose input and output are both images;
[0024] (2) Set the empty shot background Z i With the real data set X i Input the generative model Generator to get the synthetic image G i ;
[0025] (3) G i Paste the original image back to generate training sample Y i , where Z is intercepted i The screenshot box is the bounding box of the target to be detected;
[0026] Step 3: Use the generated training samples to train the target detection model.
[0027] Furthermore, in step 1, the neural network adopts the U-ResNet architecture improved based on UNet.
[0028] Furthermore, in step 1, the interleaved training process is as follows:
[0029] Assume that in N iterations, the loss values of the Discriminator and Generator models are
[0030]
[0031]
[0032] Find L record_d With L record_g The derivatives of L are record_d ', L record_g ', then in the next iteration, the number of training times of Discriminator and Generator are 3. Ceil is the ceiling function, [-1] is the last value of the array, and iteration is performed.
[0033] The beneficial effects of the present invention are:
[0034] The present invention utilizes generative adversarial model technology to migrate low-frequency event images in distribution station scenes to a relatively large number of empty shots, thereby expanding the data set necessary for the development of intelligent monitoring algorithms and improving the stability and accuracy of the algorithms. BRIEF DESCRIPTION OF THE DRAWINGS
[0035] Figure 1 This is a flow chart of the data enhancement method for the intelligent gateway of a distribution station based on the generative adversarial model provided by the present invention.
[0036] Figure 2 This is a schematic diagram of the U-ResNet architecture based on the improved UNet adopted in the present invention.
[0037] Figure 3 Schematic diagram of the input and output of the interleaved training of Discriminator and Generator.
[0038] Figure 4 Schematic diagram for generating intelligent algorithm training samples.
[0039] Figure 5 For comparative experiments Figure 1 .
[0040] Figure 6 For comparative experiments Figure 2 .
[0041] Figure 7 For comparative experiments Figure 3 .
[0042] Figure 8 It is a schematic diagram comparing the experimental effects of the present invention and the prior art. DETAILED DESCRIPTION
[0043] The technical solution provided by the present invention will be described in detail below in conjunction with specific embodiments. It should be understood that the following specific implementation methods are only used to illustrate the present invention and are not used to limit the scope of the present invention.
[0044] The data enhancement method for the intelligent gateway of a distribution station based on the generative adversarial model provided by the present invention is as follows: Figure 1 As shown, the following steps are included:
[0045] Step 1: Train the Generative Adversarial Model
[0046] (1) Randomly capture empty shots of surveillance videos as background dataset Z i , intercept the warning event footage as the real data set X i. The generative model Generator is a deep neural network model whose input and output are both images. It receives a random noise z, and generates a new image through the noise and the reference image x, which is denoted as G(z,x). The adversarial model Discriminator is a deep neural network model whose input and output are image authenticity. It is a discriminant network that determines whether a picture is "real". Its input parameter is x, x represents a picture, and the output D(x) represents the probability that x is a real picture. If it is 1, it means that x is a real picture, and if the output is 0, it means that x is not a real picture. The neural network can adopt any deep convolutional neural network architecture. The present invention adopts the U-ResNet architecture improved based on UNet, and its network structure is as follows Figure 2 shown.
[0047] Z i and X i At the same time, input the generative model Generator to get the generated image X g , X g As a negative sample, X i As a positive sample, we train the adversarial model Discriminator. Its loss matrix is L d .
[0048] (2) The loss L of the adversarial model Discriminator d Combined with the Generator, we can get the Generator loss matrix L g .
[0049] (3) L d , L g Used to optimize the Discriminator and Generator models. The specific steps are as follows:
[0050] a. When the Generator model Loss L appears g When it cannot be reduced for a long time, MSE loss can be used to reduce X i Add L as supervision information g In, at this time
[0051]
[0052] This method can accelerate the convergence of the Generator model, but it can also easily cause the Generator model to overfit to the training set.
[0053] b. When the Discriminator model LossL appears dWhen there is no change for a long time, it is usually caused by overfitting of the Discriminator model. In this case, you can reduce overfitting by adding dropout after the convolutional layer in the Discriminator model. You can also achieve a similar effect by randomly replacing some weights in the Discriminator model with random numbers.
[0054] c. When the intermediate encoding features of the Generator model are too concentrated, you can consider adding a loss function and using the KL divergence of the numerical distribution of the intermediate encoding features and the standard normal distribution as supervision for training. The optimization goal is:
[0055]
[0056] P(x) is the sample distribution of the intermediate encoding feature, Q(x) is the standard normal distribution, and the loss function is
[0057]
[0058] Among them, var is the variance of the intermediate coding feature, mean is the mean of the intermediate coding feature, and e is the natural logarithm;
[0059] d. When the intermediate encoding features of the Generator model are too concentrated, you can also consider adding triplet loss as a supplement, so that when different noise interferences are added to the same training sample, the generated images are as different as possible. The loss function is described as follows:
[0060]
[0061] Among them, anchor is the encoding feature of the training sample, sample1 is the encoding feature 1 of the sample with noise added, sample2 is the encoding feature 2 of the sample with noise added, and margin is the interval adjustment parameter, which is set to 0.0001 by default.
[0062] (4) Repeat (2)-(4) several times to obtain the Discriminator and Generator models.
[0063] Discriminator and Generator are trained alternately. When one of the models converges too quickly, its training frequency needs to be reduced. Suppose that in N iterations, the loss values of the Discriminator and Generator models are
[0064]
[0065]
[0066] L can be obtainedrecord_d With L record_g The derivatives of L are record_d ', L record_g ', then in the next iteration, the number of training times of Discriminator and Generator are 3. Ceil is the ceiling function, [-1] is the last value of the array, and the pseudo code of the iteration logic is:
[0067]
[0068] The schematic diagram of the algorithm module corresponding to the input and output is as follows Figure 3 shown.
[0069] The principle of the generative adversarial model is as follows: During the training process, the training goal of the generative model Generator is to generate real pictures to deceive the adversarial model Discriminator. The goal of the Discriminator is to correctly distinguish the pictures generated by the Generator from the real pictures. The Generator and the Discriminator constitute a dynamic game process.
[0070] The distribution of the real picture set is P data (x), the distribution generated by the Generator can be assumed to be P G (x; θ), which is a random distribution controlled by θ, where θ is the parameter of this distribution. If θ is a Gaussian mixture model, then θ represents the mean and variance of the Gaussian distribution.
[0071] Assume that data X = {x 1 ,x 2 ,...,x m}, calculate the likelihood P G (x i ;θ).
[0072] For X, the likelihood in the generative model is:
[0073]
[0074] Maximizing this likelihood function is equivalent to maximizing the probability that the generator generates a real picture.
[0075]
[0076] Solve for the parameter θ that maximizes the likelihood * , which is equivalent to maximizing its log-likelihood.
[0077] The m observable data obey the true distribution, which is equivalent to all x in the true distribution in PG The log-likelihood expectation in the distribution. Therefore, maximizing the likelihood L makes the generator generate real pictures with the highest probability, that is, solving θ so that P G Closer to P data The optimization objective can be expressed as
[0078]
[0079]
[0080] By optimizing the objective function, the parameters of the generative model Generator can be solved.
[0081] Step 2: Generate intelligent algorithm training samples
[0082] (1) Randomly capture empty shots of surveillance videos as background dataset Z i , intercept the warning event footage as the real data set X i The generative model Generator is a deep neural network model whose input and output are both images.
[0083] (2) Set the empty shot background Z i With the real data set X i Input the generative model Generator to get the synthetic image G i .
[0084] (3) G i Paste the original image back to generate training sample Y i , where Z is intercepted i The screenshot box is the bounding box of the target to be detected.
[0085] The schematic diagram of this step process is as follows Figure 4 shown.
[0086] Step 3: Use the generated training samples to train the target detection model
[0087] The target detection model and its specific training method can refer to the common target detection methods in the prior art, such as CN112686115A, a pedestrian target detection method in an autonomous driving scenario based on scale perception, and CN108010060B, a target detection method and device, and related steps.
[0088] The results of the comparative experiment using Fast-RCNN as the baseline are as follows Figure 5-Figure 7 As shown in Figure 1. The dark grey box is the prediction result of the model trained by the enhanced dataset of this patent, and the light grey box is the prediction result of the model trained by the original training set. Figure 5 , Figure 6It can be clearly seen that the original method has misdetection problems, and the detection accuracy of the method of the present invention is high. Figure 7 The original method missed the detection, but the present invention can still accurately detect the human target in the picture. The quantifiable accuracy comparison between the present invention and the prior art is as follows: Figure 8 As shown, the dark grey is the curve of the present invention, and the light grey is the curve of the prior art. It can be seen from the figure that the present invention is obviously superior to the prior art.
[0089] It should be noted that the above content only illustrates the technical idea of the present invention and cannot be used to limit the protection scope of the present invention. For ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principle of the present invention. These improvements and modifications all fall within the protection scope of the claims of the present invention.
Claims
1. A data enhancement method for intelligent gateway of distribution station based on generative adversarial model, It is characterized in that The steps include: Step 1: Train the Generative Adversarial Model (1) Randomly capture empty shots of surveillance videos as background dataset Z i , intercept the warning event footage as the real data set X i ; The generative model Generator is a deep neural network model whose input and output are both images; the adversarial model Discriminator is a deep neural network model whose input and output are image authenticity; Z i and X i At the same time, input the generative model Generator to get the generated image X g , X g As a negative sample, X i As a positive sample, the adversarial model Discriminator is trained, and its loss matrix is L d ; (2) The loss L of the adversarial model Discriminator d Combined with the Generator, we get the Generator loss matrix L g ; (3) L d , L g Used to optimize the Discriminator and Generator models. The specific steps are as follows: a. When the Generator model LossL appears g When it cannot be reduced for a long time, use MSE loss to reduce X i Add L as supervision information g In, at this time b. When the Discriminator model LossL appears d When there is no change for a long time, we can reduce overfitting by adding dropout after the convolutional layer in the Discriminator model, or randomly replace some weights in the Discriminator model with random numbers. c. When the intermediate encoding features of the Generator model are too concentrated, a loss function is added, and the numerical distribution of the intermediate encoding features and the KL divergence of the standard normal distribution are used as supervision for training. The optimization goal is: P(x) is the sample distribution of the intermediate encoding feature, Q(x) is the standard normal distribution, and the loss function is Among them, var is the variance of the intermediate coding feature, mean is the mean of the intermediate coding feature, and e is the natural logarithm; d. When the intermediate encoding features of the Generator model are too concentrated, triplet loss is added as a supplement. Its loss function is described as follows: Among them, anchor is the encoding feature of the training sample, sample1 is the encoding feature 1 of the sample with noise added, sample2 is the encoding feature 2 of the sample with noise added, and margin is the interval adjustment parameter; (4) Repeat (2)-(4) several times to obtain the model Discriminator and Generator; the Discriminator and Generator are trained alternately; Step 2: Generate intelligent algorithm training samples (1) Randomly capture empty shots of surveillance videos as background dataset Z i , intercept the warning event footage as the real data set X i , the generative model Generator is a deep neural network model whose input and output are both images; (2) Set the empty shot background Z i With the real data set X i Input the generative model Generator to get the synthetic image G i ; (3) G i Paste the original image back to generate training sample Y i , where Z is intercepted i The screenshot box is the bounding box of the target to be detected; Step 3: Use the generated training samples to train the target detection model.
2. According to claim 1, the data enhancement method for intelligent gateway of distribution station based on generative adversarial model, It is characterized in that In step 1, the neural network adopts the U-ResNet architecture improved based on UNet.
3. According to the data enhancement method for distribution station intelligent gateway based on generative adversarial model in claim 1, It is characterized in that In step 1, the interleaved training process is as follows: Assume that in N iterations, the loss values of the Discriminator and Generator models are Find L record_d With L record_g The derivatives of L are record_d ', L record_g ', then in the next iteration, the number of training times of Discriminator and Generator are 3. Ceil is the ceiling function, [-1] is the last value of the array, and iteration is performed.
