Classiﬁcation of insulators using neural network based on computer vision

Insulators of the electrical power grid are usually installed outdoors, so they suffer from environmental stresses, such as the presence of contamination. Contamination can increase surface conductivity, which can lead to system failures, reducing the reliability of the network. The identiﬁcation of insulators that have their properties compromised is important so that there are no discharges through its insulating body. To perform the classi-ﬁcation of contaminated insulators, this paper presents computer vision techniques for the extraction of contamination characteristics, and a neural network (NN) model for the classiﬁcation of this condition. Speciﬁcally, the Sobel edge detector, Canny edge detection, binarization with threshold, adaptive binarization with threshold, threshold with Otsu and Riddler–Calvard techniques will be evaluated. The results show that it is possible to have an accuracy of up to 97.50% for the classiﬁcation of contaminated insulators from the extraction of characteristics with computer vision using the NN for the classiﬁcation. The proposed model is more accurate than well-established models such as support-vector machine (SVM), k-nearest neighbor (k-NN), and ensemble learning methods. This showed that optimizing the model’s parameters can make it superior to solve the problem in question.

failure more difficult to predict.To carry out an analysis of the probability of a failure occurring in relation to the level of contamination, the equivalent salt deposit density (ESDD) and the non-soluble deposit density (NSDD) must be evaluated.Based on the knowledge about fault conditions and their characteristics, contamination monitoring can be used to improve reliability in the network [5].
The presence of ultraviolet radiation on polymeric insulators, which are in an external environment, can accelerate its degradation process, and thereby leave these components in a critical situation [6].The contamination that accumulates on the surface of the insulators is non-uniform and uneven, when insulators in different locations are compared, which makes monitoring of this condition difficult [7].Insulators in an external environment can be exposed to fog, which added to the contamination can also be harmful to these components.The results presented by Liu et al. [8] show that with the increase in the duration of the fog and the artificial conductivity applied to the environment, in which the insulators are installed, increases the ESDD.As a result, the voltage required for a disruptive failure decreases, allowing discharges to occur more frequently.
Some techniques have been used to identify the level of contamination of electrical power network insulators.According to Salem et al. [9] the contamination can be diagnosed according to the leakage current that flows in the insulator.ESDD is a method that is being used extensively by engineers to describe the severity of pollution in the degradation process of contaminated insulators [10].
The increase of the relative humidity of the air with contamination and environmental variations can accelerate the process of degradation of the insulator, thus these components are affected by the flashover voltage, which as a consequence reduces the reliability of this type of component [11].The prediction of the development of a flashover voltage can be assessed using electric field measurement [12].The development of a fault in a contaminated insulator can be correlated with the electrical field it has around it.Thus, an alternative to assess the condition of distribution insulators is to use specific equipment for system inspection and thus define strategies to mitigate failures [13].
Classifying the condition of insulators using artificial intelligence techniques is promising, since defects can be identified automatically through pattern recognition.In chain insulators of transmission lines, deep learning techniques can be used to identify the absence of a variable number of disks [14].One of the great difficulties in identifying failures in insulators through computer vision is that failures are rare, so conducting network training to identify certain conditions is difficult, due to the small data set.The application of geometric constraints to data sets recorded during inspections can improve the accuracy of the model, which can result in an accuracy of up to 92.86% [15].
The use of advanced models to identify defects in insulators has been studied by several researchers.The convolutional neural network (CNN) architecture can present results of accuracy of up to 99.76% for the monitoring of insulators from aerial images [16].For the detection of defects in insulators, modern combined models such as the ResNeSt and region pro-posal network (RPN) can be used.Wang et al. [17] presented an application of the combination of RPN models to improve the ResNeSt's ability to extract features.For a complete assessment, a large number of controlled experiments were applied and the results showed that the model is fast, being able to process and identify defects with a rate of 12.8 pictures per second, presenting an accuracy of 98.38%.
The use of CNN to assess defects in insulators in the field through the processing of aerial images is a challenging subject, given that the interference of the image background makes classification difficult.According to Tao et al.'s [18] traditional models based on shallow learning techniques can only locate specific faults in insulators under controlled conditions.When it is necessary to classify failure conditions in field photography with wide variation, more complete models are needed.The use of advanced artificial intelligence techniques to improve the analysis of specific conditions has been explored, in [19] the adaptive neural control is applied for the design of non-linear feedback systems, in [20] the dynamic surface tracking control is used for non-linear systems.
Environments with a high level of contamination can accelerate the degradation process of insulators that are outdoors.The process of evaluating the condition of the insulators through computer vision can improve the safety and operation of systems that are close to the power grid.The combination of techniques through a deep multitasking neural network can improve the accuracy of the classification of defects in insulators [21].
Specific assessments of the condition of the surface of insulators are rare.From the use of polymeric insulators, there may be a loss in hydrophobicity as the insulator ages, leaving it more vulnerable to dry band arcing and flashover.Chatterjee et al. [22] performed an assessment of the amount of water accumulated in insulators using a deep learning framework.The results show that from a pre-trained deep CNN model AlexNet is possible to classify with high accuracy the wettability class.A model using deep CNN to insulator surface erosion assessment is presented by Ibrahim et al. [23].The evaluation is based on IEC-60587 standard, which defines the degree of erosion for a failed sample.The results are proof of concept to outdoor on-field tests further.
Related to the classification of contamination in insulators using innovative methods, the work of Liu et al. [24] explores the support vector machine (SVM) for multi-classifying the severity of pollution in insulators based on photothermal radiometry (PTR).The PTR pollution severity assessment model is well established for assessing pollution severity parameters such as ESDD, and NSDD that will be the focus of this paper.This method stands out for having the ability to evaluate the characteristics of transient thermal radiation and the frequency domain of the contamination layer.The results show that there are satisfactory efficiency and precision using SVM based on the PTR, being promising techniques for being quick and nondestructive.
Based on the need to evaluate the contamination of insulators that are exposed to environmental variations, this paper aims to carry out the classification of contamination levels using computer vision methods and the deep learning neural network for the multi-classification.As presented in the literature, some authors have classified the conditions of insulators using modern artificial intelligence models, however, the use of these models to assess contamination levels has not been explored and this will be presented in this paper.
The advantage of using an insulator contamination classification model is that, based on its results, predictive measures can be taken to clean the network or replace components.From the performance of an automated inspection, it is possible to define strategies for maintaining the network, aiming at improving its reliability.The disadvantage in the proposed evaluation is related to the variations that can be found in the field due to the different conditions in which the insulators are exposed and the different types of contamination that can accumulate on the surface of these components.
The contributions of this paper for classification of contamination levels in the electric distribution power grid are summarized in the following: • The first contribution is related to the improvement in the inspection of the electrical distribution system.Through a classification model based on artificial intelligence, it is possible to automate the inspection of the electrical power system, thereby improving the speed and comprehensiveness of the grid inspection.• The second contribution focuses on innovation in the classification of the level of contamination of insulators.Some authors have carried out works aimed at the identification of missing insulators in insulator chains in transmission lines, specific works for image analysis regarding the condition of the insulator surface are rare.Specifically, the classification of the level of contamination is an innovative research.• The third contribution is related to the combination of computer vision and artificial intelligence techniques to create a model with an acceptable classification accuracy that has the ability to perform a global assessment of contamination conditions.
The remainder of this paper is organized as follows: In Section 2, the process of contamination of the insulators is explained, and it is discussed how the characteristics of the samples were extracted through computer vision; Section 3 presents the parameters analyzed in this article in relation to the classifier model; In Session 4, the results of applying the model for the classification of contamination are presented and discussed; In Section 5, the conclusion is presented.

