CN111597964A - Insulator image detection method - Google Patents

Insulator image detection method Download PDF

Info

Publication number
CN111597964A
CN111597964A CN202010403307.1A CN202010403307A CN111597964A CN 111597964 A CN111597964 A CN 111597964A CN 202010403307 A CN202010403307 A CN 202010403307A CN 111597964 A CN111597964 A CN 111597964A
Authority
CN
China
Prior art keywords
glass
training
ceramic
detection
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
CN202010403307.1A
Other languages
Chinese (zh)
Other versions
CN111597964B (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.)
Electric Power Research Institute of Yunnan Power Grid Co Ltd
Original Assignee
Electric Power Research Institute of Yunnan Power Grid Co Ltd
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 Electric Power Research Institute of Yunnan Power Grid Co Ltd filed Critical Electric Power Research Institute of Yunnan Power Grid Co Ltd
Priority to CN202010403307.1A priority Critical patent/CN111597964B/en
Publication of CN111597964A publication Critical patent/CN111597964A/en
Application granted granted Critical
Publication of CN111597964B publication Critical patent/CN111597964B/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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/21Design or setup of recognition systems or techniques; Extraction of features in feature space; Blind source separation
    • G06F18/214Generating training patterns; Bootstrap methods, e.g. bagging or boosting
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/24Classification techniques
    • 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/04Architecture, e.g. interconnection topology
    • G06N3/048Activation functions
    • 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
    • G06N3/084Backpropagation, e.g. using gradient descent

Landscapes

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

Abstract

The application discloses an insulator image detection method, which comprises the following steps: performing feature extraction on the glass insulator image based on VGG16 to obtain a training feature map; selecting a detection frame based on the training feature map, and combining the training feature map with the detection frame to obtain a training feature vector; performing ROI pooling treatment on the training feature vectors to obtain pooled feature vectors; performing two kinds of loss training on the pooled feature vectors to obtain a first detection network; obtaining a ceramic characteristic diagram and a glass characteristic diagram according to the first detection network; performing regression loss processing on the ceramic characteristic diagram and the glass characteristic diagram to obtain a regression loss function; processing the ceramic characteristic diagram and the glass characteristic diagram based on a classifier to obtain a classification loss function; performing resistance loss training on the regression loss function and the classification loss function to obtain a feature extraction network; and obtaining the insulator image detection network by using the feature extraction network. The insulator can be accurately detected.

Description

