CN114821368A - Power defect detection method based on reinforcement learning and Transformer - Google Patents

Power defect detection method based on reinforcement learning and Transformer Download PDF

Info

Publication number
CN114821368A
CN114821368A CN202210482372.7A CN202210482372A CN114821368A CN 114821368 A CN114821368 A CN 114821368A CN 202210482372 A CN202210482372 A CN 202210482372A CN 114821368 A CN114821368 A CN 114821368A
Authority
CN
China
Prior art keywords
vector
image
transformer
feature
network
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202210482372.7A
Other languages
Chinese (zh)
Other versions
CN114821368B (en
Inventor
李帷韬
侯建平
胡平路
管树志
杨盛世
张雪松
李奇越
孙伟
刘鑫
常文婧
李卫国
王刘芳
董翔宇
黄杰
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Super High Voltage Branch Of State Grid Anhui Electric Power Co ltd
Hefei University of Technology
Original Assignee
Super High Voltage Branch Of State Grid Anhui Electric Power Co ltd
Hefei University of Technology
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Super High Voltage Branch Of State Grid Anhui Electric Power Co ltd, Hefei University of Technology filed Critical Super High Voltage Branch Of State Grid Anhui Electric Power Co ltd
Priority to CN202210482372.7A priority Critical patent/CN114821368B/en
Publication of CN114821368A publication Critical patent/CN114821368A/en
Application granted granted Critical
Publication of CN114821368B publication Critical patent/CN114821368B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V20/00Scenes; Scene-specific elements
    • G06V20/10Terrestrial scenes
    • G06V20/17Terrestrial scenes taken from planes or by drones
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/045Combinations of networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/764Arrangements for image or video recognition or understanding using pattern recognition or machine learning using classification, e.g. of video objects
    • G06V10/765Arrangements for image or video recognition or understanding using pattern recognition or machine learning using classification, e.g. of video objects using rules for classification or partitioning the feature space
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/77Processing image or video features in feature spaces; using data integration or data reduction, e.g. principal component analysis [PCA] or independent component analysis [ICA] or self-organising maps [SOM]; Blind source separation
    • G06V10/774Generating sets of training patterns; Bootstrap methods, e.g. bagging or boosting
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V20/00Scenes; Scene-specific elements
    • G06V20/40Scenes; Scene-specific elements in video content
    • G06V20/41Higher-level, semantic clustering, classification or understanding of video scenes, e.g. detection, labelling or Markovian modelling of sport events or news items
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V20/00Scenes; Scene-specific elements
    • G06V20/40Scenes; Scene-specific elements in video content
    • G06V20/46Extracting features or characteristics from the video content, e.g. video fingerprints, representative shots or key frames
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y04INFORMATION OR COMMUNICATION TECHNOLOGIES HAVING AN IMPACT ON OTHER TECHNOLOGY AREAS
    • Y04SSYSTEMS INTEGRATING TECHNOLOGIES RELATED TO POWER NETWORK OPERATION, COMMUNICATION OR INFORMATION TECHNOLOGIES FOR IMPROVING THE ELECTRICAL POWER GENERATION, TRANSMISSION, DISTRIBUTION, MANAGEMENT OR USAGE, i.e. SMART GRIDS
    • Y04S10/00Systems supporting electrical power generation, transmission or distribution
    • Y04S10/50Systems or methods supporting the power network operation or management, involving a certain degree of interaction with the load-side end user applications

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Multimedia (AREA)
  • Software Systems (AREA)
  • General Health & Medical Sciences (AREA)
  • Health & Medical Sciences (AREA)
  • Artificial Intelligence (AREA)
  • Evolutionary Computation (AREA)
  • Computing Systems (AREA)
  • Computational Linguistics (AREA)
  • Databases & Information Systems (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Medical Informatics (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Biomedical Technology (AREA)
  • Biophysics (AREA)
  • Data Mining & Analysis (AREA)
  • Molecular Biology (AREA)
  • General Engineering & Computer Science (AREA)
  • Mathematical Physics (AREA)
  • Remote Sensing (AREA)
  • Image Analysis (AREA)

Abstract

The invention discloses a power defect identification method based on reinforcement learning and Transformer, which comprises the following steps: 1, acquiring an original data set by an unmanned aerial vehicle aerial photography, and generating a confrontation network augmentation data set through deep convolution; 2, extracting image features by using a reinforcement learning module to search a foreground region; and 3, compressing the feature vector of the background region through a Transformer module, further extracting features, and finally obtaining a final prediction result through a full connection layer. The invention realizes the detection of the electric power defect area by utilizing deep learning, thereby reducing the labor cost, being not influenced by external factors such as weather, background and the like, and improving the detection efficiency and the detection precision.

Description

Power defect detection method based on reinforcement learning and Transformer
Technical Field
The invention relates to the field of deep learning, in particular to a power defect detection method based on reinforcement learning and a Transformer.
Background
With the continuous increase of the power demand in China, the scale of the power transmission line is rapidly enlarged, and the power transmission line is exposed in a complex natural environment for a long time and is interfered by natural conditions such as rainwater corrosion, lightning stroke and the like, so that various faults are easy to occur, and the safe and stable operation of a power grid is influenced. Therefore, the high-efficiency inspection of the power transmission line is important for ensuring normal operation of production and life.
Many transmission lines erect in the region of rare people, and the topography is complicated, and the cost and the degree of difficulty that traditional manual work was patrolled and examined are all higher. Therefore, many areas adopt unmanned aerial vehicle to carry on image acquisition device's mode, gather transmission line's image and video data fast to the work load is patrolled and examined in significantly reducing. However, because the aerial images are large in quantity and complex in background, when workers adopt manual judgment, the efficiency is low, judgment errors are easy to occur, and the requirement of routing inspection is difficult to meet. Therefore, the research of the power transmission line detection fault detection method based on the aerial image of the unmanned aerial vehicle has important theoretical and practical values.
With the continuous development of unmanned aerial vehicle technology and computer technology, research on detection in the aspect of power transmission lines at home and abroad has made a certain progress, and the method can be divided into a traditional image processing method and a deep learning method according to the principle of an identification algorithm. Feature extraction in traditional image processing methods mainly relies on artificially designed extractors. The document [ frequency tuning-based insulator identification and positioning ] provides a frequency tuning-based insulator identification and positioning algorithm, and the insulator positioning in a complex background is realized by threshold segmentation in HSV color space and calculation of significance information of a target object by using a frequency tuning method. The document [ a contact network insulator identification method based on Canny edge feature points ] provides a contact network insulator identification method based on Canny edge feature points, and the intelligent identification of the contact network insulator is realized by extracting image edge features by using Canny and extracting feature points on an edge image by using an SURF algorithm. However, the traditional algorithm excessively depends on manually designing an extractor, the calculation amount is large, and the detection precision and speed can not meet the requirements of practical application.
With the continuous improvement of computer computing ability, deep learning is continuously applied in new fields, and gradually becomes mainstream due to good generalization and characterization ability. Currently, a model based on a combined significant region and a Fast-CNN is used for insulator characteristic detection research, so that the insulator working state detection effect in a power transmission line is improved; according to the insulator defect detection method of the lightweight YOLOV3, an improved lightweight network is constructed by a framework, and insulator positioning and fault detection are realized. In the methods, the power failure detection is performed by using the reinforcement learning model, so that the detection performance is greatly improved compared with the traditional method, but the following problems exist: 1) the data sets are relatively few, and the general performance of the trained model under different environments is poor; 2) a final prediction result is obtained through a deep network, and the information of a small target object cannot be reconstructed, so that the detection precision is influenced; 3) the prior frame needs to be set for detection, the performance is greatly influenced by the design of the prior frame, and meanwhile, the calculation related to the anchor window in training and detection occupies a large amount of calculation resources, so that the method cannot be well adapted to circuit inspection tasks in various different environments; 4) background-independent detection occupies a large amount of computing resources, and influences the final detection result.
Disclosure of Invention
Aiming at the defects of the prior art, the invention aims to solve the problems of poor universality, excessive dependence on a priori frame, occupation of computing resources by irrelevant background, influence on precision and the like in different environments of the conventional power defect detection method, and provides a depth-based power defect detection method so as to realize intelligent power defect inspection, reduce labor cost and improve detection efficiency and detection accuracy.
The invention adopts the following technical scheme for solving the technical problems:
the invention discloses a power defect identification method based on reinforcement learning and a Transformer, which is characterized by comprising the following steps of:
step 1, collecting an electric power inspection aerial image set, using a depth convolution to generate a countermeasure network for data enhancement to obtain an expanded image data set, standardizing the expanded image data set, and labeling each standardized image with a target detection frame to obtain a training data set;
step 2, constructing a reinforcement learning module for screening foreground regions and background regions, inputting the training data set into the reinforcement learning module for training, and obtaining a foreground region characteristic vector set F of the ith image in the training data set i,f And background region vector set F i,b
Step 3, according to the foreground characteristic vector set F of the ith image i,f And background region vector set F i,b Using bilinear pooling layer to assemble F vector to the background region i,b Performing information compression on the non-key area to obtain a feature vector set F with the number of M i,c Then the foreground feature vector set F i,f After the connection, a new vector combination F is obtained i *
Step 4, combining the new vectors of the ith image F i * Inputting the feature into a Transformer module for feature extraction to obtain a feature map T i And then, processing the characteristic diagram by using a full connection layer, and outputting a prediction result, so that a loss function is constructed according to the prediction result and a real result, the loss function is used for training parameters of the Transformer module, and finally the trained Transformer module is obtained and used for identifying the power defect.
The method for identifying an electric power defect according to the present invention is also characterized in that the step 2 includes:
step 2.1, constructing a reinforcement learning module, comprising: a main network and a DQN network for extracting the characteristics of the DetNet; randomly initializing parameters of the reinforcement learning module;
the main network is a convolutional neural network constructed based on hole convolution and comprises X convolutional blocks; wherein, the x-th convolution block is formed by a convolution kernel with the size of c 1 Having a common convolution layer, a convolution kernel size of c 2 Has a hole convolution layer and a convolution kernel size of c 2 Wherein, a batch normalization layer and a ReLu activation function are connected behind each convolution block;
the DQN network composition consists of a fully connected network;
2.2, setting the space of an experience pool D according to the number of pictures in the training data set, and initializing the experience pool D;
step 2.3, inputting the ith image with the target detection frame in the training data set into the extraction trunk network for feature extraction to obtain a feature map F with the size of C multiplied by n i (ii) a C represents a characteristic diagram F i N represents a feature map F i Length or width of (d);
step 2.4, the characteristic diagram F is processed i Dividing the motion space into n multiplied by n block unit areas with equal size, wherein each block unit area represents one motion selection, and obtaining a motion space marked as A i ={a i,1 ,a i,2 ,,...,a i,t ,...,a i,n×n },a i,t An operation for selecting the t-th unit area in the ith image;
step 2.5, calculating the reward score r of the unit area selected by the t action in the ith image by using the formula (1) i,t Thereby obtaining the characteristic diagram F i Is rewarding function J i ={j i,1 ,j i,2 ,,...,j i,t ,...,j i,n×n };
Figure BDA0003628070720000031
In the formula (1), Δ i,t Representing the number of target object pixels contained in the t unit area in the ith image; delta i,all Representing the total number of pixels of the t-th unit area in the ith image;
step 2.6, setting the characteristic diagram F i State space s of i
Step 2.7, inputting the state space into the DQN network, obtaining the score of each action in the action space, selecting the K actions with the highest score by a greedy strategy, and selecting the actions from the state space s i And K actions of it constitute a Q value table Q(s) i ,a i );
And calculating K reward values obtained under the current K actions according to a reward function R, so as to obtainAnd K prize values and Q values table Q(s) i ,a i ) The formed ith tuple is stored in an experience pool D;
step 2.8, sequentially processing all images in the training data set according to the process from the step 2.3 to the step 2.7, thereby filling the experience pool D;
2.9, randomly selecting the G group in the experience pool D, and updating parameters in the primary reinforcement learning module by using a back propagation algorithm;
step 2.10, z is performed according to the procedure from step 2.3 to step 2.9 1 And storing the final reinforcement learning module after secondary updating, inputting the images in the training data set into the final reinforcement learning module, and outputting a final feature map F 'from the ith image' i Selecting the feature map F' i Taking the K unit areas with the highest medium reward value as a foreground area feature vector set F i,f ={f i,f,l And 1., K, with the remaining unit area as the background area vector set F i,b ={f i,b,r 1, ·, n × n-K }; wherein f is i,f,l Feature vectors representing the ith foreground region in the ith image, f i,b,r A feature vector representing the r-th background region in the i-th image.
The step 3 comprises the following steps:
step 3.1, obtaining an aggregation weight vector a corresponding to the r background region vector in the ith image by using the formula (2) i,r
a i,r =f i,b,r W a (2)
In the formula (2), W a Representing a weight matrix with one dimension of C multiplied by M; a is i,r ={a i,r,m 1,. and M, wherein M represents a compressed vector dimension; a is i,r,m Is an aggregate weight vector a i,r The mth element in the ith image represents the mth aggregation weight corresponding to the characteristic vector of the mth background area in the ith image;
step 3.2, utilizing the formula (3) to perform the m-th aggregation weight a corresponding to the r-th background region feature vector in the i-th image i,r,m Carrying out standardization processing to obtain the r-th background region feature vector pair in the ith imageCorresponding mth normalized polymerization weight a' i,r,m
Figure BDA0003628070720000041
In the formula (3), a i,r',m The mth aggregation weight corresponding to the characteristic vector of the mth background area in the ith image is shown,
Figure BDA0003628070720000042
the m-th aggregation weight sum of all the background region feature vectors in the i-th image is represented;
step 3.2, obtaining the r characteristic projection vector f 'in the i image by using the formula (4)' i,r
f′ i,r =f i,r W v (4)
In the formula (4), W v Representing a weight matrix with one dimension of C multiplied by C;
step 3.3, obtaining the m-th compressed feature vector f in the ith image by using the formula (5) i,m Thereby obtaining a compressed background region feature vector set F i,c ={f i,m ,|m=1,...,M}:
Figure BDA0003628070720000043
In formula (5), a represents convolution between vectors.
The step 4 specifically comprises the steps of:
step 4.1, constructing a Transformer module, which comprises the following steps: a Transformer feature extraction network and an end-to-end detector; and randomly initializing parameters of the Transformer module;
the Transformer feature extraction network branch is Y Transformer blocks constructed based on Transformer-encode, wherein the Y Transformer block sequentially comprises a first normalization layer, a multi-head self-attention mechanism layer, a second normalization layer and a multi-layer perceptron, wherein the input of the first normalization layer is in jump connection with the output of the multi-head attention mechanism layer, and the input of the second normalization layer is in jump connection with the output of the multi-layer perceptron;
the end-to-end detector is comprised of a fully connected network;
step 4.2, collecting the new vector F of the ith image i * Sending the data into the Transformer feature extraction network, and obtaining a feature map T with highly concentrated information after feature extraction of Y Transformer blocks in sequence i Then the characteristic diagram T is used i Inputting the data into the end-to-end detector for prediction to obtain a prediction result.
Compared with the prior art, the invention has the beneficial effects that:
1. the method applies the deep convolution to generate the confrontation network to data enhancement, generates the picture through the training deep learning network, improves the size of the data set, and improves the generalization performance of the model under different environments.
2. According to the method, the cavity convolution is used for feature extraction, on the premise that pooling loss information is avoided, the receptive field is enlarged, each convolution output contains information in a large range, and compared with common convolution, the sensing capability of small target objects and the positioning capability of large target objects are improved.
3. According to the method, the key area is extracted from the characteristic diagram by using reinforcement learning, and the characteristic diagram of the background area is compressed by adopting the bilinear layer, so that the calculation proportion of irrelevant background information in a transform network is reduced, the calculation speed is increased, and the influence of irrelevant information vectors on the final detection result is reduced.
4. The method finally and directly outputs the final detection result through a group of feedforward networks, avoids the dependence of detection precision on the design of the anchor frame when the anchor frame is adopted in the traditional method and the unbalance problem of the positive anchor frame and the negative anchor frame in the training process by using a prior frame, and improves the efficiency and the precision of calculation.
Drawings
FIG. 1 is a flow chart of the algorithm of the present invention.
Detailed Description
In this embodiment, referring to fig. 1, a method for identifying an electrical defect based on reinforcement learning and a Transformer is performed according to the following steps:
step 1, collecting an electric power inspection aerial image set, using a depth convolution to generate a countermeasure network for data enhancement to obtain an expanded image data set, standardizing the expanded image data set, and labeling each standardized image with a target detection frame to obtain a training data set; in this embodiment, there are 8192 pictures in the training data set;
step 2, constructing a reinforcement learning module for screening the foreground region and the background region, inputting the training data set into the reinforcement learning module for training, and obtaining a foreground region characteristic vector set F of the ith image in the training data set i,f And background region vector set F i,b
Step 2.1, constructing a reinforcement learning module, comprising: a main network and a DQN network for extracting the characteristics of the DetNet; randomly initializing parameters of the reinforcement learning module;
the main network is a convolutional neural network constructed based on the hole convolution and comprises X convolutional blocks; wherein, the x-th convolution block is formed by a convolution kernel with the size of c 1 ×c 1 Has a common convolution, with a convolution kernel size of c 2 ×c 2 Has a hole convolution layer and a convolution kernel size of c 3 ×c 3 Wherein, each convolution block is connected with a batch normalization layer and a ReLu activation function; in this embodiment, the size of X is 6, and the size of the xth convolution block is c 1 =1、c 2 3 and c 3 =1。
The DQN network consists of fully connected networks;
2.2, setting the space of an experience pool D according to the number of pictures in the training data set, and initializing the experience pool D; in this embodiment, the spatial size of the experience pool D is 8192.
Step 2.3, inputting the ith image with the target detection frame in the training data set into an extraction trunk network for feature extraction to obtain a feature map F with the size of C multiplied by n i (ii) a C represents the number of channels of the feature map F, n represents the feature map F i Length or width of (d); in this embodiment, the number C of feature map channels is 256, and the length n is 28;
step 2.4, converting the characteristic diagram F i Dividing the motion space into n multiplied by n block unit areas with equal size, wherein each block unit area represents one motion selection, and obtaining a motion space marked as A i ={a i,1 ,a i,2 ,,...,a i,t ,...,a i,n×n },a i,t An operation for selecting the t-th unit region in the ith picture; in this embodiment, the feature map is divided into 28 × 28 block unit areas;
step 2.5, calculating the reward score r of the unit area selected by the t-th action in the ith picture by using the formula (1) i,t Thereby obtaining the reward function J of the characteristic diagram F i ={j i,1 ,j i,2 ,,...,j i,t ,...,j i,n×n };
Figure BDA0003628070720000071
In the formula (1), Δ i,t Representing the number of target object pixels contained in the t unit area in the ith picture; delta i,all Representing the total number of pixels of the t unit area in the ith picture;
step 2.6, setting a characteristic diagram F i State space s of i
Step 2.7, inputting the state space into the DQN network, obtaining the score of each action in the action space, selecting the K actions with the highest score by using a greedy strategy, and selecting the actions from the state space s i And K actions of it constitute a Q value table Q(s) i ,a i );
And calculating K rewards obtained under the current K actions according to a reward function RValues, and thus K prize values and Q values table Q(s) i ,a i ) The formed ith tuple is stored in an experience pool D; in this embodiment, the value of K is set to 260, i.e., 260 actions with the highest scores are selected by using a greedy strategy;
step 2.8, sequentially processing all images in the training data set according to the process from the step 2.3 to the step 2.7, thereby filling the experience pool D;
2.9, randomly selecting the G group in the experience pool D, and updating parameters in the primary reinforcement learning module by using a back propagation algorithm;
step 2.10, z is performed according to the procedure from step 2.3 to step 2.9 1 And storing the final reinforcement learning module after secondary updating, inputting the images in the training data set into the final reinforcement learning module, and outputting a final feature map F 'from the ith image' i Selecting a feature map F' i Taking the K unit areas with the highest medium reward value as a foreground area feature vector set F i,f ={f i,f,l And 1., K, with the remaining unit area as the background area vector set F i,b ={f i,b,r 1, ·, n × n-K }; wherein f is i,f,l Feature vectors representing the ith foreground region in the ith image, f i,b,r A feature vector representing the r-th background region in the i-th image. In this embodiment, the reinforcement learning module trains the iteration number z 1 At 200, the foreground region feature vector set comprises 260 feature vectors, and the background region vector feature comprises 524 feature vectors;
step 3, according to the foreground characteristic vector set F of the ith image i,f And background region vector set F i,b Using bilinear pooling layer to set F of background region vectors i,b Performing information compression on the non-key area to obtain a feature vector set F with the number of M i,c Then, the foreground feature vector set F is obtained i,f After the connection, a new vector combination F is obtained i *
Step 3.1, obtaining an aggregation weight vector a corresponding to the r background region vector in the ith image by using the formula (2) i,r
a i,r =f i,b,r W a (2)
In the formula (2), W a Representing a weight matrix with one dimension of C multiplied by M; a is i,r ={a i,r,m 1,. and M, wherein M represents a compressed vector dimension; a is i,r,m Is an aggregate weight vector a i,r The mth element in the ith image represents the mth aggregation weight corresponding to the characteristic vector of the mth background area in the ith image; the vector dimension M after compression in this embodiment is 60;
step 3.2, utilizing the formula (3) to perform the m-th aggregation weight a corresponding to the r-th background region feature vector in the i-th image i,r,m Carrying out normalization processing to obtain an m < th > normalized aggregation weight a 'corresponding to the r < th > background region feature vector in the i < th > image' i,r,m
Figure BDA0003628070720000081
In the formula (3), a i,r',m The mth aggregation weight corresponding to the characteristic vector of the mth background area in the ith image is shown,
Figure BDA0003628070720000082
the m-th aggregation weight sum of all the background region feature vectors in the i-th image is represented; thus changing the dimensionality and projecting the r vectors into the M vectors;
step 3.3, obtaining the r characteristic projection vector f 'in the i image by using the formula (4)' i,r
f′ i,r =f i,r W v (4)
In the formula (4), W v Representing a weight matrix with one dimension of C multiplied by C; in this embodiment, W v Is a weight matrix with dimension of 256 multiplied by 256;
step 3.4, obtaining the m-th compressed feature vector f in the ith image by using the formula (5) i,m Thereby obtaining a compressed background region feature vector set F i,c ={f i,m ,|m=1,...,M}:
Figure BDA0003628070720000083
In formula (5), a represents convolution between vectors.
Step 4, combining the new vectors of the ith image F i * Inputting the feature into a Transformer module for feature extraction to obtain a feature map T i And then, processing the characteristic diagram by using the full connection layer, and outputting a prediction result, so that a loss function is constructed according to the prediction result and a real result, the loss function is used for training parameters of the Transformer module, and finally the trained Transformer module is obtained and used for identifying the power defect.
Step 4.1, constructing a Transformer module, comprising the following steps: a Transformer feature extraction network and an end-to-end detector; randomly initializing parameters of a Transformer module;
the Transformer feature extraction network branch is Y Transformer blocks constructed based on Transformer-encode, wherein the Y Transformer block sequentially consists of a first normalization layer, a multi-head self-attention mechanism layer, a second normalization layer and a multi-layer perceptron, wherein the input of the first normalization layer is in jump connection with the output of the multi-head attention mechanism layer, and the input of the second normalization layer is in jump connection with the output of the multi-layer perceptron; in this embodiment, the number Y of transform blocks is 6;
the end-to-end detector consists of a fully connected network; in this embodiment, the fully connected network is formed of three layers;
step 4.2, collecting the new vector F of the ith image i * Sending the data into a Transformer feature extraction network, and sequentially extracting the features of Y Transformer blocks to obtain a feature map T with highly concentrated information i Then, the feature map T is used i Inputting the data into an end-to-end detector for prediction to obtain a prediction result.

Claims (4)

1. A reinforcement learning and Transformer-based electric power defect identification method is characterized by comprising the following steps:
step 1, collecting an electric power inspection aerial image set, using a depth convolution to generate a countermeasure network for data enhancement to obtain an expanded image data set, standardizing the expanded image data set, and labeling each standardized image with a target detection frame to obtain a training data set;
step 2, constructing a reinforcement learning module for screening foreground regions and background regions, inputting the training data set into the reinforcement learning module for training, and obtaining a foreground region characteristic vector set F of the ith image in the training data set i,f And background region vector set F i,b
Step 3, according to the foreground characteristic vector set F of the ith image i,f And background region vector set F i,b Using bilinear pooling layer to assemble F vector to the background region i,b Performing information compression on the non-key area to obtain a feature vector set F with the number of M i,c Then the foreground feature vector set F i,f After the connection, a new vector combination F is obtained i *
Step 4, combining the new vectors of the ith image F i * Inputting the feature into a Transformer module for feature extraction to obtain a feature map T i And then, processing the characteristic diagram by using a full connection layer, and outputting a prediction result, so that a loss function is constructed according to the prediction result and a real result, the loss function is used for training parameters of the Transformer module, and finally the trained Transformer module is obtained and used for identifying the power defect.
2. The power defect identification method according to claim 1, wherein the step 2 comprises:
step 2.1, constructing a reinforcement learning module, comprising: a main network and a DQN network for extracting the characteristics of the DetNet; randomly initializing parameters of the reinforcement learning module;
the main network is a convolutional neural network constructed based on hole convolution and comprises X convolutional blocks; wherein, the x-th convolution block is sequentially formed by the sizes of convolution kernelsIs c 1 Having a common convolution layer, a convolution kernel size of c 2 Has a hole convolution layer and a convolution kernel size of c 2 Wherein, a batch normalization layer and a ReLu activation function are connected behind each convolution block;
the DQN network composition consists of a fully connected network;
2.2, setting the space of an experience pool D according to the number of pictures in the training data set, and initializing the experience pool D;
step 2.3, inputting the ith image with the target detection frame in the training data set into the extraction trunk network for feature extraction to obtain a feature map F with the size of C multiplied by n i (ii) a C represents a characteristic diagram F i N represents a feature map F i Length or width of (d);
step 2.4, the characteristic diagram F is processed i Dividing the motion space into n multiplied by n block unit areas with equal size, wherein each block unit area represents one motion selection, and obtaining a motion space marked as A i ={a i,1 ,a i,2 ,,...,a i,t ,...,a i,n×n },a i,t An operation for selecting the t-th unit area in the ith image;
step 2.5, calculating the reward score r of the unit area selected by the t action in the ith image by using the formula (1) i,t Thereby obtaining the characteristic diagram F i Is rewarding function J i ={j i,1 ,j i,2 ,,...,j i,t ,...,j i,n×n };
Figure FDA0003628070710000021
In the formula (1), Δ i,t Representing the number of target object pixels contained in the t unit area in the ith image; delta i,all Representing the total number of pixels of the t-th unit area in the ith image;
step 2.6, setting the characteristic diagram F i State space s of i
Step 2.7, input the state space intoIn the DQN network, the score of each action in the action space is obtained, K actions with the highest score are selected by a greedy strategy, and the state space s i And K actions of it constitute a Q value table Q(s) i ,a i );
And calculating K reward values obtained under the current K actions according to the reward function R, thereby obtaining K reward values and a Q value table Q(s) i ,a i ) The formed ith tuple is stored in an experience pool D;
step 2.8, sequentially processing all images in the training data set according to the process from the step 2.3 to the step 2.7, thereby filling the experience pool D;
2.9, randomly selecting the G group in the experience pool D, and updating parameters in the primary reinforcement learning module by using a back propagation algorithm;
step 2.10, z is performed according to the procedure from step 2.3 to step 2.9 1 And storing the final reinforcement learning module after secondary updating, inputting the images in the training data set into the final reinforcement learning module, and outputting a final feature map F 'from the ith image' i Selecting the feature map F' i Taking the K unit areas with the highest medium reward value as a foreground area feature vector set F i,f ={f i,f,l And 1., K, with the remaining unit area as the background area vector set F i,b ={f i,b,r 1, ·, n × n-K }; wherein f is i,f,l Feature vectors representing the ith foreground region in the ith image, f i,b,r A feature vector representing the r-th background region in the i-th image.
3. The power defect identification method according to claim 1, wherein the step 3 comprises:
step 3.1, obtaining an aggregation weight vector a corresponding to the r background region vector in the ith image by using the formula (2) i,r
a i,r =f i,b,r W a (2)
In the formula (2), W a Representing a weight matrix with one dimension of C multiplied by M; a is i,r ={a i,r,m |m=1,...,M},MRepresenting the compressed vector dimensions; a is i,r,m Is an aggregate weight vector a i,r The mth element in the ith image represents the mth aggregation weight corresponding to the characteristic vector of the mth background area in the ith image;
step 3.2, utilizing the formula (3) to perform the m-th aggregation weight a corresponding to the r-th background region feature vector in the i-th image i,r,m Carrying out normalization processing to obtain an m < th > normalized aggregation weight a 'corresponding to the r < th > background region feature vector in the i < th > image' i,r,m
Figure FDA0003628070710000031
In the formula (3), a i,r',m The mth aggregation weight corresponding to the characteristic vector of the mth background area in the ith image is shown,
Figure FDA0003628070710000032
the m-th aggregation weight sum of all the background region feature vectors in the i-th image is represented;
step 3.2, obtaining the r characteristic projection vector f 'in the i image by using the formula (4)' i,r
f′ i,r =f i,r W v (4)
In the formula (4), W v Representing a weight matrix with one dimension of C multiplied by C;
step 3.3, obtaining the m-th compressed feature vector f in the ith image by using the formula (5) i,m Thereby obtaining a compressed background region feature vector set F i,c ={f i,m ,|m=1,...,M}:
Figure FDA0003628070710000033
In formula (5), a represents convolution between vectors.
4. The method for identifying the power defect according to claim 1, wherein the step 4 specifically comprises the steps of:
step 4.1, constructing a Transformer module, comprising the following steps: a Transformer feature extraction network and an end-to-end detector; and randomly initializing parameters of the Transformer module;
the Transformer feature extraction network branch is Y Transformer blocks constructed based on Transformer-encode, wherein the Y Transformer block sequentially comprises a first normalization layer, a multi-head self-attention mechanism layer, a second normalization layer and a multi-layer perceptron, wherein the input of the first normalization layer is in jump connection with the output of the multi-head attention mechanism layer, and the input of the second normalization layer is in jump connection with the output of the multi-layer perceptron;
the end-to-end detector is comprised of a fully connected network;
step 4.2, collecting the new vector F of the ith image i * Sending the data into the Transformer feature extraction network, and obtaining a feature map T with highly concentrated information after feature extraction of Y Transformer blocks in sequence i Then the characteristic diagram T is used i Inputting the data into the end-to-end detector for prediction to obtain a prediction result.
CN202210482372.7A 2022-05-05 2022-05-05 Electric power defect detection method based on reinforcement learning and transducer Active CN114821368B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210482372.7A CN114821368B (en) 2022-05-05 2022-05-05 Electric power defect detection method based on reinforcement learning and transducer

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210482372.7A CN114821368B (en) 2022-05-05 2022-05-05 Electric power defect detection method based on reinforcement learning and transducer