INSULATOR'S DATASET
Contamination in insulators is a difficult problem to assess in inspections of the electrical system, depending on climatic conditions there may be variation in surface conductivity [25].The variation in surface conductivity can be caused by a higher relative humidity of the air [26], which makes the identification of a critical condition difficult, since the system may not present faults on days with good climatic conditions [27].
Contamination of insulators can occur in several ways, varying their concentration and severity in relation to the location where the insulators are installed.Insulators installed in networks close to unpaved streets can have a greater accumulation of dust and organic residues [28].Insulators that are in urban areas may have more contamination due to pollution caused by industries or due to automobile fuel residues.Insulators close to coastal regions can have greater saline contamination due to the proximity to the sea.All of these forms of contamination can increase the surface conductivity in the insulators and make these components more vulnerable to disruptive discharge [29].
A major difficulty in classifying contaminated insulators is that due to the various forms of contamination and various profiles that are installed in the field, using computational models for fault identification is a challenging work [30].Another point that makes classification difficult is that a contaminated insulator does not represent an imminent failure for the system, it means that an insulator that is contaminated may be working today and in the future may develop a failure [31].

Contaminated insulator sample
The insulator samples used in this work are pin type, 15 kV class porcelain.This insulator profile is widely used in medium voltage distribution networks in southern Brazil.The artificial contamination process was carried out based on the IEC 60507 standard [32].The contaminants used in the experiment were dissolved in distilled water according to the mass by volume defined by the standard.
Insulators installed outdoors are exposed to dust, pollution, salt, among other contaminations.When the contamination is strongly stuck, and not even the action of rain helps in contaminants cleaning, the place becomes more conductive, making it more vulnerable to electrical discharges.To simulate different levels of contamination the standard IEC 60507 [32] determines an artificial contamination procedure to simulate contamination caused by environmental variations to which the insulators are exposed [33].These simulations are based on the increased concentration of contaminants ESDD and NSDD in relation to the analyzed solution.
The contamination process was carried out by submerging the insulator in a solution of distilled water, with Kaolin and sodium chloride.The amount of sodium chloride and Kaolin will be, respectively, responsible for the levels of contamination by ESDD and NSDD that the polluted insulator will have.The ESDD is used to measure the density of soluble material in terms of salinity.The ESDD method consists of dissolving the contamination layer on the surface of the insulator in distilled water and measuring the conductivity of this solution.From the conductivity, it is evaluated how much of the conductive material remained on the surface of the insulator.
The NSDD measurement is performed for non-soluble minerals to a solution containing the non-conductive contaminant.The water is filtered and the weight of the contaminants is measured, finally, based on the measurement difference, the NSDD value is obtained.Kaolin is used for this analysis as it is non-conductive.Thus, ESDD represents the conductive contamination and NSDD the non-conductive contamination.
During the contamination process, the insulators were contaminated with variations of the ESDD and the NSDD.The NSDD contamination is created from the solution of Kaolin mass dissolved in water.The use of salt in the solution increases the amount of soluble deposits and consequently increases the conductivity of the insulator's pollution layer, but this does not result in visual variations in the image, so the samples that were contaminated with salt were not considered in this work.As ESDD reduces the model's classification capability by not generating a visual result, then it was not considered for model training.
NSDD variations are given by the following equation: in this case,  f is the final mass,  i is the initial mass, and A is the surface area of the insulator.The concentration of Kaolin used in this paper was 6, 8, 10, 16, 20, and 25 (g/l).The surface area of the samples is equal to 762 cm 2 .

