Detection method based on improved faster RCNN for pin defect in transmission lines

. Defects such as insulator, pins, and counterweight in high-voltage transmission lines affect the stability of the power system. The small targets such as pins in the unmanned aerial vehicle (UAV) inspection images of transmission lines occupy a small proportion in the images and the characteristic representations are poor which results a low defect detection rate and a high false positive rate. This paper proposed a transmission line pin defect detection algorithm based on improved Faster R-CNN. First, the pre-training weights with higher matching degree are obtained based on transfer learning. And it is applied to construct defect detection model. Then, the regional proposal network is used to extract features in the model. The results of defect detection are obtained by regression calculation and classification of regional characteristics. The experimental results show that the accuracy of the pin defect detection of the transmission line reaches 81.25%


Introduction
The safe operation of high voltage transmission line affects the stability of the power system as main carrier of power grid. High-voltage transmission lines are prone to tower rust, insulator loss and other defects due to the influence of external factors such as strong wind, rain, lightning and other external factors. Therefore, it is very important to inspect the faults of high voltage transmission lines and repair the faults in time [1]. Repairing and replacing faulty equipment can improve the stability of the power system [2] and improve economic benefits.
With the application of unmanned aerial vehicle (UAV) aerial photography in power system, the detection of high-voltage transmission lines by image vision has become a research hotspot. In [3], the self-crushing of insulators is detected by masked area convolutional neural network, and the self-vibration faults of insulators in transmission lines are located. But its generalization ability is weak.The intrusion of engineering vehicles has affected the safe operation of the power grid. In [4], the "faster regions with convolutional neural network" (Faster R-CNN) method is used to quickly locate and identify construction vehicles near the intrusion into the power grid. However, compared with the defects of transmission grid equipment, construction vehicles have large targets and are easy to identify and locate. In [5], a fault detection method based on fine-grained graphics classification was proposed. This method can identify subtle changes due to graphics illumination, colour, shape, and location, and verify the aerial graphics of the transmission network. Although these methods can accurately identify the objects, they focus on large electric components such as insulators and engineering vehicle, while the researches on small electric components such as pins, screws and bolts, which are very difficult for inspectors, are relatively scarce.
In this paper, an improved Faster R-CNN method is proposed. The location of the large target is obtained in the UAV image, and then the small target is searched in the large target to determine the pin defect fault in the high-voltage transmission line. The organization structure of this article is that the second and third sections introduce the Faster R-CNN algorithm and the transfer learning algorithm respectively. In the fourth section, experiments are conducted to verify the missing pins according to the proposed algorithm. Section fifth summarizes this paper.

Faster R-CNN algorithm
In recent years, traditional vision algorithms have conducted certain research on the detection of pin defects. However, most of them just borrowed general detection models, and their detection accuracy still has room for further improvement. Aiming at the problem of low detection accuracy in target recognition, the Faster R-CNN algorithm is proposed in [6]. The architecture of Faster R-CNN is shown in Fig.1. Faster R-CNN can be divided into four parts: feature extraction network based on CNN, the region proposal networks, RoI pooling layer and classification and regression.

Feature extraction and Convolution layer
Region proposal networks (RPN) and Faster R-CNN detection need to be initialized by convolution network. Convolution network which is used to extract feature maps of original image is generally composed of convolution layer, ReLU layer and pooling layer.
After inputting the original image into the CNN network, after certain convolution and pooling operations, the feature map of the original image is obtained. These feature maps are on the one hand the feature maps of the input layer of the RPN network, and on the other hand continue to propagate forward to produce high-dimensional feature maps. The method of extracting feature maps is usually VGG-Net, ResNet and AlexNet algorithms. The feature maps of a pin image are extracted through ResNet-101 in this paper. The feature map is the deep convolution feature of the original image. Feature map of different objects are quite distinguishable, which can be used as the basis of image classification. Due to different power transmission equipment and different shooting distances, the size of the target in the original image obtained is also different, so the obtained feature size is not fixed.

The region proposal networks
The regional proposal network is regarded as a fully convolution network. Its core idea is to use sliding window and anchor mechanism to generate candidate frames. The structure of RPN is shown in the Fig.1. It scans the pin image with a sliding window and finds the area where the target is located. In PRN, a pin image will undergo the following procedures: 1) Where i is the index of the anchor; p i is the probability that there is no target in the anchor; t i is the four parameters of the predicted boundary; T i * is the coordinate parameter of the real boundary corresponding to the anchor containing the target. R is the smooth function. From formula (1), (2), RPN is the loss function Where {p i } is the output of the classification layer; {t i } is the output of the regression layer. Normalized by N cls , N reg and weight λ.

Fixed size feature maps extraction by RoI Pooling
The RoI Pooling layer is responsible for collecting all candidate boxes and calculating the feature map of each candidate box, and then sending it to the subsequent network. The companion fully connected layer in the convolutional neural network connects all the input pixels. The input image size must be a fixed value, and the network output image is also a fixed size. As shown in Fig.1, RoI Pooling layer has two inputs: the original feature map and the candidate box output by the RPN network. The size of image is not the same, so the size of input feature map needed to specify. The feature map of each candidate frame is divided into 7 horizontal parts and 7 vertical parts. Perform maximum pooling for each portion. RoI pooling layer implements multiscale feature extraction to extract feature vectors of fixed size. The specific operation of RoI Pooling is as following. 1)RoI mapping. First map RoI to the corresponding position of the feature map; 2) Block the mapped RoI; 3) Perform max pooling for each block.

