Insulator damage detection method and device based on deep learning
By constructing the insulator image data set and using the PMACNet network for feature extraction and detection, the traditional method solves the problem of insufficient feature extraction and high computational burden in insulator damage detection, and achieves a more efficient and accurate detection effect.
Patent Information
- Application Number
- CN202411837736.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-13
- Publication Date
- 2025-05-23
AI Technical Summary
Traditional deep learning methods have problems in insulator damage detection, insufficient feature extraction, large computing burden, and redundant information affect detection performance.
Using deep learning-based insulator damage detection methods, we can achieve feature fusion, key feature extraction and dimensional compression by constructing insulator image data sets and using target PMACNet networks for training, including CBS-Conv, GCS-Conv, DOFFS-Conv, upsampling and Detect units.
It improves the accuracy and efficiency of insulator damage detection, reduces feature loss, and reduces the interference of calculation overhead and redundant information on the detection results.
Smart Images

Figure CN120031787A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of insulator detection, and in particular to an insulator damage detection method and device based on deep learning. Background Art
[0002] Insulators are the main components of transmission lines. They are placed between conductors of different potentials or between conductors and grounding components to achieve insulation between transmission lines, between towers, and between the ground. In high voltage and natural disaster environments, insulators are more likely to break, and regular safety inspections are required.
[0003] At present, insulator defect detection is mainly based on traditional deep learning methods. Although it can improve the accuracy of insulator damage detection, it still has some limitations. When dealing with insulator damage detection tasks, traditional deep learning methods usually rely on fixed feature extraction layers and lack the ability to process complex shapes and diverse damage patterns, which makes key features easily lost or confused, affecting the detection effect. In the image processing process, traditional deep learning methods often generate a large number of high-dimensional features, which not only increases the computational burden and training time of the model, but also may introduce a large amount of redundant information, which cannot effectively improve the performance of insulator damage detection.
[0004] Therefore, there is an urgent need for an insulator damage detection technology that can improve the accuracy and efficiency of the detection results. Summary of the invention
[0005] In view of this, the present invention provides an insulator damage detection method and device based on deep learning to solve the problem of an insulator damage detection method and device based on deep learning.
[0006] In a first aspect, the present invention provides an insulator damage detection method based on deep learning, the method comprising:
[0007] Construct an insulator image dataset;
[0008] Preprocessing the insulator image dataset and dividing the preprocessed insulator image dataset into a training set, a validation set and a test set according to a target ratio;
[0009] Get the target PMACNet network to be trained;
[0010] Inputting the training set and the validation set into the target PMACNet network for training, and updating the network parameters of the target PMACNet network through back propagation processing;
[0011] Based on the target PMACNet network after the training is completed, damage detection is performed on the insulator image to be detected, and a damage detection result of the insulator image to be detected is obtained.
[0012] In an optional implementation manner, constructing an insulator image dataset includes:
[0013] Normal insulator images and damaged insulator images in different scenes are obtained, and the normal insulator images and the damaged insulator images are respectively annotated using a target image annotation tool to construct the insulator image dataset.
[0014] In an optional implementation manner, the preprocessing the insulator image dataset includes:
[0015] The target insulator image in the insulator image data set is sequentially subjected to histogram equalization enhancement processing, affine transformation processing and noise transformation processing to enhance the image quality of the target insulator image.
[0016] In an optional implementation, the target PMACNet network includes a CBS-Conv unit, a GCS-Conv unit, a DOFFS-Conv unit, an upsampling unit, and a Detect unit;
[0017] The CBS-Conv unit is used to perform feature fusion on the input insulator image to obtain a first feature map after feature fusion;
[0018] The GCS-Conv unit is used to perform key feature extraction and feature dimension reduction processing on the first feature map output by the CBS-Conv unit to obtain a second feature map;
[0019] The DOFFS-Conv unit is used to perform dynamic sampling processing on the second feature map output by the GCS-Conv unit to obtain a third feature map having acquired key features;
[0020] The up-sampling unit is used to perform an up-sampling operation on the third feature map to obtain a fourth feature map;
[0021] The Detect unit is used to perform a splicing operation on the fourth feature map and the second feature map to obtain a final feature map, and perform prediction processing on the final feature map to obtain an insulator damage detection result.
[0022] In an optional implementation manner, the CBS-Conv unit performs feature fusion on the input insulator image to obtain a first feature map after feature fusion, including:
[0023] The input insulator image is sequentially subjected to convolution operation, maximum pooling operation, reconvolution operation, feature map addition operation, sigmoid activation function normalization operation and dot multiplication operation to obtain the first feature map after feature fusion.
[0024] In an optional implementation, the GCS-Conv unit performs key feature extraction and feature dimension reduction processing on the first feature map output by the CBS-Conv unit to obtain a second feature map, including:
[0025] The first feature map output by the CBS-Conv unit is sequentially subjected to an average pooling operation, a convolution operation, a Concat operation, a sigmoid activation function operation, a dot product operation, and a reconvolution operation to obtain a second feature map.
[0026] In an optional implementation, the DOFFS-Conv unit dynamically samples the second feature map output by the GCS-Conv unit to obtain a third feature map having acquired key features, including:
[0027] The second feature map output by the GCS-Conv unit is sequentially subjected to a maximum pooling operation, an average pooling operation, a Concat operation, a ghost convolution dynamic sampling operation, a Relu activation function operation, and a dot product operation to obtain a third feature map having acquired key features;
[0028] The process of performing an upsampling operation on the third feature map by the upsampling unit to obtain a fourth feature map includes:
[0029] The third feature map is sequentially subjected to convolution operation, normalization and activation operation, dimensionality reduction operation, transposed convolution operation and dimensionality increase operation to obtain a fourth feature map.
[0030] In an optional implementation, the performing damage detection on the insulator image to be detected based on the trained target PMACNet network and obtaining the damage detection result of the insulator image to be detected includes:
[0031] Inputting the insulator image to be detected into the trained target PMACNet network, so as to perform feature fusion processing and key feature extraction processing on the insulator image to be detected through the trained target PMACNet network, and obtain the damage detection result of the insulator image to be detected;
[0032] Based on the accuracy of the damage detection results of the insulator image to be detected, the performance of the target PMACNet network in the insulator defect detection task is evaluated and optimized.
[0033] In an optional implementation, the step of inputting the training set and the validation set into the target PMACNet network for training, and updating the network parameters of the target PMACNet network through back propagation processing, includes:
[0034] Initializing network parameters in the target PMACNet network;
[0035] Minimizing the binary cross entropy loss function to evaluate the difference between the prediction results of the target PMACNet network during training and the true labels;
[0036] Inputting the training set into the target PMACNet network for training, and performing back propagation processing based on a stochastic gradient descent algorithm to update the network parameters of the target PMACNet network;
[0037] Inputting the verification set into the target PMACNet network after training to obtain a verification result;
[0038] According to the verification result, the hyperparameters and network structure of the target PMACNet network are adjusted.
[0039] In an optional embodiment, the method further includes:
[0040] The test set is input into the target PMACNet network after training to perform an effect test on the target PMACNet network after training.
[0041] In a second aspect, the present invention provides an insulator damage detection device based on deep learning, the device comprising:
[0042] An insulator image dataset construction module is used to construct an insulator image dataset;
[0043] A data set processing module, used for preprocessing the insulator image data set and dividing the preprocessed insulator image data set into a training set, a validation set and a test set according to a target ratio;
[0044] A target PMACNet network acquisition module is used to acquire a target PMACNet network to be trained;
[0045] A model training module, used for inputting the training set and the validation set into the target PMACNet network for training, and updating the network parameters of the target PMACNet network through back propagation processing;
[0046] The model application module is used to perform damage detection on the insulator image to be detected based on the target PMACNet network after the training is completed, and obtain the damage detection result of the insulator image to be detected.
[0047] In a third aspect, the present invention provides a computer device, comprising: a memory and a processor, the memory and the processor being communicatively connected to each other, the memory storing computer instructions, and the processor executing the computer instructions to execute an insulator damage detection method based on deep learning according to the first aspect or any corresponding embodiment thereof.
[0048] In a fourth aspect, the present invention provides a computer-readable storage medium having computer instructions stored thereon, the computer instructions being used to enable a computer to execute an insulator damage detection method based on deep learning according to the first aspect or any corresponding embodiment thereof.
[0049] In a fifth aspect, the present invention provides a computer program product, comprising computer instructions, which are used to enable a computer to execute an insulator damage detection method based on deep learning according to the first aspect or any corresponding embodiment thereof.
[0050] The technical solution provided by the present invention may include the following beneficial effects:
[0051] The present invention can accurately extract features of insulator images through the target PMACNet network. The CBS-Conv unit in the target PMACNet network can perform multi-scale feature fusion on the input insulator image at an early stage, better retain the key information in the image, improve the recognition ability of complex damage patterns, and reduce feature loss.
[0052] In addition, the present invention can also perform dimensional compression on the insulator image through the target PMACNet network. The GCS-Conv unit in the target PMACNet network can perform key feature extraction and dimensional compression. It can extract key features through the global context awareness mechanism, and effectively compress feature dimensions, reduce computational overhead, and reduce the interference of redundant information on detection results. BRIEF DESCRIPTION OF THE DRAWINGS
[0053] In order to more clearly illustrate the specific implementation methods of the present invention or the technical solutions in the prior art, the drawings required for use in the specific implementation methods or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some implementation methods of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0054] Figure 1is a flow chart of an insulator damage detection method based on deep learning according to an embodiment of the present invention;
[0055] Figure 2 is a flow chart of another insulator damage detection method based on deep learning according to an embodiment of the present invention;
[0056] Figure 3 is a flow chart of another insulator damage detection method based on deep learning according to an embodiment of the present invention;
[0057] Figure 4 is a schematic diagram of the structure of a target PMACNet network according to an embodiment of the present invention;
[0058] Figure 5 is a schematic diagram of the principle of a CBS-Conv unit according to an embodiment of the present invention;
[0059] Figure 6 is a schematic diagram of the principle of a GCS-Conv unit according to an embodiment of the present invention;
[0060] Figure 7 is a schematic diagram of the principle of a DOFFS-Conv unit according to an embodiment of the present invention;
[0061] Figure 8 is a schematic diagram of the principle of an upsampling unit according to an embodiment of the present invention;
[0062] Fig. 9 is a schematic diagram of the principle of a Detect unit according to an embodiment of the present invention;
[0063] Fig.10 is a structural block diagram of an insulator damage detection device based on deep learning according to an embodiment of the present invention;
[0064] Fig.11 It is a schematic diagram of the hardware structure of a computer device according to an embodiment of the present invention. DETAILED DESCRIPTION
[0065] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.
[0066] According to an embodiment of the present invention, an embodiment of an insulator damage detection method based on deep learning is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0067] In this embodiment, a method for detecting insulator damage based on deep learning is provided. Figure 1 is a flow chart of a method for detecting insulator damage based on deep learning according to an embodiment of the present invention. Figure 1 As shown, the process includes the following steps:
[0068] Step S101: construct an insulator image dataset.
[0069] Furthermore, the insulator image dataset is the basis of the deep learning project, and its purpose is to collect and organize insulator image data for training and testing. The insulator image dataset needs to contain a sufficient number of insulator images, which can include images of broken insulators and images of unbroken insulators, to ensure that the model can learn the characteristics of insulator damage. The construction of the insulator image dataset needs to consider factors such as the source, quality, resolution, and annotation (i.e., true label) of the image.
[0070] Step S102 , preprocessing the insulator image dataset and dividing the preprocessed insulator image dataset into a training set, a validation set and a test set according to a target ratio.
[0071] Furthermore, in step S102, the present embodiment preprocesses the collected image data to improve data quality and make it more suitable for model training. Preprocessing may include operations such as resizing, normalization, and enhancement. After preprocessing, the insulator image dataset is divided into three parts: a training set, a validation set, and a test set. This division is helpful for model learning, tuning, and evaluation.
[0072] Step S103, obtaining the target PMACNet network to be trained.
[0073] Furthermore, this embodiment needs to determine a network architecture for insulator damage detection, namely a target PMACNet network. The PMACNet network is a specific deep learning model to optimize the insulator damage detection task.
[0074] Step S104: input the training set and the verification set into the target PMACNet network for training, and update the network parameters of the target PMACNet network through back propagation processing.
[0075] Furthermore, this embodiment uses the training set to train the target PMACNet network. The training process involves inputting the images in the training set into the network, calculating the prediction results through forward propagation, then calculating the difference between the prediction results and the true labels (i.e., the loss), and finally updating the network parameters of the network through the back-propagation algorithm to minimize the loss. The validation set is used to evaluate the performance of the model during the training process, and the hyperparameters or network structure are adjusted according to the evaluation results. This process is an iterative process until a certain stopping condition is reached (such as the loss no longer decreases significantly, the validation set performance no longer improves, etc.).
[0076] Step S105 , based on the trained target PMACNet network, damage detection is performed on the insulator image to be detected, and a damage detection result of the insulator image to be detected is obtained.
[0077] Furthermore, this embodiment uses the trained target PMACNet network to perform damage detection on the insulator image to be detected, inputs the image to be detected into the target PMACNet network, calculates the prediction result through the forward propagation of the target PMACNet network, and then determines whether the insulator is damaged based on the prediction result.
[0078] For further information, see Figure 2 The flowchart of another insulator damage detection method based on deep learning is shown. The insulator damage detection method disclosed in this embodiment includes an insulator image data set construction module, a data preprocessing and data set division module, a network design module, a network training module and a network verification and evaluation module. First, an insulator image data set is constructed; then the insulator image data set is preprocessed and the insulator image data set is divided into a training set, a verification set and a test set according to a certain ratio; then a PMACNet network (i.e., a target PMACNet network) is designed and the training parameters are initialized. Then the training set and the verification set are loaded into the target PMACNet network for training and updating the network parameters; then the test set is input into the trained target PMACNet network to verify the effect of the network; finally, the trained target PMACNet network is applied to the insulator damage detection task.
[0079] In summary, this embodiment can accurately extract features of insulator images through the target PMACNet network. The CBS-Conv unit in the target PMACNet network can perform multi-scale feature fusion on the input insulator image at an early stage, better retain the key information in the image, improve the recognition ability of complex damage patterns, and reduce feature loss.
[0080] Moreover, this embodiment can also perform dimensional compression on the insulator image through the target PMACNet network. The GCS-Conv unit in the target PMACNet network can perform key feature extraction and dimensional compression. It can extract key features through the global context-aware mechanism, and effectively compress feature dimensions, reduce computational overhead, and reduce the interference of redundant information on detection results.
[0081] In this embodiment, another insulator damage detection method based on deep learning is provided. Figure 3 is a flow chart of another insulator damage detection method based on deep learning according to an embodiment of the present invention, such as Figure 3 As shown, the process includes the following steps:
[0082] Step S301: construct an insulator image dataset.
[0083] In an optional implementation, the step S301 includes:
[0084] Normal insulator images and damaged insulator images in different scenes are obtained, and the target image annotation tool is used to annotate the normal insulator images and the damaged insulator images respectively to construct the insulator image dataset.
[0085] Furthermore, this embodiment first constructs an insulator image dataset, uses drone aerial photography and camera photography to obtain normal insulator images and damaged insulator images in different scenes, and uses a target image annotation tool (such as labelme) to annotate the insulator images to form an insulator image dataset. Labelme is an image annotation software tool developed by the Computer Science and Artificial Intelligence Laboratory (CSAIL) of the Massachusetts Institute of Technology (MIT), which is written in Python and PyQT and is used for image annotation.
[0086] Step S302 , preprocessing the insulator image dataset and dividing the preprocessed insulator image dataset into a training set, a validation set and a test set according to a target ratio.
[0087] In an optional implementation, step S302 includes:
[0088] The target insulator image in the insulator image data set is sequentially subjected to histogram equalization enhancement processing, affine transformation processing and noise transformation processing to enhance the image quality of the target insulator image.
[0089] Furthermore, in step S302, the present embodiment performs data preprocessing and data set division on the insulator image dataset. Since aerial images are affected by environmental factors such as light intensity and shooting angle, the image data may be unclear, blurred, and have low quality, so that aerial images cannot be directly used for model training and testing. Therefore, the present embodiment needs to expand and enhance the insulator image dataset, such as performing data enhancement on the images with poor quality in the insulator image dataset (i.e., the above-mentioned target insulator images) through histogram equalization enhancement processing, affine transformation processing, and noise transformation processing. Finally, the insulator image dataset is divided into a training set, a validation set, and a test set in a ratio of 7:2:1. The division ratio can be flexibly changed according to the actual application task.
[0090] Among them, histogram equalization enhancement processing is an image processing technology used to enhance the contrast of an image, especially when the contrast of the image is low, the effect is more obvious. The principle of this technology is to adjust the grayscale distribution of the image so that the pixel values of different brightness in the image are more evenly distributed, thereby enhancing the overall visual effect of the image.
[0091] Affine transformation is a two-dimensional or three-dimensional image geometric transformation that maps points in the original image to new positions in the target image through linear mapping. Affine transformation maintains the parallelism and proportionality of the image, but does not preserve angles and distances.
[0092] Noise transformation processing refers to various techniques and methods for introducing or processing noise into images. It is usually used in image processing to simulate interference in real environments or to test the robustness and stability of algorithms. Noise in image processing refers to meaningless and random changes in pixel values, which will affect image quality and reduce its clarity and recognizability.
[0093] Step S303, obtaining the target PMACNet network to be trained.
[0094] In an optional implementation, the target PMACNet network includes a CBS-Conv unit, a GCS-Conv unit, a DOFFS-Conv unit, an upsampling unit, and a Detect unit;
[0095] The CBS-Conv unit is used to perform feature fusion on the input insulator image to obtain a first feature map after feature fusion;
[0096] The GCS-Conv unit is used to perform key feature extraction and feature dimension reduction processing on the first feature map output by the CBS-Conv unit to obtain a second feature map;
[0097] The DOFFS-Conv unit is used to perform dynamic sampling processing on the second feature map output by the GCS-Conv unit to obtain a third feature map having acquired key features;
[0098] The upsampling unit is used to perform an upsampling operation on the third feature map to obtain a fourth feature map;
[0099] The Detect unit is used to perform a splicing operation on the fourth feature map and the second feature map to obtain a final feature map, and perform prediction processing on the final feature map to obtain an insulator damage detection result.
[0100] For further information, see Figure 4 The schematic diagram of the structure of the target PMACNet network shown in FIG. 1 is used for insulator damage detection. In the target PMACNet network, the insulator image is first input into the CBS-Conv unit for feature fusion, then the key features are extracted and the feature dimension is reduced by the GCS-Conv unit, and then the key features are obtained by dynamic sampling by the DOFFS-Conv unit, and then the output result is upsampled, and then the upsampled result is concat-operated with the result of the GCS-Conv unit (i.e., the above-mentioned splicing operation), and finally the insulator damage detection result is obtained by the Detect unit.
[0101] In an optional implementation manner, the CBS-Conv unit performs feature fusion on the input insulator image to obtain a first feature map after feature fusion, including:
[0102] The input insulator image is sequentially subjected to convolution operation, maximum pooling operation, reconvolution operation, feature map addition operation, sigmoid activation function normalization operation and dot multiplication operation to obtain the first feature map after feature fusion.
[0103] For further information, see Figure 5 The schematic diagram of the principle of the CBS-Conv unit is shown in FIG. 1 . In this embodiment, the insulator image is first used as the feature map F 1 Input to the CBS-Conv unit for feature fusion. The CBS-Conv unit takes the input feature map F 1 Perform convolution with kernel K size of 1 and step size S of 1 (i.e. the above convolution operation) to obtain the output feature map F 2 The main purpose of this step is to extract the feature map F 1 The local features in , and generate the output feature map F 2 This convolution operation enhances the representation capability of features while maintaining spatial resolution; then, this embodiment performs a convolution operation on the feature map F 2Perform maximum pooling (i.e. the above maximum pooling operation) to obtain the feature map F 3 , by retaining the maximum value of each local area in the feature map to reduce the size of the feature map, this process helps to reduce the computational complexity, while enhancing the robustness of the features to a certain extent, making the model more focused on important features; then perform a convolution with a convolution kernel K of size 3 and a step size S of 1 (i.e., the above reconvolution operation) to obtain the feature map F 4 ; The feature map F 2 With the feature map F 4 Perform the addition operation (i.e. the above feature map addition operation) to obtain the fused feature map F 5 The purpose of this addition operation is to fuse the features extracted by different convolutional layers, retain the information of low-level features, and combine them with high-level features to improve the expression ability of the model. Then it is normalized by the sigmoid function (that is, the above-mentioned sigmoid activation function normalization operation) and combined with the feature map F 1 Perform dot multiplication (i.e. the above dot multiplication operation) to obtain the output feature map F 6 (i.e. the first feature map mentioned above). Fusion feature map F 5 And the output feature map F 6 It can be obtained by the following formula:
[0104] F 5 =Conv 3,1 (MaxPool(Conv 1,1 (F 1 )))+Conv 1,1 (F 1 );
[0105] F 6 =F 1 ×sigmoid(F 5 );
[0106] Among them, F 1 is the input feature map, Conv 1,1 It is a convolution with a kernel size of 1 and a stride of 1. 3,1 is a convolution with a kernel size of 3 and a stride of 1, MaxPool is the maximum pooling operation, sigmoid is the activation function, and F 6 is the output feature map.
[0107] The Sigmoid function is a commonly used activation function, usually used for nonlinear transformation in neural networks. The output value of the Sigmoid function is between 0 and 1. When the input x approaches positive infinity, the output is close to 1; when the input approaches negative infinity, the output is close to 0. Its mathematical expression is:
[0108] Max Pooling is a downsampling technique commonly used in Convolutional Neural Networks (CNNs) that aims to reduce the size of feature maps while retaining the most salient features.
[0109] In summary, the CBS-Conv unit first performs multiple convolutions and Maxpool (maximum pooling) operations on the input insulator image, then fuses the features with the result of the first convolution, activates it through the sigmoid activation function to obtain the fused features, and then performs a dot multiplication operation with the input feature map to obtain the feature map after feature fusion, which can effectively extract the key features in the insulator image and enhance the model's ability to capture important information.
[0110] In an optional implementation, the GCS-Conv unit performs key feature extraction and feature dimension reduction processing on the first feature map output by the CBS-Conv unit to obtain a second feature map, including:
[0111] The first feature map output by the CBS-Conv unit is subjected to an average pooling operation, a convolution operation, a Concat operation, a sigmoid activation function operation, a dot product operation, and a reconvolution operation in sequence to obtain a second feature map.
[0112] For further information, see Figure 6 The schematic diagram of the principle of the GCS-Conv unit is shown in FIG. 1 . In this embodiment, the feature map F output from the CBS-Conv unit is 6 Input to the GCS-Conv unit to extract key features and reduce feature dimensions. The GCS-Conv unit first transforms the feature map F 6 Input to the AvgPool subunit for average pooling (i.e. the average pooling operation mentioned above) to obtain the feature map F 7 ; At the same time, the feature map F 6 Perform convolution with kernel size of 1 and step size of 1 and convolution with kernel size of 3 and step size of 1 (i.e. the above convolution operation) to obtain the feature map F 8 and feature map F 9 ; The feature map F 7 and feature map F 8 Perform Concat operation to concatenate features and perform sigmoid operation (i.e. the sigmoid activation function operation mentioned above) to obtain feature map F 10 ; Finally, the feature map F 10 With the feature map F 9 Perform dot multiplication (i.e. the dot multiplication operation mentioned above) and then perform convolution with a kernel size of 3 and a step size of 1 (i.e. the reconvolution operation mentioned above) to reduce the feature dimension and obtain the output feature map F 11(ie the second characteristic diagram mentioned above).
[0113] The execution flow of the GCS-Conv unit is as follows: Assume that the feature map F 6 The dimension is H×W×C (where H is the height, W is the width, and C is the number of channels). First, the feature map F 6 Perform convolution with a kernel size of 1, a step size of 1, and a number of C to obtain the feature map F 8 , whose dimension is H×W×C; then the feature map F 6 Perform AvgPool average pooling to obtain a feature map F with a dimension of H×W×C 7 ; Then for the feature map F 6 Perform convolution with a kernel size of 3, a step size of 1, and a number of C to obtain a feature map F with a dimension of H×W×C 9 In addition, this embodiment will feature map F 8 With the feature map F 7 Perform a Concat operation and input the result of the Concat operation into the sigmoid activation function to obtain a feature map F with a dimension of H×W×2C. 10 ; Finally, the feature map F 9 With the feature map F 10 Perform a dot multiplication operation, and finally perform a convolution with a kernel size of 3, a step size of 1, and a number of C / 2 to reduce the feature dimension to obtain a feature map F with a dimension of H×W×C / 2 11 The transformation formula is as follows:
[0114] F 10 =sigmoid(Concat(Avgpool(F 6 ),Conv 1,1 (F 6 )));
[0115] F 11 =Conv 3,1 (F 10 ×Conv 3,1 (F 6 ));
[0116] Among them, F 6 is the feature map of the GCS-Conv unit input, sigmoid is the activation function, Concat is the concatenation operation along the channel, AvgPool is the average pooling operation, Conv 1,1 is a convolution operation with a kernel size of 1 and a stride of 1, F 10 is the fused and activated feature, Conv 3,1 is a convolution operation with a kernel size of 3 and a stride of 1, F 11 It is the feature map output by the GCS-Conv unit.
[0117] Average Pooling is a downsampling technique commonly used in convolutional neural networks (CNNs). Its main purpose is to reduce the size of feature maps while retaining the average information of the region.
[0118] Concat is an operation used to combine multiple tensors into a new tensor along a specific dimension.
[0119] In summary, the CBS-Conv unit first performs convolution and average pooling operations on the input feature map, then concats the convolution result with the average pooling result, activates the concatenated feature map with the simoid function and performs a dot multiplication operation on the convolved feature map, and finally performs another convolution to obtain the output feature map. Through average pooling and concatenation operations, the feature dimension is reduced, thereby reducing the computational complexity, improving the model efficiency, and reducing memory consumption.
[0120] In an optional implementation, the DOFFS-Conv unit dynamically samples the second feature map output by the GCS-Conv unit to obtain a third feature map having acquired key features, including:
[0121] The second feature map output by the GCS-Conv unit is sequentially subjected to maximum pooling operation, average pooling operation, Concat operation, ghost convolution dynamic sampling operation, Relu activation function operation and dot multiplication operation to obtain a third feature map with key features obtained.
[0122] For further information, see Figure 7 The schematic diagram of the principle of the DOFFS-Conv unit is shown in FIG. 1 . In this embodiment, the feature map F output by the GCS-Conv unit is 11 The input is sent to the DOFFS-Conv unit for dynamic sampling to obtain key features. The DOFFS-Conv unit first performs dynamic sampling on the feature map F 11 Perform the maximum pooling operation to obtain the feature map F 11max ; Then the feature map F 11 Perform average pooling operation to obtain feature map F 11avg , the average pooling and maximum pooling operations can enhance the robustness of the model to the position and small deformation of the insulator; then the results of the maximum pooling and average pooling are concat-operated to obtain the mixed feature map F 12 , for the mixed feature map F 12 Perform GhostConv dynamic sampling operation to improve feature expression ability and obtain key features to obtain feature map F 13 ; Finally, the feature map F 13After the Relu function is activated (that is, the Relu activation function operation mentioned above), it is combined with the input feature map F 11 Dot multiplication (i.e. the dot multiplication operation mentioned above) obtains the feature map F of the key features obtained 14 (i.e. the third feature map of the key features obtained above).
[0123] In this embodiment, the feature map F with a dimension of H×W×C / 2 output from the GCS-Conv unit is 11 Input into the DOFFS-Conv unit, dynamic sampling is performed to obtain key features. In the DOFFS-Conv unit, the feature map F is first 11 Perform the maximum pooling operation (MaxPool) and the average pooling operation (AvgPool) to obtain two feature maps with dimensions of H×W×C / 2; then concatenate the two feature maps through the Concat operation to obtain a feature map F with dimensions of H×W×C 12 ; Then the feature map F 12 Perform ghost convolution (GhostConv) to obtain a feature map F with dimensions H×W×C 13 , and finally the feature map F 13 After the Relu function is activated, it is combined with the input feature map F 11 Point multiplication, the output dimension is H×W×C feature map F 14 The transformation formula is as follows:
[0124] F 12 =Concat(Maxpool(F 11 ),Avgpool(F 11 ));
[0125] F 14 =Relu(GhostConv(F 12 ))×F 11 ;
[0126] Among them, F 11 is the input feature map of the DOFFS-Conv unit, Maxpool is the maximum pooling, Avgpool is the average pooling, Concat is the concatenation operation, F 12 is the concatenated feature map, GhostConv is the ghost convolution, Relu is the activation function, and F 14 is the output feature map of the DOFFS-Conv unit.
[0127] GhostConv (ghost convolution) is an efficient convolution technique used in convolutional neural networks (CNNs) to reduce computational complexity while maintaining good feature expression capabilities. Its operation is as follows:
[0128] First, a standard convolution operation is performed on the input feature map using a smaller convolution kernel (such as 3×3) to generate the main feature map. Next, a lightweight operation (such as 1×1 convolution or point-wise convolution) is applied to generate additional ghost feature maps. These ghost feature maps are derived from the features of the main feature map. The main feature map and the ghost feature map are combined to form the final output feature map.
[0129] The ReLU (Rectified Linear Unit) function is a commonly used activation function, widely used in deep learning and convolutional neural networks. Its mathematical expression is: ReLU(x) = max(0,x), and the output value of ReLU is between 0 and positive infinity. When the input x is positive, the output is equal to x; when x is negative, the output is 0.
[0130] In summary, the DOFFS-Conv unit performs average pooling and maximum pooling operations on the insulator feature map, extracts features and concatenates them through the Concat operation, and uses ghost convolution for dynamic sampling, which helps to enhance the expressiveness of the feature map while maintaining computational efficiency. (Ghost convolution) can capture more details by generating "ghost" feature maps, thereby improving the performance of the model.
[0131] In an optional implementation, the upsampling unit performs an upsampling operation on the third feature map to obtain a fourth feature map, including:
[0132] The third feature map is sequentially subjected to convolution operation, normalization and activation operation, dimensionality reduction operation, transposed convolution operation and dimensionality increase operation to obtain a fourth feature map.
[0133] For further information, see Figure 8 The schematic diagram of the principle of the upsampling unit shown in FIG. 1 shows that in this embodiment, the feature map F after the key features have been obtained from the DOFFS-Conv unit is output. 14 , input to the upsample (Upsample) to perform upsampling operation, so that the size of the input feature is doubled and the number of feature channels is reduced to 1 / 2 of the original. First, the feature map F 14 A convolution with a kernel size of 3 and a step size of 1 is performed on the H×W×C layer (i.e., the convolution operation mentioned above). The result is input to the BN layer for normalization and activated using the ReLu function to obtain a feature map F with a dimension of H×W×C. 15 ; Then use the convolution operation with a convolution kernel size of 1 and a step size of 1 to perform the feature map F 15Perform dimensionality reduction processing to obtain a feature map with a dimension of H×W×C / 4, and then use transposed convolution (ConvTranspose) to upsample the feature map to double the size of the feature map to obtain a feature map with a dimension of 2H×2W×C / 4; finally, use 1×1 convolution to increase the dimension and obtain a feature map F with an output dimension of 2H×2W×C / 2 16 (That is, the fourth characteristic diagram mentioned above).
[0134] Transpose convolution, also known as deconvolution, is a convolution operation commonly used in deep learning, mainly used for upsampling or generating higher-dimensional feature maps.
[0135] For further information, see Fig. 9 The principle schematic diagram of the Detect unit shown in FIG. 1 shows that in this embodiment, the feature map F output by the upsampling unit is 16 The feature map F output by the GCS-Conv unit 11 Perform concatenation operation to obtain feature map F 17 (i.e. the final feature map mentioned above), and then transform the feature map F with dimension H×W×C 17 Input into the Detect unit for prediction and obtain the insulator damage detection result.
[0136] The Detect unit first performs 17 Perform convolution with a kernel size of 3 and a step size of 1 to obtain the feature map F 18 The dimension is H×W×C; then the feature map F 18 Perform a convolution operation with a kernel size of 1 and a step size of 1 to obtain a feature map F with a dimension of H×W×C 19 ; Then the feature map F 18 and feature map F 19 Perform the Concat operation to obtain a feature map F with a dimension of H×W×2C 20 ; Finally, the feature map F 20 A convolution with a kernel size of 3 and a stride of 1 is performed and input into the fully connected layer (FC) to obtain an output vector T with a dimension of H×W×1. As long as one bit in the vector T is 0, it means that the insulator is damaged, and all bits are 1, which means that the insulator is normal.
[0137] The fully connected layer (FC Layer) is a basic layer in deep learning models, usually used to convert feature maps in neural networks into final outputs. Each neuron in the fully connected layer is connected to all neurons in the previous layer. This structure allows the fully connected layer to integrate all feature information from the previous layer, thereby performing higher-level feature abstraction and decision-making.
[0138] The concat operation refers to concatenating multiple tensors (or matrices) in a specified dimension. In the field of deep learning and computer vision, the concat operation is often used to fuse different feature maps or tensors together to gather multiple information.
[0139] The target PMACNet network disclosed in the above embodiment is explained below through a simple example:
[0140] Assume that the target PMACNet network is fed with an insulator image A with a dimension of 1024×1024×12. 1 (width × height × channel), the target PMACNet network first uses the insulator image as the feature map A 1 Input into the CBS-Conv unit for feature fusion, the CBS-Conv unit performs feature map A 1 Perform convolution with a kernel size of 1 and a stride of 1 to obtain a feature map A with an output dimension of 1024×1024×12 2 , then for the feature map A 2 Perform maximum pooling to obtain a feature map A with a dimension of 1024×1024×12 3 , then perform a convolution with a kernel size of 3 and a step size of 1 to obtain a feature map A with a dimension of 1024×1024×12 4 The CBS-Conv unit transforms the feature map A 2 With feature map A 4 Perform the addition operation to obtain the fused feature map A with a dimension of 1024×1024×12 5 , and then normalized by sigmoid function and compared with feature map A 1 The dot product obtains the feature map B with an output dimension of 1024×1024×12 1 .
[0141] The feature map B output by the CBS-Conv unit 1 The GCS-Conv unit first extracts key features and reduces feature dimensions. 1 Perform average pooling to obtain a feature map B with a dimension of 1024×1024×12 2 , and then for the feature map B1 Perform convolution with kernel size of 1 and step size of 1 respectively to obtain feature map B with dimension of 1024×1024×12 3 And the convolution with a kernel size of 3 and a stride of 1, we get a feature map B with a dimension of 1024×1024×12 4 . The feature map B 2 And feature map B 3 Perform the Concat operation to obtain a feature map B with a dimension of 1024×1024×24 5 , perform sigmoid normalization on it and compare it with the feature map B 4 Point multiplication, and then perform a convolution with a kernel size of 3 and a step size of 1 to reduce the feature dimension, and obtain a feature map C with a dimension of 1024×1024×6 1 .
[0142] The feature map C output by the GCS-Conv unit 1 The input is sent to the DOFFS-Conv unit for dynamic sampling to obtain key features. The DOFFS-Conv unit first performs dynamic sampling on the feature map C 1 Perform maximum pooling and average pooling, and perform Concat operation on the results to obtain a feature map C with a dimension of 1024×1024×12 2 , and then for the feature map C 2 Perform ghost convolution (GhostConv) to obtain a feature map C with a dimension of 1024×1024×12 3 Finally, the Relu activation function is used to combine with the input feature map C 1 Point multiplication, get the output feature map D with a dimension of 1024×1024×12 1 .
[0143] The feature map D output by the DOFFS-Conv unit 1 The input is sent to the upsample unit for upsampling. The upsample unit first performs an upsampling operation on the feature map D 1 Perform a convolution with a kernel size of 3 and a step size of 1, input the result into the BN layer for normalization and use the ReLu function for activation to obtain the feature map D 2 (whose dimension is 1024×1024×12), and then use the convolution operation with a convolution kernel size of 1 and a step size of 1 to perform a convolution operation on the feature map D 2 The dimensionality reduction process is performed to obtain a feature map with a dimension of 1024×1024×3. Then, the transposed convolution (ConvTranspose) is used for upsampling to double the size of the feature map to obtain a feature map with a dimension of 2048×2048×3. Finally, a 1×1 convolution is used to increase the dimension to obtain the output feature map D 3(Dimensions are 2048×2048×6).
[0144] The feature map D output by the upsample unit 3 The feature map C output by the GCS-Conv unit 1 Perform the Concat operation to obtain a feature map E with a dimension of 2048×2048×12. Then input the feature map E into the Detect unit, which first performs a convolution on the feature map E with a convolution kernel size of 3 and a step size of 1 to obtain a feature map E with a dimension of 2048×2048×12. 1 , and then for the feature map E 1 Perform a convolution with a kernel size of 1 and a stride of 1 to obtain a feature map E with a dimension of 2048×2048×12 2 , then the feature map E 1 And feature map E 2 Perform the Concat operation to obtain a feature map E with a dimension of 2048×2048×24 3 , and finally the feature map F 20 A convolution with a kernel size of 3 and a stride of 1 is performed and input into the fully connected layer (FC) to obtain an output vector T with a dimension of 1024×1024×1, where one bit is 0 indicating that the insulator is damaged, and all bits are 1 indicating that the insulator is normal.
[0145] Step S304, initializing the network parameters in the target PMACNet network, and using a minimized binary cross entropy loss function to evaluate the difference between the prediction results of the target PMACNet network during the training process and the true labels.
[0146] Step S305 , inputting the training set into the target PMACNet network for training, and performing back propagation processing based on a stochastic gradient descent algorithm to update the network parameters of the target PMACNet network.
[0147] Step S306, inputting the verification set into the target PMACNet network after training to obtain a verification result, and adjusting the hyperparameters and network structure of the target PMACNet network according to the verification result.
[0148] Furthermore, this embodiment performs parameter training and updating based on the designed target PMACNet network. First, initialize the parameters of all neural networks. During the training process, a fast alternating scheme is adopted to evaluate the difference between the model prediction result and the true label by minimizing the binary cross entropy loss function. In this embodiment, the training set is input into the target PMACNet network for training, Batch_size is set to 2, the number of iterations is 1000 rounds, the stochastic gradient descent (SGD) algorithm is used for back propagation, and the learning rate is adaptively adjusted in combination with the Adam optimizer to accelerate the convergence of the target PMACNet network. After the training is completed, this embodiment inputs the preprocessed validation set into the trained target PMACNet network to obtain the accuracy of the target PMACNet network in insulator defect detection, and uses the accuracy to evaluate the performance of the network on the validation set. According to the verification results, the hyperparameters (such as learning rate, regularization parameter, etc.) and structure of the target PMACNet network are adjusted to further optimize the network performance.
[0149] Step S307, inputting the test set into the target PMACNet network after training, so as to perform an effect test on the target PMACNet network after training.
[0150] Step S308: Based on the trained target PMACNet network, damage detection is performed on the insulator image to be detected, and a damage detection result of the insulator image to be detected is obtained.
[0151] In an optional implementation, step S308 includes:
[0152] The image of the insulator to be detected is input into the trained target PMACNet network, so as to perform feature fusion processing and key feature extraction processing on the image of the insulator to be detected through the trained target PMACNet network, and obtain the damage detection result of the image of the insulator to be detected;
[0153] Based on the accuracy of the damage detection results of the insulator image to be inspected, the performance of the target PMACNet network in the insulator defect detection task is evaluated and optimized.
[0154] Furthermore, this embodiment applies the trained target PMACNet network to the insulator defect detection task, and inputs the insulator image to be detected taken by the drone into the trained target PMACNet network. The PMACNet network obtains the insulator defect detection result through feature fusion, key feature extraction and other operations. The performance of the target PMACNet network in the insulator defect detection task is evaluated by the accuracy of insulator defect detection by the target PMACNet network, and then the relevant parameters of the target PMACNet network are adjusted according to the performance to improve the performance of the target PMACNet network.
[0155] In summary, this embodiment can accurately extract features of insulator images through the target PMACNet network. The CBS-Conv unit in the target PMACNet network can perform multi-scale feature fusion on the input insulator image at an early stage, better retain the key information in the image, improve the recognition ability of complex damage patterns, and reduce feature loss.
[0156] Moreover, this embodiment can also perform dimensional compression on the insulator image through the target PMACNet network. The GCS-Conv unit in the target PMACNet network can perform key feature extraction and dimensional compression. It can extract key features through the global context-aware mechanism, and effectively compress feature dimensions, reduce computational overhead, and reduce the interference of redundant information on detection results.
[0157] In this embodiment, a deep learning-based insulator damage detection device is also provided, which is used to implement the above-mentioned embodiments and preferred implementation modes, and the descriptions that have been made will not be repeated. As used below, the term "module" can be a combination of software and / or hardware that implements a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceivable.
[0158] This embodiment provides an insulator damage detection device based on deep learning, such as Fig.10 As shown, including:
[0159] An insulator image data set construction module 1001 is used to construct an insulator image data set;
[0160] A data set processing module 1002 is used to preprocess the insulator image data set and divide the preprocessed insulator image data set into a training set, a validation set and a test set according to a target ratio;
[0161] The target PMACNet network acquisition module 1003 is used to acquire the target PMACNet network to be trained;
[0162] A model training module 1004 is used to input the training set and the validation set into the target PMACNet network for training, and update the network parameters of the target PMACNet network through back propagation processing;
[0163] The model application module 1005 is used to perform damage detection on the insulator image to be detected based on the target PMACNet network after the training is completed, and obtain the damage detection result of the insulator image to be detected.
[0164] In an optional implementation manner, the insulator image data set construction module 1001 is further used for:
[0165] Normal insulator images and damaged insulator images in different scenes are obtained, and the normal insulator images and the damaged insulator images are respectively annotated using a target image annotation tool to construct the insulator image dataset.
[0166] In an optional implementation, the data set processing module 1002 is further configured to:
[0167] The target insulator image in the insulator image data set is sequentially subjected to histogram equalization enhancement processing, affine transformation processing and noise transformation processing to enhance the image quality of the target insulator image.
[0168] In an optional implementation, the target PMACNet network includes a CBS-Conv unit, a GCS-Conv unit, a DOFFS-Conv unit, an upsampling unit, and a Detect unit;
[0169] The CBS-Conv unit is used to perform feature fusion on the input insulator image to obtain a first feature map after feature fusion;
[0170] The GCS-Conv unit is used to perform key feature extraction and feature dimension reduction processing on the first feature map output by the CBS-Conv unit to obtain a second feature map;
[0171] The DOFFS-Conv unit is used to perform dynamic sampling processing on the second feature map output by the GCS-Conv unit to obtain a third feature map having acquired key features;
[0172] The up-sampling unit is used to perform an up-sampling operation on the third feature map to obtain a fourth feature map;
[0173] The Detect unit is used to perform a splicing operation on the fourth feature map and the second feature map to obtain a final feature map, and perform prediction processing on the final feature map to obtain an insulator damage detection result.
[0174] In an optional implementation manner, the CBS-Conv unit performs feature fusion on the input insulator image to obtain a first feature map after feature fusion, including:
[0175] The input insulator image is sequentially subjected to convolution operation, maximum pooling operation, reconvolution operation, feature map addition operation, sigmoid activation function normalization operation and dot multiplication operation to obtain the first feature map after feature fusion.
[0176] In an optional implementation, the GCS-Conv unit performs key feature extraction and feature dimension reduction processing on the first feature map output by the CBS-Conv unit to obtain a second feature map, including:
[0177] The first feature map output by the CBS-Conv unit is sequentially subjected to an average pooling operation, a convolution operation, a Concat operation, a sigmoid activation function operation, a dot product operation, and a reconvolution operation to obtain a second feature map.
[0178] In an optional implementation, the DOFFS-Conv unit dynamically samples the second feature map output by the GCS-Conv unit to obtain a third feature map having acquired key features, including:
[0179] The second feature map output by the GCS-Conv unit is sequentially subjected to a maximum pooling operation, an average pooling operation, a Concat operation, a ghost convolution dynamic sampling operation, a Relu activation function operation, and a dot product operation to obtain a third feature map having acquired key features;
[0180] The process of performing an upsampling operation on the third feature map by the upsampling unit to obtain a fourth feature map includes:
[0181] The third feature map is sequentially subjected to convolution operation, normalization and activation operation, dimensionality reduction operation, transposed convolution operation and dimensionality increase operation to obtain a fourth feature map.
[0182] In an optional implementation, the model application module is further used to:
[0183] Input the insulator image to be detected into the trained target PMACNet network, so as to perform feature fusion processing and key feature extraction processing on the insulator image to be detected through the trained target PMACNet network, and obtain the damage detection result of the insulator image to be detected;
[0184] Evaluate and optimize the performance of the target PMACNet network in the insulator defect detection task based on the accuracy of the damage detection result of the insulator image to be detected.
[0185] In an alternative embodiment, the model training module 1004 is further configured to:
[0186] Initialize the network parameters in the target PMACNet network;
[0187] Use the binary cross-entropy loss function to evaluate the difference between the prediction result and the true label of the target PMACNet network during the training process;
[0188] Input the training set into the target PMACNet network for training, and perform backpropagation processing based on the stochastic gradient descent algorithm to update the network parameters of the target PMACNet network;
[0189] Input the validation set into the trained target PMACNet network to obtain a validation result;
[0190] Adjust the hyperparameters and network structure of the target PMACNet network according to the validation result.
[0191] In an alternative embodiment, the device is further configured to:
[0192] Input the test set into the trained target PMACNet network to test the effect of the trained target PMACNet network.
[0193] The further function descriptions of the above-mentioned modules and units are the same as those in the corresponding embodiments above, and will not be repeated here.
[0194] Please refer to Fig.11 , Fig.11 which is a schematic structural diagram of a computer device provided by an alternative embodiment of the present invention, as shown in Fig.11As shown, the computer device includes: one or more processors 10, a memory 20, and interfaces for connecting various components, including high-speed interfaces and low-speed interfaces. Various components are connected to each other using different buses for communication, and can be installed on a common mainboard or installed in other ways as needed. The processor can process the instructions executed in the computer device, including instructions stored in or on the memory to display the graphical information of the GUI on an external input / output device (such as, a display device coupled to the interface). In some optional embodiments, if necessary, multiple processors and / or multiple buses can be used together with multiple memories and multiple memories. Similarly, multiple computer devices can be connected, and each device provides some necessary operations (for example, as a server array, a group of blade servers, or a multi-processor system). Fig.11 A processor 10 is taken as an example.
[0195] The processor 10 may be a central processing unit, a network processor or a combination thereof. The processor 10 may further include a hardware chip. The hardware chip may be a dedicated integrated circuit, a programmable logic device or a combination thereof. The programmable logic device may be a complex programmable logic device, a field programmable gate array, a general purpose array logic or any combination thereof.
[0196] The memory 20 stores instructions executable by at least one processor 10, so that at least one processor 10 executes the method shown in the above embodiment.
[0197] The memory 20 may include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function; the data storage area may store data created according to the use of the computer device, etc. In addition, the memory 20 may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some optional embodiments, the memory 20 may optionally include a memory remotely arranged relative to the processor 10, and these remote memories may be connected to the computer device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0198] The memory 20 may include a volatile memory, such as a random access memory; the memory may also include a non-volatile memory, such as a flash memory, a hard disk or a solid state drive; the memory 20 may also include a combination of the above types of memory.
[0199] The computer device further comprises a communication interface 30 for the computer device to communicate with other devices or a communication network.
[0200] The embodiment of the present invention also provides a computer-readable storage medium. The method according to the embodiment of the present invention can be implemented in hardware, firmware, or can be implemented as a computer code that can be recorded in a storage medium, or can be implemented as a computer code that is originally stored in a remote storage medium or a non-temporary machine-readable storage medium and will be stored in a local storage medium through a network download, so that the method described herein can be stored in such software processing on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. Among them, the storage medium can be a magnetic disk, an optical disk, a read-only storage memory, a random access memory, a flash memory, a hard disk or a solid-state hard disk, etc.; further, the storage medium can also include a combination of the above types of memories. It can be understood that a computer, a processor, a microprocessor controller, or programmable hardware includes a storage component that can store or receive software or computer code. When the software or computer code is accessed and executed by a computer, a processor, or hardware, the method shown in the above embodiment is implemented.
[0201] A part of the present invention may be applied as a computer program product, such as a computer program instruction, which, when executed by a computer, can call or provide the method and / or technical solution according to the present invention through the operation of the computer. Those skilled in the art should understand that the existence of the computer program instruction in a computer-readable medium includes, but is not limited to, a source file, an executable file, an installation package file, etc., and accordingly, the way in which the computer program instruction is executed by the computer includes, but is not limited to: the computer directly executes the instruction, or the computer compiles the instruction and then executes the corresponding compiled program, or the computer reads and executes the instruction, or the computer reads and installs the instruction and then executes the corresponding installed program. Here, the computer-readable medium may be any available computer-readable storage medium or communication medium accessible to the computer.
[0202] Although the embodiments of the present invention have been described in conjunction with the accompanying drawings, those skilled in the art may make various modifications and variations without departing from the spirit and scope of the present invention, and such modifications and variations are all within the defined scope.
Claims
1. A method for detecting insulator damage based on deep learning, characterized in that: The method comprises: Construct an insulator image dataset; Preprocessing the insulator image dataset and dividing the preprocessed insulator image dataset into a training set, a validation set and a test set according to a target ratio; Get the target PMACNet network to be trained; Inputting the training set and the validation set into the target PMACNet network for training, and updating the network parameters of the target PMACNet network through back propagation processing; Based on the target PMACNet network after the training is completed, damage detection is performed on the insulator image to be detected, and a damage detection result of the insulator image to be detected is obtained.
2. The method according to claim 1, characterized in that The step of constructing an insulator image dataset comprises: Normal insulator images and damaged insulator images in different scenes are obtained, and the normal insulator images and the damaged insulator images are respectively annotated using a target image annotation tool to construct the insulator image dataset.
3. The method according to claim 1, characterized in that The preprocessing of the insulator image data set includes: The target insulator image in the insulator image data set is sequentially subjected to histogram equalization enhancement processing, affine transformation processing and noise transformation processing to enhance the image quality of the target insulator image.
4. The method according to claim 1, characterized in that The target PMACNet network includes a CBS-Conv unit, a GCS-Conv unit, a DOFFS-Conv unit, an upsampling unit and a Detect unit; The CBS-Conv unit is used to perform feature fusion on the input insulator image to obtain a first feature map after feature fusion; The GCS-Conv unit is used to perform key feature extraction and feature dimension reduction processing on the first feature map output by the CBS-Conv unit to obtain a second feature map; The DOFFS-Conv unit is used to perform dynamic sampling processing on the second feature map output by the GCS-Conv unit to obtain a third feature map having acquired key features; The up-sampling unit is used to perform an up-sampling operation on the third feature map to obtain a fourth feature map; The Detect unit is used to perform a splicing operation on the fourth feature map and the second feature map to obtain a final feature map, and perform prediction processing on the final feature map to obtain an insulator damage detection result.
5. The method according to claim 4, characterized in that The CBS-Conv unit performs feature fusion on the input insulator image to obtain a first feature map after feature fusion, which includes: The input insulator image is sequentially subjected to convolution operation, maximum pooling operation, reconvolution operation, feature map addition operation, sigmoid activation function normalization operation and dot multiplication operation to obtain the first feature map after feature fusion.
6. The method according to claim 4, characterized in that The process in which the GCS-Conv unit extracts key features and reduces feature dimensions on the first feature map output by the CBS-Conv unit to obtain a second feature map includes: The first feature map output by the CBS-Conv unit is sequentially subjected to an average pooling operation, a convolution operation, a Concat operation, a sigmoid activation function operation, a dot product operation, and a reconvolution operation to obtain a second feature map.
7. The method according to claim 4, characterized in that The process in which the DOFFS-Conv unit performs dynamic sampling processing on the second feature map output by the GCS-Conv unit to obtain a third feature map having acquired key features includes: The second feature map output by the GCS-Conv unit is sequentially subjected to a maximum pooling operation, an average pooling operation, a Concat operation, a ghost convolution dynamic sampling operation, a Relu activation function operation, and a dot product operation to obtain a third feature map having acquired key features; The process of performing an upsampling operation on the third feature map by the upsampling unit to obtain a fourth feature map includes: The third feature map is sequentially subjected to convolution operation, normalization and activation operation, dimensionality reduction operation, transposed convolution operation and dimensionality increase operation to obtain a fourth feature map.
8. The method according to claim 1, characterized in that The method of performing damage detection on the insulator image to be detected based on the target PMACNet network after the training is completed, and obtaining the damage detection result of the insulator image to be detected includes: Inputting the insulator image to be detected into the trained target PMACNet network, so as to perform feature fusion processing and key feature extraction processing on the insulator image to be detected through the trained target PMACNet network, and obtain the damage detection result of the insulator image to be detected; Based on the accuracy of the damage detection results of the insulator image to be detected, the performance of the target PMACNet network in the insulator defect detection task is evaluated and optimized.
9. The method according to claim 1, characterized in that: The step of inputting the training set and the validation set into the target PMACNet network for training, and updating the network parameters of the target PMACNet network through back propagation processing, comprises: Initializing network parameters in the target PMACNet network; Minimizing the binary cross entropy loss function to evaluate the difference between the prediction results of the target PMACNet network during training and the true labels; Inputting the training set into the target PMACNet network for training, and performing back propagation processing based on a stochastic gradient descent algorithm to update the network parameters of the target PMACNet network; Inputting the verification set into the target PMACNet network after training to obtain a verification result; According to the verification result, the hyperparameters and network structure of the target PMACNet network are adjusted.
10. The method according to claim 1, characterized in that The method further comprises: The test set is input into the target PMACNet network after training to perform an effect test on the target PMACNet network after training.