Insulator's photography
After contamination of the insulator, photographs were taken from four different perspectives.To perform this procedure, the insulator was rotated 90 • in each photograph.In this way, four photographs were obtained from different perspectives, these being frontal, lateral (left and right), and back, as seen in Figure 1.
The registration of photographs from different perspectives is important because contamination is distributed over the entire insulator's surface, in a non-uniform manner.Thus, if there is more contamination in one of the perspectives of the insulator, it will be considered.
For comparative purposes, the same photography parameters were used in all samples considered.The exposure time for each set was 3.3 ms with an ISO 100 light sensitivity, and a focal length of 4 mm.All photographs were recorded with an LG H-818 sensor that has a focal aperture of 1.8.For future comparisons, the data are available at: https://github.com/SFStefenon/InsulatorsDataSet.

Computer vision
To perform the analysis in relation to the photographs of the insulators samples used in this article, the images were initially converted to grayscale.Then, the blur technique was applied to reduce the complexity in the analysis of the photograph.To apply the blur technique, the gaussian smoothing filter was used on the input source image to smooth and reduce its image noise.For this purpose, the OpenCV library, which is specific for computer vision, was used in Python.Sobel edge detector is a discrete differentiation operator, which calculates an approximation of the gradient of an image intensity function [34].To use Sobel, it is necessary to carry out the combination of Gaussian smoothing and differentiation, which was explained previously.In this algorithm, the derivatives are calculated from the horizontal and vertical changes, the result is the combination of the results of these variations at each point in the image [35].
Canny's algorithm has several stages and is very popular for edge detection.In the Canny's filter, the direction of the gradient is always perpendicular to the edges, being rounded in one of the four angles that represent the horizontal, vertical, and two diagonal directions [36].After obtaining the direction and magnitude of the gradient, a complete scan of the image is performed to remove unwanted pixels that may not constitute the edge of the resulting image.In this way, it is checked if each pixel is a local maximum in its vicinity in the direction of the gradient.In the last step, it is evaluated if the edges are really correct from the intensity gradient, the edges that are not within the maximum and minimum limits are discarded.The result obtained is a binary image with thin edges [37].
In the Binarization with threshold technique for each pixel in the image, the same threshold value is applied.Thus, if the value is less than the image limit, it is set to 0, otherwise, it is set to the maximum value.As the objective of this work is to carry out the classification of the contamination of the insulator, this method is promising to define the boundaries of the images [38].In the binarization process, the first argument is the source image, which is previously transformed into grayscale.The second value is the limit used by the classifier and the third value is the maximum assigned to each pixel that exceeds the limit defined in this process [39].
Since the global limit value in the binarization may not be good for all variations of the image, adaptive binarization with threshold determines the limit of a pixel-based on a small region around it.Thus, different limits are obtained for different regions of the same image [40].Through this process, results can be found that do not have much influence in relation to the variation of lighting, which helps the classifier to have the specific objective of classifying the contamination of the insulator and not variations of the photographs.
In the binarization with Otsu the limit value is determined based on an analysis of the histogram of the image, two peaks of the histogram are evaluated and the limit is defined between these values.Thus, the algorithm finds the ideal limit for output based on the variation of the image.The Ridler and Calvard algorithm use an iterative clustering approach, in which an initial threshold estimate is made [41,42].
In this paper, this estimate is made from the binarization with Otsu, then the pixels above and below the limit are assigned to the object and background classes, and thus the result of the threshold with Otsu and Riddler-Calvard binarization is obtained.
To use the threshold with Otsu and Riddler-Calvard, the Mahotas library was used, which is also a computer vision library used in Python.Figure 2 shows the result of applying the filters in relation to the pre-processed image.

