You are on page 1of 4

Research on Image Recognition of Insulators

Based on YOLO Algorithm


Shenghui Wang, Leilei Niu, and Nan Li

Abstract—Insulators are important components of power traditional methods: mainly based on the shape and texture of
transmission and transformation equipment in power systems. the insulators combining the BP neural network to identify the
Insulator identification is a basis work for evaluation of insulation insulators. The characteristics includes the HOG features, SVM,
status of insulators in computer vision. With the recent
the SUFS characteristic [2-3], the Hu moment invariants and the
development of big data and cloud computing technologies,
terminal-to- terminal picture recognition was accomplished based wavelet coefficients [4], etc., This kind of method has low
on deep learning algorithms, making it possible to apply insulator accuracy, poor robustness, and high requirement for the
image recognition in power systems. This paper firstly introduced shooting angle of the target video and pictures. 2) The deep
the research background of deep learning: the recent YOLO (You learning algorithm. The terminal-to-terminal picture
Only Look Once) convolutional neural network algorithm, recognition avoid the need for the artificial features. This
established insulator image databases for train and test, and
method has high recognition accuracy and good generalization
preprocessed the images of training insulator images with the
TensorFlow platform. With the YOLO algorithm applied, the ability. YOLO (You Only Look Once) is a recognition
training of the image database for 5 days was completed, and a algorithm based on depth learning based on Joseph Redmon in
good recognition result was achieved. Then the results were 2015. It constructed based on regression and can realize real
compared between the Fast R-CNN algorithm and the YOLO time and global recognition of an image [5-6].
algorithm in identify speed and accuracy. Based on relevant paper, There are relatively few paper researching the identification
the accuracy of insulator image recognition is defined, and the
of insulators by deep learning. Paper [7] reviews the inspection
factors that affect the accuracy of insulator image recognition are
discussed: It is concluded that the accuracy of identification mode based on UAV (Unmanned Aerial Vehicle) and the
increases with the increase in the number of training insulators, power line inspection based on deep learning. It demonstrates
which is the next step in the identification of insulators. the probability of deep learning algorithm for inspection of
electrical equipment. Paper [8] shows the case in which
Index Terms—convolution neural network, deep learning, algorithm of combining GMM and YOLO been used to realize
image recognition, Insulators the recognition of pedestrians in the substation, without
mentioning the identification of insulators; Paper [9] proposed
a method of identifying insulators based on depth learning and
I. INTRODUCTION
non-maximum term suppression and linear fitting, but its

I NSULATORS are important components of transmission


and transformation equipment in power system. It is very
important for the safe and stable operation of power system to
disadvantage is that it cannot realize the overall and real-time
identification of insulators; In paper [10], YOLO is used to
process and transform aerial images, and good positioning
know its operation state in time [1]. Presently, the artificial results are obtained.
patrol method is used in power grid, which not only consumes In this paper, the insulators training database is trained with
time and labor, but also hardly grasp the status of electric YOLO to realize the identification of the insulators and the
equipment such as lines and insulators in a timely and location of the discharge position based on ultraviolet imaging.
comprehensive manner. With the development of big data and The main work done in this paper are as follows: 1) The image
cloud computing technologies, terminal-to-terminal picture database of porcelain insulators is constructed, and the training
recognition is accomplished based on deep learning algorithms, samples are labeled. 2) The preprocessing, importing, training
making it possible to apply insulator recognition in power and recognition of image employing the YOLO algorithm are
systems. realized based on the TensorFlow platform and OpenCV; 3)
There are 2 main routes taken to recognize insulators: 1) The comparison of identification accuracy between YOLO and
other algorithms is done and analyzed; 4) the factors affecting
Project Supported by the Fundamental Research Funds for the Central Universities the accuracy of insulator recognition are discussed.
(2015ZD19)
Shenghui Wang, North China Electric Power University, Baoding, China (e-mail:
hdwsh@ ncepu.edu.cn). II. DEEP LEARNING ALGORITHM
Leilei Niu, NCEPU(e-mail: raynewwood@ 163.com).
Nan LI, State Grid Baoding Electric Power Supply Company
Deep Learning (DL), first proposed by Hilton in University

