A method, device and equipment for detecting defects of insulators
By optimizing the backbone network and detection head group of the insulator defect detection model, the problem of slow detection speed in the existing technology is solved, and a balance between real-time performance and accuracy of insulator defect detection is achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- GUANGDONG POWER GRID CO LTD
- Filing Date
- 2023-02-28
- Publication Date
- 2026-06-30
Smart Images

Figure CN116188433B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of image technology, and in particular to a method, apparatus, and device for detecting insulator defects. Background Technology
[0002] Insulators are important components in power transmission lines, serving to fix conductors and maintain their electrical performance. However, insulators on power transmission lines are exposed to complex natural environments for extended periods, including strong winds, thunderstorms, high temperatures, and extreme cold, which can easily lead to insulator damage, string breakage, and optical corrosion. These defects are one of the main factors affecting the stable operation of the power system. Therefore, accurately detecting insulator defects and taking timely corresponding measures is crucial for maintaining the stable operation of the power system.
[0003] Currently, the main method for detecting insulator defects is to build models using deep learning-based target detection methods. However, this method focuses more on improving the accuracy of insulator defect detection, resulting in a slow detection speed that cannot meet the real-time requirements of practical applications. Summary of the Invention
[0004] This invention provides an insulator defect detection method, apparatus, and device, which solves the technical problem that existing deep learning-based target detection methods focus more on improving the detection accuracy of insulator defects, resulting in slow detection speeds and failing to meet the real-time requirements of practical applications.
[0005] The first aspect of this invention provides a method for detecting insulator defects, comprising:
[0006] When a training image is received, image preprocessing is performed on the training image to generate training data;
[0007] The training data is used to train a preset insulator defect detection model to generate a target insulator defect detection model, wherein the target insulator defect detection model includes a backbone network and a detection head group;
[0008] When an image of an insulator to be identified is received, the backbone network is used to extract features from the image and output multiple insulator feature maps layer by layer.
[0009] By continuously upsampling, feature maps of multiple insulators are fused to generate multiple fused feature maps.
[0010] Based on the resolution of the fused feature map, a corresponding detection head is matched from the detection head group;
[0011] The detection head is used to perform defect detection on the fused feature map to determine whether there are defects in the image of the insulator to be identified.
[0012] Optionally, the training data includes training sample data and test sample data, and the step of training a preset insulator defect detection model using the training data to generate a target insulator defect detection model includes:
[0013] The training sample data is input into a preset insulator defect detection model to generate a corresponding training feature map;
[0014] Select a standard feature map corresponding to the training feature map from the training sample data;
[0015] Calculate the overlap between the training feature map and the standard feature map;
[0016] Determine whether the overlap degree is less than or equal to a preset overlap degree threshold;
[0017] If the overlap is greater than the overlap threshold, the test sample data is input into the insulator defect detection model to obtain the detection time for generating the test feature map;
[0018] Determine whether the detection time is less than a preset detection time threshold;
[0019] If the detection time is less than the detection time threshold, training is stopped and a target insulator defect detection model is generated.
[0020] If the detection time is greater than or equal to the detection time threshold, or the overlap is less than or equal to the preset overlap threshold, then the model parameters of the insulator defect detection model are adjusted by the gradient descent method, and the process jumps to the step of inputting the training sample data into the preset insulator defect detection model, generating the corresponding training feature map, and obtaining the detection time of the training feature map.
[0021] Optionally, the backbone network includes a 7×7 standard convolutional layer, a first-stage convolutional group, a second-stage convolutional group, a third-stage convolutional group, and a fourth-stage convolutional group connected in sequence. The step of using the backbone network to perform feature recognition on the insulator image to be identified when an insulator image to be identified is received, and outputting multiple insulator feature maps layer by layer, includes:
[0022] When an image of an insulator to be identified is received, the 7×7 standard convolutional layer is used to extract features from the image to be identified and generate a low-level feature map.
[0023] The first stage convolutional group extracts features from the underlying feature map to generate a first insulator feature map, wherein the first stage convolutional group includes three first bottleneck modules connected in sequence.
[0024] The second stage convolutional group extracts features from the first insulator feature map to generate a second insulator feature map, wherein the second stage convolutional group includes four first bottleneck modules connected in sequence.
[0025] The third-stage convolutional group extracts features from the second insulator feature map to generate a third insulator feature map, wherein the third-stage convolutional group includes twenty-three second bottleneck modules connected in sequence.
[0026] The fourth-stage convolutional group extracts features from the third insulator feature map to generate a fourth insulator feature map, wherein the fourth-stage convolutional group includes a third bottleneck module and two first bottleneck modules connected in sequence.
[0027] Optionally, the first bottleneck module includes a 1×1 multi-channel standard convolutional layer, a first bottleneck branch, a feature fusion layer, a batch normalization layer, and a LeakyReLU activation layer; the specific processing procedure of the first bottleneck module is as follows:
[0028] A 1×1 multi-channel standard convolutional layer and the first bottleneck branch are used to extract features from the input first feature image, generating multiple first extracted feature maps;
[0029] The multiple first extracted feature maps are fused by a feature fusion layer to generate a first extracted fused feature map.
[0030] The first extracted and fused feature map is non-linearly mapped by passing it through a batch normalization layer and a LeakyReLU activation layer in sequence to generate the first bottleneck feature map.
[0031] The first bottleneck branch includes a 1×1 multi-channel standard convolutional layer, a batch normalization layer, a LeakyReLU activation layer, a 3×3 multi-channel standard convolutional layer, a batch normalization layer, a LeakyReLU activation layer, and a 1×1 multi-channel standard convolutional layer connected in sequence.
[0032] Optionally, the second bottleneck module includes a 1×1 multi-channel standard convolutional layer, a second bottleneck branch, a feature fusion layer, a batch normalization layer, and a LeakyReLU activation layer; the specific processing procedure of the second bottleneck module is as follows:
[0033] A 1×1 multi-channel standard convolutional layer and the second bottleneck branch are used to extract features from the input second feature image, generating multiple second extracted feature maps;
[0034] The multiple second extracted feature maps are fused using a feature fusion layer to generate a second extracted fused feature map.
[0035] The second extracted and fused feature map is non-linearly mapped by passing it through a batch normalization layer and a LeakyReLU activation layer in sequence to generate a second bottleneck feature map.
[0036] The second bottleneck branch includes a 1×1 multi-channel standard convolutional layer, a batch normalization layer, a LeakyReLU activation layer, a 1×3 multi-channel standard convolutional layer, a 3×1 multi-channel standard convolutional layer, a batch normalization layer, a LeakyReLU activation layer, and a 1×1 multi-channel standard convolutional layer connected in sequence.
[0037] Optionally, the third bottleneck module includes a 1×1 multi-channel standard convolutional layer, a third bottleneck branch, a feature fusion layer, a batch normalization layer, and a DY-ReLU activation layer; the specific processing procedure of the third bottleneck module is as follows:
[0038] The 1×1 multi-channel standard convolutional layer and the third bottleneck branch are used to extract features from the input third feature image, generating multiple third extracted feature maps;
[0039] The multiple third extracted feature maps are fused using a feature fusion layer to generate a third extracted fused feature map.
[0040] The third extracted and fused feature map is nonlinearly mapped by passing it through a batch normalization layer and a DY-ReLU activation layer in sequence to generate a third bottleneck feature map.
[0041] The third bottleneck branch includes a 1×1 multi-channel standard convolutional layer, a batch normalization layer, a DY-ReLU activation layer, a 3×3 multi-channel dilated convolutional layer, a batch normalization layer, a DY-ReLU activation layer, and a 1×1 multi-channel standard convolutional layer connected in sequence.
[0042] Optionally, the fused feature map includes a first fused feature map, a second fused feature map, a third fused feature map, and a fourth fused feature map. The step of fusing the multiple insulator feature maps through continuous upsampling to generate multiple fused feature maps includes:
[0043] By upsampling the feature map of the fourth insulator, a first sampled feature map is generated, and the feature map of the fourth insulator is used as the first fused feature map;
[0044] The first sampled feature map and the third insulator feature map are fused by the feature fusion layer to generate a second fused feature map.
[0045] A second sampled feature map is generated by upsampling the second fused feature map;
[0046] The second sampled feature map and the second insulator feature map are fused by the feature fusion layer to generate a third fused feature map.
[0047] A third sampled feature map is generated by upsampling the third fused feature map;
[0048] The third sampled feature map and the first insulator feature map are fused by the feature fusion layer to generate a fourth fused feature map.
[0049] Optionally, the step of using the detection head to perform defect detection on the fused feature map and determining whether the insulator image to be identified has defects includes:
[0050] The detection head is used to perform defect detection on the fused feature map to generate an image score;
[0051] Determine whether the image score is less than or equal to a preset score threshold;
[0052] If the image score is greater than or equal to the score threshold, then the image of the insulator to be identified is found to have a defect.
[0053] If the image score is less than the score threshold, the output will show that the image of the insulator to be identified does not have defects.
[0054] A second aspect of the present invention provides an insulator defect detection device, comprising:
[0055] The image preprocessing module is used to preprocess the training image when a training image is received to generate training data.
[0056] The target insulator defect detection model generation module is used to train a preset insulator defect detection model using the training data to generate a target insulator defect detection model, wherein the target insulator defect detection model includes a backbone network and a detection head group;
[0057] The insulator feature map acquisition module is used to extract features from the insulator image to be identified using the backbone network when an insulator image to be identified is received, and output multiple insulator feature maps layer by layer.
[0058] The fusion feature map acquisition module is used to perform feature fusion on the multiple insulator feature maps through continuous upsampling to generate multiple fusion feature maps;
[0059] The detection head acquisition module is used to match the corresponding detection head from the detection head group according to the resolution of the fused feature map;
[0060] The defect detection module is used to perform defect detection on the fused feature map using the detection head, and to determine whether the image of the insulator to be identified has defects.
[0061] A third aspect of the present invention provides an electronic device, including a memory and a processor, wherein the memory stores a computer program, and when the computer program is executed by the processor, the processor performs the steps of the insulator defect detection method as described in any one of the first aspects of the present invention.
[0062] As can be seen from the above technical solutions, the present invention has the following advantages:
[0063] This invention addresses the problem that existing deep learning-based target detection methods for insulator defect detection focus primarily on improving detection accuracy, resulting in slow detection speeds that fail to meet the real-time requirements of practical applications. By inputting the feature maps of the insulator to be identified into the target insulator defect detection model without anchor points, the invention improves detection speed. Furthermore, the internal structure of the target insulator defect detection model shortens the time required for feature recognition by the backbone network, achieving a balance between detection speed and accuracy. Attached Figure Description
[0064] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0065] Figure 1 This is a flowchart of the steps of an insulator defect detection method provided in Embodiment 1 of the present invention;
[0066] Figure 2 This is a flowchart of the steps of an insulator defect detection method provided in Embodiment 2 of the present invention;
[0067] Figure 3 This is a schematic diagram of the structure of the second bottleneck module provided in Embodiment 2 of the present invention;
[0068] Figure 4 This is a schematic diagram of the structure of the third bottleneck module provided in Embodiment 2 of the present invention;
[0069] Figure 5 This is a schematic diagram of the target insulator defect detection model provided in Embodiment 2 of the present invention;
[0070] Figure 6 This is a structural block diagram of an insulator defect detection device provided in Embodiment 3 of the present invention. Detailed Implementation
[0071] This invention provides an insulator defect detection method, apparatus, and device to address the technical problem that existing deep learning-based target detection methods focus more on improving the detection accuracy of insulator defects, resulting in slow detection speeds and failing to meet the real-time requirements of practical applications.
[0072] To make the objectives, features, and advantages of this invention more apparent and understandable, the technical solutions of the embodiments of this invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the embodiments described below are only some embodiments of this invention, and not all embodiments. Based on the embodiments of this invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this invention.
[0073] Please see Figure 1 , Figure 1 This is a flowchart illustrating the steps of an insulator defect detection method provided in Embodiment 1 of the present invention.
[0074] The present invention provides a method for detecting insulator defects, comprising:
[0075] Step 101: When a training image is received, perform image preprocessing on the training image to generate training data.
[0076] Training images refer to images containing defective insulators selected from images of power grid drone inspections, and all images are cropped to a size of 1024*1024.
[0077] Image preprocessing refers to collecting images containing defective insulators, compiling them into a preliminary image dataset, and randomly dividing the images in the dataset into a training set and a test set at a ratio of 7:3. Using Photoshop software, the lighting and contrast of the images in the training set and the test set are adjusted respectively, so that each image has 5 expanded images with different lighting and 5 images with different contrast. The expanded images and the original images before expansion are combined to form the expanded training sample data and test sample data. Finally, LabME software is used to annotate the defective insulators in the training set and the test set respectively, generating XML format annotation files.
[0078] Training data refers to the sample data used to train the insulator defect detection model.
[0079] In this embodiment of the invention, when an insulator image collected by a drone is received, the insulator image is divided, labeled, and expanded to generate training data.
[0080] Step 102: Train the preset insulator defect detection model using training data to generate the target insulator defect detection model, which includes a backbone network and a detection head group.
[0081] The target insulator defect detection model refers to a neural network model composed of an insulator detection neural network. It mainly includes a backbone network and a detection head group. The backbone network is composed of a 7×7 standard convolutional layer, a first-stage convolutional group, a second-stage convolutional group, a third-stage convolutional group, and a fourth-stage convolutional group connected in sequence. The detection head group includes a first detection head, a second detection head, a third detection head, and a fourth detection head, and the detection head is equipped with a feature interactor.
[0082] In this embodiment of the invention, a target insulator defect detection model is generated by training a preset insulator defect detection model using training data.
[0083] Step 103: When the image of the insulator to be identified is received, the backbone network is used to extract features from the image of the insulator to be identified, and multiple insulator feature maps are output layer by layer.
[0084] An insulator feature map refers to the insulator feature map output by inputting an image of the insulator to be identified into the backbone network.
[0085] In this embodiment of the invention, when an image of an insulator to be identified is received, a backbone network is used to extract features of the insulator to be identified, and four insulator feature images are output layer by layer.
[0086] It should be noted that the backbone network includes a 7×7 standard convolutional layer, a first-stage convolutional group, a second-stage convolutional group, a third-stage convolutional group, and a fourth-stage convolutional group. Each convolutional group consists of several bottleneck modules, and each stage convolutional group generates an insulator feature map when extracting features from the feature map.
[0087] Step 104: Perform feature fusion on multiple insulator feature maps through continuous upsampling to generate multiple fused feature maps.
[0088] Upsampling refers to enlarging the input image to increase its resolution.
[0089] In this embodiment of the invention, when multiple insulator feature maps are received, the multiple insulator feature maps are arranged in descending order of resolution to form a pyramid feature hierarchy structure. Continuous upsampling and addition operations are performed from top to bottom to generate multiple fused feature maps.
[0090] Step 105: Match the corresponding detection head from the detection head group according to the resolution of the fused feature map.
[0091] Resolution refers to the amount of information stored in an image, used to represent the total number of pixels in the image.
[0092] The detection head refers to a feature recognition network used to identify and locate defects and their positions from a fused feature map.
[0093] In this embodiment of the invention, when the output fused feature map is received, the corresponding detection head is selected from the four detection heads according to the resolution of the feature map.
[0094] Step 106: Use the detection head to perform defect detection on the fused feature map to determine whether there are defects in the image of the insulator to be identified.
[0095] In this embodiment of the invention, a detection head is used to perform defect detection on the fused feature map, and the detection results are used to determine whether there are defects in the image of the insulator to be identified.
[0096] In this embodiment of the invention, when a training image is received, it is preprocessed to generate training data. This training data is then used to train a pre-defined insulator defect detection model, generating a target insulator defect detection model. When an insulator image to be identified is received, it is input into the target insulator defect detection model. The backbone network within the target insulator defect detection model extracts features from the image, outputting multiple insulator feature maps layer by layer. These feature maps are arranged in descending order of resolution to form a pyramid feature hierarchy. Continuous upsampling and addition operations are performed from top to bottom to generate multiple fused feature maps. Based on the resolution of these feature maps, a corresponding detection head is selected from four detection heads. The detection head then performs defect detection on the fused feature map to determine whether the insulator image to be identified has a defect. This solves the technical problem that existing insulator defect detection methods, while achieving high detection accuracy, suffer from slow detection speeds, failing to meet the real-time requirements of practical applications. By improving the internal structure of the backbone network, the time for the backbone network to extract features from the image of the insulator to be identified is shortened while ensuring detection accuracy, thus achieving a balance between the detection speed and accuracy of insulator defects.
[0097] Please see Figure 2 , Figure 2 This is a flowchart illustrating the steps of an insulator defect detection method provided in Embodiment 1 of the present invention.
[0098] The present invention provides a method for detecting insulator defects, comprising:
[0099] Step 201: When a training image is received, perform image preprocessing on the training image to generate training data.
[0100] In this embodiment of the invention, the specific implementation process of step 201 is similar to that of step 101, and will not be repeated here.
[0101] It is worth mentioning that the training data (including defective images such as missing insulators, cracked insulators, and dirty insulators) was used, and the brightness and contrast of the training and test sets within the training data were adjusted using Photoshop, and then labeled using Labelme.
[0102] Step 202: Train the preset insulator defect detection model using training data to generate the target insulator defect detection model, which includes a backbone network and a detection head group.
[0103] Furthermore, the training data includes training sample data and test sample data, and step 202 may include the following sub-steps:
[0104] S11. Input the training sample data into the preset insulator defect detection model to generate the corresponding training feature map.
[0105] Training feature maps refer to the defect feature maps generated by inputting training sample data into the insulator defect detection model.
[0106] Detection time refers to the time spent inputting training sample data into the insulator defect detection model and generating training feature maps. The time spent represents the detection speed of the insulator defect detection model.
[0107] In this embodiment of the invention, training sample data is input into a preset insulator defect detection model to generate a corresponding training feature map, and the time spent generating the training feature map is obtained.
[0108] It should be noted that the shorter the detection time, the faster the insulator defect detection model can detect defects.
[0109] S12. Select the standard feature map corresponding to the training feature map from the test sample data.
[0110] In this embodiment of the invention, a standard feature map corresponding to the training feature map is selected from the training sample data.
[0111] S13. Calculate the overlap between the training feature map and the standard feature map.
[0112] Overlap ratio refers to the ratio between the training feature map and the standard feature map.
[0113] In this embodiment of the invention, the ratio between the training feature map and the standard feature map is calculated.
[0114] S14. Determine whether the overlap is less than or equal to the preset overlap threshold.
[0115] In this embodiment of the invention, it is determined whether the ratio between the training feature map and the standard feature map is less than or equal to 99%.
[0116] S15. If the overlap is greater than the overlap threshold, the test sample data is input into the insulator defect detection model to obtain the detection time for generating the test feature map.
[0117] In this embodiment of the invention, if the ratio between the training feature map and the standard feature map is greater than 99%, the detection sample data is input into the trained insulator defect detection model to obtain the detection time for generating test features.
[0118] S16. Determine whether the detection time is less than the preset detection time threshold.
[0119] The detection time threshold refers to the average detection speed of the trained insulator defect detection model.
[0120] In this embodiment of the invention, it is determined whether the detection time is less than the average detection speed of the trained insulator defect detection model.
[0121] S17. If the detection time is less than the detection time threshold, stop training and generate the target insulator defect detection model.
[0122] In this embodiment of the invention, if the detection time is less than the average detection speed of the trained insulator defect detection model, the training is stopped and the target insulator defect detection model is generated.
[0123] S18. If the detection time is greater than or equal to the detection time threshold, or the overlap is less than or equal to the preset overlap threshold, then the model parameters of the insulator defect detection model are adjusted by the gradient descent method, and the process jumps to the step of inputting the training sample data into the preset insulator defect detection model, generating the corresponding training feature map, and obtaining the detection time of the training feature map.
[0124] In this embodiment of the invention, if the detection time is greater than or equal to the average detection speed of the trained insulator defect detection model, or the ratio between the training feature map and the standard feature map is less than 99%, then the model parameters of the insulator defect detection model are adjusted by the gradient descent method, and the process jumps to the steps of inputting training sample data into the preset insulator defect detection model, generating the corresponding training feature map, and obtaining the detection time of the training feature map.
[0125] It should be noted that gradient descent adjusts the model by minimizing the objective function j(o), where o are the model parameters, o∈R. d In each iteration, for each model parameter, the corresponding parameter value is updated in the opposite direction of the gradient of the objective function on that variable.
[0126] Step 203: When the image of the insulator to be identified is received, the backbone network is used to extract features from the image of the insulator to be identified, and multiple insulator feature maps are output layer by layer.
[0127] Furthermore, the backbone network comprises a 7×7 standard convolutional layer, a first-stage convolutional group, a second-stage convolutional group, a third-stage convolutional group, and a fourth-stage convolutional group connected in sequence. Step 203 may include the following sub-steps:
[0128] S21. When an image of an insulator to be identified is received, a 7×7 standard convolutional layer is used to extract features from the image of the insulator to be identified and generate a low-level feature map.
[0129] In this embodiment of the invention, when an image of an insulator to be identified is received, the image features of the image of the insulator to be identified are extracted through a 7×7 standard convolutional layer to generate a low-level feature map.
[0130] S22. The first-stage convolutional group extracts features from the low-level feature map to generate the first insulator feature map, wherein the first-stage convolutional group includes three first bottleneck modules connected in sequence.
[0131] Furthermore, the first bottleneck module includes a 1×1 multi-channel standard convolutional layer, a first bottleneck branch, a feature fusion layer, a batch normalization layer, and a LeakyReLU activation layer; the specific processing procedure of the first bottleneck module is as follows:
[0132] A 1×1 multi-channel standard convolutional layer and a first bottleneck branch are used to extract features from the input first feature image, generating multiple first extracted feature maps;
[0133] The first feature image refers to the feature map input to the first bottleneck module.
[0134] In this embodiment of the invention, after the feature map is input to the first bottleneck module, the feature map is input to a 1×1 multi-channel standard convolutional layer and the first bottleneck branch respectively to extract features from the feature map, generating two types of first extracted feature maps.
[0135] The feature fusion layer fuses multiple first extracted feature maps to generate a first extracted fused feature map.
[0136] In this embodiment of the invention, two first extracted feature maps are input into the feature fusion layer, and feature fusion is performed through an addition operation to generate a first extracted fused feature map.
[0137] The first extracted and fused feature map is nonlinearly mapped by sequentially passing through a batch normalization layer and a LeakyReLU activation layer to generate the first bottleneck feature map.
[0138] The first bottleneck branch consists of a 1×1 multi-channel standard convolutional layer, a batch normalization layer, a LeakyReLU activation layer, a 3×3 multi-channel standard convolutional layer, a batch normalization layer, a LeakyReLU activation layer, and a 1×1 multi-channel standard convolutional layer connected in sequence.
[0139] In this embodiment of the invention, the first extracted and fused feature map is nonlinearly mapped by a batch normalization layer and a LeakyReLU activation layer in sequence to generate a first bottleneck feature map.
[0140] S23. The first insulator feature map is extracted by the second stage convolution group to generate the second insulator feature map, wherein the second stage convolution group includes four first bottleneck modules connected in sequence.
[0141] In this embodiment of the invention, the first insulator feature map is input into the second convolution group for feature extraction to generate the second insulator feature map.
[0142] S24. The second insulator feature map is extracted by the third-stage convolution group to generate the third insulator feature map, wherein the third-stage convolution group includes twenty-three second bottleneck modules connected in sequence.
[0143] Furthermore, the second bottleneck module includes a 1×1 multi-channel standard convolutional layer, a second bottleneck branch, a feature fusion layer, a batch normalization layer, and a LeakyReLU activation layer; the specific processing procedure of the second bottleneck module is as follows:
[0144] A 1×1 multi-channel standard convolutional layer and a second bottleneck branch are used to extract features from the input second feature image, generating multiple second extracted feature maps.
[0145] A feature fusion layer is used to fuse multiple second extracted feature maps to generate a second extracted fused feature map.
[0146] The second extracted and fused feature map is non-linearly mapped by passing it through a batch normalization layer and a LeakyReLU activation layer in sequence to generate the second bottleneck feature map.
[0147] The second bottleneck branch consists of a 1×1 multi-channel standard convolutional layer, a batch normalization layer, a LeakyReLU activation layer, a 1×3 multi-channel standard convolutional layer, a 3×1 multi-channel standard convolutional layer, a batch normalization layer, a LeakyReLU activation layer, and a 1×1 multi-channel standard convolutional layer connected in sequence.
[0148] like Figure 3 As shown, in this embodiment of the invention, the second bottleneck module includes a 1×1 standard convolutional layer with 1024 channels, a second bottleneck branch, a feature fusion layer, a batch normalization layer, and a LeakyReLU activation layer. The 1×1 standard convolutional layer with 1024 channels and the second bottleneck branch respectively extract features from the input second feature image, generating two types of second extracted feature maps. These two second extracted feature maps are then input into the feature fusion layer and fused through an addition operation to generate a second extracted feature map. The second extracted fused feature map is then nonlinearly mapped through the batch normalization layer and the LeakyReLU activation layer to generate a second bottleneck feature map. The second bottleneck branch includes a 1×1 standard convolutional layer with 256 channels, a batch normalization layer, a LeakyReLU activation layer, a 1×3 standard convolutional layer with 256 channels, a 3×1 standard convolutional layer with 256 channels, a batch normalization layer, a LeakyReLU activation layer, and a 1×1 standard convolutional layer with 1024 channels, connected sequentially.
[0149] It should be noted that using a 1×3 standard convolutional layer with 256 channels and a 3×1 standard convolutional layer with 256 channels can effectively reduce the computational cost of the model, thereby shortening the time for feature extraction from the feature map. At the same time, it can make the output feature map size the same as the input feature map size, increasing the receptive field and thus improving the accuracy of model detection.
[0150] S25. The fourth insulator feature map is generated by extracting features from the third insulator feature map through the fourth stage convolution group, wherein the fourth stage convolution group includes a third bottleneck module and two first bottleneck modules connected in sequence.
[0151] Furthermore, the third bottleneck module includes a 1×1 multi-channel standard convolutional layer, a third bottleneck branch, a feature fusion layer, a batch normalization layer, and a DY-ReLU activation layer; the specific processing procedure of the third bottleneck module is as follows:
[0152] A 1×1 multi-channel standard convolutional layer and a third bottleneck branch are used to extract features from the input third feature image, generating multiple third extracted feature maps;
[0153] The feature fusion layer fuses multiple third-extracted feature maps to generate a third-extracted fused feature map.
[0154] The third extracted and fused feature map is non-linearly mapped by passing through a batch normalization layer and a DY-ReLU activation layer in sequence to generate the third bottleneck feature map.
[0155] The third bottleneck branch consists of a 1×1 multi-channel standard convolutional layer, a batch normalization layer, a DY-ReLU activation layer, a 3×3 multi-channel dilated convolutional layer, a batch normalization layer, a DY-ReLU activation layer, and a 1×1 multi-channel standard convolutional layer connected in sequence.
[0156] like Figure 4As shown, in this embodiment of the invention, the third bottleneck module includes a 1×1 standard convolutional layer with 2048 channels, a third bottleneck branch, a feature fusion layer, a batch normalization layer, and a DY-ReLU activation layer. The 1×1 standard convolutional layer with 2048 channels and the third bottleneck branch extract features from the third feature image, generating two types of third extracted feature maps. These two third extracted feature maps are then input to the feature fusion layer and fused through an addition operation to generate a third extracted fused feature map. This third extracted fused feature map is then nonlinearly mapped through the batch normalization layer and the DY-ReLU activation layer to generate the third bottleneck feature map. The third bottleneck branch includes a 1×1 standard convolutional layer with 512 channels, a batch normalization layer, a DY-ReLU activation layer, a 3×3 dilated convolutional layer with 512 channels (dilation rate = 2, padding = 2), a batch normalization layer, and a DY-ReLU activation layer, all connected sequentially. The 1×1 standard convolutional layer with 2048 channels is then used to extract features from the third feature image.
[0157] It should be noted that the third bottleneck module uses a DY-ReLU activation layer as the activation function, which improves the model's feature extraction capability and thus improves the model's detection accuracy.
[0158] like Figure 5 As shown in this embodiment of the invention, the target insulator defect detection model includes a backbone network and a detection head group. The backbone network is divided into a 7×7 standard convolutional layer, a first-stage convolutional group, a second-stage convolutional group, a third-stage convolutional group, and a fourth-stage convolutional group. When the image of the insulator to be identified is input into the sequentially connected 7×7 standard convolutional layer, first-stage convolutional group, second-stage convolutional group, third-stage convolutional group, and fourth-stage convolutional group, each stage convolutional group generates a corresponding insulator feature map. A 1×1 standard convolutional layer is then used to extract features from the four insulator feature maps, generating a first insulator feature map, a second insulator feature map, a third insulator feature map, and a fourth insulator feature map. The four insulator feature maps are arranged in a layer feature pyramid structure according to their resolution, and continuous upsampling is performed to generate three fused feature maps. Finally, the fourth insulator feature map and the three fused feature maps are input into the corresponding detection heads of the detection head group for defect detection, based on their resolution.
[0159] Step 204: Perform feature fusion on multiple insulator feature maps through continuous upsampling to generate multiple fused feature maps.
[0160] Furthermore, the fused feature map includes a first fused feature map, a second fused feature map, a third fused feature map, and a fourth fused feature map, and step 204 may include the following sub-steps:
[0161] S31. By upsampling the feature map of the fourth insulator, a first sampled feature map is generated, and the feature map of the fourth insulator is used as the first fused feature map.
[0162] In this embodiment of the invention, a first sampled feature map is generated by upsampling the feature map of the fourth insulator, and the feature map of the fourth insulator is used as the first fused feature map.
[0163] S32. The first sampled feature map and the third insulator feature map are fused through the feature fusion layer to generate the second fused feature map.
[0164] In this embodiment of the invention, the first sampled feature map and the third insulator feature map are input into the feature fusion layer and feature fusion is performed by addition to generate the second fused feature map.
[0165] S33. A second sampled feature map is generated by upsampling the second fused feature map.
[0166] In this embodiment of the invention, a second sampled feature map is generated by upsampling the second fused feature map.
[0167] S34. The second sampled feature map and the second insulator feature map are fused through the feature fusion layer to generate the third fused feature map.
[0168] In this embodiment of the invention, the second sampled feature map and the second insulator feature map are input into the feature fusion layer and feature fusion is performed through an addition operation to generate a third fused feature map.
[0169] S35. A third sampled feature map is generated by upsampling the third fusion feature map.
[0170] In this embodiment of the invention, a third sampled feature map is generated by upsampling the third fused feature map.
[0171] S36. The third sampled feature map and the first insulator feature map are fused through the feature fusion layer to generate the fourth fused feature map.
[0172] In this embodiment of the invention, the third sampled feature map and the first insulator feature map are input into the feature fusion layer and feature fusion is performed by addition to generate a fourth fused feature map.
[0173] Step 205: Match the corresponding detection head from the detection head group according to the resolution of the fused feature map.
[0174] In this embodiment of the invention, the four insulator feature maps and the three fused feature maps are arranged in descending order of resolution, and then input into the first detection head, the second detection head, the third detection head, and the fourth detection head in sequence.
[0175] Step 206: Use the detection head to perform defect detection on the fused feature map and generate an image score.
[0176] In this embodiment of the invention, a detection head is used to detect defects in the fused feature map and generate a corresponding image score.
[0177] Step 207: Determine whether the image score is greater than or equal to the preset score threshold.
[0178] In this embodiment of the invention, it is determined whether the image score is greater than or equal to 95.
[0179] It should be noted that the higher the image score, the more obvious the defective target in the fused feature map.
[0180] Step 208: If the image score is greater than or equal to the score threshold, then output that the image of the insulator to be identified has a defect.
[0181] In this embodiment of the invention, if the image score is greater than or equal to 95, the image of the insulator to be identified is output as having defects.
[0182] Step 209: If the image score is less than the score threshold, output that the image of the insulator to be identified does not have defects.
[0183] In this embodiment of the invention, if the image score is less than 95, the output image of the insulator to be identified is found to be free of defects.
[0184] In this embodiment of the invention, when a training image is received, image preprocessing is performed to generate training sample data and test sample data. The preset insulator defect detection model is trained and tested using the training and test sample data respectively, ultimately obtaining a target insulator defect detection model that meets the requirements. When an insulator image to be identified is received, the image is input into the target insulator defect detection model. The backbone network within the target insulator detection model extracts features from the image, outputting multiple insulator feature maps layer by layer. These feature maps are arranged in descending order of resolution to form a pyramid feature hierarchy. Continuous upsampling and addition operations are performed from top to bottom to generate multiple fused feature maps. A corresponding detection head is matched from the detection head group according to the resolution of the fused feature map. The detection head performs defect detection on the fused feature map to determine whether the insulator image to be identified has a defect. This solves the technical problem that while existing insulator defect detection methods have high detection accuracy, their detection speed is slow and cannot meet the real-time requirements of practical applications. By incorporating a fourth-stage convolutional group composed of one third bottleneck module and two first bottleneck modules connected sequentially within the backbone network, and a third-stage convolutional group composed of 23 second bottleneck modules connected sequentially, the computational load of the backbone network during feature extraction is reduced. Simultaneously, the receptive field during feature extraction is increased, ensuring that the output feature map size is consistent with the input feature map size. This improves the speed and capability of the backbone network in extracting image features, achieving a balance between speed and accuracy in insulator defect detection.
[0185] Please see Figure 6 , Figure 6 This is a structural block diagram of an insulator defect detection device provided in Embodiment 3 of the present invention.
[0186] This invention provides an insulator defect detection device, comprising:
[0187] The image preprocessing module 601 is used to preprocess the training image when a training image is received to generate training data.
[0188] The target insulator defect detection model generation module 602 is used to train a preset insulator defect detection model using training data to generate a target insulator defect detection model, wherein the target insulator defect detection model includes a backbone network and a detection head group;
[0189] The insulator feature map acquisition module 603 is used to extract features from the insulator image to be identified using a backbone network when an insulator image to be identified is received, and output multiple insulator feature maps layer by layer.
[0190] The fusion feature map acquisition module 604 is used to perform feature fusion on multiple insulator feature maps through continuous upsampling to generate multiple fusion feature maps;
[0191] The detection head acquisition module 605 is used to match the corresponding detection head from the detection head group according to the resolution of the fused feature map;
[0192] The defect detection module 606 is used to perform defect detection on the fused feature map using a detection head to determine whether there are defects in the image of the insulator to be identified.
[0193] Furthermore, the training data includes training sample data and test sample data, and the target insulator defect detection model generation module 602 includes:
[0194] The training parameter acquisition submodule is used to input training sample data into a preset insulator defect detection model and generate corresponding training feature maps.
[0195] The judgment and analysis submodule is used to select the standard feature map corresponding to the training feature map from the training sample data;
[0196] Calculate the overlap between the training feature map and the standard feature map;
[0197] Determine whether the overlap is less than or equal to a preset overlap threshold;
[0198] If the overlap is greater than the overlap threshold, the test sample data is input into the insulator defect detection model to obtain the detection time for generating the test feature map;
[0199] Determine whether the detection time is less than the preset detection time threshold;
[0200] If the detection time is less than the detection time threshold, training is stopped and a target insulator defect detection model is generated.
[0201] If the detection time is greater than or equal to the detection time threshold, or the overlap is less than or equal to the preset overlap threshold, the model parameters of the insulator defect detection model are adjusted by the gradient descent method, and the process jumps to the step of inputting the training sample data into the preset insulator defect detection model, generating the corresponding training feature map, and obtaining the detection time of the training feature map.
[0202] Furthermore, the backbone network comprises a 7×7 standard convolutional layer, a first-stage convolutional group, a second-stage convolutional group, a third-stage convolutional group, and a fourth-stage convolutional group connected in sequence, including:
[0203] The low-level feature map generation submodule is used to extract features from the image of the insulator to be identified using a 7×7 standard convolutional layer when an image of the insulator to be identified is received, and generate a low-level feature map.
[0204] The first insulator feature map generation submodule is used to extract features from the bottom feature map through the first stage convolution group to generate the first insulator feature map, wherein the first stage convolution group includes three first bottleneck modules connected in sequence.
[0205] The second insulator feature map generation submodule is used to extract features from the first insulator feature map through a second-stage convolutional group to generate the second insulator feature map. The second-stage convolutional group includes four first bottleneck modules connected in sequence.
[0206] The third insulator feature map generation submodule is used to extract features from the second insulator feature map through the third-stage convolution group to generate the third insulator feature map. The third-stage convolution group includes twenty-three second bottleneck modules connected in sequence.
[0207] The fourth insulator feature map generation submodule is used to extract features from the third insulator feature map through the fourth-stage convolution group to generate the fourth insulator feature map. The fourth-stage convolution group includes a third bottleneck module and two first bottleneck modules connected in sequence.
[0208] Furthermore, the first bottleneck module includes a 1×1 multi-channel standard convolutional layer, a first bottleneck branch, a feature fusion layer, a batch normalization layer, and a LeakyReLU activation layer; the specific processing procedure of the first bottleneck module is as follows:
[0209] A 1×1 multi-channel standard convolutional layer and a first bottleneck branch are used to extract features from the input first feature image, generating multiple first extracted feature maps;
[0210] The feature fusion layer fuses multiple first extracted feature maps to generate a first extracted fused feature map.
[0211] The first extracted and fused feature map is non-linearly mapped by passing through a batch normalization layer and a LeakyReLU activation layer in sequence to generate the first bottleneck feature map.
[0212] The first bottleneck branch consists of a 1×1 multi-channel standard convolutional layer, a batch normalization layer, a LeakyReLU activation layer, a 3×3 multi-channel standard convolutional layer, a batch normalization layer, a LeakyReLU activation layer, and a 1×1 multi-channel standard convolutional layer connected in sequence.
[0213] Furthermore, the second bottleneck module includes a 1×1 multi-channel standard convolutional layer, a second bottleneck branch, a feature fusion layer, a batch normalization layer, and a LeakyReLU activation layer; the specific processing procedure of the second bottleneck module is as follows:
[0214] A 1×1 multi-channel standard convolutional layer and a second bottleneck branch are used to extract features from the input second feature image, generating multiple second extracted feature maps.
[0215] A feature fusion layer is used to fuse multiple second extracted feature maps to generate a second extracted fused feature map.
[0216] The second extracted and fused feature map is non-linearly mapped by passing it through a batch normalization layer and a LeakyReLU activation layer in sequence to generate the second bottleneck feature map.
[0217] The second bottleneck branch consists of a 1×1 multi-channel standard convolutional layer, a batch normalization layer, a LeakyReLU activation layer, a 1×3 multi-channel standard convolutional layer, a 3×1 multi-channel standard convolutional layer, a batch normalization layer, a LeakyReLU activation layer, and a 1×1 multi-channel standard convolutional layer connected in sequence.
[0218] Furthermore, the third bottleneck module includes a 1×1 multi-channel standard convolutional layer, a third bottleneck branch, a feature fusion layer, a batch normalization layer, and a DY-ReLU activation layer; the specific processing procedure of the third bottleneck module is as follows:
[0219] A 1×1 multi-channel standard convolutional layer and a third bottleneck branch are used to extract features from the input third feature image, generating multiple third extracted feature maps;
[0220] The feature fusion layer fuses multiple third-extracted feature maps to generate a third-extracted fused feature map.
[0221] The third extracted and fused feature map is non-linearly mapped by passing through a batch normalization layer and a DY-ReLU activation layer in sequence to generate the third bottleneck feature map.
[0222] The third bottleneck branch consists of a 1×1 multi-channel standard convolutional layer, a batch normalization layer, a DY-ReLU activation layer, a 3×3 multi-channel dilated convolutional layer, a batch normalization layer, a DY-ReLU activation layer, and a 1×1 multi-channel standard convolutional layer connected in sequence.
[0223] Furthermore, the fused feature map includes a first fused feature map, a second fused feature map, a third fused feature map, and a fourth fused feature map, and the fused feature map acquisition module 604 includes:
[0224] The first fusion feature map generation submodule is used to generate a first sampled feature map by upsampling the feature map of the fourth insulator, and to use the feature map of the fourth insulator as the first fusion feature map;
[0225] The second fused feature map generation submodule is used to perform feature fusion on the first sampled feature map and the third insulator feature map through the feature fusion layer to generate the second fused feature map.
[0226] The second sampling feature map generation submodule is used to generate a second sampling feature map by upsampling the second fused feature map;
[0227] The third fusion feature map generation submodule is used to perform feature fusion on the second sampled feature map and the second insulator feature map through the feature fusion layer to generate the third fusion feature map.
[0228] The third sampling feature map generation submodule is used to generate a third sampling feature map by upsampling the third fused feature map;
[0229] The fourth fusion feature map generation submodule is used to perform feature fusion on the third sampled feature map and the first insulator feature map through the feature fusion layer to generate the fourth fusion feature map.
[0230] Furthermore, the defect detection module 606 includes:
[0231] The image score acquisition submodule is used to perform defect detection on the fused feature map using a detection head and generate an image score.
[0232] The defect judgment and analysis submodule is used to determine whether the image score is greater than or equal to a preset score threshold;
[0233] If the image score is greater than or equal to the score threshold, then the image of the insulator to be identified is found to have a defect.
[0234] If the image score is less than the score threshold, the output will show that the image of the insulator to be identified does not have defects.
[0235] This invention also provides an electronic device, characterized in that it includes a memory and a processor, wherein the memory stores a computer program, and when the computer program is executed by the processor, the processor performs the steps of the insulator defect detection method as described in any of the above embodiments.
[0236] The memory can be an electronic memory such as flash memory, EEPROM (Electrically Erasable Programmable Read-Only Memory), EPROM, hard disk, or ROM. The memory has storage space for program code used to perform any of the method steps described above. For example, the storage space for program code may include individual program codes for implementing the various steps in the methods described above. This program code can be read from or written to one or more computer program products. These computer program products include program code carriers such as hard disks, compact discs (CDs), memory cards, or floppy disks. The program code may be compressed, for example, in a suitable form. When run by a computing processing device, this code causes the computing processing device to perform the various steps in the street view text recognition method described above.
[0237] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working process of the above-described apparatus and unit can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.
[0238] In the several embodiments provided in this application, it should be understood that the disclosed apparatus and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another device, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between devices or units may be electrical, mechanical, or other forms.
[0239] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0240] Furthermore, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.
[0241] The above-described embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit it. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method of detecting defects in an insulator, characterized by, include: When a training image is received, image preprocessing is performed on the training image to generate training data; The training data is used to train a preset insulator defect detection model to generate a target insulator defect detection model, wherein the target insulator defect detection model includes a backbone network and a detection head group; When an image of an insulator to be identified is received, the backbone network is used to extract features from the image and output multiple insulator feature maps layer by layer. By continuously upsampling, feature maps of multiple insulators are fused to generate multiple fused feature maps. Based on the resolution of the fused feature map, a corresponding detection head is matched from the detection head group; The detection head is used to perform defect detection on the fused feature map to determine whether there are defects in the image of the insulator to be identified; The backbone network comprises a 7×7 standard convolutional layer, a first-stage convolutional group, a second-stage convolutional group, a third-stage convolutional group, and a fourth-stage convolutional group connected in sequence. The step of using the backbone network to perform feature recognition on the received insulator image and outputting multiple insulator feature maps layer by layer includes: When an image of an insulator to be identified is received, the 7×7 standard convolutional layer is used to extract features from the image to be identified and generate a low-level feature map. The first stage convolutional group extracts features from the underlying feature map to generate a first insulator feature map, wherein the first stage convolutional group includes three first bottleneck modules connected in sequence. The second stage convolutional group extracts features from the first insulator feature map to generate a second insulator feature map, wherein the second stage convolutional group includes four first bottleneck modules connected in sequence. The third-stage convolutional group extracts features from the second insulator feature map to generate a third insulator feature map, wherein the third-stage convolutional group includes twenty-three second bottleneck modules connected in sequence. The fourth-stage convolutional group extracts features from the third insulator feature map to generate a fourth insulator feature map, wherein the fourth-stage convolutional group includes a third bottleneck module and two first bottleneck modules connected in sequence.
2. The insulator defect detection method according to claim 1, characterized by, The training data includes training sample data and test sample data. The step of training a preset insulator defect detection model using the training data to generate a target insulator defect detection model includes: The training sample data is input into a preset insulator defect detection model to generate a corresponding training feature map; Select a standard feature map corresponding to the training feature map from the training sample data; Calculate the overlap between the training feature map and the standard feature map; Determine whether the overlap degree is less than or equal to a preset overlap degree threshold; If the overlap is greater than the overlap threshold, the test sample data is input into the insulator defect detection model to obtain the detection time for generating the test feature map; Determine whether the detection time is less than a preset detection time threshold; If the detection time is less than the detection time threshold, training is stopped and a target insulator defect detection model is generated. If the detection time is greater than or equal to the detection time threshold, or the overlap is less than or equal to the preset overlap threshold, then the model parameters of the insulator defect detection model are adjusted by the gradient descent method, and the process jumps to the step of inputting the training sample data into the preset insulator defect detection model, generating the corresponding training feature map, and obtaining the detection time of the training feature map.
3. The insulator defect detection method according to claim 1, characterized by, The first bottleneck module includes a 1×1 multi-channel standard convolutional layer, a first bottleneck branch, a feature fusion layer, a batch normalization layer, and a LeakyReLU activation layer; the specific processing procedure of the first bottleneck module is as follows: A 1×1 multi-channel standard convolutional layer and the first bottleneck branch are used to extract features from the input first feature image, generating multiple first extracted feature maps; The multiple first extracted feature maps are fused by a feature fusion layer to generate a first extracted fused feature map. The first extracted and fused feature map is non-linearly mapped by passing it through a batch normalization layer and a LeakyReLU activation layer in sequence to generate the first bottleneck feature map. The first bottleneck branch includes a 1×1 multi-channel standard convolutional layer, a batch normalization layer, a LeakyReLU activation layer, a 3×3 multi-channel standard convolutional layer, a batch normalization layer, a LeakyReLU activation layer, and a 1×1 multi-channel standard convolutional layer connected in sequence.
4. The insulator defect detection method according to claim 1, characterized by, The second bottleneck module includes a 1×1 multi-channel standard convolutional layer, a second bottleneck branch, a feature fusion layer, a batch normalization layer, and a LeakyReLU activation layer; the specific processing procedure of the second bottleneck module is as follows: A 1×1 multi-channel standard convolutional layer and the second bottleneck branch are used to extract features from the input second feature image, generating multiple second extracted feature maps; The multiple second extracted feature maps are fused using a feature fusion layer to generate a second extracted fused feature map. The second extracted and fused feature map is non-linearly mapped by passing it through a batch normalization layer and a LeakyReLU activation layer in sequence to generate a second bottleneck feature map. The second bottleneck branch includes a 1×1 multi-channel standard convolutional layer, a batch normalization layer, a LeakyReLU activation layer, a 1×3 multi-channel standard convolutional layer, a 3×1 multi-channel standard convolutional layer, a batch normalization layer, a LeakyReLU activation layer, and a 1×1 multi-channel standard convolutional layer connected in sequence.
5. The insulator defect detection method according to claim 1, characterized by, The third bottleneck module includes a 1×1 multi-channel standard convolutional layer, a third bottleneck branch, a feature fusion layer, a batch normalization layer, and a DY-ReLU activation layer; the specific processing procedure of the third bottleneck module is as follows: The 1×1 multi-channel standard convolutional layer and the third bottleneck branch are used to extract features from the input third feature image, generating multiple third extracted feature maps; The multiple third extracted feature maps are fused using a feature fusion layer to generate a third extracted fused feature map. The third extracted and fused feature map is nonlinearly mapped by passing it through a batch normalization layer and a DY-ReLU activation layer in sequence to generate a third bottleneck feature map. The third bottleneck branch includes a 1×1 multi-channel standard convolutional layer, a batch normalization layer, a DY-ReLU activation layer, a 3×3 multi-channel dilated convolutional layer, a batch normalization layer, a DY-ReLU activation layer, and a 1×1 multi-channel standard convolutional layer connected in sequence.
6. The insulator defect detection method according to claim 1, characterized by, The fused feature map includes a first fused feature map, a second fused feature map, a third fused feature map, and a fourth fused feature map. The step of fusing the multiple insulator feature maps through continuous upsampling to generate multiple fused feature maps includes: By upsampling the feature map of the fourth insulator, a first sampled feature map is generated, and the feature map of the fourth insulator is used as the first fused feature map; The first sampled feature map and the third insulator feature map are fused by the feature fusion layer to generate a second fused feature map. A second sampled feature map is generated by upsampling the second fused feature map; The second sampled feature map and the second insulator feature map are fused by the feature fusion layer to generate a third fused feature map. A third sampled feature map is generated by upsampling the third fused feature map; The third sampled feature map and the first insulator feature map are fused by the feature fusion layer to generate a fourth fused feature map.
7. The insulator defect detection method according to claim 1, characterized by, The step of using the detection head to perform defect detection on the fused feature map and determining whether the insulator image to be identified has defects includes: The detection head is used to perform defect detection on the fused feature map to generate an image score; Determine whether the image score is less than or equal to a preset score threshold; If the image score is greater than or equal to the score threshold, then the image of the insulator to be identified is found to have a defect. If the image score is less than the score threshold, the output will show that the image of the insulator to be identified does not have defects.
8. An insulator defect detection apparatus characterized by comprising: To implement the insulator defect detection method according to any one of claims 1-7, the method comprises: The image preprocessing module is used to preprocess the training image when a training image is received to generate training data. The target insulator defect detection model generation module is used to train a preset insulator defect detection model using the training data to generate a target insulator defect detection model, wherein the target insulator defect detection model includes a backbone network and a detection head group; The insulator feature map acquisition module is used to extract features from the insulator image to be identified using the backbone network when an insulator image to be identified is received, and output multiple insulator feature maps layer by layer. The fusion feature map acquisition module is used to perform feature fusion on the multiple insulator feature maps through continuous upsampling to generate multiple fusion feature maps; The detection head acquisition module is used to match the corresponding detection head from the detection head group according to the resolution of the fused feature map; The defect detection module is used to perform defect detection on the fused feature map using the detection head, and to determine whether the image of the insulator to be identified has defects.
9. An electronic device, comprising: The device includes a memory and a processor, wherein the memory stores a computer program, and when the computer program is executed by the processor, the processor causes the processor to perform the steps of the insulator defect detection method as described in any one of claims 1-7.