Insulator recognition based on convolution neural network

Insulator fault detection plays an important role in maintaining the safety of transmission lines. Insulator recognition is a prerequisite for its fault detection. An insulator recognition algorithm based on convolution neural network (CNN) is proposed. A dataset is established to train the constructed CNN. The correct rate is 98.52% for 1220 training samples and the accuracy rate of testing is 89.04% on 1305 samples. The classification result of the CNN is further used to segment the insulator image. The test results show that the proposed method can realize the effective segmentation of insulators.


Introduction
As a special insulation control, insulators play an important role in transmission lines.Once the insulator breaks down, it will damage the use and the running life of lines.Therefore, insulator fault detection is very important in maintaining the safety of the whole line [1].Manned helicopter inspection was first used in some developed countries [2].However, its cost is high, and there are safety problems [3].Unmanned aerial vehicle (UAV) inspection has more advantages, such as convenient carrying, high efficiency, simple, reliable, quick response, low cost, rich load, using broadly, low environmental request to take-off and land, autonomous flight and so on [4].Thus it receives widespread attention.With the development of computer vision technology, it has become the mainstream of inspecting transmission line by using UAV to generate report of various faults automatically [5].
In order to identify and detect faults of aerial insulator, some methods are already designed.It is shown in [6] that colour features and gradient characteristics are used to segment the insulator image, and then adaptive morphology is applied to identify fault for segmented insulator.The insulator image is segmented by using the maximum between-class variance method (OTSU) and faults are located by calculating the distance between adjacent insulator pairs [7].It is reported in [8] that insulators are segmented by using the improved edge direction histogram, and faults are judged by using the normalized histogram distance.The insulator contour is detected by Hough transform, and then fault detection is judged with the block texture feature sequence [9].In addition, the image is segmented by the difference of gray value, and the insulator status is judged by the difference between normal insulator and fault insulator [10].The characteristic of these detection methods is that insulator images are segmented firstly and then faults are identified.Thus it can be found that the basis of fault detection is insulator image segmentation [11].And there are many methods for image segmentation, such as threshold-based [12,13], texture-based [14], edge-based, morphological-based, local mean based [15], neural network based [16], automatic cooperative segmentation with Hough detection and CV model [17] and so on.At present, there is not a generally and effective image segmentation method for the insulator images with complex and changeable background.So it is undoubtedly a difficult problem to design an image segmentation method with adaptive.
Insulator segmentation is usually designed for images that contain insulators.However, the inspection objects of UAV include not only insulators, but also wires, wire clamps, leading wires, tower poles, strained tube and line corridors etc [18].The efficiency of relying on workers to observe and judge insulator images is very low because the images collected are varied [19].In order to realize the automatic detection of insulator faults, it is necessary to select out the insulator image first.
Convolution neural network (CNN) has gained great success in the field of image processing, and it receives more and more attentions [20].In this paper, an algorithm for insulator recognition based on CNN is proposed, which can automatically extract the feature of insulators and distinguish the insulator and background.

Insulator image recognition algorithm
The flowchart of insulator image recognition algorithm based on CNN is shown in Figure 1.Firstly, the image is cut to make a training dataset.Then a CNN is build and it is trained by using the dataset.The trained CNN is tested and the misjudged sample is found out to update the dataset.Finally, the CNN is trained again on the updated dataset.
CNN is mainly composed of convolution layers and pooling layers.A pooling layer usually follows a convolution layer.Convolution layer uses convolution kernels to extract the feature of previous layer through linear convolution.Pooling layer extracts the correlation feature in neighboring pixels by the maximum pooling or the mean pooling.It can effectively reduce the computation load while remaining unchanged for the extracted features.The CNN is constructed in this paper as shown in Figure 2, which consists of 7 layers, including one input layer, two convolution layers, two pooling layers, one fully connected layer and one output layer.Input layer is the gray image of 48*48.Six convolution kernels of 5*5 are made convolution with input layer to obtain six feature maps of 44*44.Then, six pooling maps of 22*22 are generated by mean pooling for the features extracted by the first convolution layer.Repeat the previous steps, the second convolution layer has 12 feature maps of 18*18, and the followed pooling layer has 12 pooling maps of 9*9.These features are input into a common neural network for classification.Fully connected layer has 972 neurons, and output layer has 2 neurons corresponding to background and insulator, respectively.