POWERCON2018 Paper NO. 201805150000003 Page1/4 3871


978-1-5386-6461-2/18/$31.00 ©2018 IEEE
of Toronto in 2006, is the latest branch of machine learning. frames are encoded as three-dimensional tensors of structural
Instead of the original artificial design feature, it is a 7*7* (4 * 5 +1) to be trained and tested with subsequent deep
terminal-to-terminal network which has better robustness and networks. Its specific implementation path is shown in Figure 4
generalization ability.
The deep learning network can realize the nonlinear mapping,
and the terminal-to-terminal network architecture mapping the
pixel characteristic to the label value, the brief description is
shown in Figure 1. Box+IOU

With Form 7×7 Picture Recognition Result


Input
Fig.1 Terminal-to-terminal Network Architecture
By weight sharing and down sampling, the optimal Class Map
extraction of the characteristics of each layer is realized. The Fig. 4 YOLO global image recognition
gradient disappearance phenomenon is reduced to the The YOLO system first grayscale the image through the
maximum degree through the drop-out mechanism. The rgb2gray function, then standardized the image scale into
robustness strengthened employing the large database. 448*448, set the training batch to 8, and convert the gray image
A. convolution neural network to the 8*448*448*1-dimension tensor through the imread
function of the opencv2 function family. Then the data is
The Convolution Neural Network (CNN) demonstrate its
connected to the convolution layer and the pool layer, and the
enormous potential in 2012. As shown in Figure 3, uses Pmn to
data set is obtained.
represent the m row and n column element of the original data
The 4-dimensional tensor size is 8*7*7*125, then the
matrix, Wij indicate the I row J column of the convolution
selection of the diagnostic frame and the judgement of IOU
kernel, the activation function and the ReLU function is
values and categories are carried out respectively. The specific
designed to reduce its over fitting phenomenon. Its specific
network model is shown in Figure 5.
parameters, as shown in (1) and (2).
Gray Picture
­ x, x >0 (8, 448, 448, 1)

Re LU˄x˅ ˄1˅
¯0, x  0 Convolution Layer 1-6

2 2
M ij =sigmiod(¦¦Wij u Pi+m,j+n +bij ) δ2ε Convolution Layer 1-6

i 0 j 0
Convolution Layer 7-9

Data Collection
(8, 7, 7, 125)

Transform

Original Feature
data Core Recognition Box IOU Classify Result
map 澳 (8, 7, 7, 5, 4) (8, 7, 7, 5, 1) (8, 7, 7, 5, 1)
Fig. 4 Convolution algorithm

B. YOLO algorithm SIGMOID ReLU



Compared with other deep learning algorithms such as Fig.5 specific network model of YOLO
R-CNN, the YOLO algorithm transforms the detection model In the process of YOLO’s recognition, the trained network
into a regression problem and uses the features of the entire model and network structure were saved as checkpoint network
image rather than a part of the capture of the image to predict parameters. The network parameters were read in the test, by
each boundary box. This means that YOLO can discriminate all minimizing the Euclidean distance between the real coordinates
categories of images in a global manner. It terminal-to-terminal and the prediction coordinate values in each layer, to achieve
architecture achieves high precision. The program divides the the iterative optimization of each layer parameter and the
imported image into 7 *7 (adjustable) grids, two bounding parameter prediction that finally conforms to the threshold
boxes were predicted within each grid box, then calculates the setting.
confidence of these boxes and the class. These prediction Finally, the predicted coordinates of (left, top), (right, bottom)
are carried out through the rectangle function in the CV2

POWERCON2018 Paper NO. 201805150000003 Page2/4 3872


