Detection of Abnormal Hot Spots Infrared Images of Power Equipment Based on YOLOv4

The stable operation of power equipment is very important to ensure the stability of power grid. In this paper, an object detection model is designed for detection of the abnormal hot spots of electrical equipment. In order to improve the performance of the object detection model, data augmentation of image is applied to extending the training set. The test results show that the model based on YOLOv4 can identify and locate the abnormal heating fault point in the infrared image with high accuracy. The precision and recall rate of the object detection model on test set can reach 88.51% and 91.66% respectively.


Introduction
Due to the influence of external environment and other factors, electrical equipment in operation for a long time is prone to failure. The early stage of power equipment fault is usually characterized by overall or local abnormal heating. [1] The stable operation of power equipment is very important to ensure the stability of power grid. Therefore, it is of great significance to realize the automatic monitoring of the temperature change of electrical equipment and discover the abnormal hot spots in time for the fault diagnosis and maintenance of electrical equipment.
The causes of abnormal heating of power transmission and transformation equipment are: defects of the equipment itself, oxidation and corrosion of the contact surface, loose strands of wires, insufficient design current carrying capacity, etc. Electrical equipment failure will produce abnormal hot spots. The infrared radiation energy is converted into electrical signal by the detector, and then amplified and converted into the thermal image of the temperature distribution to realize the function of measuring the surface temperature of the object. [2] The infrared thermal imaging technology has the advantages of non-contact, all-weather operation, strong anti-interference, etc. At present, it mainly relies on manual identification of abnormal hot spots in infrared thermal imaging images of power equipment. This traditional infrared image recognition method has high cost, long time-consuming, and the accuracy is easily affected by the subjective consciousness of the staff. In order to improve the analysis and processing ability of infrared images, scholars at home and abroad have done a lot of researches. In reference [3], by using visible and infrared images, a new type of power equipment based on the improved Fast Affine Template Matching (FAST-Match) algorithm is proposed to obtain the position of the corresponding target in the infrared image. In reference [4], a fuzzy enhancement technology of infrared thermal image based With the development of deep learning and computer vision technology, a series of object detection algorithms based on convolutional neural network (CNN) have been widely used in industry and commerce. Using object detection algorithms to process infrared images can realize automatic recognition and diagnosis of abnormal hot spots of power equipment, and improve the intelligent level of power equipment inspection.

YOLOv4 model
The object detection algorithms are mainly divided into one-stage methods and two-stage methods. One-stage methods include You Only Look Once (YOLO) and Single Shot Multi-Box Detector (SSD). The two-stage methods include Region-Convolutional Neural Network (R-CNN) and Faster R-CNN, Mask R-CNN and other optimization algorithms. One-stage method activates the frame and prediction class from a single activation map, which greatly improves the detection speed. [5] YOLOv4 has 43.5% AP for the MS COCO dataset at a real-time speed of 65 FPS on Tesla V100. Therefore, YOLOv4 is suitable for real-time monitoring of abnormal heating fault point in infrared image of power equipment. Faster R-CNN is a typical algorithm of two-stage method and its detection results were compared to verify the detection effect of YOLOv4 algorithm on the infrared images.
YOLOv4 is improved on the basis of YOLOv3, the network of YOLOv4 is composed of backbone network, neck network and head network. At the same time, some techniques are used to improve its performance. Firstly, mosaic data augmentation are used to enhance the data, four images are randomly scaled, and then randomly distributed for stitching, which greatly enriches the detection data set. In particular, random scaling adds many small targets, making the network more robust.

The backbone network
The backbone network in YOLOV4, which is pre-trained on Imagenet, is CSPDarknet53. CSP network is a new backbone network which enables state-of-the-art methods such as ResNet and DenseNet to be light-weighted [6] and meanwhile keep the accuracy, reduce the calculation bottleneck and memory cost. Darknet53 is the backbone network used by YOLOv3. Combined with the idea of CSP network, CSPDarknet53 network is formed. [7] Yolov4's backbone net all uses the Mish activation function, while the later networks still use leaky ReLU function. The Mish activation function is a smooth non-monotonic activation function and defined as [8] : Where x is the input of Mish activation function.
The Mish activation function has the following advantages: • There is no upper bound or lower bound. No upper bound is required for activation functions, because it avoids the gradient saturation which leads to a sharp decline in training speed. No lower bound attribute helps to achieve regularization effect. • Continuous and smooth. the Mish activation function is continuous and smooth, which help in realizing easier optimization and better generalization • Better performance. Compared with ReLU, the Mish activation function has a large amount of computation, but it shows a better result in deep neural network.