Experiment analysis
The constructed CNN is trained and tested with aerial images, some images as shown in Figure 3.The first column is the images without insulators (negative sample), and the second column is the images containing insulators (positive sample).A common feature of these images is that the background is complex and changeable.The criterion to evaluate the experiment result adopted in this paper is as follows [21] TP P TP FP   (1) where P is the precision rate, R is the recall rate, and AC is the accuracy rate.TP represents the number of positive samples that are correctly identified.TN represents the number of negative samples that are correctly identified.
FP represents the number of negative samples that are judged as positive samples.FN represents the number of positive samples that are judged as negative samples.
The CNN is trained by using the training set I. The convergence curve for training set I is shown in Figure 5, and the training accuracy is 98.96%.The error converges at 361 epoch and tends to stabilize.The trained CNN is tested by using the rest 87 raw images from the database.These raw images are cut into 1305 new sub-images, including 307 insulator images and 998 background images.The test result is shown in Table 1, which shows 99 insulator images and 949 background images are identified correctly.The accuracy rate, the recall rate, and the precision rate are 80.31%, 32.25% and 66.89%, respectively.It costs 21.98s for dealing with all the 151 raw images.The average processing time of each image is 0.15s.Similarly, the CNN trained on the training dataset II is tested by the previous 1305 samples.Its result is shown in Table 2.We can see from this Table that 274 insulator and 888 background images are correctly identified, respectively.Compared to the test result on dataset I, we can get that the accuracy rate, the recall rate and the precision increase to 89.04%, 89.25%, and 71.35%, respectively.It costs 26.1s with all the 151 raw images.The average processing time of each image is 0.17s.Comparing Table 1 with Table 2, we can get that the test accuracy rate increases by 8.73% and the recall rate increases by 57%, and the precision rate increases by 4.46%, when the number of training samples increases from 960 to 1220.The average time of processing an image is about 0.15s~0.17s.Thus, the method proposed in this paper can effectively identify the insulator and background in aerial images.It can provide convenience for insulator segmentation and faults detection by selecting the image containing insulators.

Insulator images segmentation
In view of the method proposed in this paper can quickly identify insulators, we use it to segment the insulator image.The image segmentation method based on CNN and OTSU is shown in Figure 7.An insulator image is first cut into small sub-images, and then put into the trained CNN for classification.If the sub-image is judged to be background, the pixel value of the subimage is set to 0, otherwise it is segmented by OTSU.The algorithm is tested with a few samples which are shown in Figure 8.The first line of Figure 8 is the original image, the second line is the segmentation result by OTSU, and the third line is the segmentation result by our method.From this Figure, we can see that the segmentation result of our method only has few backgrounds in the binary images comparing with the results of OTSU.Especially, the segmentation result is more obvious when the insulator and the tower pole are non-overlapping.Hence, we can conclude that the method proposed in this paper can effectively remove the residual towers, grassland and other background, and get a better segmentation result.Nevertheless, one point must be pointed out that the size of sub-images can affect the result of segmentation.The removal of the background in some areas is not complete if the sub-image is too large.As shown in the third column of Figure 8, it has both insulator and a lot of background in some areas.The sub-image is not too small either, otherwise the insulator cannot be identified.Therefore, in practical engineering applications, the segmentation can be improved by increasing the number of training samples and improving the classification ability of CNN.

Conclusions
In this paper, an insulator image recognition method based on CNN is proposed to detect images containing insulator.The experiments results show that the recognition rate of training samples can reach 98.52%, and the accuracy rate of testing increase from 80.31% to 89.04% with increasing the number of samples in the training dataset.The method can effectively distinguish the image with and without insulators.By using the classification result of the CNN, an image segmentation algorithm is designed.The test results show that the proposed algorithm can improve the image segmentation result.The proposed insulator image recognition method helps to insulator intelligent fault detection, so it has high value in engineering application.

Figure 1 .
Figure 1.Flowchart of insulator image recognition algorithm based on CNN.

Figure 3 .
Figure 3. Partial images for experimental analysis At present, there is not a common database for insulator detection.In this paper, a database containing 151 aerial images (1280*720) is constructed, including 133 images containing insulator and 18 images without insulator.The raw images are too big to deal with by the CNN.So, we cut them into sub-images by using a slide window.We pick out 64 aerial images from the database to establish the training dataset.These raw images are cut through a sliding window, and then the sub-images are compressed and converted to gray images.The training dataset I including 960 sub-images which size is 48*48.The training dataset includes two kinds of images, one is background and the other is insulator.Some training samples are shown in Figure 4.

Figure 4 .
Figure 4. Part of the training set of sample images, the first two lines are background images, and the latter two lines are the insulator images

Figure 5 .
Figure 5. Training error of training dataset I We pick out the 257 misjudged samples and add them to the training dataset I to form training dataset II.For the convenience of setting the parameters, we add 3 background images to training dataset, so the number of training dataset II is 1220.The CNN is trained again with training dataset II.The training error of the training dataset II is shown in Figure 6.The training accuracy rate is 98.52%, and the error converges from the 433 epoch.

Figure 6 .
Figure 6.Training error of training dataset II

Figure 8 .
Figure 8. Example of insulator images segmentation.The first, the second and the third lines are, respectively, the original image, the OTSU result, and our method result.

Table 1 .
Test results of training models for training set I

Table 2 .
Test results of training models for training set II