Publications (2)

Publication Number Publication Date
CN114821368A true CN114821368A (en) 2022-07-29
CN114821368B CN114821368B (en) 2024-03-01

Family

ID=82510615

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210482372.7A Active CN114821368B (en) 2022-05-05 2022-05-05 Electric power defect detection method based on reinforcement learning and transducer

Country Status (1)

Country Link
CN (1) CN114821368B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117094705A (en) * 2023-10-19 2023-11-21 国网安徽省电力有限公司电力科学研究院 Method, system and equipment for predicting defects of high-voltage switch cabinet

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11045271B1 (en) * 2021-02-09 2021-06-29 Bao Q Tran Robotic medical system
WO2021244079A1 (en) * 2020-06-02 2021-12-09 苏州科技大学 Method for detecting image target in smart home environment
CN113808123A (en) * 2021-09-27 2021-12-17 杭州跨视科技有限公司 Machine vision-based dynamic detection method for liquid medicine bag
CN114066820A (en) * 2021-10-26 2022-02-18 武汉纺织大学 Fabric defect detection method based on Swin-transducer and NAS-FPN

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2021244079A1 (en) * 2020-06-02 2021-12-09 苏州科技大学 Method for detecting image target in smart home environment
US11045271B1 (en) * 2021-02-09 2021-06-29 Bao Q Tran Robotic medical system
CN113808123A (en) * 2021-09-27 2021-12-17 杭州跨视科技有限公司 Machine vision-based dynamic detection method for liquid medicine bag
CN114066820A (en) * 2021-10-26 2022-02-18 武汉纺织大学 Fabric defect detection method based on Swin-transducer and NAS-FPN

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
王刘旺;周自强;林龙;韩嘉佳;: "人工智能在变电站运维管理中的应用综述", 高电压技术, no. 01, 31 January 2020 (2020-01-31) *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117094705A (en) * 2023-10-19 2023-11-21 国网安徽省电力有限公司电力科学研究院 Method, system and equipment for predicting defects of high-voltage switch cabinet
CN117094705B (en) * 2023-10-19 2024-01-02 国网安徽省电力有限公司电力科学研究院 Method, system and equipment for predicting defects of high-voltage switch cabinet