module introduced in TensorFlow to implement the picture the image was normalized to 448*448, as is shown in figure 6.b.
frame operation of the corresponding test picture prediction The 6.b was read through the imread function as the 448*448
area and save the picture to complete the test.澳 matrix, and the related label parameters were packed together
been sent to the YOLO network for training.
III. IMPLEMENTATION OF IMAGE RECOGNITION ALGORITHM
The platform and its parameters used in this paper are as
follows: the software platform python3.6, the algorithm
framework TensorFlow-GPU, the insulator target label
program labelImg, the training CPU 7700, and the GPU Nvidia
GeForce 1060 for training.
The work of this paper includes: 1. Using YOLO to train the
standard database VOC2007, comparing the results with other
algorithms. 2, training and identifying the insulator database 澳澳 澳
built by the author. The training time was 1 weeks, the sample (a) original picture ( b) Picture after process
database was 1000, and the number of test images was 200. The Fig.6 Preprocess of training Image
influencing factors of the recognition results were also C. Image preprocessing
analyzed. 1000 insulator pictures were taken in laboratory and on spot,
A. Comparison and analysis based on VOC2007 database 800 of which were used for labeling and training, and the
To get the advantages and disadvantages of the YOLO remaining 200 for testing. The picture library is shown in
algorithm over other algorithms on each performance index, Figure 7.
this paper used the database VOC 2007 to identify and test the The label of the training picture made by labelImg, and the
picture and compares the results with the well-known Fast insulator area in the picture is labeled with a rectangle frame,
R-CNN. We take each index mentioned in the paper [12] to and the insulator's [left, right, top, bottom, index] information
compare the results of the two algorithms. outputs together in the picture, and the number of the most
TABLE I annotated insulators in each image is 30. The position data of
THE PRECISION COMPARISON OF YOLO AND FAST R-CNN each picture will be output to the file that is in line with the
Type/Algorithm YOLO漏%漐 Fast R-CNN漏%漐 name of the corresponding image, in the form of. Xml. The
category information in the. Xml file read by related extraction
Object Recognizes
67.50 69.40 software, the insulator coordinate information was extracted
Precision IOU>0.5
and stored in the corresponding.Txt document to get the label
Class Recognizes
Precision 180 9.80 value of the corresponding picture according to the format so
0.1<IOU<0.5 that they convenient and available to train.
Class Recognizes
Similarity 6.55 5.00
IOU> 0.1
Class Fault
3.80 4.10
IOU> 0.1

Background
4.15 11.7
IOU<0.1

From the above table, we can see that YOLO can


discriminate categories correctly. The discriminate rate of class
corrects and similar add up to 90.05% while the Fast R-CNN Fig. 7 Insulator Picture database
scores only 84.2%. As far as background detection is concerned, D. The training and recognition of insulators
the probability that Fast R-CNN failed to detect any class is
The digitized picture and the corresponding label are packed
11.7%, the error rate is about 3 times that of YOLO. YOLO is
into the YOLO model for training. The total loss is the sum of
more competitive than Fast R-CNN from the perspective of
coordinate error, category error, object error and noobject error,
higher accuracy and lower misjudgment rate.
and the calculation formula of each error is shown in (3).
B. Image preprocessing
The original image is RGB, as shown in figure 6.a, using
rgb2gray function, the 3-dimensional red, green and blue
channels were grayscale by the ratio of 0.299:0.587:0.114, then

POWERCON2018 Paper NO. 201805150000003 Page3/4 3873


s
2
B
saturation. The number of pictures affects the time of the
Ocoord ¦ ¦ , ij [( xi  xˆ i )2  ( yi  yˆ i ) ]
obj 2

i=0 j 0 gradient’s disappearance and the accuracy of recognition.


δ3ε
2
s B

+Ocoord ¦¦, obj

ij
[( wi  ˆi )  (
w
2
hi  hˆi ) ]
2

s
2
B
i=0 j 0
s
2
B
IV. CONCLUSION
 ¦¦, obj

ij
(c i -cˆ i )  Onoobj
2
¦¦, noobj

ij
(c i -cˆ i )
2

800 training and 200 test insulator images were included in


i=0 j 0 i=0 j 0