CLASSIFIER MODEL ARCHITECTURE
In this section, the model used to carry out the contamination classification discussed in this paper will be presented.The model used for the classification is based on the Keras, being a TensorFlow platform for Python.The result of classification is based on the desired output in relation to the contamination of the insulators evaluated in the laboratory.Based on this approach an embedded system could be applied as an solution for the classification task during the electrical inspection on the field [43,44].
Initially, the data obtained from computer vision processing was imported as the model input.For the purpose of contamination degree classification the desired output from the network is obtained by the results of the NSDD.The sequence model was used, which is a direct model, in which piles of single input and single output layers are obtained.
The network architecture model used in this paper for classification is based on the convolution of the resulting images from the application of specific filters, and followed by a fully connected sequential layer model using the dense class, with a hidden layer [45].From a greater number of hidden layers, the model did not converge for this application.The use of recurring layers, which are currently becoming very popular, prevented the network from converging.
The output of the network is dense class resulting in the response that defines whether the concentration of contaminants is above an acceptable limit, and a failure prevention measure must be carried out.The first definition for the model is the configuration of the layers to be added, which it will explained in the next section.The output of each neuron y is given by the following equation: where f is the used activation function, w is a vector of the real weight of each input, x.w is a scalar product of the sum of the w with the weights, and  is the inclination, that is, the bias that does not depends on the input value.Then, the sum is the linear combination of the inputs weighted [46].
The sigmoid activation function is widely used, considering that it is a smooth and continuously differentiable function, given by The TanH activation function has similar characteristics to sigmoid [47].The difference between these functions is that the hyperbolic tangent has a range of variation from -1 to 1 as an output, while the sigmoid results only in positive values, calculated from the equation: The softsign activation function has similar characteristics to the TanH activation function, however, the TanH converges exponentially, while the softsign converges polynomially, given by The exponential activation function is given by The ReLU activation function has been widely used by researchers mainly in deep networks [48].The ReLU is nonlinear, so you can copy errors back and have multiple layers of neurons activated.The ReLU activation function is given by One of the advantages of using the ReLU function is that it does not activate all neurons at the same time.With this, if the input is negative, it will be converted to zero and the neuron will not be activated, so only a few neurons are activated, which can make the network more efficient.
The ELU activation function has characteristics similar to the ReLU function.having non-linearity and saturating in the negative part of its domain, being expressed by The softplus activation function is a variation of ReLU.However, softplus is smoother and its derivative gives rise to a logistic function, given by A summary of the structure of the algorithm used is shown in Figure 3.For the training of the network, 600 input images are used, which are convulsed to the completely connected classifier.The images are obtained from the 30 samples, resulting from the use of five insulators with six levels of Kaolin concentration.For each sample, four photos are taken in different views around the insulator, for each of the photos five computer vision techniques are used.
After defining the number of neurons and the activation function of the model, the optimizer is defined.In this paper, we evaluated the optimizers, stochastic gradient descent (SGD), RMSprop, adaptive moment estimation (ADAM), AdaMAX, nesterov accelerated adaptive moment estimate (NADAM), AdaGRAD, and AdaDELTA.
The SGD, updates the network parameters to minimize the loss function [49], taking steps in each iteration (i) towards the negative loss gradient, given by the equation: wherein, E ( i ) is the loss function,  is the learning rate, and  is the vector of the parameters.RMSProp maintains a moving average of the squares of the elements of the parameter gradients and can be calculated as follows: where  2 is the decay rate of the moving average [50].So the algorithm uses the moving average to normalize the updates for each parameter individually, according to The ADAM calculates adaptive learning rates for each parameter [51].The descending averages of the past m i and the squared gradients of the past v i are calculated as follows: Based on the m i and v i parameters, the ADAM optimizer uses moving averages to update the neural network, given by The AdaMAX is an optimizer that can be promising especially in embedded models, being a variant of ADAM based on the infinite standard.A combination of the ADAM optimizer and the Nesterov accelerated gradient result in the NADAM.
The AdaGRAD makes minor updates to parameters associated with very frequent resources and makes important updates to parameters associated with infrequent resources.AdaGRAD optimization can be calculated by the G ∈ R d ×d is a diagonal matrix, where each element is the sum of the squares of the gradients.In these optimizers the  term is used to avoid division by zero.Finally, AdaDELTA is a variation of AdaGRAD that aims to reduce its decreasing learning rate.In the AdaDELTA optimizer, the previous square gradients are restricted to the gradient window to a fixed size, so the current average depends only on the current gradient and the previous average.