The neck network
The neck network is SPP and PAN. SPP network can effectively increase the receiving range of backbone features and significantly separate the most important context features. The SPP block is added over the CSPDarknet53, to increase the receptive field and separate the most significant context features out. Pan network has the structure of repeatedly extracting features, PANet is used to

The head network
The head network is responsible for the final prediction task such as predicting the category and the bounding box information of the target object. YOLOv3 is used as the head network.

Difficulties in detection of infrared image
In the infrared images, the background includes many other power equipment, which bring serious interference; and the defect electrical equipment are quite various. The shape characteristics of abnormal heating equipment learned by neural network will interfere with the real fault location.

Data augmentation of training set.
Heating fault of power equipment happens randomly and infrequently. A training set consists of plenty of samples is difficult to build. The performance of the object detection model is usually better with more samples in the training set. Because the parameters in neural network gradually converge to the optimal value through many rounds of training. Therefore, data augmentation of image is applied to extend the training set. Gaussian noise whose probability density function obeys Gaussian distribution. The causes of Gaussian noise are as follows: the brightness of background is not uniform, each component of the circuit has its own noise and mutual influence, the image sensor works for a long time and the temperature is too high. S&P (salt and pepper) noise is a black-and-white bright and dark noise produced by image sensor, transmission channel and decoding processing. Adding Gaussian and S&P noise to the infrared images is also an efficient way to extend training set.
Taking the method of rotation, mirror, adjusting colour saturation, adding noise to expand the data set and the image processing method is shown in table 1. The number of images is expanded nine times as much as the original training set through a series of data augmentation methods.

Case Studies
The software configuration of this experiment includes windows10, anaconda3, python3.7, CUDA tool kit10.1, cudnn8.0, etc. The environment is pytorch1.5.1. A computer host (32g CPU) and an independent graphics card RTX 2080super are used to speed up the process of training model. The learning rate is set to 0.001, the attenuation coefficient is set to 0.0005, and the steps mode is selected to update the learning rate. Set the number of iterations to 12000，when the number of training iterations reaches 7000 and 10000, the learning rate is reduced to 20% and 5% of the initial learning rate respectively.

Construction of Training Set
A total of 350 infrared images with abnormal heating fault of power equipment including insulators, circuit breakers, conductors and fittings are collected from the power grid company. Data augmentation method is used to extend the training set. Methods including rotation, mirror, adjusting colour saturation, adding Gaussian and S&P noise are applied to the original images, therefore the training set is extended to 3150 images. Before the training, the manual marking through LabelImg of abnormal hot spots in infrared images is carried out and then put into the training set in the standard format of VOC standard picture set.

The Assessment Indices
The recall and precision rate are used as to evaluate the object detection model's performance [14] , and the formulas of the recall and precision rate are shown in equation (2) and equation (3): Where TP (true positives) refers to that objects are correctly identified; FP (false positives) refers to that background is identified as target object wrongly; FN (false negatives) refers to that the target object is identified as background wrongly.

Test Results and Analysis
The test set containing 80 infrared images of electrical equipment is used to test the performance of object detection model. The test results are shown in figure 1.  As is shown in table 2, the recall and precision rate of the object detection model trained by the original training set without data augmentation method are both lower than that of the object detection model trained by the extended training set, the detection effect has been significantly improved. The model based on Faster R-CNN trained by the same expanded training set are used to verify the performance of the model based on YOLOv4.
It can be seen from the test results, Fast RCNN is not good for detecting abnormal hot spots in infrared images. Therefore, the reason may be that Faster RCNN is not sensitive to colour features of images. In order to verify the conjecture, the conventional visible images and gray images of electrical equipment with abnormal heat are used as test images, the test results are shown in figure 2.  Figure 2. The results of training loss function By analyzing the test results, Fast RCNN is more sensitive to the edge and texture features of objects. The model trained by infrared image can still recognize the corresponding objects in visible and gray images. Therefore, Faster RCNN is not suitable for detecting the abnormal hot spots in infrared images of electrical equipment.

Conclusion
In this paper, the object detection model based on YOLOv4 is proposed for detection of the abnormal hot spots of electrical equipment. Data augmentation of image is applied to extend the training set in order to improve the performance of the object detection model. The test results show that the method used in this paper can identify and locate the abnormal heating fault point in the infrared image with high accuracy. The precision and recall rate of the object detection model on test set can reach 88.51% and 91.66% respectively.