Method and system for predicting contamination degree of insulator based on computer vision
Through computer vision technology and weakly supervised distillation learning algorithm combined with hidden Markov model, the problem of small detection range and low accuracy in insulator filth detection technology is solved, and more accurate and efficient detection of filth degree is achieved to adapt to different environments and equipment Reduce operation and maintenance costs.
Patent Information
- Application Number
- CN202411193956.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-28
- Publication Date
- 2024-12-20
AI Technical Summary
The existing insulator pollution detection technology has problems such as small detection range, low accuracy, small data set size and limited generalization capabilities, which leads to unstable and inaccurate detection results and cannot meet the personalized needs of different environments and equipment.
Adopting a weakly supervised distillation learning algorithm framework based on computer vision, combined with the hidden Markov chain model, automatically obtain insulator information through video analysis, identify and locate dirty areas, consider scene differences characteristics, improve the generalization ability of dirty degree detection, and provide more Intelligent operation and maintenance suggestions.
It realizes more accurate detection of insulator filth, reduces the number of manual operation and maintenance times, reduces operation and maintenance costs, improves work efficiency and detection reliability, and adapts to the personalized needs of different environments and equipment.
Smart Images

Figure CN119168958A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of insulator contamination detection, and in particular to a method and system for predicting the contamination degree of an insulator based on computer vision. Background Art
[0002] Insulators play an important role in ensuring the safety of transmission lines. The function of this equipment determines that it has to work in the atmospheric environment for a long time, so various dust particles in the air are also very easy to accumulate on the surface. The dust that falls on its surface merges with water under weather conditions with high air humidity, forming a conductive water film on the surface of the insulator, which will gradually weaken the insulation performance of the insulator and cause power grid accidents. In order to meet this challenge, insulator contamination detection technology has attracted much attention. However, this technology faces many technical and market difficulties in the process of promotion and application: First, due to the long time and low accuracy of manual inspection, the detection range is generally small and cannot meet widespread needs; second, the limitations of detection technology make manual inspection significantly lower than actual needs in terms of accuracy and efficiency; finally, the lagging construction of insulator pollution data sets has led to the current detection accuracy being significantly insufficient.
[0003] In the prior art, there are some technical challenges and limitations in the field of insulator pollution detection based on computer vision: the size of the public insulator pollution detection dataset is relatively small, and the number of samples is limited. This situation restricts the generalization ability of the existing models in actual usage scenarios, making the detection results unstable and unreliable. Lack of personalized models. Existing insulator pollution detection models often lack features that consider different environmental conditions and equipment characteristics, resulting in the detection results may not meet the personalized needs of different scenarios. This may cause inaccurate detection in practical applications. The generalization ability of existing models is limited. In specific environments, some existing models may perform well, but may perform poorly in different environments or new datasets, and lack good generalization ability. This limits the reliability and scalability of these models in practical applications.
[0004] Therefore, in order to solve the above technical problems, it is urgent to propose a new technical means. Summary of the invention
[0005] In view of this, the purpose of the present invention is to provide a method and system for predicting the degree of insulator contamination based on computer vision. In the scenario of insulator inspection and operation, compared with the traditional general insulator identification model, the insulator identification and positioning results obtained by using the algorithm framework of weakly supervised distillation learning take into account the characteristic information of scene differences, and the obtained insulator identification and positioning results specifically include invisible pollution sources in different scenes; by combining the two modal inputs of insulator pollution type and pollution degree into the hidden Markov chain, the generalization ability of contamination degree detection is further improved, which helps to more accurately understand the main components of insulator contamination and the degree of damage, thereby providing more intelligent operation and maintenance suggestions. Unlike the traditional contamination detection model based on CNN or VIT, the present invention can obtain and process insulator information in real time; compared with the traditional insulator contamination judgment suggestion method, the present invention does not require complex user input or settings. It automatically obtains necessary information through video analysis, making intelligent detection of contamination levels more convenient and user-friendly. This also means that insulator operation and maintenance recommendations can be dynamically adjusted as the status of the insulator changes to better meet its needs. By pushing more accurate contamination levels, unnecessary manual operation and maintenance times can be reduced, thereby reducing labor costs, helping to improve work efficiency and optimize operation and maintenance costs.
[0006] The present invention provides a method for predicting the degree of insulator contamination based on computer vision, comprising the following steps:
[0007] S1. Obtain the original video of the insulator and preprocess it to obtain an insulator image dataset;
[0008] S2: Use the trained weakly supervised distillation learning neural network to extract the insulator image dataset and obtain the insulator recognition and positioning results;
[0009] S3: Use hyperspectral and HSV color gamut detection algorithms to calculate the insulator and obtain the pollution type;
[0010] S4: Use KNN clustering algorithm to calculate different types of insulators to obtain the degree of contamination;
[0011] S5: Construct a hidden Markov model and input the insulator contamination type results and contamination degree results into the hidden Markov model for processing to obtain a prediction result of the comprehensive score of the insulator contamination degree.
[0012] Furthermore, the process of constructing a hidden Markov model includes:
[0013] Determine the observation sequence O = (O1, ...O T ), O T represents the state of the model at time T, then the state of the model at time t is represented by O t , t∈T;
[0014] The two states of insulator contamination degree and contamination type are defined as implicit states, and the implicit state at time t is represented by q t , then q t ∈[S1,...S N ], S1-S N Represents N hidden states;
[0015] Determine the hidden Markov model state probability distribution matrix A, A = {a ij}, a ij represents the probability of going from the i-th state to the j-th state, then at any time t, we have:
[0016] a ij =P[q t+1 =S j |q t =S i ], 1≤N, j≤N
[0017] The insulator image positioning recognition results and N pollution types are used as observation state parameters; the hidden Markov model observation probability distribution matrix B is determined, B = {b j (O)},b j (O) represents the random observation output probability of state j:
[0018] b j (0) = P[O t |q t =S j ], 1≤j≤N
[0019] The initial state probability distribution is determined to be π1=P(q1=S1), where π1 represents the observation probability of the initial hidden state q1.
[0020] Furthermore, the weakly supervised distillation learning neural network includes a teacher network and a student network; the training process of the weakly supervised distillation learning neural network includes:
[0021] Obtain a training insulator dataset with hard labels, use the training insulator dataset to train the teacher network, and obtain a trained initial teacher network;
[0022] Input the preprocessed insulator image dataset into the initial teacher network and output the initial insulator recognition result;
[0023] The student network is trained using the training insulator data set to obtain a trained initial student network;
[0024] The initial insulator recognition results are used as soft labels, and the preprocessed insulator image dataset is used to train the initial student network, and the final insulator recognition and positioning results are output;
[0025] The loss function of the weakly supervised distillation learning neural network is calculated, and the network parameters are adjusted according to the loss function to obtain a trained weakly supervised distillation learning neural network.
[0026] Furthermore, the loss function of the weakly supervised distillation learning neural network is:
[0027] Loss all =0.8CeLoss hardlabel +0.2CeLoss softlabel
[0028] Among them, Loss all Represents the total loss of the weakly supervised distillation learning neural network, CeLoss hardlabel Represents the total loss of the student network trained on the insulator dataset, CeLoss softlabel Total loss for training the student network for the preprocessed insulator image dataset.
[0029] Furthermore, the teacher network includes a SpectFormer network and a SA-Attention module; and the student network is a SpectFormer network.
[0030] Furthermore, the process of preprocessing the original video stream of the insulator includes:
[0031] S11: extracting an image frame completely including the insulators under the distribution network from the original video stream;
[0032] S12: performing full image matching denoising processing on each frame of image to obtain an insulator image data set; the process of performing full image matching denoising processing on each frame of image includes:
[0033] S121: setting a search box size S, obtaining multiple pixel blocks according to the search box, and calculating the similarity between every two pixel blocks;
[0034] S122: Calculating the weight of every two pixel blocks according to the similarity between every two pixel blocks;
[0035] S123: Calculate the denoised pixel according to the weights of the pixel block centered on the pixel and the pixel blocks centered on other pixels and the pixel values of other pixels, and then obtain the denoised image frame.
[0036] Furthermore, the hyperspectral and HSV color gamut detection algorithm includes an encoder, a decoder and a key point regressor; the encoder includes 1 two-dimensional convolution layer and 15 Bneck layers; the decoder is composed of two upsampling blocks; the key point regressor is a convolution layer with a convolution kernel size of 1×1;
[0037] The upsampling block includes spatial transposed convolution, 1X 1 convolution and attention module.
[0038] Furthermore, the process of obtaining the insulator contamination type positioning result includes: inputting the preprocessed insulator image data set into the teacher network in the weakly supervised distillation learning neural network for processing to obtain an insulator feature map; performing gradient backpropagation processing on the insulator feature map to obtain an insulator heat map; and diffusing the insulator heat map into a rectangular area 1.3 times the size as the insulator positioning result.
[0039] Accordingly, the present invention also provides an insulator contamination degree prediction system based on computer vision, comprising: a data preprocessing module, an insulator identification and positioning module, a contamination type and degree detection module, and a contamination comprehensive degree scoring module;
[0040] The data preprocessing module is used to obtain the original video stream of the insulator and preprocess it to obtain an insulator image data set;
[0041] The insulator recognition module is used to generate an insulator image recognition and positioning result according to the preprocessed insulator image data set;
[0042] The contamination type and degree detection module is used to generate the contamination type and the corresponding contamination degree according to the insulator image data set;
[0043] The pollution degree comprehensive scoring module is used to obtain the insulator pollution degree prediction result by inputting the insulator pollution type and the corresponding pollution degree according to the hidden Markov model.
[0044] Beneficial effects of the present invention: Through the present invention, in the scenario of insulator inspection and operation, compared with the traditional general insulator identification model, the insulator identification and positioning results obtained by using the weakly supervised distillation learning algorithm framework take into account the characteristic information of scene differences, and the obtained insulator identification and positioning results specifically include invisible pollution sources in different scenes; by combining the two modal inputs of insulator pollution type and pollution degree into the hidden Markov chain, the generalization ability of pollution degree detection is further improved, which helps to more accurately understand the main pollution components and damage degree of the insulator, thereby providing more intelligent operation and maintenance suggestions. Unlike the traditional pollution detection model based on CNN or VIT, the present invention can obtain and process the information of the insulator in real time; compared with the traditional insulator pollution judgment suggestion method, the present invention does not require complex user input or settings. It automatically obtains necessary information through video analysis, making intelligent detection of contamination levels more convenient and user-friendly. This also means that insulator operation and maintenance recommendations can be dynamically adjusted as the status of the insulator changes to better meet its needs. By pushing more accurate contamination levels, unnecessary manual operation and maintenance times can be reduced, thereby reducing labor costs, helping to improve work efficiency and optimize operation and maintenance costs. BRIEF DESCRIPTION OF THE DRAWINGS
[0045] The present invention will be further described below in conjunction with the accompanying drawings and embodiments:
[0046] Figure 1 It is a flow chart of the present invention.
[0047] Figure 2 Schematic diagram of the weakly supervised distillation learning neural network of the present invention.
[0048] Figure 3 This is a schematic diagram of the Bneck layer structure of the present invention. DETAILED DESCRIPTION
[0049] The invention is further described in detail below:
[0050] The present invention provides a method for predicting the degree of insulator contamination based on computer vision, such as Figure 1 As shown: the following steps are included:
[0051] S1: Obtain the original video stream of the insulator captured by the drone and preprocess it to obtain the image dataset of the insulator captured by the drone.
[0052] The original video stream of insulators captured by drones is obtained in real time through the monitoring facilities installed in the power supply bureau's management area; the original video stream is pre-processed, including:
[0053] S11: Extracting image frames of a complete insulator string from the original video stream.
[0054] S12: Perform full image matching and denoising processing on each frame of the image to obtain a dataset of insulator images captured by a drone.
[0055] The process of performing full image matching denoising on each frame of image includes:
[0056] S121: setting a search box size S, obtaining multiple pixel blocks according to the search box, and calculating the similarity between every two pixel blocks.
[0057] Set the search box size S, scan the image according to the size of the search box, and get all pixel blocks; define two pixel blocks B(x) and B(y) to represent pixel blocks of size S centered on x and y, respectively, where x and y are the centers of the two pixel blocks. Similarity measurement is usually measured by the difference between Gaussian weighted pixels. The formula for calculating similarity is:
[0058]
[0059] Wherein, Similarity(x, y) represents the similarity between a pixel block B(x) centered at pixel I(x) and of size S and a pixel block B(y) centered at pixel I(y) and of size S, h is a parameter that controls the similarity weight, p is the pixel position within the pixel block B(x), I(p) is the pixel value at position p, and I(p+yx) is the pixel value in B(y) corresponding to p in B(x).
[0060] S122: Calculate the weight of every two pixel blocks according to the similarity between every two pixel blocks.
[0061] Calculate the similarity weights between each pixel block B(y) and the pixel block centered on the pixel to be denoised I(x). These weights will be used for weighted averaging to estimate the pixel value. The formula for calculating the weights of two pixels is:
[0062]
[0063] Among them, Weight(x, y) represents the weight of the pixel block B(x) with size S centered on pixel I(x) and the pixel block B(y) with size S centered on pixel I(y), T represents the set of pixel blocks in the image frame, SImilarity(x, z) represents the weight of the pixel block B(x) with size S centered on pixel I(x) and the pixel block B(z) with size S centered on pixel I(z).
[0064] S123: Calculate the denoised pixel according to the weights of the pixel block centered on the pixel and the pixel blocks centered on other pixels and the pixel values of other pixels, and then obtain the denoised image frame.
[0065] Use the weights to perform weighted averaging to estimate the pixel value, i.e. the denoised pixel value. For each pixel I(x), use the weights to estimate it:
[0066]
[0067] in, represents the denoised pixel x, Weight(x, y) represents the weights of the pixel block B(x) with size S centered on pixel x and the pixel block B(y) with size S centered on pixel y, I(y) represents the pixel value of pixel y, and P represents the pixel set of the image frame.
[0068] Through the above denoising process, the information of similar areas in the image is used to reduce noise and retain image details. By calculating the similarity, weight and weighted average, the denoised insulator image with a size of B*3*224*224 is finally obtained.
[0069] S2: Use the trained weakly supervised distillation learning neural network to process the drone-captured insulator image dataset to obtain the insulator image recognition and positioning results.
[0070] like Figure 2 As shown in FIG. 1 , the weakly supervised distillation learning neural network includes a teacher network and a student network; the training process of the weakly supervised distillation learning neural network includes:
[0071] Obtain a training insulator dataset with hard labels. Preferably, obtain a publicly labeled RAF insulator dataset on the Internet, input the insulator dataset into the teacher network to learn the network weight parameters, and obtain a trained initial teacher network. Specifically:
[0072] The teacher network includes the SpectFormer network and the SA-Attention (SA attention mechanism) module. SpectFormer is a deep convolutional neural network with a structure including convolutional layers, residual blocks, pooling layers, global average pooling, and fully connected layers. It allows very deep networks, which helps to learn more complex features. The use of residual blocks to solve the gradient problem can improve training efficiency. The SA-Attention module learns spatial relationships with directional information through nonlinear mapping of different directional dimensions of the feature map space. By focusing on the output of the convolutional layer between channels, it learns the importance of each channel for a specific task, which helps the network better select and utilize important feature channels.
[0073] The process of the teacher network processing the input RAF dataset (size B*3*224*224, B refers to the number of images in a batch for each input training, RGB=3, length*width is 224*224) includes: the dataset passes through SpectFormer to obtain the Feature Map feature map, the feature map undergoes two convolution operations of Patch extraction, and the feature map size becomes B*512*64. The feature map then passes through the SA-Attention mechanism to obtain the expression classification result of the dataset; the loss is calculated based on the expression classification result and the hard label, and the network parameters are adjusted based on the loss to obtain the trained initial teacher network.
[0074] The real-time drone-captured insulator image dataset is input into the initial teacher network, and the initial insulator prediction results are output.
[0075] The student network is the SpectFormer network, and the training insulator dataset is used to train the student network to obtain a trained initial student network.
[0076] The initial insulator prediction results are used as soft labels, and the UAV captured insulator image dataset is used to train the initial student network to output the final insulator prediction results.
[0077] Calculate the loss function of the weakly supervised distillation learning neural network, and adjust the network parameters according to the loss function to obtain the trained weakly supervised distillation learning neural network. The loss function of the weakly supervised distillation learning neural network is:
[0078] Loss all =0.8CeLoss hardlabel +0.2CeLoss softlabel
[0079] Among them, Loss all Represents the total loss of the weakly supervised distillation learning neural network, CeLoss hardlabel Represents the total loss of the student network trained on the insulator dataset, CeLoss softlabel Total loss of the student network trained on the UAV captured insulator image dataset.
[0080] CeLoss hardlabel and CeLoss softlabel They are all cross entropy losses, and the calculation formula is:
[0081]
[0082] n represents the total number of predicted insulator identification and positioning results. In the present invention, n=7; y iThe true label of the insulator recognition and positioning result, that is, whether the expression classification of the image belongs to the i-th category, if yes, it is 1, otherwise it is 0; p i Represents the predicted probability vector of the model, that is, the probability that the expression in the image belongs to the i-th category.
[0083] The trained weakly supervised distillation learning neural network is used to process the insulator image dataset captured by UAV, and the insulator image positioning and recognition results can be obtained.
[0084] For the insulator pollution type positioning result, the drone captured insulator image dataset is input into the teacher network in the weakly supervised distillation learning neural network for processing to obtain the insulator feature map; specifically, the drone captured insulator image dataset is processed by the SA-Attention module of the trained student network to obtain the insulator feature map of size B*C*8*8. The weight of each pixel in these insulator feature maps represents the size of interest in the insulator; the C*8*8 insulator feature map is processed by gradient back propagation (Grad-CAM algorithm) to obtain the insulator heat map corresponding to the original image of size 224*224; the insulator heat map is diffused into a rectangular area of 1.3 times the size as the insulator pollution type positioning result.
[0085] The process of gradient back propagation of the insulator feature map includes:
[0086] Calculate the predicted highest insulator identification and positioning result probability y in the output feature map of the SA-Attention module c The partial derivative relative to the feature map gives the influence of each spatial position in the feature map:
[0087]
[0088] in, represents the weight of the kth channel of the feature layer A for expression category c, y c represents the predicted probability value of expression classification c, Represents the data of feature layer A at coordinate i, j in channel k; Z represents the width × height of the feature layer, which is 8*8 here.
[0089] By accumulating the sum of the partial derivatives of each channel position of the feature map, averaging it, and passing it through the Relu activation function, we finally get a heat map of the same size as the input image:
[0090]
[0091] Among them, A k Represents the data of the kth channel in feature layer A, where A is the feature layer output after CA_Attention, with a total of 7 channels.
[0092] In short, we only need to use the insulator identification and positioning results predicted by the student network as the c input of the above formula and perform gradient backpropagation to obtain the insulator heat map. The area with large weights in the heat map represents the insulator area that plays a decisive role in the corresponding prediction probability.
[0093] S3: The hyperspectral and HSV color gamut detection algorithms are used to calculate the insulators to obtain the pollution type, and the KNN clustering algorithm is used to process the insulators to obtain the pollution degree.
[0094] Preferably, the hyperspectral and HSV color gamut detection algorithm includes an encoder, a decoder and a key point regressor; the encoder includes 1 two-dimensional convolution layer and 15 Bneck layers.
[0095] The decoder consists of two upsampling blocks (LPBs). In order to reduce the amount of calculation and parameters while maintaining the effect of transposed convolution, the present invention designs a lightweight upsampling block. It consists of three parts: spatial transposed convolution (Depthwise Transpose Convolution), 1X 1 convolution and attention module. Specifically, the low-dimensional information is expanded to high-dimensional information through 1X1 point convolution, and spatial transposed convolution is used for each channel of the feature map for spatial transformation, and then 1X1 point convolution is used to fuse the information between the channels and compress the high-dimensional information to the original input dimension.
[0096] The traditional transposed matrix parameter is: C in ×C out ×K×K, K is the kernel size of the traditional transposed convolution. The number of parameters of LPB is: C * ×K×K+C in ×C * ×1×1+C out ×C * ×1×1, C * is the number of channels of high-dimensional features.
[0097] The keypoint regressor is a convolutional layer with a kernel size of 1×1.
[0098] The parameters of the hyperspectral and HSV color gamut detection algorithms are shown in the following table:
[0099] Table 1 Hyperspectral and HSV color gamut detection algorithm parameters
[0100]
[0101]
[0102] In Table 1, the structure of bneck is as follows Figure 3As shown in the figure, Input channel represents the number of input channels, Input size represents the size of the input, exp size represents the number of expanded channels in the module, out represents the number of output channels, Attention represents the SE attention module, NL represents the type of nonlinear activation function used, HS represents the h-swish activation function, RE represents the Relu activation function, and LPB represents the upsampling block.
[0103] The insulator positioning result is adjusted to 256*192 size; it is input into the hyperspectral and HSV color gamut detection algorithm for processing to obtain the insulator contamination type;
[0104] The KNN clustering algorithm is used to process the insulators with determined pollution types to obtain the pollution degree. Preferably, there are 14 pollution types in the present invention.
[0105] S4: Construct a hidden Markov model and input the insulator contamination type and contamination degree into the hidden Markov model for processing to obtain the prediction result of the comprehensive contamination degree of the insulator captured by the drone.
[0106] Hidden Markov Model is a statistical model, which is mainly used to describe a Markov process with hidden state unknown parameters. The process is a double random process, one of which cannot be directly observed and is described by the state transition probability matrix. The other random process outputs observable observation symbols, which are defined by the output probability. Its application is to identify the internal invisible state from the external observation sequence, that is, to determine the implicit parameters of the process from the observable parameters. The comprehensive pollution degree under different pollution source states in the insulator is unobservable, but the pollution type caused by the insulator pollution source and the state information of the pollution degree of the corresponding pollution type are observable, that is, the comprehensive pollution degree prediction is essentially to use the observable insulator characterization parameter information to predict the comprehensive pollution degree of the insulator that is difficult to subjectively evaluate. At the same time, the double random process characteristics of the hidden Markov model are also very consistent with the characteristics of the pollution degree of the insulator exposed in different environments. Therefore, the present invention adopts the hidden Markov model to construct an insulator comprehensive pollution degree prediction model.
[0107] The process of building a hidden Markov model involves:
[0108] Determine the observation sequence O = (O1, ...O T ), O T represents the state of the model at time T, then the state of the model at time t is represented by O t , t∈T; Specifically: convert the insulator classification results into corresponding category index values, convert the 14 pollution types into one-dimensional coordinate vectors (X, Y), and splice them into the observation matrix
[0109] O[Class_index,X1,Y1,X2,Y2.....X14,Y14], the observation matrix O1,O2,O3....OT at each moment constitutes the observation sequence O=(O1,...O T ).
[0110] The two states of insulator contamination type and contamination degree are defined as implicit states, and the implicit state at time t is represented by q t , then q t ∈[S1,...S N ], S1-S N Represents N hidden states; in the present invention, N=2.
[0111] Determine the hidden Markov model state probability distribution matrix A, A = {a ij}, a ij represents the probability of going from the i-th state to the j-th state, then at any time t, we have:
[0112] a ij =P[q t+1 =S j |q t =S i ], 1≤N, j≤N
[0113] Specifically: add the HMM toolbox to MATLAB, use MATLAB programming to batch import 300 sets of learning training samples to train the HMM model, and then learn the lane change data model parameters obtained by training: finally get the hidden Markov model state probability distribution matrix A, A = {a ij}.
[0114] The insulator image positioning and recognition results and 14 pollution types are used as observation state parameters; the hidden Markov model observation probability distribution matrix B is determined, B = {b j (O)},b j (O) represents the random observation output probability of state j:
[0115] b j (0) = P[O t |q t =S j ], 1≤j≤N
[0116] The initial state probability distribution is determined to be π1 = P(q1 = S1), where π1 represents the observation probability of the initial hidden state q1. Since the initial value selection has little effect on the final convergence result of the HMM model training, it can be initialized by random or uniform value selection under the condition of satisfying the Markov chain. Preferably, the mean method is used to obtain
[0117] According to the initial state probability distribution, state transition probability distribution, and observation probability distribution determined in the above steps, the hidden Markov model is simplified into a triple: λ=(π, A, B).
[0118] The hidden Markov model is trained through training data, and the model parameters are adjusted through repeated iterations and step-by-step refinement, so that the parameters are finally stabilized at an acceptable accuracy. That is, the HMM uses the forward-backward algorithm (Forward-Backward Algorithm) iterative solution method to train the model. The real-time insulator contamination type recognition results and the corresponding contamination level are input into the hidden Markov model, and the hidden Markov model is solved to obtain the contamination level prediction results of the insulator captured by the drone.
[0119] The present invention also proposes a computer vision insulator contamination degree prediction system, which can execute the above-mentioned computer vision insulator contamination degree prediction method; comprising: a data preprocessing module, an insulator identification and positioning module, a contamination type and degree detection module, and a contamination comprehensive degree scoring module;
[0120] The data preprocessing module is used to obtain the original video stream of the insulator captured by the drone and preprocess it to obtain the image data set of the insulator captured by the drone;
[0121] The insulator recognition module is used to generate an insulator image recognition and positioning result based on the insulator image data set pre-processed after being captured by the drone;
[0122] The contamination type and degree detection module is used to generate the contamination type and the corresponding contamination degree according to the pre-processed insulator image data set captured by the drone;
[0123] The contamination degree comprehensive scoring module is used to obtain the prediction result of the insulator contamination degree captured by the drone according to the hidden Markov model by inputting the insulator contamination type and the corresponding contamination degree.
[0124] Finally, it should be noted that the above embodiments are only used to illustrate the technical solution of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solution of the present invention can be modified or replaced by equivalents without departing from the purpose and scope of the technical solution of the present invention, which should be included in the scope of the claims of the present invention.
Claims
1. A method for predicting the degree of insulator contamination based on computer vision. Features: The following steps are involved: S1. Obtain the original video of the insulator and preprocess it to obtain an insulator image dataset; S2: Use the trained weakly supervised distillation learning neural network to extract the insulator image dataset and obtain the insulator recognition and positioning results; S3: Use hyperspectral and HSV color gamut detection algorithms to calculate the insulator and obtain the pollution type; S4: Use KNN clustering algorithm to calculate different types of insulators to obtain the degree of contamination; S5: Construct a hidden Markov model and input the insulator contamination type results and contamination degree results into the hidden Markov model for processing to obtain a prediction result of the comprehensive score of the insulator contamination degree.
2. According to the computer vision-based insulator contamination degree prediction method of claim 1, Features: The process of building a hidden Markov model involves: Determine the observation sequence O = (O 1 , ... T ), O T represents the state of the model at time T, then the state of the model at time t is represented by O t , t∈T; The two states of insulator contamination degree and contamination type are defined as implicit states, and the implicit state at time t is represented by q t , then q t ∈[S 1 , ...S N ],S 1 -S N Represents N hidden states; Determine the hidden Markov model state probability distribution matrix A, A = {a ij }, a ij represents the probability of going from the i-th state to the j-th state, then at any time t, we have: a ij =P[q t+1 =S j |q t =S i ],1≤N,j≤N The insulator image positioning recognition results and N pollution types are used as observation state parameters; the hidden Markov model observation probability distribution matrix B is determined, B = {b j (O)},b j (O) represents the random observation output probability of state j: b j (0)=P[O t |Q t =S j ],1≤j≤N Determine the initial state probability distribution as π 1 =P(q 1 =S 1 ), π 1 represents the initial hidden state q 1 The probability of observation.
3. According to the computer vision-based insulator contamination degree prediction method of claim 1, Features: The weakly supervised distillation learning neural network includes a teacher network and a student network; the training process of the weakly supervised distillation learning neural network includes: Obtain a training insulator dataset with hard labels, use the training insulator dataset to train the teacher network, and obtain a trained initial teacher network; Input the preprocessed insulator image dataset into the initial teacher network and output the initial insulator recognition result; The student network is trained using the training insulator data set to obtain a trained initial student network; The initial insulator recognition result is used as a soft label, and the preprocessed insulator image dataset is used to train the initial student network to output the final insulator recognition and positioning results; The loss function of the weakly supervised distillation learning neural network is calculated, and the network parameters are adjusted according to the loss function to obtain a trained weakly supervised distillation learning neural network.
4. According to the computer vision-based insulator contamination degree prediction method of claim 3, Features: The loss function of the weakly supervised distillation learning neural network is: Loss all =0.8CeLoss hardlabel +0.2CeLoss softlabel Among them, Loss all Represents the total loss of the weakly supervised distillation learning neural network, CeLoss hardlabel Represents the total loss of the student network trained on the insulator dataset, CeLoss softlabel Total loss for training the student network for the preprocessed insulator image dataset.
5. According to the computer vision-based insulator contamination degree prediction method of claim 3, Features: The teacher network includes a SpectFormer network and a SA-Attention module; the student network is a SpectFormer network.
6. According to the computer vision-based insulator contamination degree prediction method of claim 1, Features: The process of preprocessing the original video stream of the insulator includes: S11: extracting an image frame completely including the insulators under the distribution network from the original video stream; S12: performing full image matching denoising processing on each frame of image to obtain an insulator image data set; the process of performing full image matching denoising processing on each frame of image includes: S121: setting a search box size S, obtaining multiple pixel blocks according to the search box, and calculating the similarity between every two pixel blocks; S122: Calculating the weight of every two pixel blocks according to the similarity between every two pixel blocks; S123: Calculate the denoised pixel according to the weights of the pixel block centered on the pixel and the pixel blocks centered on other pixels and the pixel values of other pixels, and then obtain the denoised image frame.
7. According to the computer vision-based insulator contamination degree prediction method of claim 1, Features: The hyperspectral and HSV color gamut detection algorithm includes an encoder, a decoder and a key point regressor; the encoder includes 1 two-dimensional convolution layer and 15 Bneck layers; the decoder is composed of two upsampling blocks; the key point regressor is a convolution layer with a convolution kernel size of 1×1; The upsampling block includes spatial transposed convolution, 1X1 convolution and attention module.
8. According to the computer vision-based insulator contamination degree prediction method of claim 1, Features: The process of obtaining the insulator contamination type positioning result includes: inputting the preprocessed insulator image data set into the teacher network in the weakly supervised distillation learning neural network for processing to obtain the insulator feature map; performing gradient backpropagation processing on the insulator feature map to obtain the insulator heat map; and diffusing the insulator heat map into a rectangular area 1.3 times the size as the insulator positioning result.
9. Insulator contamination degree prediction system based on computer vision, It is characterized in that include: Data preprocessing module, insulator identification and positioning module, pollution type and degree detection module, pollution comprehensive degree scoring module; The data preprocessing module is used to obtain the original video stream of the insulator and preprocess it to obtain an insulator image data set; The insulator recognition module is used to generate an insulator image recognition and positioning result according to the preprocessed insulator image data set; The contamination type and degree detection module is used to generate the contamination type and the corresponding contamination degree according to the insulator image data set; The pollution degree comprehensive scoring module is used to obtain the insulator pollution degree prediction result by inputting the insulator pollution type and the corresponding pollution degree according to the hidden Markov model.
Citation Information
Cited By
Insulator pollution degree classification method based on double-attention multi-scale enhancement network
CN121305231A