Classifier
After the complete definition of the model parameters, the classifier is evaluated.For the evaluation of this paper, 1000 epochs were defined, based on k-fold cross-validation.The Scikit-Learn was used for the classifier, which is applied to numerical computation for the development of deep learning models for machine learning.Cross-validation consists of assessing the generalizability of a model, based on a set of data.Based on this technique, it seeks an estimate how accurate this model is, based on its performance for a new set of data.In cross-validation, the data set partitioning is performed in mutually exclusive subsets, so that part of the subsets are used to train the network and the remaining data is used for testing [52].
The k-fold cross-validation method consists of dividing the total data set into k subsets of the same size and using these for testing and the remaining k-1 for those used to estimate the parameters, calculating the model's accuracy.The process is performed k times alternating the test subset in a circular way, in this article the parameter k was evaluated [53].
In this paper, the classification were evaluated on an Intel Core I5-7400, 20 GB of Random-Access Memory, with Python programming language on a Windows 10 operating system.For the neural network the Numpy, Keras, and Sklearn libraries were used.For the computer vision analysis CV2 and Mahotas libraries were used.For a comparative analysis, the results of the application of well-established models such as supportvector machine (SVM) [54], k-nearest neighbor (k-NN) [55], and ensemble learning methods (Ens) [56] are presented.
To perform the comparisons through benchmarking, the parameters used to configure the network of the other models were the same as the proposed method.The specific optimization of each model could result in better performance in each analysis.This optimization was not performed, the objective of the analysis is to compare the proposed method with standard networks.
A flowchart of the proposed method is presented in Figure 4.The work is divided in three analysis, which are laboratory analysis, computer vision processing, and evaluation of the classification model.In laboratory analyses, the insulators are artificially contaminated, NSDD measurements are made and photographs are taken to record their conditions.In computer vision processing, some image processing techniques are applied to extract contamination characteristics.The evaluation of the classification model is based on the model configuration, on statistical analysis, and finally, on benchmarking.

