CNN-SVM-based distribution network equipment infrared image identification method and system
By employing a CNN-SVM-based image recognition method, utilizing wavelet denoising and Otsu segmentation, and combining deep convolutional neural networks and support vector machine classifiers, the problem of low efficiency in infrared image recognition of power distribution equipment was solved, enabling fast and accurate fault identification and improving the stability of the power distribution system.
Patent Information
- Application Number
- CN202410933760.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-12
- Publication Date
- 2024-11-12
AI Technical Summary
In existing technologies, infrared image recognition of power distribution network equipment is inefficient and makes it difficult to quickly and accurately identify early thermal faults. This results in high costs and low efficiency for manual inspections, affecting the stable operation of the power distribution system.
An image recognition method based on CNN-SVM is adopted. Infrared images are processed by wavelet denoising and Otsu segmentation. A deep convolutional neural network and support vector machine classifier are combined to establish an image recognition model, which can achieve fast and accurate fault identification.
It enables rapid and accurate identification of infrared images of power distribution equipment, reduces the cost of manual inspection, improves the efficiency of fault resolution, and ensures the stable operation of the power distribution system.
Smart Images

Figure CN118942026A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of power distribution fault monitoring, and more specifically, relates to a CNN-SVM based distribution network equipment infrared image recognition method and system. Background Art
[0002] With the increasing demand for electricity and the continuous expansion of the power grid, the distribution system, as the end of the power system, has a direct impact on the user's power demand if its operating status is stable. Distribution network equipment is affected by factors such as high-load operation, continuous aging of equipment materials, and severe weather, and distribution network failures occur from time to time. Before distribution network equipment fails, there are often abnormal temperatures. Therefore, accurate identification of infrared images of distribution network equipment plays a vital role in preventing power grid failures.
[0003] Infrared detection technology is one of the important means of status detection of power equipment. Compared with conventional detection technology, infrared detection technology has the advantages of no power outage, no sampling, no contact, high detection efficiency, safe operation, and high sensitivity. By capturing the infrared radiation of the equipment and obtaining the infrared image of the equipment, professionals can judge the operating status of the equipment based on this. Although infrared detection technology has been widely used in status monitoring and thermal fault diagnosis of distribution network equipment, it is still common in China for operation and maintenance personnel to conduct regular inspections using handheld infrared thermal imagers, which is inefficient and requires operation and maintenance personnel to have certain professional knowledge. It is often difficult to detect early thermal faults of certain equipment through a single infrared image. Summary of the invention
[0004] In order to solve the problems existing in the prior art, the purpose of the present invention is to provide a distribution network equipment infrared image recognition method and system based on CNN-SVM, which is used to solve the problem that the prior art cannot quickly and accurately identify the infrared image of the distribution network equipment, and quickly determine whether the distribution network equipment has an early thermal failure, thereby reducing the cost of manual inspection and maintenance, which is of great significance to the safe and stable operation of the distribution system.
[0005] To achieve the above object, according to a first aspect of the present invention, a distribution network equipment infrared image recognition method based on CNN-SVM includes:
[0006] Step S1, obtaining a distribution network equipment infrared image dataset, performing denoising and segmentation processing on the distribution network equipment infrared image, and after processing, dividing the distribution network equipment infrared image dataset into normal operating state samples and fault samples and setting different labels for each, and at the same time dividing the normal operating state samples and the fault samples into a training set, a test set and a validation set;
[0007] Step S2, establishing a CNN-SVM image recognition model. The network architecture of the CNN-SVM image recognition model includes sequentially arranged convolutional layers, deep residual shrinkage networks, BN layers, activation layers, pooling layers, GAP layers and SVM classifiers. The infrared image of the distribution network equipment after denoising and segmentation is input into the model, and after convolution, soft thresholding, normalization and activation operations, it enters the pooling layer. After two consecutive operations, it is passed to the GAP layer for global average pooling. Finally, the GAP layer features are passed into the SVM classifier for fault identification.
[0008] Step S3, using the infrared image data of the distribution network equipment in step S1 to train and test the model. In the training stage, the gradient descent algorithm is used to perform back propagation. At the same time, the accuracy is verified using the validation set data. The training process reaches the preset iteration rounds, and the accuracy of the model meets the preset expected standard. The optimal hyperparameters and corresponding weight configurations of the model at this time will be saved. If the above conditions are not met, the initial parameters of the model will be adjusted accordingly to seek the optimal model performance; the saved parameters are migrated to the CNN-SVM image recognition model, and the SVM classifier is trained using the output features and sample labels of the GAP layer;
[0009] The test set is input into the trained CNN-SVM image recognition model to output the fault diagnosis results. Then, the previously saved parameters are transferred to the CNN-SVM image recognition model, and the output features of the GAP layer are used to perform targeted training on the SVM classifier. Targeted training uses the output feature information of the sample and the label corresponding to the sample as the training data of the SVM classifier to train the model.
[0010] Step S4, using the infrared image data of the distribution network equipment in the verification set to test the accuracy of the model;
[0011] Step S5: Use the trained CNN-SVM image recognition model to recognize the infrared image of the distribution network equipment.
[0012] According to a specific embodiment of the present invention, in step S1, the infrared image of the distribution network equipment is denoised using a wavelet denoising method.
[0013] According to a specific implementation of the present invention, in step S1, Otsu segmentation method is used for segmentation processing.
[0014] Furthermore, the infrared image recognition method for distribution network equipment based on CNN-SVM, step S2 specifically includes:
[0015] (1) The convolution layer extracts features from the input infrared image data of the distribution network equipment. The convolution operation formula is as follows:
[0016] Where: Represents the i-th feature map output by the k-th layer; is the weight value of the i-th convolution in the k-th layer; represents the convolution operator; N represents the jth feature map output by the k-1th layer; k-1 Output feature map set for the k-1th layer; is the bias term of the i-th convolution in the k-th layer;
[0017] (2) Use a deep residual shrinkage network to perform soft thresholding on feature data so that each feature can generate its own independent threshold;
[0018] (3) After soft thresholding, the infrared image feature data extracted by the convolution layer is subjected to nonlinear activation, and the activation function uses the Gelu function;
[0019] (4) Input the activated feature data into the pooling layer and downsample using the maximum pooling method. The maximum pooling formula is:
[0020]
[0021] Where: is the pixel value of the sth row and tth column of the i-th feature map input to the pooling layer; P and Q are the height and width of the pooling window respectively; is the pixel value of the mth row and nth column of the i-th feature map output after the pooling operation;
[0022] The infrared image of the distribution network equipment is convolved twice to obtain c feature maps of size α×β, which are input into the GAP layer; the GAP layer automatically adjusts the pooling kernel size to α×β, and then performs global average pooling on each feature map to obtain the feature vector X r ={x1,x2,…,x i ,…,x c}, where xi is expressed as:
[0023]
[0024] The feature vector output by the GAP layer is sent to the SVM classifier; the mathematical model of the SVM classifier is:
[0025]
[0026] Where: w is the normal vector of the hyperplane; λ is the threshold; ρ>0 is the penalty factor; ξ r is the slack variable, ξ r ≥1;X r is the feature vector of the rth sample; y r is the category label; z is the number of samples;
[0027] Use the Gaussian radial basis kernel function to map the sample data from the low-dimensional space to the high-dimensional space, and obtain its classification decision function in the high-dimensional space. The corresponding fitting relationship is as follows:
[0028]
[0029] Where: sgn is the sign function; is the Lagrange multiplier; ε is the width parameter; λ * is the optimal threshold; X is the feature vector of the sample to be tested.
[0030] To achieve the above-mentioned object, according to a second aspect of the present invention, a distribution network equipment infrared image recognition system based on CNN-SVM is proposed, comprising: a computer-readable storage medium and a processor;
[0031] The computer-readable storage medium is used to store executable instructions;
[0032] The processor is used to read the executable instructions stored in the computer-readable storage medium and execute the steps of the CNN-SVM-based distribution network equipment infrared image recognition method.
[0033] Through the above design scheme, the present invention can bring the following beneficial effects:
[0034] The present invention uses an image recognition model established by a deep convolutional neural network to perform infrared image recognition of distribution network equipment. Compared with traditional methods, it can achieve faster and more accurate recognition effects. At the same time, the SVM classifier is applied to the proposed deep convolutional neural network, and under the same conditions, a better classification effect is achieved. The present invention can meet the requirements of good infrared image recognition effect and high speed of distribution network equipment, greatly reduce the impact of distribution network failures, improve the efficiency of solving distribution network failures, effectively reduce power outages of distribution network equipment caused by early thermal failures, and effectively ensure the stable operation of distribution network equipment. BRIEF DESCRIPTION OF THE DRAWINGS
[0035] The accompanying drawings herein are used to provide a further understanding of the present invention and constitute a part of the present application. The exemplary embodiments of the present invention and their descriptions are used to understand the present invention and do not constitute improper limitations of the present invention. In the accompanying drawings:
[0036] Figure 1 This is a flow chart of the infrared image recognition method of distribution network equipment based on CNN-SVM of the present invention;
[0037] Figure 2 This is a schematic diagram of the CNN-SVM image recognition model used in the method of the present invention;
[0038] Figure 3It is a structural diagram of the deep residual shrinkage network of the method of the present invention;
[0039] Figure 4 This is a graph of the test results of the CNN-SVM image recognition model of the method of the present invention. DETAILED DESCRIPTION
[0040] The technical solution of the present invention is further described below in conjunction with the accompanying drawings and embodiments, but is not limited thereto. Any modification or equivalent replacement of the technical solution of the present invention that does not depart from the spirit and scope of the technical solution of the present invention should be included in the protection scope of the present invention.
[0041] The present invention proposes a distribution network equipment infrared image recognition method based on CNN-SVM, and a distribution network equipment infrared image recognition system based on CNN-SVM, the system comprising a computer-readable storage medium and a processor; the computer-readable storage medium is used to store executable instructions; the processor is used to read the executable instructions stored in the computer-readable storage medium, and execute the steps of the distribution network equipment infrared image recognition method based on CNN-SVM.
[0042] The infrared image recognition method of distribution network equipment based on CNN-SVM, such as Figure 1 As shown, the method comprises the following steps:
[0043] Step S1, using an infrared imager to collect infrared images of distribution network equipment of power equipment, and denoising and segmenting the collected infrared images of distribution network equipment, including 10,000 normal operation state samples and 200 fault samples. The labels set for normal operation state samples are non-fault labels, and the labels set for fault samples are fault labels. The normal operation state samples and fault samples are divided into training set, test set and validation set in a ratio of 3:1:1.
[0044] Here, the wavelet denoising method is used for the infrared image of the distribution network equipment. This belongs to the prior art. For the convenience of understanding, the present invention only makes a brief explanation. The wavelet denoising method has a better effect on removing Gaussian white noise. The wavelet denoising method is mainly based on comparing the modulus value of each layer coefficient after wavelet decomposition with a certain threshold, processing the coefficients differently according to the two comparison results, and then reconstructing the image with the processed wavelet coefficients, so that the noise can be removed. In threshold denoising, the threshold function plays a very important role in the processing and estimation of wavelet coefficients. The soft threshold function is selected here, which has overall continuity and the processed image is smoother. The specific formula is as follows:
[0045]
[0046] Where: is the output result of the soft threshold function; w j,kis the wavelet transform coefficient; λ is the pre-selected threshold; sgn() is the sign function.
[0047] The threshold λ selection method is the same at each decomposition level, and the formula is as follows:
[0048]
[0049] Where: σ represents the standard deviation of noise; N represents the total number of pixels in the image.
[0050] The image segmentation method uses the Otsu segmentation method, which belongs to the prior art. For the convenience of understanding, the present invention only makes a brief description. The Otsu segmentation method can separate the target and background pixels of the image according to the threshold. The optimal threshold is determined by the maximum variance between the two categories. Suppose the number of pixels with grayscale i in the original image is n i , the total length of the image is L, the grayscale range is [0, L-1], then the total number of pixels is:
[0051]
[0052] Where: n i is the number of pixels of the i-th gray level.
[0053] The probability of occurrence of each gray value is: For p i have:
[0054] The pixels in the image are divided into two categories C0 and C1 according to the threshold λ. C0 consists of pixels with grayscale values in [0, λ-1], and C1 consists of pixels with grayscale values in [λ, L-1]. The probabilities of regions C0 and C1 are:
[0055]
[0056]
[0057] The average grayscale value of C0 and C1 is:
[0058]
[0059] Among them, μ is the average gray value of the entire image:
[0060]
[0061] Total variance of the two regions:
[0062]
[0063] The optimal segmentation threshold is when the variance The value of λ is the maximum.
[0064] Step S2: Build a CNN-SVM image recognition model, input the infrared image of the distribution network equipment into the model, and enter the pooling layer after convolution, soft thresholding, normalization and activation operations. After two consecutive operations, the image is passed to the GAP layer for global average pooling, and finally the GAP layer features are passed to the SVM classifier for fault identification. Figure 2 As shown, the specific identification steps are as follows:
[0065] (1) The convolution layer extracts features from the input infrared image samples of the distribution network equipment. The shallow convolution is used to extract the basic features of the image edge and shape, and the deep convolution is used to extract the high-level abstract features of the image. The convolution operation formula is as follows:
[0066]
[0067] Where: Represents the i-th feature map output by the k-th layer; is the weight value of the i-th convolution in the k-th layer; represents the convolution operator; N represents the jth feature map output by the k-1th layer; k-1 Output feature map set for the k-1th layer; is the bias term of the i-th convolution in the k-th layer;
[0068] (2) The feature data is soft-thresholded by deleting feature information with an absolute value less than the threshold λ and retaining feature information with an absolute value greater than the threshold λ. The formula is as follows:
[0069]
[0070] Among them, y is the feature data after soft thresholding, x is the feature data to be processed, and λ is the threshold, which is a positive number.
[0071] In practical applications, the selection of thresholds for different types of distribution network equipment infrared images must be different. In order to make each sample have its own unique threshold, a deep residual shrinkage network is inserted to generate the threshold, such as Figure 3As shown in the figure, it is the basic module of the deep residual shrinkage network. After the features are processed by a series of convolutions, when they arrive at the deep residual shrinkage network, they will be divided into two processing paths. First, one path enters a compact neural network, which first averages the features and applies the global average pooling (GAP) technique to extract feature I. Subsequently, feature I is sent to a fully connected network, where the Sigmoid function is used as the activator of the last layer, which produces a set of weights a. This set of weights is then multiplied point by point with each channel feature of feature I to calculate the final threshold a×1. Using this threshold, feature I will be soft-thresholded to obtain the updated feature. At the same time, the other path directly passes the original feature information to the output end through the connection. In this process, the network map processed by soft thresholding is weighted fused with the identity map. From then on, the processed new feature is formed.
[0072] (3) The activation function uses the Gelu function, which improves the robustness of the training process by adding random regular transformations. It combines the advantages of Dropout, Zoneout, and Relu functions and can realize the probabilistic expression of neuron input operations.
[0073] (4) Input the activated feature data into the pooling layer and use the maximum pooling method for downsampling, which reduces the feature size while keeping the feature dimension unchanged, and reduces the number of parameters while retaining the effective features. The maximum pooling formula is:
[0074]
[0075] Where: is the pixel value of the sth row and tth column of the i-th feature map input to the pooling layer; P and Q are the height and width of the pooling window respectively; is the pixel value of the mth row and nth column of the i-th feature map output after the pooling operation.
[0076] (5) The infrared image of the distribution network equipment is convolved twice to obtain c feature maps of size α×β, which are input into the GAP layer; the GAP layer automatically adjusts the pooling kernel size to α×β, and then performs global average pooling on each feature map to obtain the feature vector
[0077] X r ={x1,x2,…,x i ,…,x c}, where xi is expressed as:
[0078]
[0079] (6) The feature vector X of the sample to be tested output by the GAP layer is sent to the SVM classifier. The advantage of SVM is that it can solve small sample, nonlinear and binary classification problems. For the infrared images of distribution network equipment, the image samples of normal operation status are far more than the fault image samples, and the number of samples required by SVM is relatively small. Therefore, the SVM classifier is used to realize fault image discrimination. The mathematical model of SVM is:
[0080]
[0081] Where: w is the normal vector of the hyperplane; λ is the threshold; ρ>0 is the penalty factor; ξ r is the slack variable, ξ r ≥1;X r is the feature vector of the rth sample; y r is the category label; z is the number of samples;
[0082] Since image recognition problems are often linearly inseparable problems, when solving such problems, it is necessary to map the data in the low-dimensional space to the high-dimensional space, thereby converting the nonlinear problem into a linear problem. Here, the Gaussian radial basis kernel function is used to map the sample data from the low-dimensional space to the high-dimensional space to obtain its classification decision function in the high-dimensional space. The corresponding fitting relationship is shown below:
[0083]
[0084] Where: sgn is the sign function; is the Lagrange multiplier; ε is the width parameter; λ * is the optimal threshold; X is the feature vector of the sample to be tested.
[0085] Step S3: Use the infrared image data of the distribution network equipment in step S1 to train and test the model. During the training phase, the gradient descent algorithm is used to perform back propagation to dynamically adjust and optimize the parameters of the model. At the same time, the accuracy is verified using the validation set data. Once the training process reaches the preset number of iterations and the accuracy of the model meets the preset expected standards, the optimal hyperparameters and corresponding weight configurations of the model will be saved. If these conditions are not met, the initial parameters of the model are adjusted accordingly to seek better model performance. The saved parameters are migrated to the CNN-SVM image recognition model, and the SVM classifier is trained using the output features and sample labels of the GAP layer;
[0086] The test set is input into the trained CNN-SVM image recognition model to output the fault diagnosis results. Then, the previously saved parameters are successfully migrated to the CNN-SVM image recognition model, and the output features of the global average pooling (GAP) layer are used to train the SVM classifier in a targeted manner, that is, the output feature information of the sample is combined with the label corresponding to the sample (fault or non-fault) as the training data of the SVM classifier to train the model. The specific implementation process is as follows: Figure 1 shown.
[0087] Step S4: In order to verify the effectiveness of the infrared image recognition method of distribution network equipment based on CNN-SVM, the model accuracy is tested using actual infrared image data of distribution network equipment. The model parameters are set as follows: the parameters of the CNN model are initialized using random initialization; the SVM classifier uses the radial basis function as the kernel function of the SVM, the value range of the penalty parameter ρ is set in [1,1000], and the value range of the kernel parameter is set in [0.1,1000]. The results are as follows: Figure 4 As shown in the figure, after 200 iterations, the accuracy of the trained CNN-SVM image recognition model on the test set can be stabilized at 89.5%, and the accuracy on the validation set can be stabilized at 88%, indicating that the model can accurately identify thermal faults in infrared images of distribution network systems.
[0088] The above is only a specific implementation of the present invention, but the protection scope of the present invention is not limited thereto. Any modification, equivalent replacement and improvement made by any person skilled in the art within the technical scope disclosed by the present invention and within the spirit and principle of the present invention shall be covered within the protection scope of the present invention. At the same time, the contents not described in detail in this specification belong to the prior art known to those skilled in the art.
Claims
1. Infrared image recognition method of distribution network equipment based on CNN-SVM, It is characterized in that include: Step S1, obtaining a distribution network equipment infrared image dataset, performing denoising and segmentation processing on the distribution network equipment infrared image, and after processing, dividing the distribution network equipment infrared image dataset into normal operating state samples and fault samples and setting different labels for each, and at the same time dividing the normal operating state samples and fault samples into a training set, a test set and a validation set; Step S2, establishing a CNN-SVM image recognition model. The network architecture of the CNN-SVM image recognition model includes sequentially arranged convolutional layers, deep residual shrinkage networks, BN layers, activation layers, pooling layers, GAP layers and SVM classifiers. The infrared image of the distribution network equipment after denoising and segmentation is input into the model, and after convolution, soft thresholding, normalization and activation operations, it enters the pooling layer. After two consecutive operations, it is passed to the GAP layer for global average pooling. Finally, the GAP layer features are passed into the SVM classifier for fault identification. Step S3, using the infrared image data of the distribution network equipment in step S1 to train and test the model. In the training stage, the gradient descent algorithm is used to perform back propagation. At the same time, the accuracy is verified using the validation set data. The training process reaches the preset iteration rounds, and the accuracy of the model meets the preset expected standard. The optimal hyperparameters and corresponding weight configurations of the model at this time will be saved. If the above conditions are not met, the initial parameters of the model will be adjusted accordingly to seek the optimal model performance; the saved parameters are migrated to the CNN-SVM image recognition model, and the SVM classifier is trained using the output features and sample labels of the GAP layer; The test set is input into the trained CNN-SVM image recognition model to output the fault diagnosis results. Then, the previously saved parameters are transferred to the CNN-SVM image recognition model, and the output features of the GAP layer are used to perform targeted training on the SVM classifier. Targeted training uses the output feature information of the sample and the label corresponding to the sample as the training data of the SVM classifier to train the model. Step S4, using the infrared image data of the distribution network equipment in the verification set to test the accuracy of the model; Step S5: Use the trained CNN-SVM image recognition model to recognize the infrared image of the distribution network equipment.
2. According to the CNN-SVM-based infrared image recognition method for distribution network equipment according to claim 1, Features: In step S1, the infrared image of the distribution network equipment is denoised using a wavelet denoising method.
3. The infrared image recognition method for network distribution equipment based on CNN-SVM according to claim 1, Features: In step S1, the Otsu segmentation method is used to perform segmentation processing.
4. The infrared image recognition method for network distribution equipment based on CNN-SVM according to claim 1, Features: Step S2 specifically includes: (1) The convolution layer extracts features from the input infrared image data of the distribution network equipment. The convolution operation formula is as follows: Where: Represents the i-th feature map output by the k-th layer; is the weight value of the i-th convolution in the k-th layer; represents the convolution operator; N represents the jth feature map output by the k-1th layer; k-1 Output feature map set for the k-1th layer; is the bias term of the i-th convolution in the k-th layer; (2) Use a deep residual shrinkage network to perform soft thresholding on feature data so that each feature can generate its own independent threshold; (3) After soft thresholding, the infrared image feature data extracted by the convolution layer is subjected to nonlinear activation, and the activation function uses the Gelu function; (4) Input the activated feature data into the pooling layer and downsample using the maximum pooling method. The maximum pooling formula is: Where: is the pixel value of the sth row and tth column of the i-th feature map input to the pooling layer; P and Q are the height and width of the pooling window respectively; is the pixel value of the mth row and nth column of the i-th feature map output after the pooling operation; The infrared image of the distribution network equipment is convolved twice to obtain c feature maps of size α×β, which are input into the GAP layer; the GAP layer automatically adjusts the pooling kernel size to α×β, and then performs global average pooling on each feature map to obtain the feature vector X r ={x 1 ,x 2 ,…,x i ,…,x c }, where xi is expressed as: The feature vector output by the GAP layer is sent to the SVM classifier; the mathematical model of the SVM classifier is: Where: w is the normal vector of the hyperplane; λ is the threshold; ρ>0 is the penalty factor; ξ r is the slack variable, ξ r ≥1;X r is the feature vector of the rth sample; y r is the category label; z is the number of samples; Use the Gaussian radial basis kernel function to map the sample data from the low-dimensional space to the high-dimensional space, and obtain its classification decision function in the high-dimensional space. The corresponding fitting relationship is as follows: Where: sgn is the sign function; is the Lagrange multiplier; ε is the width parameter; λ * is the optimal threshold; X is the feature vector of the sample to be tested.
5. A distribution network equipment infrared image recognition system based on CNN-SVM, It is characterized in that include: A computer readable storage medium and a processor; The computer-readable storage medium is used to store executable instructions; The processor is used to read the executable instructions stored in the computer-readable storage medium and execute the steps of the CNN-SVM-based distribution network equipment infrared image recognition method described in any one of claims 1 to 4.