Insulator image detection method
Technical Field
The application relates to the technical field of target detection and identification, in particular to an insulator image detection method.
Background
The insulator is an important element in the power transmission line, is used for supporting and fixing the bus bar and the live conductor, so as to ensure that the live conductor or the conductor has enough distance and insulation with the ground, and is an irreplaceable part in the power transmission line. The insulator is exposed in the natural environment for a long time and is influenced by natural factors, and the problems of aging or damage and the like exist. Therefore, the insulator needs to be accurately identified when the power transmission line is patrolled.
In the prior art, a line inspection robot is generally used for inspection, an image of an insulator to be detected is obtained through a camera, then the image is segmented, and target extraction is performed according to the characteristics of the insulator so as to identify the accurate insulator.
However, the inventor of the present application found that the prior art has the following disadvantages: the insulator comprises a glass insulator and a ceramic insulator, the glass insulator is mainly used in the existing production technology, the detection method in the prior art is specific to the glass insulator, and when the ceramic insulator is in an image, the detection method in the prior art cannot detect the ceramic insulator. Therefore, the prior art has the defect that the insulator cannot be accurately detected.
Disclosure of Invention
The application provides an insulator image detection method, which aims to solve the problem that the insulator cannot be accurately detected in the prior art.
In order to solve the technical problem, the embodiment of the application discloses the following technical scheme:
the application provides an insulator image detection method, which comprises the following steps:
performing feature extraction on the glass insulation subimage based on a preset VGG16 network to obtain a training feature diagram;
selecting a detection frame based on the training feature map; combining the training feature map with the detection frame to obtain a training feature vector;
performing ROI pooling treatment on the training feature vectors to obtain pooled feature vectors;
performing classification loss training and coordinate regression loss training on the pooled feature vectors to obtain a first detection network;
inputting the same number of ceramic insulator pictures and glass insulator pictures into the first detection network to obtain a ceramic characteristic diagram and a glass characteristic diagram;
performing regression loss processing on the ceramic characteristic diagram and the glass characteristic diagram to obtain a regression loss function; processing the ceramic characteristic diagram and the glass characteristic diagram based on a preset classifier to obtain a classification loss function;
performing resistance loss training based on the regression loss function and the classification loss function to obtain a feature extraction network;
and replacing a preset VGG16 network in the first detection network with the feature extraction network to obtain an insulator image detection network, wherein the insulator image detection network is used for detecting whether an image contains an insulator.
Optionally, the performing feature extraction on the glass insulation sub-image based on the preset VGG16 network includes:
preprocessing the glass insulator image, wherein the preprocessing comprises mirroring, rotating and zooming to a preset format;
inputting the preprocessed glass insulator image into a preset VGG16 network for feature extraction processing;
the preset VGG16 network includes: 13 conv layers, 13 relu layers and 4 pooling layers.
Optionally, the selecting a detection frame based on the training feature map includes:
performing convolution processing on the training characteristic diagram to obtain a training matrix;
screening the training matrix based on a sliding window with a preset format to obtain a candidate detection window;
carrying out non-maximum suppression processing on the candidate detection window to obtain a candidate frame;
respectively carrying out prediction classification loss processing and regression loss processing on the candidate frames to obtain foreground candidate frames;
and screening the foreground candidate frame based on the foreground score to obtain a detection frame.
Optionally, the performing prediction classification loss processing and regression loss processing on the candidate frame respectively includes:
and respectively carrying out prediction classification loss processing and regression loss processing on the candidate frame based on two convolution checks, wherein a loss function is as follows:
Figure BDA0002490323640000021
Figure BDA0002490323640000022
Figure BDA0002490323640000023
wherein:
Nclsrepresenting the size of the batch, NregRepresenting the number of anchor points;
λ represents a hyper-parameter;
piis the prediction probability for which anchor point i is the object,
Figure BDA0002490323640000024
is a ground truth label;
when anchor i is positive, ground truth label
Figure BDA0002490323640000025
Is 1, when the anchor point i has a negative value,
Figure BDA0002490323640000026
is 0;
Lclsto categorical losses; l isregIs the regression loss;
tiis a vector of 4 parameterized coordinates representing a prediction candidate box;
Figure BDA0002490323640000031
is a candidate frame coordinate vector related to the positive sample anchor point;
r is a robust loss function.
Optionally, the screening the foreground candidate frame based on the foreground score to obtain a detection frame includes:
obtaining a foreground score of the foreground candidate frame;
ordering the anchors based on the foreground scores, extracting the first N anchors, mapping foreground candidate frames corresponding to the first N anchors into the training feature map, and removing the foreground candidate frames exceeding the boundary to obtain anchor frames;
and carrying out non-maximum suppression processing on the anchor frames, calculating the foreground scores of the anchor frames subjected to the non-maximum suppression processing, sorting the anchor frames from large to small according to the foreground score conditions, and selecting a preset number of anchor frames with the scores close to the front as detection frames.
Optionally, the processing the ceramic characteristic map and the glass characteristic map based on a preset classifier to obtain a classification loss function includes:
respectively inputting the ceramic characteristic diagram and the glass characteristic diagram into a preset classifier to obtain a classification result, wherein the classification result comprises: glass features, ceramic features, and non-glass non-ceramic features;
calculating a loss function for the glass features, the ceramic features, and the non-glass non-ceramic features:
Lglass=-q1logp(1)
LCeramic material=-q2logp(2)
LNon-glass non-ceramics=-q3logp(3)
Wherein:
q1、q2and q is3Labels that are glass, ceramic, and non-glass non-ceramic features, respectively;
p is the prediction probability vector of the classifier output.
Optionally, the regression loss function is:
Figure BDA0002490323640000032
wherein:
fglassShowing a characteristic diagram of the glass, fCeramic materialRepresenting a ceramic feature map;
Figure BDA0002490323640000033
represents L2And (5) carrying out norm operation.
Optionally, the performing the loss-fighting training on the regression loss function and the classification loss function includes:
taking the formula (3) and the formula (4) as a first set of training losses for updating parameters of the feature extraction network; taking the formula (1) and the formula (2) as a second group of training losses, and updating the network parameters of the preset classifier;
alternately back-propagating the first set of training losses and the second set of training losses until the losses converge.
Compared with the prior art, the beneficial effect of this application is:
the application provides an insulator image detection method which comprises the steps of carrying out feature extraction on a glass insulator image based on a preset VGG16 network to obtain a training feature map; selecting a detection frame based on the training feature map, and combining the training feature map with the detection frame to obtain a training feature vector; performing ROI pooling treatment on the training feature vectors to obtain pooled feature vectors; performing classification loss training and coordinate regression loss training on the pooled feature vectors to obtain a first detection network; inputting the same number of ceramic insulator pictures and glass insulator pictures into a first detection network to obtain a ceramic characteristic diagram and a glass characteristic diagram; performing regression loss processing on the ceramic characteristic diagram and the glass characteristic diagram to obtain a regression loss function; processing the ceramic characteristic diagram and the glass characteristic diagram based on a preset classifier to obtain a classification loss function; performing resistance loss training on the regression loss function and the classification loss function to obtain a feature extraction network; and replacing a preset VGG16 network in the first detection network with the feature extraction network to obtain an insulator image detection network, wherein the insulator image detection network is used for detecting whether the image contains an insulator. According to the method, the glass insulator is used as training data to construct the detection network, the characteristic extraction network capable of detecting different types of characteristics is obtained by utilizing the method of the loss-resisting training, and finally the characteristic extraction network and the detection network are combined to obtain the detection network capable of identifying two types of insulators, so that the detection network provided by the method can be identified no matter the image is a ceramic insulator or a glass insulator. Therefore, compared with the prior art, the method and the device have higher accuracy.
Drawings
In order to more clearly explain the technical solution of the present application, the drawings needed to be used in the embodiments will be briefly described below, and it is obvious to those skilled in the art that other drawings can be obtained according to the drawings without any creative effort.
Fig. 1 is a schematic flow chart of an insulator image detection method according to an embodiment of the present application.
Detailed Description
In order to make those skilled in the art better understand the technical solutions in the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
Referring to fig. 1, a schematic flow chart of an insulator image detection method provided in the embodiment of the present application is shown. As can be seen with reference to fig. 1, the method comprises the following steps:
s1, extracting the characteristics of the glass insulation subimages based on a preset VGG16 network to obtain a training characteristic diagram;
s2, selecting a detection frame based on the training feature map; combining the training feature map with the detection frame to obtain a training feature vector;
s3, performing ROI pooling treatment on the training feature vectors to obtain pooled feature vectors;
s4, performing classification loss training and coordinate regression loss training on the pooled feature vectors to obtain a first detection network;
s5, inputting the same number of ceramic insulator pictures and glass insulator pictures into the first detection network to obtain a ceramic characteristic diagram and a glass characteristic diagram;
s6, performing regression loss processing on the ceramic characteristic diagram and the glass characteristic diagram to obtain a regression loss function; processing the ceramic characteristic diagram and the glass characteristic diagram based on a preset classifier to obtain a classification loss function;
s7, performing loss confrontation training based on the regression loss function and the classification loss function to obtain a feature extraction network;
and S8, replacing the preset VGG16 network in the first detection network with the feature extraction network to obtain an insulator image detection network, wherein the insulator image detection network is used for detecting whether the image contains an insulator.
The respective steps will be described in detail below.
Step S1: and performing feature extraction on the glass insulation sub-image based on a preset VGG16 network to obtain a training feature map.
Specifically, the embodiment of the present application first performs pretreatment on a glass insulator sub-image, including:
and randomly extracting 30% of glass insulator images to perform mirror image operation, then extracting 30% of the rest images to randomly perform clockwise 90 degrees, 180 degrees and 270 degrees rotation, and not performing operation on the rest images to obtain a plurality of images with resolution. These images are then scaled to a fixed size mxnx3. In the embodiment of the present application, M-N-416 is set, that is, a picture format with a resolution 416 is adopted.
And inputting the preprocessed glass insulator image into a preset VGG16 network for feature extraction.
Specifically, the preset VGG16 network is a convolutional network, and includes: 13 conv layers, 13 relu layers, 4 pooling layers. Wherein all convolutional layer parameter settings are:
kernel_size=3,pad=1,strid=1
wherein: kernel _ size indicates the convolution kernel size, pad 1 indicates that the original image is filled with 0 once, and stride 1 indicates that the step size per convolution kernel shift is 1.
All pooling layers are:
kernel_size=2,pad=0,strid=2
wherein: pad-0 means that the original image does not need to be filled with 0, and stride-2 means that the step size per convolution kernel movement is 2.
After the VGG16 network processing, a matrix with the size of (M/16) × (N/16) × 3 can be obtained and used as a training feature map.
Step S2: selecting a detection frame based on the training characteristic diagram; and combining the training characteristic diagram with the detection frame to obtain a training characteristic vector. The method specifically comprises the following steps:
s201: and acquiring a detection frame.
S2011: and carrying out convolution processing on the training characteristic diagram to obtain a training matrix.
Specifically, the convolution operation is performed on the matrix of (M/16) × (N/16) × 3 by using a convolution kernel of 3 × 2 × 2, and two matrices of a single channel size of (M/16) × (N/16) × 1 are obtained as training matrices.
S2012: and screening the training matrix based on a sliding window with a preset format to obtain a candidate detection window.
Specifically, in the embodiment of the present application, a 3 × 3 sliding window is adopted to slide on the training matrix, and padding is set to 1 (that is, 0 is used to fill one circle for the original image before sliding), 9 frames with different sizes are selected for each anchor point of the training matrix, where the sizes of the 9 frames are: 128,256,512, respectively, and the length-width ratio is 1:1, 1:2, 2:1, respectively. Thus, a candidate detection window of (M/16) × (N/16) × 9 is obtained.
S2013: and carrying out non-maximum suppression processing on the candidate detection window to obtain a candidate frame.
Specifically, the candidate detection windows that exceed the training matrix are first discarded altogether, and then non-maximum suppression (NMS) is performed. And acquiring the coincidence ratio (IOU) of the candidate detection window and the training matrix, and discarding the part of the candidate detection window when the IOU value is larger than a preset threshold value. And screening to obtain the candidate frame.
S2014: and respectively carrying out prediction classification loss processing and regression loss processing on the candidate frames to obtain the foreground candidate frames.
Specifically, the convolution kernel is used to perform two branch operations on the candidate box: predictive classification loss processing and regression loss processing. Predicting the candidate frame by the prediction classification loss processing, and predicting the candidate frame into scores of a foreground and a background; the regression loss process regresses the size and position of each box according to the label of the actual truth. The method aims to predict the coordinates of a candidate frame and make the coordinates close to the real coordinates, and the loss function is as follows:
Figure BDA0002490323640000061
Figure BDA0002490323640000062
Figure BDA0002490323640000063
wherein:
Nclsindicating the size of the batch (Simultaneous Pictures), NregRepresenting the number of anchor points;
λ represents a hyper-parameter;
piis the prediction probability for which anchor point i is the object,
Figure BDA0002490323640000064
is a ground truth label;
when anchor i is positive, ground truth label
Figure BDA0002490323640000065
Is 1, when the anchor point i has a negative value,
Figure BDA0002490323640000066
is 0;
Lclsto categorical losses; l isregIs the regression loss;
tiis a vector of 4 parameterized coordinates representing a prediction candidate box;
Figure BDA0002490323640000071
is a candidate frame coordinate vector related to the positive sample anchor point;
r is a robust loss function.
Loss of classification LclsIs the log loss of two classes (object and non-object).
Classification loss predicts whether a candidate box contains a target (i.e., a foreground or background decision), while regression loss makes the coordinates of the candidate box the same as the labeled truth coordinates, i.e., the two coordinates may be the same after a linear transformation. The input original anchorA is mapped to obtain a regression window G' which is closer to the real window G, namely: given a ═ a (Ax, Ay, Aw, Ah), one finds a mapping f such that:
f(Ax,Ay,Aw,Ah)=(G′x,G′y,G′w,G′h)
(G′x,G′y,G′w,G′h)≈(Gx,Gy,Gw,Gh)
the correct linear transformation factor can be obtained by a loss function.
The foreground candidate frame can be obtained by two kinds of loss processing.
S2015: and screening the foreground candidate frame based on the foreground score to obtain a detection frame.
Specifically, the method comprises the following steps:
s20151: and acquiring the foreground score of the foreground candidate frame.
S20152: and ordering the anchors based on the foreground scores (in the embodiment of the application, ordering according to the order of branches from large to small), extracting the first N anchors (in the embodiment of the application, extracting the first 6000 anchors), mapping foreground candidate frames corresponding to the first N anchors into the training feature map, and removing the foreground candidate frames exceeding the boundary to obtain the anchor frames.
S20153: and performing non-maximum suppression processing on the anchor frames, calculating the foreground scores of the anchor frames subjected to the non-maximum suppression processing, sorting the anchor frames from large to small according to the foreground score conditions, and selecting a preset number of anchor frames (300 before the anchor frames are selected in the embodiment of the application) with the scores close to the front as detection frames.
S202: and acquiring a training feature vector.
Specifically, the detection frame and the training feature map are multiplied to obtain a training feature vector.
Step S3: and performing ROI pooling treatment on the training feature vectors to obtain pooled feature vectors.
Specifically, the training feature vector is input into the ROI pooling layer, which is equivalent to 2 inputs: training a feature map and a detection box. Wherein: coordinates [ x1, y1, x2 and y2] of a detection frame in an input image correspond to an M × N scale, the coordinates of the detection frame are mapped into conv5-3 with the size of (M/16) × (N/16), then the corresponding area of the detection frame in conv5-3 is divided into 7 equal parts horizontally and vertically, maximum pooling layer processing is carried out on each part, a pooling result of fixed-size (7 × 7) output is obtained, and fixed-length output is achieved.
Step S4: and performing classification loss training and coordinate regression loss training on the pooled feature vectors to obtain a first detection network.
Specifically, loss training is achieved through the two full-connection layers, and a first detection network capable of detecting the glass insulator is obtained.
Step S5: and inputting the same number of ceramic insulator pictures and glass insulator pictures into the first detection network to obtain a ceramic characteristic diagram and a glass characteristic diagram.
Specifically, two kinds of characteristic diagrams having the size of (M/16) × (N/16) × 256 were obtained.
Step S6: performing regression loss processing on the ceramic characteristic diagram and the glass characteristic diagram to obtain a regression loss function; and processing the ceramic characteristic diagram and the glass characteristic diagram based on a preset classifier to obtain a classification loss function.
Specifically, the method for obtaining the classification loss function includes:
and respectively inputting the ceramic characteristic diagram and the glass characteristic diagram into a preset classifier to obtain a classification result. The classification results are three types: glass features, ceramic features, and non-glass non-ceramic features.
Wherein, the non-glass non-ceramic characteristics specifically refer to: common features of ceramic and glass insulators, i.e. insulator features that are not affected by the appearance of the glass and the appearance of the ceramic.
The preset classifier in the embodiment of the application is composed of three full connection layers, wherein the last full connection layer is three neurons, and the three neurons are used for judging whether a characteristic diagram input into the classifier is a ceramic characteristic, a glass characteristic or a non-glass non-ceramic characteristic.
Calculating a loss function for the glass features, the ceramic features, and the non-glass, non-ceramic features based on the classifier output:
Lglass=-q1logp (1)
LCeramic material=-q2logp (2)
LNon-glass non-ceramics=-q3logp (3)
Wherein:
q1、q2and q is3Labels that are glass, ceramic and non-glass non-ceramic features, respectively (labels take one-hot form);
p is a prediction probability vector output by the classifier (i.e., a probability that the input feature map is judged to be a ceramic insulator, a glass insulator or neither a ceramic insulator nor a glass insulator).
Specifically, the prediction probability vector is composed of three values, each of which is a probability that the feature map belongs to a certain category. For example, (0.2,0.3,0.5) indicates that the probability that the inputted feature map belongs to a glass insulator is 0.2, the probability that the feature map belongs to a ceramic insulator is 0.3, and the probability that the feature map belongs to neither a glass insulator nor a ceramic insulator is 0.5.
And (3) performing regression loss processing on the two characteristic graphs, wherein a regression loss function is as follows:
Figure BDA0002490323640000081
wherein:
fglassShowing a characteristic diagram of the glass, fCeramic materialRepresenting a ceramic feature map;
Figure BDA0002490323640000091
represents L2And (5) carrying out norm operation.
In the embodiment of the application, the ceramic insulator features extracted by the network are close to the glass insulator features through regression loss, so that discriminant features (namely common features of the glass insulator and the ceramic insulator) which do not receive the influence of the appearance of the ceramic are extracted.
Step S7: and performing resistance loss training on the regression loss function and the classification loss function to obtain a feature extraction network.
The embodiment of the application adopts the countermeasure thought to carry out loss training on the network, and specifically comprises the following steps:
in training the network, we used 2 sets of training losses.
Wherein, formula (3) LNon-glass non-ceramicsLoss and equation (4) L2The loss is a first group of training loss, and the group of loss functions are specially used for training the characteristic extraction network to achieve the purpose of extracting common characteristics of the glass insulator and the ceramic insulator.
Formula (1) LGlassLoss and formula (2) LCeramic materialThe losses are a second set of training losses, which are used to train the classifier in order to correctly distinguish whether the input signature is from a glass insulator or a ceramic insulator.
Based on the countermeasure thought, two groups of losses respectively reversely propagate and train the feature extraction network and the classifier, so that the feature extraction network and the classifier mutually game (the feature extraction network extracts the common features of the ceramic insulator and the glass insulator, so that the classifier can not distinguish whether the features come from the glass insulator or the ceramic insulator, the classifier continuously improves the classification capability of the classifier, and the classifier can judge as long as the feature graph input into the classifier still carries information of one wire of the ceramic insulator and the glass insulator). And when the two groups of losses are propagated reversely, an alternative execution strategy is adopted.
1, the 1 st group training loss is propagated reversely, and network parameters of the feature extraction network are updated.
2, the 2 nd training loss is propagated reversely, and the network parameters of the classifier are updated.
The first set of training losses and the second set of training losses are alternately propagated in reverse until the losses converge, and the feature extraction network is capable of extracting common features of the glass insulator and the ceramic insulator.
Step S8: and replacing a preset VGG16 network in the first detection network with the feature extraction network to obtain an insulator image detection network, wherein the insulator image detection network is used for detecting whether an image contains an insulator.
Specifically, the trained feature extraction network obtained in step S7 is replaced by the preset VGG16 in the first detection network, so as to obtain a complete insulator image detection network. And inputting the image to be detected into the insulator image detection network, so as to detect whether the image contains the insulator.
It should be noted that, no matter the insulator in the image is a glass insulator or a ceramic insulator, the insulator image detection network obtained in the embodiment of the present application can detect the insulator in the image.
In summary, compared with the prior art, the method has the following beneficial effects:
according to the method, the glass insulator is used as training data to construct the detection network, the characteristic extraction network capable of detecting different types of characteristics is obtained by utilizing the loss-resisting training method, and finally the characteristic extraction network and the detection network are combined to obtain the detection network capable of identifying two types of insulators, so that the insulator image detection network provided by the method can be identified no matter whether the image is a ceramic insulator or a glass insulator. Therefore, compared with the prior art, the method and the device have higher accuracy.
The embodiment of the application is applied to the automation of the power grid and patrols and examines the insulator, and as for the insulator training sample, only a large amount of training data of one type and corresponding labels and a small amount of insulator training samples of another type (not corresponding labels) need to be provided, and the insulators of two types can be detected and identified. For example, glass insulators and ceramic insulator samples (a large number of glass insulators and a small number of ceramic insulators are needed), only the glass insulators are needed to be marked, and the ceramic insulator samples are not needed to be marked, so that the purpose of detecting and identifying the two insulators can be achieved through training. The method and the device have certain robustness under the condition that the training data of the insulators are unbalanced and the data volume of certain insulator types is very small in the actual power grid inspection. Compared with the prior art, the method and the device are higher in accuracy.
Since the above embodiments are all described by referring to and combining with other embodiments, the same portions are provided between different embodiments, and the same and similar portions between the various embodiments in this specification may be referred to each other. And will not be described in detail herein.
It is noted that, in this specification, relational terms such as "first" and "second," and the like, are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a circuit structure, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such circuit structure, article, or apparatus. The term "comprising" a defined element does not, without further limitation, exclude the presence of other like elements in a circuit structure, article, or device that comprises the element.
Other embodiments of the present application will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure herein. This application is intended to cover any variations, uses, or adaptations of the invention following, in general, the principles of the application and including such departures from the present disclosure as come within known or customary practice within the art to which the invention pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the application being indicated by the following claims. The above-described embodiments of the present application do not limit the scope of the present application.