RESULTS AND DISCUSSION
The first result to be analyzed is the NSDD from the laboratory, based on the Kaolin contamination.For this evaluation,  the six contamination levels of insulators with five insulators each, resulted in a total of 30 samples.The NSDD results are shown in Table 1.
The statistical results of the NSDD are shown in Table 2.These results are used as the basis for conducting the contamination classification.After defining the data to be used for training the network, the process of evaluating the proposed algorithm begins in relation to the characteristics extracted from the processed images.
In this first assessment, the techniques are used separately to carry out the training of the network.The purpose of this assessment is to identify whether all techniques result in an improvement in the accuracy of the algorithm.The results of this assessment are shown in Table 3.For the initial analysis, the SGD optimizer was used, with the ReLU activation function in the intermediate layer, using 10-folds for cross-validation.
The accuracy found from the image processing techniques, resulted in satisfactory values, reaching up to 89.17%, using the Canny edge detector.In most of the analysis performed with image processing techniques, the best results were found using 25 neurons, so this number of neurons was defined as the standard in this paper.
The accuracy for the classification using the pre-processed image, without the application of specific techniques for extracting characteristics, was less than 50% in all variations in the number of neurons.Image pre-processing was applied by converting the RGB photo to grayscale and applying blur.As it results in a low accuracy for classification, these data were not considered in the network training.
Considering that the activation function has an influence on the calculation method of the algorithm and thus there may be variation in accuracy.Table 4 shows the evaluation of the variation in the activation function.Another parameter that is also evaluated is the number of folds used in the crossvalidation process.
The exponential activation function had the worst accuracy results from all variations in the number of folds.The activation function that had the best accuracy was softsign with 91.25% accuracy using eight-folds.This activation function was used for the following simulations.The optimizers were also evaluated, and the parameters that resulted in the best accuracy were used to compare the optimizers.In Table 5, the results of this evaluation are presented from the variation in the number of folds.
As can be seen, the variation in the optimizer has a great impact on the model's accuracy.The AdaDELTA optimizer had unsatisfactory results in all variations in the number of folds, with accuracy less than 51.47.The optimizer ADAM had promising results, being the most stable in relation to the variation of your number of folds, with accuracy greater than 90.83%.The best result was obtained from the use of the NADAM optimizer with eight-folds reaching an accuracy of 97.5%, from this result this configuration was used to evaluate the robustness of the algorithm in relation to the number of simulations.It were performed 50 simulations using the same configuration for statistical analysis.

Statistical analysis
For a complete analysis of the capacity of the proposed algorithm, it is necessary to evaluate the variation of its parameters in relation to several simulations, thus it is possible to determine whether the model maintains its accuracy.Table 6 presents the values of the statistical analysis of 50 simulations from the same configuration.Statistical analysis shows that there is a high variance in the results when 50 simulations are performed.This is because in some of the simulations the resulting accuracy values are low, increasing the variance and standard deviation in the set of responses.Although there is no fully normal distribution of  results, using the proposed algorithm most of the analysis results has high accuracy, as can be seen in Figure 5.
In this case, 38% of the analysis performed resulted in accuracy closer to 95%, showing that in most cases the algorithm achieves the objective of classification.More broadly, 80% of the simulations resulted in accuracy between 92.5% and 97.5%, which means that in most analyses the results are satisfactory for a contamination classification.To finalize the evaluation of the algorithm, a benchmarking is presented in relation to wellestablished classification techniques based on artificial intelligence.