s2 B the database. The YOLO algorithm depending on TensorFlow


 ¦ , iobj ¦ ( pi (c )  p
ˆ i (c )) 2 platform was applied to insulator image preprocessing and the
i=0 cclass
identification of insulators image was realized. The accuracy of
identification of insulators was about 83.5%, and the
The total loss is achieved by using the MomentumOptimizer
recognition accuracy of YOLO and other algorithms was
provided by the TensorFlow platform. During the test, the
compared, and the advantages of YOLO algorithm in
maximum value of the class was taken as the picture’s
recognition speed and accuracy were obtained. With the
prediction class, and the prediction frame and its coordinates of
increase of the number of training insulators images, the
the predicted value are larger than the set value as the
recognition accuracy was also increased. which indicates the
recognition frame.
direction for the next step of the insulators identification.
The training process lasts for one entire week on the insulator
picture training database, the YOLO model realized the
ACKNOWLEDGMENT
identification of the test set insulators, and the calculation speed
was comparatively faster. And according to the data This paper is supported by the Fundamental Research Funds
verification of the VOC2007 above, the YOLO is more for the Central Universities of CHINA (2015ZD15).
accurate than other algorithms. The result of its identification is
shown as shown in Figure 8. REFERENCES
[1] Guan Zhicheng. External Insulation of Insulators and Power
Transmission Equipment[M]. Tsinghua University Press, 2006.
[2] LI Yan, LI Yan. Insulator Identification and Location Based on HOG
Features and SVM[J]. Journal of Transportation Engineering and
Information, 2015, 13(4):53-60.
[3] Tong W G, Li B S, Pei Y L. Extraction and recognition of insulator based
on aerial image[C]// International Conference on Electric Information and
Control Engineering. IEEE, 2011:4195-4198.
[4] Cheng Haiyan, Han Wei, Wang Di, et al. Insulator Positioning Method in
Aerial Image of Power Grid Inspection[J]. Journal of System Simulation,
2017, 29(6): 1327-1336.
Fig. 8 Recognition results of insulators [5] Redmon J, Divvala S, Girshick R, et al. You Only Look Once: Unified,
TABLE Ċ Real-Time Object Detection[J]. 2015:779-788.
THE PRECISION COMPARISON OF YOLO AND FAST R-CNN THE PRECISION [6] Redmon J, Farhadi A. YOLO9000: Better, Faster, Stronger[J]. Computer
COMPARISON OF DIFFERENT TRAINING NUMBERS Vision and Pattern Recognition, 2017:6517-6525.
Type/Precision/Number [7] Nguyen V N, Jenssen R, Roverso D. Automatic autonomous vision-based
500漏%漐 650漏%漐 800漏%漐 power line inspection: A review of current status and the potential role of
deep learning[J]. International Journal of Electrical Power & Energy
Object Recognizes Systems, 2018, 99:107-120.
58.10 62.30 67.50
Precision IOU>0.5 [8] Peng Q, Luo W, Hong G, et al. Pedestrian Detection for Transformer
Substation Based on Gaussian Mixture Model and YOLO[C]//
Class Recognizes International Conference on Intelligent Hu-man-Machine Systems and
18.50 16.2 18.00
Precision 0.1<IOU<0.5 Cybernetics. IEEE, 2016:562-565.
Class Recognizes [9] Liu Y, Yong J, Liu L, et al. The method of insulator recognition based on
Similarity 10.80 11.00 6.55 deep learning[C]// International Conference on Applied Robotics for the
IOU> 0.1 Power Industry. IEEE, 2016:1-5.
[10] Wei Yongming, Quan Jicheng, Hou Yuqing Yang. Research on aerial
Class Fault image positioning of UAV based on YOLO v2[J]. Progress in Laser and
4.50 4.30 3.80
IOU> 0.1 Optoelectronics, 2017(11):95-104.
[11] Lenc K, Vedaldi A. R-CNN minus R[J]. Computer Science, 2015.
Background
8.10 6.20 4.15 Shenghui Wang, Male, born in Hubei China 1977. Received his Ph.D. degree
IOU<0.1
in High Voltage and insulation technology in 2011, associate professor of
When the number of insulators in the training database North China Electric Power University, He mainly engaged in the research of
increased, the testing accuracy became higher. In the process of on-line monitoring and fault diagnosis of electrical equipment.
Leilei Niu, Male, born in Hebei China 1989. Ph. D. candidate of North China
testing, we found that when the training concentrated a certain Electric University, he mainly engaged in electrical equipment on-line
number of insulators, alone with the training time arise, the monitoring and fault diagnosis research.
accuracy of the insulators increased. But when the training time
reaches a certain value, the train_loss encounters gradient

POWERCON2018 Paper NO. 201805150000003 Page4/4 3874

You might also like