Claims (8)

1. An insulator image detection method, characterized in that the method comprises:
performing feature extraction on the glass insulation subimage based on a preset VGG16 network to obtain a training feature diagram;
selecting a detection frame based on the training feature map; combining the training feature map with the detection frame to obtain a training feature vector;
performing ROI pooling treatment on the training feature vectors to obtain pooled feature vectors;
performing classification loss training and coordinate regression loss training on the pooled feature vectors to obtain a first detection network;
inputting the same number of ceramic insulator pictures and glass insulator pictures into the first detection network to obtain a ceramic characteristic diagram and a glass characteristic diagram;
performing regression loss processing on the ceramic characteristic diagram and the glass characteristic diagram to obtain a regression loss function; processing the ceramic characteristic diagram and the glass characteristic diagram based on a preset classifier to obtain a classification loss function;
performing resistance loss training based on the regression loss function and the classification loss function to obtain a feature extraction network;
and replacing a preset VGG16 network in the first detection network with the feature extraction network to obtain an insulator image detection network, wherein the insulator image detection network is used for detecting whether an image contains an insulator.
2. The detection method according to claim 1, wherein the feature extraction of the glass insulator image based on the preset VGG16 network comprises:
preprocessing the glass insulator image, wherein the preprocessing comprises mirroring, rotating and zooming to a preset format;
inputting the preprocessed glass insulator image into a preset VGG16 network for feature extraction processing;
the preset VGG16 network includes: 13 conv layers, 13 relu layers and 4 pooling layers.
3. The detection method according to claim 1, wherein the selecting a detection box based on the training feature map comprises:
performing convolution processing on the training characteristic diagram to obtain a training matrix;
screening the training matrix based on a sliding window with a preset format to obtain a candidate detection window;
carrying out non-maximum suppression processing on the candidate detection window to obtain a candidate frame;
respectively carrying out prediction classification loss processing and regression loss processing on the candidate frames to obtain foreground candidate frames;
and screening the foreground candidate frame based on the foreground score to obtain a detection frame.
4. The detection method according to claim 3, wherein the performing prediction classification loss processing and regression loss processing on the candidate frames respectively comprises:
and respectively carrying out prediction classification loss processing and regression loss processing on the candidate frame based on two convolution checks, wherein a loss function is as follows:
Figure FDA0002490323630000011
Figure FDA0002490323630000012
Figure FDA0002490323630000013
wherein:
Nclsrepresenting the size of the batch, NregRepresenting the number of anchor points;
λ represents a hyper-parameter;
piis the prediction probability for which anchor point i is the object,
Figure FDA0002490323630000021
is a ground truth label;
when anchor i is positive, ground truth label
Figure FDA0002490323630000022
Is 1, when the anchor point i has a negative value,
Figure FDA0002490323630000023
is 0;
Lclsto categorical losses; l isregIs the regression loss;
tiis a vector of 4 parameterized coordinates representing a prediction candidate box;
Figure FDA0002490323630000024
is a candidate frame coordinate vector related to the positive sample anchor point;
r is a robust loss function.
5. The detection method according to claim 3, wherein the screening the foreground candidate frame based on the foreground score to obtain a detection frame comprises:
obtaining a foreground score of the foreground candidate frame;
ordering the anchors based on the foreground scores, extracting the first N anchors, mapping foreground candidate frames corresponding to the first N anchors into the training feature map, and removing the foreground candidate frames exceeding the boundary to obtain anchor frames;
and carrying out non-maximum suppression processing on the anchor frames, calculating the foreground scores of the anchor frames subjected to the non-maximum suppression processing, sorting the anchor frames from large to small according to the foreground score conditions, and selecting a preset number of anchor frames with the scores close to the front as detection frames.
6. The detection method according to claim 1, wherein the step of processing the ceramic feature map and the glass feature map based on a preset classifier to obtain a classification loss function comprises:
respectively inputting the ceramic characteristic diagram and the glass characteristic diagram into a preset classifier to obtain a classification result, wherein the classification result comprises: glass features, ceramic features, and non-glass non-ceramic features;
calculating a loss function for the glass features, the ceramic features, and the non-glass non-ceramic features:
Lglass=-q1log p (1)
LCeramic material=-q2log p (2)
LNon-glass non-ceramics=-q3log p (3)
Wherein:
q1、q2and q is3Labels that are glass, ceramic, and non-glass non-ceramic features, respectively;
p is the prediction probability vector of the classifier output.
7. The detection method according to claim 6, wherein the regression loss function is:
Figure FDA0002490323630000025
wherein:
fglassShowing a characteristic diagram of the glass, fCeramic materialRepresenting a ceramic feature map;
Figure FDA0002490323630000026
represents L2And (5) carrying out norm operation.
8. The detection method according to claim 7, wherein the training of the regression loss function and the classification loss function for countermeasures against loss comprises:
taking the formula (3) and the formula (4) as a first set of training losses for updating parameters of the feature extraction network; taking the formula (1) and the formula (2) as a second group of training losses, and updating the network parameters of the preset classifier;
alternately back-propagating the first set of training losses and the second set of training losses until the losses converge.
CN202010403307.1A 2020-05-13 2020-05-13 Insulator image detection method Active CN111597964B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010403307.1A CN111597964B (en) 2020-05-13 2020-05-13 Insulator image detection method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010403307.1A CN111597964B (en) 2020-05-13 2020-05-13 Insulator image detection method