Faster R-CNN detection
After the candidate regions are extracted by RPN, the feature map is sent to the RoI pooling layer together with the candidate regions. The final target detection and recognition is realized by Faster R-CNN. At this time, RPN and Faster R-CNN share the convolution layer. The two networks realize the weight sharing during training which can not only reduce the parameters but also form a joint network. It makes the detection accuracy and efficiency higher.
Two networks need to be trained in the training process. One is the RPN network and the other is the classification network used after getting the box. The usual approach is to alternate training, that is, RPN network is trained once and then classification network is trained within a batch.
The above process can identify pin in an image and mark them out. It can also simultaneously identify pin defect and mark them out. Some testing experiments are presented in the next section.

Transfer learning
In order to improve the detection accuracy, most target detection algorithms require a large amount of data to train the model. But the actual situation is that it is difficult to collect enough data to match the required algorithm. Therefore, researchers put forward the idea of transfer learning and applied it to the training of target detection algorithms. In target detection, the so-called transfer learning is to transfer the parameters of one training model (the original domain) to another training model (the target task), so that the target model can get better results [7]. The algorithm block diagram of transfer learning is shown in the Fig.2. The lack of defect data and the high cost of collection have brought extremely difficulties to the identification of pin defect detection problems on transmission line tower. In this paper, the transfer learning algorithm is used to solve the problem of lack of defective data. In order to obtain the pre training weights of the corresponding categories with high matching, performs corresponding network selection and parameter adjustment are carried out according to the typical characteristics of small targets. After the new data is entered into the typical defect database of the visible light inspection of the power grid, the characteristic parameters of different layers are trained and reserved to obtain a reliable learning model with higher classification accuracy.

Experiments and results analysis 4.1 Data set
We collected 28,379 aerial images of transmission lines taken by UAVs. Based on the purpose of reducing training and testing time, this article first adjusts the pixels of the original image to 1000×800. Perform brightness adjustment, white noise, down-sampling and other processing on the training set samples to increase the sample by 3 times. In the testing phase, the samples are divided into 3 categories: 8:2 of the same batch of data is divided into training set A, test set B, and the line image in the open scene as the verification set C.

Implementation method
We built a Faster R-CNN to experiment. Considering that the number of samples in the obtained data set is small, and the types of pin defects are small, this paper combines the idea of transfer learning, and the trained model data is used as the initial weight of the proposed Faster R-CNN model. Our task is to detect pin defects in transmission line towers.
Before training, the Faster R-CNN is initialized with pre-trained weights from the data set of the collected grid visible light patrol typical defect database. The image input to the convolutional layer is first normalized. The aspect ratio of the image is guaranteed. In RPN, we used 63 scale anchor points. The seven areas of the anchor frame are [1,2,4,8,16,32,64], corresponding to nine aspect ratios, which are [1:10, 1:5, 1:3, 1:2, 1:1, 2:1, 3:1, 5:1, 10:1]. Then, the feature map is convoluted in two ways. the convolution kernels are 1x1x2k and 1x1x4k, respectively, which represent the probability value of the object contained in each anchor output by the RPN and the coordinates of the object. The probability score of each anchor output by the RPN network and the coordinates of the objects in each anchor are used as the prediction signal, the label of each anchor calculated and the coordinates of the corresponding Ground Truth are used as the supervision signal, the network is calculated the loss of network.

Result analysis
Target detection uses four boxes to locate the target. To judge whether an identification box is correct or not, the main way is to make IoU judgment with the real box. Since pin is relatively small in the aerial image, model is likely to be missed, so IoU is selected as 0.5. We use the precision rate P and the recall rate R to evaluate algorithm.
In order to compare the applicability of the proposed method, the proposed ResNeXtV2_101 + Faster-RCNN detection method is compared with the currently popular YOLOV3-SPP-ultralytics and ResNeXtv2_50 + Light-head-RCNN. YOLO is a regressionbased method, and the ResNeXtv2_50+Light-head-RCNN algorithm is an accelerated algorithm of R-FCN. The results are shown in Table 1. The experimental results show that the performance of the target detection algorithm of YOLOV3-SPP-ultralytics is the worst,. The Yolov3-spp-ultralytics + Yolo V3 algorithm solves the target detection problem with the regression method which improves the calculation time of image detection but reduces the accuracy. The ResNeXtv2_50+Light-head-RCNN algorithm sacrifices accuracy to improve the calculation speed. Faster-RCNN through the introduction of RPN, this method is combined with CNN to improve the accuracy of detection, with better recall and precision. The training results of typical transmission line defects and pin defects are shown in Table 2 Compared with the two types of defect recognition, pin defect recognition accuracy and recall are lower. The reasons are as follows. 1)The target occupies less effective pixels in the original image. When the image is zoomed to 1000 ×800, the pin defect feature has been blurred or even lost. Therefore, the effect of the trained model is poor.
2)The recall rate of big targets such as connection hardware identification cannot reach 100%. Some pins are missed in the test results. Therefore, the big target (connecting fittings) should try to find all parts containing pin defects, but there is no guarantee that there are no missing.

Conclusion
In this paper, the image recognition technology in computer vision technology is applied to the detection of defects in transmission lines. Aiming at the problem that the pin defect target in the transmission line image captured by UAV is small and the feature similarity leads to the low accuracy of model detection, pin defect recognition method based on the improved Faster R-CNN model is proposed. First, the pre-trained model is used as the initial weight. Combined with the idea of migration learning algorithm, the problem of insufficient pin defect samples during Faster R-CNN model training is solved. The experimental results show that the Faster R-CNN model based on transfer learning proposed in this paper has an accuracy of 81.25% in detecting pin defects of transmission lines. This method has practical engineering application