Small sample expansion method for power anomaly scene

The method of generating synthetic samples and SamplePairing mixed samples through the SMOTE algorithm solves the problem of limited number of samples and low recognition accuracy in the power image field, and improves the recognition accuracy and generalization ability of the model.

CN119672460APending Publication Date: 2025-03-21JIANGSU ELECTRIC POWER INFORMATION TECH
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202411722080.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-28
Publication Date
2025-03-21

AI Technical Summary

Technical Problem

In the field of power image, limited sample size leads to insufficient model training, which may lead to problems such as overfitting and under-adaptation, affecting the generalization ability of the model. At the same time, the algorithm model accuracy in the field of target recognition is low, the average recognition accuracy is less than 50%, resulting in a large amount of false positive information, which is prone to omit defects and hidden dangers.

Method used

The SMOTE algorithm generates synthetic samples of a few categories of samples to expand the data set, improve the accuracy of model recognition, and mix different samples through SamplePairing to increase the diversity of the data set and improve the performance of the model when processing complex scenarios.

Benefits of technology

By expanding the data set and increasing the diversity of the data set, the model recognition accuracy and generalization ability are improved, and the sample imbalance problem in small sample scenarios is solved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119672460A_ABST
    Figure CN119672460A_ABST
Patent Text Reader

Abstract

The invention discloses a power abnormal scene small sample expansion method, which comprises the following steps: acquiring a normal image and an abnormal image of power equipment through acquisition equipment, and establishing a normal image sample set and an abnormal image sample set to form a data set; generating a synthetic sample of a few types of samples through an SMOTE algorithm to expand a data set; the method comprises the following steps of: mixing different samples through SamplePaging; according to the method, the model identification precision is improved, and the model generalization ability is improved; different samples are mixed through SamplePaging, the diversity of a data set is increased, and in electric power image deep learning application, the method is used for combining different types of electric power equipment images, improving the performance when a model processes a complex scene, and solving the problem of sample imbalance in a small sample scene.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of artificial intelligence technology, and in particular to a method for expanding small samples of power abnormality scenarios. Background Art

[0002] The electrical field involves a wide range of fields, including power systems, motors and power electronics, control theory, etc. With the continuous advancement of computer vision and artificial intelligence technology, the application of image data sets in the electrical field is becoming more and more extensive. As a key component of the power system, the safe and stable operation of transmission lines is crucial to the reliability of the overall power grid;

[0003] As a key technical resource, image datasets are gradually becoming an important means to improve system operation and maintenance efficiency and security;

[0004] However, the existing technology of power anomaly scene small sample still has some defects:

[0005] 1. In the field of power image processing, the number of samples for many tasks is limited, which may lead to insufficient model training to achieve ideal performance. Insufficient data may lead to problems such as overfitting and underfitting, affecting the generalization ability of the model.

[0006] 2. At the same time, since artificial intelligence technology is widely used in power grid operation and inspection, infrastructure, safety supervision and other fields, in the power image data set, the algorithm model accuracy in the target recognition field is low, and the average recognition accuracy is less than 50%, which generates a large number of false positives and is prone to missing defects. Some categories may have fewer samples than other categories, which may lead to poor performance of the model in identifying these minority categories, thereby affecting the overall recognition accuracy; Summary of the invention

[0007] In order to solve the above problems; the purpose of the present invention is to provide a small sample expansion method for power abnormality scenes, which generates synthetic samples of minority category samples through the SMOTE algorithm to expand the data set and improve the model recognition accuracy. In the deep learning application of power images, it is used to expand the minority category samples such as power equipment defects and improve the generalization ability of the model; by mixing different samples through SamplePairing, the diversity of the data set is increased. In the deep learning application of power images, it is used to combine different types of power equipment images, improve the performance of the model in processing complex scenes, and solve the sample imbalance problem in small sample scenes.

[0008] The present invention adopts the following technical solution:

[0009] A method for expanding a small sample of power abnormality scenarios includes the following steps:

[0010] S1. Establishing a sample set; obtaining normal images and abnormal images of the power equipment through a collection device, respectively, establishing a normal image sample set and an abnormal image sample set, and forming a data set;