Publications (2)

Publication Number Publication Date
CN111597964A true CN111597964A (en) 2020-08-28
CN111597964B CN111597964B (en) 2023-01-20

Family

ID=72185420

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010403307.1A Active CN111597964B (en) 2020-05-13 2020-05-13 Insulator image detection method

Country Status (1)

Country Link
CN (1) CN111597964B (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106877237A (en) * 2017-03-16 2017-06-20 天津大学 A kind of method of insulator missing in detection transmission line of electricity based on Aerial Images
CN107392901A (en) * 2017-07-24 2017-11-24 国网山东省电力公司信息通信公司 A kind of method for transmission line part intelligence automatic identification
CN111091105A (en) * 2019-12-23 2020-05-01 郑州轻工业大学 Remote sensing image target detection method based on new frame regression loss function

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106877237A (en) * 2017-03-16 2017-06-20 天津大学 A kind of method of insulator missing in detection transmission line of electricity based on Aerial Images
CN107392901A (en) * 2017-07-24 2017-11-24 国网山东省电力公司信息通信公司 A kind of method for transmission line part intelligence automatic identification
CN111091105A (en) * 2019-12-23 2020-05-01 郑州轻工业大学 Remote sensing image target detection method based on new frame regression loss function

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
朱有产等: "基于改进Mask R-CNN的绝缘子目标识别方法", 《微电子学与计算机》 *
陈俊杰等: "基于Faster R-CNN模型的绝缘子故障检测", 《电工电气》 *

Also Published As

Publication number Publication date
CN111597964B (en) 2023-01-20

Similar Documents

Publication Publication Date Title
CN107944396B (en) Knife switch state identification method based on improved deep learning
CN112183788B (en) Domain adaptive equipment operation detection system and method
CN106875381B (en) Mobile phone shell defect detection method based on deep learning
CN111815564B (en) Method and device for detecting silk ingots and silk ingot sorting system
CN111783819B (en) Improved target detection method based on region of interest training on small-scale data set
CN109598298B (en) Image object recognition method and system
CN113221787A (en) Pedestrian multi-target tracking method based on multivariate difference fusion
CN111597941B (en) Target detection method for dam defect image
CN115147418B (en) Compression training method and device for defect detection model
CN113344475A (en) Transformer bushing defect identification method and system based on sequence modal decomposition
CN112396035A (en) Object detection method and device based on attention detection model
CN113255590A (en) Defect detection model training method, defect detection method, device and system
CN114549507A (en) Method for detecting fabric defects by improving Scaled-YOLOv4
CN116012291A (en) Industrial part image defect detection method and system, electronic equipment and storage medium
CN113435407A (en) Small target identification method and device for power transmission system
CN114187505A (en) Detection method and device for falling-off of damper of power transmission line, medium and terminal equipment
CN115937091A (en) Transformer substation equipment defect image detection method based on changeable patch
Zhang et al. Improved yolov8 insulator fault detection algorithm based on biformer
CN113901924A (en) Document table detection method and device
CN113536896A (en) Small target detection method, device and storage medium based on improved fast RCNN
CN116363136B (en) On-line screening method and system for automatic production of motor vehicle parts
CN113313678A (en) Automatic sperm morphology analysis method based on multi-scale feature fusion
CN111597964B (en) Insulator image detection method
CN112837281A (en) Pin defect identification method, device and equipment based on cascade convolutional neural network
CN114283431B (en) Text detection method based on differentiable binarization

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