Method for identifying defects of power transmission line based on miniImageNet dataset auxiliary training small sample learning
Patent Information
- Application Number
- CN202311198784.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-09-16
- Publication Date
- 2026-10-30
- Estimated Expiration
- 2043-09-16
AI Technical Summary
[0006]针对上述现有技术存在的问题,本发明提供了一种基于预训练模型的小样本学习输电线路缺陷识别方法,该方法解决了传统检测方法精度低、成本高以及无法测量形状复杂零件的技术缺陷
[0048]本发明在小样本条件下进行电力缺陷识别,模型通过局部与全局识别的结合,提升模型对电力缺陷的识别能力,还解决了小样本条件下电力设备缺陷识别难的问题。本发明对不同缺陷具有较好的识别效果,能够在实际应用中有效地代替人工识别异常缺陷的过程,极大地减少人力物力的损耗。
Smart Images

Figure CN117475361B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the fields of image processing, remote sensing imagery and computer vision technology, and specifically relates to a method for identifying transmission line defects based on a few-sample learning method assisted by the miniImageNet dataset. Background Technology
[0002] The power system consists of a power supply and distribution network, power plants, and electricity users. Power plants convert various energy sources (such as fossil fuels, hydropower, nuclear power, wind power, and solar power) into electrical energy. The transmission network transmits this electrical energy to various regions via high-voltage transmission lines, and the distribution network distributes the electrical energy to end users. Electricity users include households, industries, businesses, and public institutions. They obtain the necessary electrical energy through the distribution network for various purposes such as lighting, heating, and production. To ensure the safe and reliable supply of electricity, the power system requires a monitoring and control system. The monitoring system monitors the power system status, load conditions, and faults in real time and detects abnormal situations. The control system adjusts and controls power plants and the distribution network based on the monitored information to maintain system balance and stability. The safe and reliable operation of the power system is crucial. It converts natural energy into electrical energy and transmits it to users through transmission lines to meet the electricity needs of various sectors.
[0003] With the improvement of people's living standards, the prevalence and total length of power transmission lines are constantly increasing. To ensure the safe operation of these lines, regular inspection and maintenance are crucial. This includes regular line inspections, cleaning the surrounding environment, and timely detection and resolution of potential faults and risks. Simultaneously, the adoption of advanced monitoring and protection technologies, such as intelligent sensing devices and remote monitoring systems, enables real-time monitoring of line status, timely response to abnormal situations, and improved line safety and reliability. It is necessary to focus on strengthening line maintenance and management, and taking effective measures to ensure their reliability and supply capacity.
[0004] my country has a vast territory, and the complex climate conditions pose a challenge to the materials of power transmission lines, making them prone to damage. In particular, the risk of damage to power transmission lines is further increased under the influence of extreme weather such as typhoons, rainstorms, high temperatures, cold weather, rain, snow and frost. In addition, high voltage phenomena such as lightning strikes generated by nature can also affect the lifespan of power transmission lines. Faults in power transmission lines can seriously affect the stable operation of the power system. Therefore, in order to ensure the reliable operation of power transmission lines, we need to strengthen the inspection and maintenance of power transmission line faults [4][5] to improve the disaster resistance of the power system and cope with the challenges brought by extreme weather and high voltage. In particular, with the development of technology, the use of drones for inspection has gradually grown in the power industry.
[0005] Since defects in transmission lines are not easy to collect and data collection costs are high, it is necessary to identify defects in transmission lines under small sample conditions to reduce the costs of manual inspection and manual data labeling, thereby achieving defect identification of transmission lines and ensuring the normal operation of the power system. Summary of the Invention
[0006] To address the problems of the existing technologies, this invention provides a small-sample learning method for identifying transmission line defects based on a pre-trained model. This method solves the technical shortcomings of traditional detection methods, such as low accuracy, high cost, and inability to measure parts with complex shapes.
[0007] The first aspect of the present invention provides a few-shot learning method for identifying transmission line defects based on training assisted by the miniImageNet dataset, comprising the following steps:
[0008] S1. Obtain defect sample data of transmission lines, perform data preprocessing, and create an image dataset;
[0009] S2. Input the image dataset into the few-shot learning model for meta-learning training and testing. At the same time, use the global prediction score as an auxiliary target and calibrate the parameter metric space using the predicted local similarity score and global similarity score.
[0010] S3. Input the defect samples of the transmission line to be tested into the model for accurate prediction and identification.
[0011] Preferably, in step S2, the image dataset is input into a few-shot learning model for meta-learning training and testing. The specific steps are as follows:
[0012] A1. In the meta-learning phase, the input is an image downsampled in 3-way 20-shot mode. The input image is divided into support set images X. S and query set image X Q ;
[0013] A2, will support image set X S and query set image X Q After inputting into the embedding network, the support set image features f are obtained. s and query set image features f q Then, similarity measurement is performed, and based on feature f s and f q Perform local similarity score prediction and output d. s and d q ;
[0014] A3. The local metric score r is obtained by calculating the local branches of KNN. loc The global metric score r is calculated from the MMD global branch. glo ;
[0015] A4. Using local metric fraction r loc and global metric score r glo Calculate the overall optimization loss;
[0016] A5. Gradient updates optimize the model;
[0017] A6. During the testing phase, only local branches are used for testing.
[0018] Preferably, the prediction of the local similarity score includes the following steps:
[0019] To achieve a local perspective, the features of each sample are divided into m groups, called deep local descriptors, as shown below:
[0020]
[0021]
[0022] Where c represents the number of categories, z represents the number of support set samples for each category, and m and n represent the number of query set samples, respectively; for each query sample, each q can be obtained. i Local similarity score r loc :
[0023]
[0024]
[0025]
[0026] in,· k The operation refers to the K-Nearest Neighbors (KNN) algorithm.
[0027] (2) The prediction of the global similarity score includes the following steps:
[0028] A31. Add a feature reorganization module after feature embedding;
[0029] A32, feature f s and f q Input the feature extraction and recombination module to obtain d s and d q It can be represented by the following formula:
[0030] Q, K, V = Conv(f)
[0031] d=fc(Conv([Conv(Conv(K),Q])*Conv(V)+K))
[0032] Where Conv represents convolution operation and fc represents fully connected layer;
[0033] A33. Further potential characteristics of the support set and query set can be represented as follows:
[0034]
[0035] d q =[dq 1 ,...,dq n ]
[0036] in, dq represents the latent features supporting the i-th sample in the j-th class of the set. n This represents the latent features of the n samples in the query set of species;
[0037] A34. Global similarity score prediction integrates MMD indicators to calculate dq. n Samples in the same category The semantic consistency between them is determined by the following method for calculating the MMD distance:
[0038]
[0039] The trace of the matrix is represented by tr(·), and the function φ M (·)=φ(·,·) represents a multi-kernel function, indicating that the calculation of the original features is performed in multiple different high-dimensional quantity spaces. The formula for the multi-kernel function is as follows:
[0040]
[0041]
[0042]
[0043]
[0044] A35. Obtain the global similarity score r of the nth query sample. glo This represents the negative value of the MMD distance, specifically as follows:
[0045] r glo (dq n ,ds c )=-MMD(dq n ,ds c ).
[0046] Preferably, before model training, the pixel size of the transmission line defect sample image data is scaled down, limiting the long side of the image to no more than 84 and the short side to no more than 84. The number of channels of the image is converted into a 3-channel color image, and Conv64 is used as the embedding network of the model.
[0047] The present invention has the following beneficial effects:
[0048] This invention enables power defect identification under small sample conditions. The model enhances its ability to identify power defects by combining local and global identification methods, and also solves the problem of difficult power equipment defect identification under small sample conditions. This invention demonstrates good identification performance for different types of defects and can effectively replace manual identification of abnormal defects in practical applications, greatly reducing the waste of manpower and resources. Attached Figure Description
[0049] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0050] Figure 1 A flowchart illustrating a few-sample learning method for identifying transmission line defects based on a pre-trained model;
[0051] Figure 2 This is a schematic diagram of the model structure;
[0052] Figure 3 A schematic diagram of the feature regrouping module;
[0053] Figure 4 Images from the miniImageNet training dataset;
[0054] Figure 5 Example of a test set wire defect;
[0055] Figure 6 Example of insulator defects in the test set;
[0056] Figure 7 Example images of foreign object defects used in the training and test set for the experiment;
[0057] Figure 8 The test results are the wire defect test results in the test set of the experimental test results;
[0058] Figure 9 This is a graph showing the test results of insulator defects in the test set from the experimental test results;
[0059] Figure 10This is a diagram showing the test results of foreign object defects in the test set during the experimental testing.
[0060] Figure 11 This is a graph showing the trend of accuracy changes during algorithm training. Detailed Implementation
[0061] In the following description, specific details such as particular system architectures and techniques are set forth for illustrative purposes and not for limitation, in order to provide a thorough understanding of the embodiments of the invention. However, those skilled in the art will understand that the invention can be implemented in other embodiments without these specific details. In other instances, detailed descriptions of well-known systems, apparatuses, circuits, and methods are omitted so as not to obscure the description of the invention with unnecessary detail.
[0062] Example 1
[0063] Reference Figure 1 This invention proposes a few-shot learning method for identifying power line defects using the miniImageNet dataset. The model is trained on the publicly available miniImageNet dataset and tested with power line defect data. A compact metric space is constructed on the miniImageNet dataset to achieve metric identification of power line defects.
[0064] In this embodiment, the power transmission line defect sample dataset comes from on-site power transmission equipment images taken by drones. The data includes three categories: conductors, insulators, and foreign objects. This invention selects these three types of defects for the experiment. The hardware environment configuration for the experiment is: Ubuntu 20.04 operating environment, 24GB of video memory, and an NVIDIA 3090 graphics card. The software environment uses the PyTorch deep learning framework, with parallel computing on the CUDA 10.3 architecture platform.
[0065] S1. Obtain defect sample data of transmission lines, perform data preprocessing, and create an image dataset;
[0066] To ensure the universality of the model, before training the model, the pixel size of the transmission line defect sample image data is scaled down, limiting the long side of the image to no more than 84 and the short side to no more than 84. The number of channels of the image is converted into a 3-channel color image, and Conv64 is used as the embedding network of the model.
[0067] S2. Input the image dataset into the few-shot learning model for meta-learning training and testing. At the same time, use the global prediction score as an auxiliary target and calibrate the parameter metric space using the predicted local similarity score and global similarity score.
[0068] The establishment of a parameter metric space is crucial in few-shot learning models because it enables accurate predictions of input samples. However, the existence of domain gaps leads to significant differences between test and training samples, potentially resulting in the inappropriate use of properly trained parameter metrics on test samples. Therefore, in addition to the requirement for accurate measurement, another requirement for metric learning is good generalization.
[0069] To address the aforementioned technical problems, this invention proposes a scheme for predicting local-to-global similarity scores. The global score prediction is used as an auxiliary target, and the local-to-global similarity score can be used to calibrate the parameter metric space, combining it from both local and global perspectives. This calibration maximizes the semantic consistency between samples within the same category. The scheme consists of two parts: local similarity score prediction and global similarity score prediction.
[0070] 1. Reference Figure 2 The model structure is illustrated below. The meta-learning training and testing process is summarized as follows:
[0071] A1. In the meta-learning phase, the input is images downsampled in a 3-way 20-shot manner. The input image dataset is divided into support set images X. S With query set image X Q ;
[0072] A2, will support image set X S and query set image X Q After inputting into the embedding network, the support set image features f are obtained. s and query set image features f q Then, similarity measurement is performed, and based on feature f s and f q Perform local similarity score prediction and output d. s and d q ;
[0073] A3. The local similarity score r is obtained by calculating and predicting from the local branches of KNN. loc The global similarity score r is predicted by calculating the global branch of MMD. glo ;
[0074] 2. Prediction of local similarity scores, including the following steps:
[0075] To predict the similarity score of local regions, the features of each sample are divided into m groups, called deep local descriptors, and then the support set image features f s and query set image features f q The details are as follows:
[0076]
[0077]
[0078] Where c represents the number of categories, z represents the number of support set samples for each category, and n represents the number of query set samples; for each query sample This invention can obtain each q i Local similarity score r loc :
[0079]
[0080]
[0081]
[0082] in,· k The operation refers to the K Nearest Neighbors (KNN) algorithm, which is used to select the K deep local descriptors that are closest to the support set of deep local descriptors of class c.
[0083] In this invention, the global branch differs from the local branch in that it prioritizes analyzing the overall distribution of the query set rather than focusing on each individual sample. The goal of this branch is to analyze the semantic consistency between each query sample and samples of the same category in the support set.
[0084] 3. Global similarity score prediction, including the following steps:
[0085] A31. Considering the difference between local and global contexts, a feature reorganization module Ds(φ) is added after feature embedding. D This is to meet the requirements of global similarity score prediction. For example... Figure 3 The diagram shows a schematic of the feature reorganization module, which is based on the Cot attention mechanism and shares f. s and f q The weights are determined by this mechanism. Due to its advantages in context learning, this invention chooses it for feature regrouping.
[0086] A32, feature f s and f q Input the feature extraction and recombination module to obtain d s and d q It can be represented by the following formula:
[0087] Q, K, V = Conv(f)
[0088] d=fc(Conv([Conv(Conv(K),Q])*Conv(V+K))
[0089] Where Conv represents convolution operation and fc represents fully connected layer;
[0090] A33. Further potential characteristics of the support set and query set can be represented as follows:
[0091]
[0092] d q [dq 1 , ..., dq n ]
[0093] in, dq represents the latent features supporting the i-th sample in the j-th class of the set. n This represents the latent features of the n samples in the query set of species;
[0094] A34. Global similarity score prediction integrates MMD indicators to calculate dq. n Samples in the same category The semantic consistency between them is determined by the following method for calculating the MMD distance:
[0095]
[0096] The trace of the matrix is represented as tr(·), and the function φ M (·) = φ(.,·) represents a multi-kernel function, indicating that the calculation of the original features is performed in multiple different high-dimensional quantity spaces. The formula for the multi-kernel function is as follows:
[0097]
[0098]
[0099]
[0100]
[0101] A35. The global similarity score r of the nth query sample glo This represents the negative value of the MMD distance, specifically as follows:
[0102] r glo (dq n ,ds c )=-MMD(dq n ,ds c ).
[0103] A4. Using local metric fraction r loc and global metric score r glo Calculate the overall optimization loss;
[0104] Overall model training: using local similarity scores r loc And global similarity score r glo The overall optimization loss of the calculation model is used here, specifically the cross-loss entropy, as shown below:
[0105]
[0106]
[0107] A5. Gradient updates optimize the model;
[0108] A6. During the testing phase, only local branches are used for testing.
[0109] Experimental results:
[0110] Reference Figure 4-7 Using actual inspection images collected by drones as experimental subjects, the effectiveness of the recognition method of this invention and existing algorithms (Convm, Versa, and Relation) was tested. Results are shown below. Figure 8-10 ,in, Figure 8 The test results are the wire defect test results from the test set in the experimental test results. Figure 9 This is a graph showing the test results of insulator defects in the test set from the experimental test results. Figure 10 The experimental test results include a graph of foreign object defect test results in the test set, and Table 1 and... Figure 11 This is the result of the accuracy trend test.
[0111] Table 1.
[0112] Convm 73.23% Versa 72.13% Relation 79.26% Algorithm of this invention 89.21%
[0113] The results show that the recognition method of the present invention has a higher accuracy rate compared with existing recognition algorithms.
[0114] This invention is not limited to the specific embodiments described above. Any modifications made by those skilled in the art based on the above concept without creative effort are within the scope of protection of this invention.
Claims
1. A method for identifying transmission line defects based on a few-sample training method using the miniImageNet dataset, characterized in that... Includes the following steps: S1. Obtain defect sample data of transmission lines, perform data preprocessing, and create an image dataset; S2. Input the image dataset into the few-shot learning model for meta-learning training and testing, use the global prediction score as an auxiliary target, and calibrate the parameter metric space using the predicted local similarity score and global similarity score. S3. Input the defect samples of the transmission line to be tested into the model for accurate prediction and identification; In step S2, the image dataset is fed into the few-shot learning model for meta-learning training and testing. The specific steps are as follows: A1. During the meta-learning phase, the input is an image downsampled in a 3-way 20-shot manner. The input image is divided into support set images. and query set images ; A2, will support image sets and query set images After inputting into the embedding network, the support set image features are obtained. and query set image features Then, similarity measurement is performed, and based on features... and Perform local similarity score prediction and output. and ; A3. Local metric scores are obtained from local branches of KNN. The global metric score is calculated from the MMD global branch. ; A4. Using local metrics and scores and global metric score Calculate the overall optimization loss; A5. Gradient updates optimize the model; A6. During the testing phase, only local branches are used for testing; The prediction of the local similarity score, Includes the following steps: To achieve a local perspective, the features of each sample are divided into m groups, called deep local descriptors, as shown below: Where c represents the number of categories, z represents the number of support set samples for each category, and m and n represent the number of query set samples, respectively; for each query sample, each Local similarity score : in, The operation refers to the K-Nearest Neighbors (KNN) algorithm; The prediction of the global similarity score includes the following steps: A31. Add a feature reorganization module after feature embedding; A32, Features and Input feature extraction and recombination module to obtain and It can be represented by the following formula: in, This represents the convolution operation. Indicates a fully connected layer; A33. Further potential characteristics of the support set and query set can be represented as follows: in, Indicates support for the centralized first The first in the class Potential features of a sample Indicates the species in the query set Potential characteristics of the sample; A34. Global similarity score prediction integrates the MMD index and calculates... Samples in the same category The semantic consistency between them is determined by the following method for calculating the MMD distance: The trace of the matrix is represented as... ,function This indicates a multi-kernel function, meaning the computation of the original features is performed in multiple different high-dimensional space. The formula for the multi-kernel function is as follows: ; A35, No. Global similarity score of each query sample This represents the negative value of the MMD distance, specifically as follows: 。 2. The method for identifying transmission line defects based on miniImageNet dataset-assisted training with few-sample learning according to claim 1, characterized in that, Before training the model, the pixel size of the transmission line defect sample image data was scaled down to limit the long side of the image to no more than 84 pixels and the short side to no more than 84 pixels. The number of channels of the image was converted into a 3-channel color image, and Conv64 was used as the embedding network of the model.
3. The method for identifying transmission line defects based on miniImageNet dataset-assisted training with few-sample learning according to claim 1, characterized in that, The use of local metric scores and global metric score The overall optimization loss is calculated, and the cross-loss entropy is used for optimization, as shown below: 。
Citation Information
Patent Citations
Few-sample power defect detection method based on attention mechanism and metric learning
CN113657517A
Method and system for image classification
US20220189143A1