[0011] S2. Expand the data set. Generate synthetic samples of minority class samples through the SMOTE algorithm to expand the data set. The specific algorithm is as follows:

[0012] 21) Identify the samples belonging to the minority class in the data set through the SMOTE algorithm;

[0013] 22) For each minority class sample, find its K-nearest neighbors in the feature space, usually using the Euclidean distance metric to measure the similarity between data points;

[0014] 23) Interpolate the difference between the selected minority class sample and its nearest neighbor sample to generate a new sample. For each minority class sample, randomly select a sample from its k nearest neighbors, and then randomly select a point on the line between the two as the new synthetic sample, and then repeat until a sufficient number of synthetic samples are generated;

[0015] S3, sample mixing: Mix different samples through SamplePairing. The specific steps are as follows:

[0016] 31) Randomly select two images from the expanded data set through SamplePairing, enhance the two images, and then superimpose the two images at the pixel level to obtain a mixed image;

[0017] 32) Using the label of one image as the actual annotation of the mixed image, while the label of the other image is not used;

[0018] 33) The mixed image and its corresponding label are sent to the neural network for training. After the training is completed, SamplePairing is stopped and fine-tuning is started to obtain a new mixed sample.

[0019] Preferably, in S2, the specific steps of the SMOTE algorithm are as follows:

[0020] For each sample x in the minority class, calculate its distance to all samples in the minority class sample set using the Euclidean distance as the standard to obtain its k nearest neighbors. Set a sampling ratio according to the sample imbalance ratio to determine the sampling multiplier N. For each minority class sample x, randomly select several samples from its k nearest neighbors. Assume that the selected nearest neighbor is xn. For each randomly selected nearest neighbor xn, construct a new sample with the original sample. The formula is as follows:

[0021] x new =x+rand(0,1)×(x~-x)

[0022] Among them, x represents each sample in the minority class, and rand represents the generation of random real numbers.

[0023] Preferably, in S3, the enhancement processing includes flipping, cropping and resolution adjustment.

[0024] Preferably, in S3, the superposition process is as follows: taking the average value of pixels of the two images at the same position to obtain a new mixed image.

[0025] Compared with the prior art, the present invention has the following beneficial effects:

[0026] 1. In the present invention, the synthetic samples of minority category samples are generated by the SMOTE algorithm to expand the data set and improve the model recognition accuracy. In the deep learning application of power images, it is used to expand the minority category samples such as power equipment defects and improve the generalization ability of the model;

[0027] 2. In the present invention, SamplePairing is used to mix different samples to increase the diversity of the data set. In the deep learning application of power images, it is used to combine different types of power equipment images, improve the performance of the model in processing complex scenes, and solve the problem of sample imbalance in small sample scenes. BRIEF DESCRIPTION OF THE DRAWINGS

[0028] Figure 1 The flowchart of the method for expanding small samples of power anomaly scenarios of the present invention. DETAILED DESCRIPTION

[0029] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0030] like Figure 1 As shown, the present invention provides a method for expanding a small sample of power abnormality scenarios, comprising the following steps:

[0031] S1. Establish sample set

[0032] By using a collection device, normal images and abnormal images of the power equipment are respectively obtained, and a normal image sample set and an abnormal image sample set are established to form a data set;

[0033] S2. Expanding the dataset

[0034] The SMOTE algorithm is used to generate synthetic samples of minority class samples to expand the data set. The specific algorithm is as follows:

[0035] 1: Use the SMOTE algorithm to identify samples belonging to the minority class in the data set;

[0036] 2: For each minority class sample, find its K-nearest neighbors in the feature space, usually using the Euclidean distance metric to measure the similarity between data points;

[0037] 3: Interpolate the difference between the selected minority class sample and its nearest neighbor sample to generate a new sample. For each minority class sample, randomly select a sample from its k nearest neighbors, and then randomly select a point on the line between the two as the new synthetic sample, and then repeat until a sufficient number of synthetic samples are generated to achieve the purpose of balancing the data set;

[0038] For each sample x in the minority class, calculate its distance to all samples in the minority class sample set using the Euclidean distance as the standard to obtain its k nearest neighbors. Set a sampling ratio according to the sample imbalance ratio to determine the sampling multiplier N. For each minority class sample x, randomly select several samples from its k nearest neighbors. Assume that the selected nearest neighbor is xn. For each randomly selected nearest neighbor xn, construct a new sample with the original sample. The formula is as follows:

[0039] x new =x+rand(0,1)×(x~-x)

[0040] Among them, x represents each sample in the minority class, and rand represents the generation of random real numbers.

[0041] S3. Sample mixing

[0042] Mix different samples through SamplePairing. The specific steps are as follows:

[0043] 1: Two images are randomly selected from the expanded dataset through SamplePairing, and the two images are enhanced, including flipping, cropping, and resolution adjustment. Then, the two images are superimposed at the pixel level, and the average value of the pixels of the two images at the same position is taken to obtain a new mixed image;

[0044] 2: Using the label of one image as the actual annotation of the mixed image, while the label of the other image is not used;

[0045] 3: Send the mixed image and its corresponding label to the neural network for training. After the training is completed, stop SamplePairing and start fine-tuning to obtain a new mixed sample.

[0046] Obviously, those skilled in the art can make various changes and modifications to the present invention without departing from the spirit and scope of the present invention. Thus, if these modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include these modifications and variations.

Claims

1. A method for expanding small samples of power anomaly scenarios, characterized in that: The following steps are involved: S1. Establishing a sample set; obtaining normal images and abnormal images of the power equipment through a collection device, respectively, establishing a normal image sample set and an abnormal image sample set, and forming a data set; S2. Expand the data set. Generate synthetic samples of minority class samples through the SMOTE algorithm to expand the data set. The specific algorithm is as follows: 21) Identify the samples belonging to the minority class in the data set through the SMOTE algorithm; 22) For each minority class sample, find its K-nearest neighbors in the feature space and use the Euclidean distance metric to measure the similarity between data points; 23) Interpolate the difference between the selected minority class sample and its nearest neighbor sample to generate a new sample. For each minority class sample, randomly select a sample from its k nearest neighbors, and then randomly select a point on the line between the two as the new synthetic sample, and then repeat until a sufficient number of synthetic samples are generated; S3, sample mixing: Mix different samples through SamplePairing. The specific steps are as follows: 31) Randomly select two images from the expanded data set through SamplePairing, enhance the two images, and then superimpose the two images at the pixel level to obtain a mixed image; 32) Using the label of one image as the actual annotation of the mixed image, while the label of the other image is not used; 33) The mixed image and its corresponding label are sent to the neural network for training. After the training is completed, SamplePairing is stopped and fine-tuning is started to obtain a new mixed sample.

2. A method for expanding a small sample of power anomaly scenarios according to claim 1, characterized in that: In S2, the specific steps of the SMOTE algorithm are as follows: For each sample x in the minority class, calculate its distance to all samples in the minority class sample set using the Euclidean distance as the standard to obtain its k nearest neighbors. Set a sampling ratio according to the sample imbalance ratio to determine the sampling multiplier N. For each minority class sample x, randomly select several samples from its k nearest neighbors. Assume that the selected nearest neighbor is xn. For each randomly selected nearest neighbor xn, construct a new sample with the original sample. The formula is as follows: x new =x+rand(0,1)×(x~-x) Among them, x represents each sample in the minority class, and rand represents the generation of random real numbers.

3. The method for expanding a small sample of power anomaly scenarios according to claim 1, characterized in that: In S3, the enhancement processing includes flipping, cropping and resolution adjustment.

4. A method for expanding a small sample of power anomaly scenarios according to claim 1, characterized in that: In S3, the superposition process is as follows: taking the average value of the pixels of the two images at the same position to obtain a new mixed image.

Citation Information

Cited By

  • Small sample model training system and method based on electric power image detection

    CN120563968A

  • A small sample model training system and method based on power image detection

    CN120563968B