Research on fine tuning parameter insulator identification based on YOLOV4 algorithm

Aiming at the problem that the training network time of YOLOV4 algorithm is too long due to the large data set of aerial insulator images, a method based on YOLOV4 algorithm is proposed to shorten the training time by fine-tuning parameters without affecting the positioning detection accuracy. Based on the development of UBANTU virtual machine, through CUDA and CUDNN environment configuration, and through the detection and verification of insulator aerial photo data set, the feasibility of accurate positioning of insulators under the condition of fine tuning parameters of YOLOV4 algorithm is successfully proved.


Introduction
With the increasing mileage of high-voltage transmission lines in China, regular inspection of transmission lines has become the most important to maintain the stable operation of the power system. High-voltage transmission lines are often laid across provinces and cities, and often cannot avoid passing through areas with complicated terrain conditions. Insulators, as an important part of transmission lines, are not only abundant in quantity but also very easy to be damaged under complex climatic conditions. Insulator detection has become an important target of transmission line detection. The traditional manual inspection of insulators requires inspection workers to carry heavy inspection tools to travel in the rugged areas where transmission lines are set up, which is not only dangerous but also inefficient. In the context of intelligent inspection of modern power grid, it has become a trend to use aerial images of UAV for insulator fault detection. Aerial images of insulators often have many irrelevant background interference, and how to optimize the algorithm for aerial insulator positioning is the main research direction of researchers in China [1] .
Traditional target detection and recognition methods are represented by feature extraction method based on SIFT algorithm and HOG algorithm, as well as classifier method based on SVM algorithm. However, these traditional target detection methods can only be applied to specific situations under manual setting, and are not capable of self-learning to adapt to different backgrounds [2] . With the development of deep learning, a target detection method based on CNN convolution network emerged, but the detection speed is slow due to the increasing number of network layers and large parameters of CNN convolution network [3] .
Therefore, after considering the detection speed and accuracy, YOLOV4 algorithm is selected as the algorithm of insulator positioning detection. In this study, an improved method of fine-tuning YOLOV4 algorithm was proposed in UBANTU virtual machine to detect and locate insulators.

Ubuntu and YoloV4 algorithms
Compared with the Windows system we often use, more and more image processing scholars prefer to process images in Ubuntu VIRTUAL machine. When configuring the virtual environment for Windows system, the environment may fail because a certain software is not installed or different software conflicts may occur. Creating virtual environments in Ubuntu is much easier and more successful than in Windows. Ubuntu also has many advantages such as no need to defragment files, a very efficient file management system, a powerful command line, and a great user experience.
Yolov4 algorithm is improved by improving model training skills and stacking methods on the basis of YOLOv3 algorithm. The combination of Darknet-53 residual network and CSP can not only reduce the amount of computation, but also make the image extract deeper feature data. Mosaic sample enhancement method and the addition of SPP network modules enable the algorithm to adapt to recognition under different environmental backgrounds [4] . Yolov4 model is divided into four parts: input, trunk, neck and head. Its network structure is shown in Figure 1.

Model parameters and fine tuning
Set batch parameter yolov4-tiny-Insulato. CFG in the CFG folder under the root directory. The default value is 64. The meaning of subdivision is how many images can be divided. For example, during training, if multiple images cannot be input simultaneously, split the input training in batches and set it to 2. Width and height parameters are set to 416 to prevent errors caused by excessive image size, and the maximum number of iterations of MAX_batches is set to 2000.

Model evaluation
Yolov4 algorithm was used to train the model, among which the most important is the loss function value in the case of multiple iterations, whose calculation formula is as follows [5] : The meaning of each formula in the formula:f LOSS is the loss function,λ coord is the loss weight of the target position coordinates, λ noodj is the loss weight of target frame confidence,Whether the JTH anchor frame of grid I contains a target is expressed as or noodj ,The prediction and actual target frame are represented by , , , ℎ and ˆ ,ˆ ,ˆ , ĥ respectively,I the prediction category and actual category of grid are represented by and ˆ respectively,The predicted target probability and actual target probability of grid I are represented by and ˆ respectively,B is the number of borders, is the number of grids.