Benchmarking
In this subsection, the results of a benchmarking based on three well-consolidated models are presented.Table 7 shows the results for the compared models.As can be seen in some configurations of this model, the number of folds has no influence on the accuracy results, in some situations, the calculation formula also does not generate large variations in the model's accuracy.This demonstrates that the models are stable for the classification of the problem in question.The best results are found from the models in ensemble subspace discriminant and SVM using the quadratic and cubic functions with 90.91% accuracy for classification.These results are inferior when compared to the proposed method, which has an average accuracy of 93.1% and can reach up to 97.5% in the best case.

Comparisons to other state-of-the-art approaches
Although there are advantages to using specific equipment such as ultrasound, advanced training is usually required for operators [7].Because the detection of audio is carried out in a directional way, it is difficult to be automated, being performed from the ground, making inspection slower.
One of the great difficulties in deep learning approaches for image-based classification is the possibility of incorrect classification due to models consider the background of the image to perform the classification [3].Some authors have carried out specific works to improve this ability, identifying the insulator before carrying out the classification.
Tao et al. [18] achieved a F-score of 0.933 to classify missing insulators.Chen et al. [57] using a modified version of YOLOv3 achieved a F-score of 0.938 and Li et al. [58] reached 0.944 using their method for the equivalent tasks.Despite promising results, these models are used to identify specific failures, such as missing insulators or broken insulators.The contamination issue addressed in this paper requires a more specific model as the visual differences between contamination levels are minor.

CONCLUSION
The techniques of separate computer vision applied in the model result in a satisfactory accuracy for the classification, however, the combination of all the techniques presented in this work results in higher accuracy, in this way the use of more techniques for extraction of characteristics is promising for the classification.The evaluation of the activation function and the optimizer are extremely important for a better classification considering that some optimizers result in low accuracy in the model.The optimizers NADAM and ADAM had the best accuracy results for the classification discussed in this work.
Statistical analysis shows that the model can have a high variance, however, the average result remains high and even in the worst case, the accuracy is acceptable for the classification in question.The average accuracy found from 50 simulations is 93.10%, with 86% of the results being higher than 92.5%, when the normal distribution is evaluated.This result occurs because in the normal distribution, the values are distributed according to their greater proximity to the values defined for each class, which in this case the classes were generated from a variation of 2.5%.
The comparison with other models shows that the proposed algorithm is superior to well-consolidated models like SVM, k-NN, and ensemble learning methods.For the compared models, the best result was 90.91% accurate.The variation in the number of folds did not result in a variation in accuracy in some models evaluated in this comparison.In the future, the classification of the insulator's conditions may be evaluated in the field, considering that the models presented can be used successfully for the classification of contamination.
The use of the proposed model results in a satisfactory accuracy for classification of contamination in insulators, application of this model can be carried out in insulators installed in an external environment.Based on these results, it is possible to perform predictive maintenance of the electrical network and thus improve the reliability of the electricity supply.The NSDD results are grouped according to the concentration of Kaolin used for the analysis.This demonstrates that even with different insulators the result of contamination depends on the concentration of contaminants to which the insulators are exposed.
The analysis presented in this paper can be extended to other insulators profiles.In addition, an evaluation of composite insulators is promising, considering that these materials are being increasingly used in distribution power systems.For future work, analyzes that combine audio signals can be used to improve the ability to identify faults.Thus, the ultrasonic signal can be combined with computer vision techniques, presented in this work, to obtain an improved model.

FIGURE 1
FIGURE 1 Photographs from different perspectives of the contaminated insulator sample: (A) front; (B) right side; (C) back; (D) left side

FIGURE 3
FIGURE 3 Summary of the structure of the proposed algorithm

FIGURE 4
FIGURE 4 Flowchart of the proposed method

FIGURE 5
FIGURE 5 Assessment of the normal distribution of results

TABLE 1 NSDD
variation according to Kaolin concentration NSDD by sample (mg/cm 2 ) K a o l i n( g / l )

TABLE 2
Results of statistical analysis for the NSDD

TABLE 3
Variation of neurons using different computer vision techniques

TABLE 4
Results of folds variation using different activation functions

TABLE 5
Results of folds variation using different optimizers

TABLE 6
Results of statistical analysis for the classification