Also Published As

Publication number Publication date
CN114821368B (en) 2024-03-01

Similar Documents

Publication Publication Date Title
CN111062951B (en) Knowledge distillation method based on semantic segmentation intra-class feature difference
CN109241982B (en) Target detection method based on deep and shallow layer convolutional neural network
CN110930342B (en) Depth map super-resolution reconstruction network construction method based on color map guidance
CN109146944B (en) Visual depth estimation method based on depth separable convolutional neural network
CN112489164B (en) Image coloring method based on improved depth separable convolutional neural network
CN111242844B (en) Image processing method, device, server and storage medium
CN112785636B (en) Multi-scale enhanced monocular depth estimation method
CN113066089B (en) Real-time image semantic segmentation method based on attention guide mechanism
CN110009700B (en) Convolutional neural network visual depth estimation method based on RGB (red, green and blue) graph and gradient graph
CN113449691A (en) Human shape recognition system and method based on non-local attention mechanism
CN113554032A (en) Remote sensing image segmentation method based on multi-path parallel network of high perception
CN113901928A (en) Target detection method based on dynamic super-resolution, and power transmission line component detection method and system
CN114821368A (en) Power defect detection method based on reinforcement learning and Transformer
CN114529793A (en) Depth image restoration system and method based on gating cycle feature fusion
CN114581789A (en) Hyperspectral image classification method and system
CN116523888B (en) Pavement crack detection method, device, equipment and medium
CN116977631A (en) Streetscape semantic segmentation method based on DeepLabV3+
CN108596831B (en) Super-resolution reconstruction method based on AdaBoost example regression
CN115331081A (en) Image target detection method and device
CN111681176B (en) Self-adaptive convolution residual error correction single image rain removing method
CN113240589A (en) Image defogging method and system based on multi-scale feature fusion
CN112308772B (en) Super-resolution reconstruction method based on deep learning local and non-local information
CN113239771A (en) Attitude estimation method, system and application thereof
CN111899161A (en) Super-resolution reconstruction method
CN115147774B (en) Pedestrian re-identification method based on characteristic alignment in degradation environment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant