Glass insulator contamination identification method and device, computer equipment and storage medium

By using a pixel-focused attention mechanism and a multi-head self-attention network backbone network, combined with a feature fusion network, multi-scale feature extraction and fusion are performed on glass insulator images captured by drones. This solves the problem of insufficient detection accuracy in existing technologies and achieves more efficient glass insulator contamination identification.

CN119723389BActive Publication Date: 2025-11-18CHINA SOUTHERN POWER GRID ARTIFICIAL INTELLIGENCE TECHNOLOGY CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411842282.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-12-13
Publication Date
2025-11-18
Estimated Expiration
2044-12-13

AI Technical Summary

Technical Problem

Existing methods for detecting contamination in glass insulators based on convolutional neural networks lack sufficient global long-range modeling capabilities, resulting in low detection accuracy. Furthermore, they do not fully utilize shallow features, making it difficult to effectively identify contamination in glass insulators with different spectral colors.

Method used

A backbone network based on pixel-focused attention mechanism and multi-head self-attention network is adopted, combined with feature fusion network (feature pyramid network FPN and path aggregation network PAN) to perform multi-scale feature extraction and fusion on glass insulator images captured by UAV, and to identify dirt through detection head.

Benefits of technology

It improves the accuracy of glass insulator contamination identification, enabling more accurate identification of glass insulator contamination with different spectral colors, enhancing the ability to perceive the surrounding environment, and improving detection precision.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119723389B_ABST
    Figure CN119723389B_ABST
Patent Text Reader

Abstract

The application relates to a glass insulator contamination identification method and device, computer equipment and a storage medium, and relates to the technical field of artificial intelligence. The method comprises the following steps: acquiring a to-be-identified picture of each glass insulator photographed by a UAV; determining a multi-scale feature map of the to-be-identified picture based on a pre-constructed backbone network; the backbone network is determined based on a pixel focus attention mechanism and a multi-head self-attention network model; the pixel focus attention mechanism is used to determine the local features of each pixel according to the correlation degree between the pixels and to determine the context information of each pixel; inputting the multi-scale feature map into a feature fusion network, performing feature fusion on the multi-scale feature map through a feature pyramid network (FPN) and a path aggregation network (PAN) in the feature fusion network, and obtaining a fused feature map; and inputting the fused feature map into a detection head to obtain a contamination identification result corresponding to the to-be-identified picture. The method can improve the glass insulator contamination identification accuracy.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of artificial intelligence technology, and in particular to a method, apparatus, computer equipment, storage medium and computer program product for identifying contamination in glass insulators. Background Technology

[0002] Glass insulators in power transmission lines are a crucial component of the power grid, primarily functioning to support transmission conductors, isolate current, and protect electrical components along the lines. Because glass insulators on transmission lines are exposed to the elements 24 / 7, they inevitably accumulate dirt and grime over time. When dirt and dust accumulate on the insulator surface, a conductive layer forms, reducing insulation resistance and increasing the risk of leakage and breakdown, posing a threat to electrical equipment and personnel safety. When the insulator surface is severely contaminated, its flashover voltage drops significantly, making it more prone to flashover and breakdown under the same operating voltage, leading to line faults and equipment damage.

[0003] In related technologies, current glass insulator defect detection generally uses YOLO series target detection algorithms based on convolutional neural networks for direct detection. However, the convolutional structure of convolutional neural networks is only advantageous for local short-range modeling, and is weak in global long-range modeling capabilities, with a small receptive field. Glass insulator contamination often exhibits different appearances due to variations in lighting and environment; the insufficient receptive field of convolutional neural networks leads to insufficient accuracy in detecting glass insulator contamination. Furthermore, the main difference between contaminated and normal glass insulators lies in their spectral color, which is a shallow feature in neural networks. YOLO series convolutional neural networks only use features from the last three stages of resolution during feature fusion, resulting in insufficient utilization of shallow features and contributing to the problem of insufficient accuracy in identifying glass insulator contamination. Summary of the Invention

[0004] Therefore, it is necessary to provide a method, apparatus, computer equipment, computer-readable storage medium, and computer program product for identifying glass insulators that can improve the accuracy of glass insulator contamination identification, in order to address the aforementioned technical problems.

[0005] Firstly, this application provides a method for identifying contamination in glass insulators. The method includes:

[0006] Acquire images of each glass insulator to be identified, taken by a drone;

[0007] Based on a pre-constructed backbone network, a multi-scale feature map of the image to be identified is determined. The backbone network is determined based on a network model that combines a pixel-focused attention mechanism and a multi-head self-attention network. The pixel-focused attention mechanism is used to determine the local features of each pixel and the contextual information of each pixel based on the degree of correlation between pixels. The multi-head self-attention network is used to determine the triples of the linear transformation of the image and independently calculates the attention weights corresponding to each pixel based on the attention heads corresponding to the query, key, and value contained in the triples. The multi-scale feature map is a feature map containing the local features and contextual information of each pixel, obtained by calculating the attention weights corresponding to each pixel. The multi-scale feature map includes multiple feature maps of different resolutions.

[0008] The multi-scale feature map is input into the feature fusion network, and the feature pyramid network FPN and path aggregation network PAN in the feature fusion network are used to fuse the features of the multi-scale feature map to obtain the fused feature map.

[0009] The fused feature map is input into the detection head to obtain the pollution identification result corresponding to the image to be identified; the detection head is a classification network composed of multiple convolutional layers; the pollution identification result includes an output image with the glass insulator labeled, and the pollution category of each glass insulator in the output image; the pollution category includes polluted and unpolluted.

[0010] In one embodiment, the multi-scale feature map includes multiple target feature maps; determining the multi-scale feature map of the image to be identified based on a pre-constructed backbone network includes:

[0011] Based on the patch embedding layer of the backbone network, the image to be identified is segmented to obtain feature vectors corresponding to multiple image patches, and these feature vectors are determined as the initial feature map corresponding to the image to be identified.

[0012] The initial feature map is downsampled multiple times to obtain multiple target feature maps with different resolutions; the downsampling process is determined by weighted summation of the feature vectors of each pixel after convolution based on the pixel focusing attention mechanism.

[0013] For the target feature map with the lowest resolution, the triples of each pixel after convolution are weighted and summed through the multi-head self-attention network to obtain the updated target feature map with the lowest resolution.

[0014] The updated target feature map with the lowest resolution, along with other target feature maps of different resolutions, are identified as multi-scale feature maps.

[0015] In one embodiment, the step of fusing features from the multi-scale feature map using the Feature Pyramid Network (FPN) and the Path Aggregation Network (PAN) in the feature fusion network to obtain a fused feature map includes:

[0016] The multi-scale feature map is input into the Feature Fusion Network (FPN). The FPN upsamples the feature maps of different resolutions in the multi-scale feature map to obtain the initial fused feature map corresponding to the image to be identified. The FPN is used to transfer the semantic information of the high-resolution feature map in the multi-scale feature map to the low-resolution feature map.

[0017] The initial fused feature map is input into the PAN in the feature fusion network. The PAN performs downsampling processing on the feature maps of different resolutions in the initial fused feature map to obtain a fused feature map composed of multiple feature maps of different resolutions. The PAN is used to transfer the position information of the low-resolution feature map in the initial fused feature map to the corresponding high-resolution feature map.

[0018] In one embodiment, the step of inputting the fused feature map into the detection head to obtain the dirt identification result corresponding to the image to be identified includes:

[0019] The fused feature map is input into multiple convolutional layers of the trained detection head to obtain the output of the detection head; the output includes the bounding box parameters, class probability, and confidence score of each glass insulator in the image to be identified;

[0020] For each of the glass insulators, if the confidence level corresponding to the current glass insulator is greater than the first threshold and the category probability corresponding to the current glass insulator is greater than the second threshold, then the pollution category of the current glass insulator is determined to be polluted.

[0021] The bounding box parameters and pollution category corresponding to the current glass insulator are marked in the image to be identified to obtain the marked image, and the pollution category of the current glass insulator is stored to obtain the stored pollution category;

[0022] After completing the traversal of each glass insulator, the marked image is determined as the output image, and the stored contamination category is determined as the contamination category of each glass insulator in the output image.

[0023] In one embodiment, the method further includes:

[0024] The backbone network, the feature fusion network, and the detection head are identified as the recognition model to be trained, and a training sample set for the recognition model to be trained is obtained; the training sample set includes images containing the pollution categories of glass insulators.

[0025] The training sample set is input into the recognition model to be trained to obtain the loss value of the recognition model to be trained; the loss value is determined based on the actual results and prediction results of the training sample set.

[0026] The model parameters in the recognition model to be trained are adjusted to obtain an updated recognition model to be trained. Then, the step of inputting the training sample set into the recognition model to be trained and obtaining the loss value of the recognition model to be trained is returned to be executed until the loss value meets the training termination condition, and the trained backbone network, feature fusion network and detection head are obtained.

[0027] In one embodiment, the training sample set includes multiple images of insulators labeled with location information and pollution categories; obtaining the training sample set for the recognition model to be trained includes:

[0028] Based on the initial insulator images corresponding to the glass insulators of each tower taken by drone;

[0029] The initial insulator images are preprocessed to obtain preprocessed insulator images; the image preprocessing includes rotation, cropping and enhancement.

[0030] The locations of each glass insulator and the pollution categories in the preprocessed insulator images are labeled to obtain labeled insulator images. Multiple labeled insulator images are then selected as a training sample set.

[0031] Secondly, this application also provides a glass insulator contamination identification device. The device includes:

[0032] The image acquisition module is used to acquire images of each glass insulator to be identified taken by the drone;

[0033] The feature determination module is used to determine the multi-scale feature map of the image to be identified based on a pre-constructed backbone network. The backbone network is determined based on a network model of pixel-focused attention mechanism and multi-head self-attention network. The pixel-focused attention mechanism is used to determine the local features of each pixel and the context information of each pixel according to the degree of correlation between pixels. The multi-head self-attention network is used to determine the triples of the linear transformation of the image and independently calculate the attention weights corresponding to each pixel based on the attention heads corresponding to the query, key, and value contained in the triples. The multi-scale feature map is a feature map containing the local features and context information of each pixel, obtained by calculating the attention weights corresponding to each pixel. The multi-scale feature map includes multiple feature maps of different resolutions.

[0034] The feature fusion module is used to input the multi-scale feature map into the feature fusion network, and perform feature fusion on the multi-scale feature map through the feature pyramid network FPN and the path aggregation network PAN in the feature fusion network to obtain a fused feature map;

[0035] The fused feature map is input into the detection head to obtain the pollution identification result corresponding to the image to be identified; the detection head is a classification network composed of multiple convolutional layers; the pollution identification result includes an output image with the glass insulator labeled, and the pollution category of each glass insulator in the output image; the pollution category includes polluted and unpolluted.

[0036] Thirdly, this application also provides a computer device. The computer device includes a memory and a processor, the memory storing a computer program, and the processor executing the computer program to implement the steps of the method described in the first aspect.

[0037] Fourthly, this application also provides a computer-readable storage medium. The computer-readable storage medium stores a computer program thereon, which, when executed by a processor, implements the steps of the method described in the first aspect.

[0038] Fifthly, this application also provides a computer program product. The computer program product includes a computer program that, when executed by a processor, implements the steps of the method as described in the first aspect.

[0039] The aforementioned glass insulator contamination identification method, apparatus, computer equipment, storage medium, and computer program product input images captured by a drone into a pre-constructed backbone network. This backbone network uses a pixel-focused attention mechanism and a multi-head self-attention network to determine the local features of each pixel in the image, obtaining feature maps determined by these local features. This results in multiple feature maps of different resolutions corresponding to the image, which are then defined as multi-scale feature maps. These multi-scale feature maps represent the shallow and deep features of the image in different feature maps. Based on this, the server inputs the multi-scale feature maps into a feature fusion network. The feature pyramid network (FPN) and path aggregation network (PAN) within the feature fusion network fuse the multi-scale feature maps to obtain a fused feature map. The fused feature map enhances the shallow features in the multi-scale feature map. Finally, the fused feature map is input into a detection head. The detection head can identify and classify the glass insulators in the image based on the fused feature map, determining the location and category of the glass insulators, and outputting an image labeled with the contamination category of the glass insulators. Because multi-head self-attention networks possess long-range establishment capabilities, they can utilize ultra-large receptive field enhancement algorithms to improve perception of the surrounding environment, enabling more accurate identification of glass insulator contamination. Furthermore, the feature map fusion process enhances the shallow features of both contaminated and normal glass insulators, better identifying contaminants with different spectral colors, thereby improving the accuracy of glass insulator contamination identification. Attached Figure Description

[0040] To more clearly illustrate the technical solutions in the embodiments or related technologies of this application, the accompanying drawings used in the description of the embodiments or related technologies will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0041] Figure 1 This is an application environment diagram of the glass insulator contamination identification method in one embodiment;

[0042] Figure 2 This is a flowchart illustrating a method for identifying contamination in glass insulators in one embodiment;

[0043] Figure 3 This is a flowchart illustrating a method for identifying contamination in glass insulators in another embodiment;

[0044] Figure 4 This is a schematic diagram of the backbone network in one embodiment;

[0045] Figure 5This is a schematic diagram of the backbone network and feature fusion network in one embodiment;

[0046] Figure 6 This is a schematic diagram of the backbone network and feature fusion network in another embodiment;

[0047] Figure 7 This is a structural block diagram of a glass insulator contamination identification device in one embodiment;

[0048] Figure 8 This is an internal structural diagram of a computer device in one embodiment. Detailed Implementation

[0049] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.

[0050] The glass insulator contamination identification method provided in this application embodiment can be applied to, for example... Figure 1 In the application environment shown, terminal 102 communicates with server 104 via a network. A data storage system can store the data that server 104 needs to process. Terminal 102 can receive images to be identified captured by drones or imaging devices, or it can capture images of the images to be identified itself. Terminal 102 sends the images to be identified to server 104. Server 104 can determine the multi-scale feature maps of the images to be identified through a pre-built backbone network. The multi-scale feature maps are then input into a feature fusion network. Through the Feature Pyramid Network (FPN) and Path Aggregation Network (PAN) in the feature fusion network, the multi-scale feature maps are fused to obtain a fused feature map. Server 104 can input the fused feature map into a detection head to obtain the dirt identification result corresponding to the image to be identified. The data storage system can be integrated on server 104 or placed in the cloud or on other network servers. Terminal 102 can be, but is not limited to, various personal computers, laptops, smartphones, tablets, IoT devices, and portable wearable devices. Server 104 can be implemented using a standalone server or a server cluster consisting of multiple servers.

[0051] In one exemplary embodiment, such as Figure 2 As shown, a method for identifying contamination in glass insulators is provided, which can be applied to... Figure 1 Taking server 104 as an example, the explanation includes the following steps S202 to S208. Wherein:

[0052] Step S202: Obtain images of each glass insulator to be identified taken by the drone.

[0053] Glass insulators are devices used to support and insulate conductors. In power systems, they are widely used in high-voltage and ultra-high-voltage AC and DC transmission lines for insulating and suspending conductors.

[0054] Specifically, the server can receive photos of glass insulators on various towers taken by terminals or drones. The terminals or drones can capture photos of at least one glass insulator on multiple towers according to predetermined shooting parameters such as shooting time, shooting height, and shooting angle. All captured photos can be identified as images to be recognized.

[0055] Step S204: Based on the pre-constructed backbone network, determine the multi-scale feature map of the image to be identified.

[0056] The backbone network is determined based on a network model that combines pixel-focused attention mechanism and multi-head self-attention network. The pixel-focused attention mechanism is used to determine the local features of each pixel and the contextual information of each pixel based on the degree of correlation between pixels. The multi-head self-attention network is used to determine the triples of the linear transformation of the image and independently calculate the attention weights corresponding to each pixel based on the attention heads corresponding to the query, key, and value contained in the triples. The multi-scale feature map is a feature map containing the local features and contextual information of each pixel, obtained by calculating the attention weights corresponding to each pixel. The multi-scale feature map includes multiple feature maps of different resolutions.

[0057] Specifically, the server can pre-build a network model incorporating a pixel-focused attention mechanism and a multi-head self-attention network. The pixel-focused attention mechanism integrates local and global information. For example, it can preprocess the input feature map using convolutional layers, linear layers, etc., mapping it into multiple representations, decomposing the feature map into local and global features, and generating interactions between local and global features, thereby enhancing the contextual information of local pixels. In the interactions of multiple local pixels, the pixel-focused attention mechanism can use a soft attention mechanism to calculate the importance of each pixel to other pixels, and use this importance as a weight. This weight is used to weight local features to emphasize important regions in the image.

[0058] Multi-head self-attention networks (MFAs) divide an image into several blocks, each of which may be flattened into a one-dimensional vector. The input to the entire image then consists of these blocks. The MFA generates three different attention heads (triplets) from each block through a linear transformation: query, key, and value. The MFA determines the attention weights for each pixel across these attention heads. Finally, the outputs of each attention head are concatenated to obtain the feature map of the image to be recognized.

[0059] In one example, the backbone network can downsample the image to be recognized, obtaining a lower-resolution feature map with each sampling, thus obtaining multiple feature maps of different resolutions based on the number of samplings, and determining them as multi-scale feature maps.

[0060] Step S206: Input the multi-scale feature map into the feature fusion network. Through the feature pyramid network FPN and the path aggregation network PAN in the feature fusion network, the multi-scale feature map is fused to obtain the fused feature map.

[0061] The feature fusion network includes the Feature Pyramid Network (FPN) and the Path Aggregation Network (PAN). FPN is primarily used to improve the performance of glass insulator detection and segmentation. FPN employs a top-down feature fusion method, constructing multi-scale feature maps to enable the network to simultaneously utilize high-level semantic features and low-level detail features. PAN is a network structure for enhancing semantic segmentation and object detection. PAN aggregates multi-layer feature maps through bottom-up and top-down data flows, thereby fusing these multi-layer feature maps. Combining PAN with FPN can further improve the feature representation capability.

[0062] Specifically, the server inputs the multi-scale feature map of the image to be identified into the FPN. The FPN can upsample the multi-scale feature map to obtain a processed multi-scale feature map. Then, the processed multi-scale feature map is downsampled by the PAN to obtain a fused feature map. The fused feature map contains high-level semantic features, low-level detail features, and location information of the glass insulator.

[0063] Step S208: Input the fused feature map into the detection head to obtain the dirt recognition result corresponding to the image to be identified.

[0064] The detection head is a classification network composed of multiple convolutional layers; the pollution identification results include an output image of the glass insulator labeled with the pollution type of each glass insulator in the output image; the pollution type includes polluted and unpolluted.

[0065] Specifically, the server can input the fused feature map into the detection head. The detection head can process the fused feature map through multiple convolutional layers to obtain the location information of normal or contaminated glass insulators in the image to be processed, as well as the contamination category of each glass insulator. The server can then annotate the original image to be identified based on the contamination category and location information to obtain an annotated output image, thereby determining the output image and the contamination category of each glass insulator as the contamination identification result corresponding to the image to be identified.

[0066] In the aforementioned method for identifying glass insulator contamination, images captured by a drone are input into a pre-constructed backbone network. This backbone network uses a pixel-focusing attention mechanism and a multi-head self-attention network to determine the local features of each pixel in the image, resulting in feature maps determined by these local features. This yields multiple feature maps of different resolutions corresponding to the image, which are then defined as multi-scale feature maps. These multi-scale feature maps represent the shallow and deep features of the image in different feature maps. Based on this, the server inputs the multi-scale feature maps into a feature fusion network. The feature pyramid network (FPN) and path aggregation network (PAN) within the feature fusion network fuse the multi-scale feature maps to obtain a fused feature map. This fused feature map enhances the shallow features within the multi-scale feature maps. Finally, the fused feature map is input into a detection head. The detection head can then identify and classify the glass insulators in the image based on the fused feature map, determining their location and category, and outputting an image labeled with the contamination category of the glass insulator. Because multi-head self-attention networks possess long-range establishment capabilities, they can utilize ultra-large receptive field enhancement algorithms to improve perception of the surrounding environment, enabling more accurate identification of glass insulator contamination. Furthermore, the feature map fusion process enhances the shallow features of both contaminated and normal glass insulators, better identifying contaminants with different spectral colors, thereby improving the accuracy of glass insulator contamination identification.

[0067] In an exemplary embodiment, the multi-scale feature map contains multiple target feature maps. The specific implementation process of the step "determining the multi-scale feature map of the image to be identified based on the pre-constructed backbone network" includes:

[0068] The patch embedding layer based on the backbone network segments the image to be identified, obtaining feature vectors corresponding to multiple patches, which are then used as the initial feature maps for the image to be identified. Multiple downsampling processes are applied to the initial feature maps to obtain multiple target feature maps at different resolutions. The downsampling process is determined by weighted summation of the feature vectors of each pixel after convolution, based on a pixel-focused attention mechanism. For the target feature map with the lowest resolution, a multi-head self-attention network is used to weighted summation of the triples of each pixel after convolution, resulting in an updated target feature map with the lowest resolution. The updated target feature map with the lowest resolution, along with other target feature maps of different resolutions, are then identified as multi-scale feature maps.

[0069] The patch embedding layer is used to segment the image to be recognized, obtaining multiple patches. Each patch is then mapped to a one-dimensional vector through a fully connected layer, resulting in the feature vector of the image to be recognized. For example, the processing of the patch embedding layer can be represented by Patch Embedding. Downsampling is used to reduce the spatial size of the initial feature map.

[0070] Specifically, the server can input the image to be recognized into a patch embedding layer to segment the image, obtaining multiple segmented patches, and determining a one-dimensional vector for each patch, thus obtaining an initial feature map composed of the one-dimensional vectors of each patch. The server can then downsample the initial feature map using a focus attention layer and a convolutional GLU (Gated Linear Unit) layer in the backbone network to obtain a first-downsampled target feature map. Based on this, the server can iterate the above process. For example, it can further segment the first-downsampled target feature map using the patch embedding layer to obtain a segmented initial feature map, and then downsample the segmented initial feature map using a focus attention layer and a convolutional GLU layer in the backbone network to obtain a second-downsampled target feature map. The resolution of the second-downsampled target feature map is smaller than that of the first-downsampled target feature map. Accordingly, the server can iterate the downsampling process multiple times to obtain multiple target feature maps with different resolutions. During the downsampling process, the server can use a pixel focus attention mechanism to perform a weighted summation of the feature vectors of each pixel after convolution in the feature map, and add the features from the previous sampling to the target feature map after the next sampling.

[0071] In addition, during the final downsampling process, the server first segments the target feature map obtained from the previous sampling using a patch embedding layer, resulting in an initial segmented feature map. The server then performs a final downsampling process on the initial segmented feature map using a multi-head self-attention layer and a convolutional GLU layer in the backbone network, yielding the final downsampled target feature map. This target feature map is the lowest-resolution target feature map. The lowest-resolution target feature map is determined during its generation by weighted summation of the triples of each pixel after convolution using a multi-head self-attention network. At this point, the image to be recognized contains a number of target feature maps corresponding to the number of downsampling iterations. These multiple target feature maps are then used to define a multi-scale feature map. In other words, the lowest-resolution target feature map, along with multiple target feature maps of different resolutions, constitutes the multi-scale feature map.

[0072] In this embodiment, the resolution of the downsampled feature map can be reduced through tile segmentation by multiple iterations of the downsampling process. The pixel focusing attention mechanism and multi-head self-attention network in the downsampling process can add features to the feature map of each downsampled map, thereby enhancing the feature information of each target feature map and increasing the feature information at different depths in the multi-scale feature map, which can improve the feature information and feature quantity of the multi-scale feature map.

[0073] In an exemplary embodiment, the specific implementation process of the step "using the Feature Pyramid Network (FPN) and the Path Aggregation Network (PAN) in the Feature Fusion Network to perform feature fusion on the multi-scale feature map to obtain a fused feature map" includes:

[0074] First, the multi-scale feature map is input into the FPN in the feature fusion network. The FPN upsamples the feature maps of different resolutions in the multi-scale feature map to obtain the initial fused feature map corresponding to the image to be identified.

[0075] Among them, FPN is used to transfer the semantic information of the high-resolution feature map in the multi-scale feature map to the low-resolution feature map.

[0076] Specifically, the server inputs multi-scale feature maps into the Feature Fusion Network (FPN). Since the FPN contains a feature pyramid, it can receive target feature maps of different resolutions from the multi-scale feature maps. Based on the resolution of the target feature maps in the feature pyramid, the server starts with the lowest-resolution target feature map and uses upsampling processing (such as nearest neighbor interpolation or bilinear interpolation) to adjust the resolution of this target feature map to be the same as the resolution of the target feature map in the previous layer. The server then fuses the upsampled target feature map with the target feature map in the previous layer to obtain the fused feature map for the previous layer. Based on this, the server can iterate, for example, upsampling the fused feature map in the previous layer to make its resolution the same as the target feature map in the layer before that, and then fusing the fused feature map in the layer before that. Through multiple iterations of upsampling, feature fusion of the multi-scale feature maps can be completed, resulting in the initial fused feature map corresponding to the image to be recognized. The initial fused feature map can include multiple feature maps that have been fused by the FPN.

[0077] In one example, consider four different levels of target feature maps: C2, C3, C4, and C5. C2 represents a lower-level feature map with high resolution and rich detail; C5 represents a higher-level feature map with lower resolution and more semantic information. The server can start with the highest-level feature map, C5. C5 undergoes upsampling to adjust its spatial dimensions, matching it with lower-level (e.g., C4, C3) feature maps. The upsampled feature map is then fused with the corresponding lower-level feature maps, typically using element-wise summing. For C4: the upsampled C5 feature map is added to the C4 feature map to obtain the fused feature F4. For C3: the upsampled F4 feature map is added to the C3 feature map to obtain the fused feature F3. For C2: C2 and the upsampled F3 are combined to generate the final F2.

[0078] Finally, the initial fused feature map is input into the PAN in the feature fusion network. The PAN performs downsampling processing on the feature maps of different resolutions in the initial fused feature map to obtain a fused feature map composed of multiple feature maps of different resolutions.

[0079] PAN is used to transfer the location information of low-resolution feature maps in the initial fused feature map to the corresponding high-resolution feature maps. PAN adds a reverse-direction feature pyramid after FPN to supplement FPN and transfer high-resolution feature information.

[0080] Specifically, the server inputs the initial fused feature map into the PAN (Programmable Node) in the feature fusion network. The PAN, through its internal feature pyramid, receives feature maps of different resolutions from the initial fused feature map. Then, based on the resolution of the feature maps in the feature pyramid, the server starts with the highest-resolution feature map and downsamples it to match the resolution of the next layer's feature map. The server then fuses the downsampled feature map with the target feature map of the next layer to obtain the fused feature map for the next layer. Based on this, the server can iterate, for example, downsampling the fused feature map of the next layer to make its resolution match the feature map of the layer after that, and then fusing the fused feature map of the next layer with the feature map of the layer after that. Through multiple iterations of downsampling, the initial fused feature map can be fused to obtain the fused feature map corresponding to the image to be recognized.

[0081] In this embodiment, the feature pyramid of FPN+PAN can perform two rounds of feature fusion on the multi-scale feature map. The first round of fusion is to upsample the multi-scale feature map by FPN, and the second round of fusion is to downsample the initial fused feature map after upsampling by PAN to obtain the fused feature map. This can transfer deep semantic information to shallow features and fine semantic information to deep features, thereby improving the semantic information content and semantic richness of the fused feature map.

[0082] In an exemplary embodiment, the specific implementation process of the step "inputting the fused feature map into the detection head to obtain the dirt recognition result corresponding to the image to be recognized" includes:

[0083] The fused feature map is input into multiple convolutional layers of the trained detection head to obtain the output of the detection head. For each glass insulator, if the confidence level of the current glass insulator is greater than a first threshold and the class probability of the current glass insulator is greater than a second threshold, then the pollution category of the current glass insulator is determined to be "polluted". The bounding box parameters and pollution category of the current glass insulator are marked in the image to be identified to obtain a marked image, and the pollution category of the current glass insulator is stored to obtain a stored pollution category. After traversing all glass insulators, the marked image is determined as the output image, and the stored pollution category is determined as the pollution category of each glass insulator in the output image.

[0084] The output includes the bounding box parameters, class probability, and confidence score for each glass insulator in the image to be identified. The bounding box parameters can be the coordinates of the center point and width, height, or the coordinates of the top-left and bottom-right corners. The class probability is the probability that the glass insulator is either contaminated or uncontaminated. The confidence score is the probability that a glass insulator exists within each bounding box.

[0085] Specifically, the server can input the fused feature map into multiple convolutional layers of the trained detection head. The detection head can process the fused feature map to obtain the bounding box parameters, class probabilities, and confidence scores of each detected glass insulator. For example, the server can use the detection head to identify two glass insulators, namely insulator A and insulator B, and obtain the bounding box parameters, class probabilities, and confidence scores of insulator A, as well as the bounding box parameters, class probabilities, and confidence scores of insulator B. For insulator A, if the confidence score corresponding to insulator A is greater than a first threshold and the class probability corresponding to insulator A is greater than a second threshold, then the current glass insulator is determined to be contaminated. If the confidence score corresponding to insulator A is greater than the first threshold and the class probability corresponding to insulator A is less than or equal to the second threshold, then the current glass insulator is determined to be uncontaminated. If the confidence score corresponding to insulator A is less than the first threshold, then insulator A is determined to be a non-insulator and will not be processed as an insulator.

[0086] Subsequently, if it is determined that insulator A and insulator B are both insulators, the server can mark the bounding box parameters and pollution category corresponding to insulator A in the image to be identified, and mark the bounding box parameters and pollution category corresponding to insulator B in the image to be identified, thus obtaining a marked image. The pollution categories of insulator A and insulator B are stored in a pre-established storage structure, thus obtaining stored pollution categories. At this point, the marked image is determined as the output image, and the stored pollution categories are determined as the pollution categories of each glass insulator in the output image.

[0087] In this embodiment, the bounding box parameters, category probability, and confidence level of the glass insulator can be obtained through the detection head. The pollution category of the glass insulator can be determined by the category probability and confidence level, thereby enabling the glass insulator to be marked in the image to be identified and obtaining the pollution identification result, which can improve the accuracy of the pollution identification result.

[0088] In one exemplary embodiment, the method further includes:

[0089] The process involves identifying the backbone network, feature fusion network, and detection head as the recognition model to be trained, and obtaining the training sample set for the model. The training sample set is then input into the model to obtain its loss value. The model parameters are adjusted to obtain an updated model. The process then returns to the previous steps of inputting the training sample set into the model and obtaining its loss value, continuing until the loss value meets the training termination condition. This process yields the trained backbone network, feature fusion network, and detection head.

[0090] The training sample set includes images labeled with the pollution category of the glass insulator; the loss value is determined based on the actual results and prediction results of the training sample set.

[0091] Specifically, the server can define the model consisting of the backbone network, feature fusion network, and detection head as the recognition model to be trained. The server can obtain labeled images of glass insulators in multiple scenarios using drones, and use these as a training sample set. The labeled images contain the location information and pollution category of the glass insulators. Scenarios can include different times, locations, and models of glass insulators operating under different weather conditions. The server can input the training sample set into the recognition model to be trained, obtaining the predicted values ​​corresponding to each labeled image in the training sample set. The server uses a loss function to determine the loss values ​​between the predicted values ​​and the location information and pollution category, respectively. The server updates the parameters of the backbone network, feature fusion network, and detection head in the recognition model to be trained, aiming to minimize the loss value, resulting in a trained recognition model. The training sample set is then iteratively input into the trained recognition model to determine the loss value, until the loss value meets the training termination condition. At this point, the recognition model to be trained is a successfully trained recognition model. If the loss value does not meet the training termination condition, the parameters in the recognition model to be trained are adjusted, and the training sample set is input for iterative training.

[0092] In this embodiment, the backbone network, feature fusion network, and detection head can be iteratively trained using the training sample set of glass insulators. When the loss value meets the training termination condition, the trained backbone network, feature fusion network, and detection head can be obtained, which can improve training efficiency and the recognition accuracy of the trained backbone network, feature fusion network, and detection head.

[0093] In an exemplary embodiment, the training sample set contains multiple images of glass insulators labeled with their location information and pollution categories. The specific implementation process of the step "obtaining the training sample set for the recognition model to be trained" includes:

[0094] The initial insulator images corresponding to the glass insulators of each tower are obtained by taking pictures of them with drones; the images of each initial insulator image are preprocessed to obtain preprocessed insulator images; the image preprocessing includes rotation, cropping and enhancement processing; the location of each glass insulator and the pollution type in the preprocessed insulator images are labeled to obtain labeled insulator images, and multiple labeled insulator images are determined as training sample sets.

[0095] Specifically, drones can capture images of glass insulators on various towers in different scenarios, thus obtaining initial insulator images. The server can receive these initial insulator images and perform rotation, cropping, and image enhancement processing. Rotation and cropping can yield insulator images with consistent specifications. For example, the specifications could include insulators facing the same direction and images of the same size. Image enhancement can involve desaturation, increasing color saturation, etc., and this application does not limit the scope of the enhancement. The server can label the location of each glass insulator and the type of pollution in the insulator images according to instructions sent by the user, obtaining labeled insulator images. The server can then use multiple labeled insulator images as a training sample set.

[0096] In this embodiment, by acquiring initial insulator images using a drone, and performing image preprocessing and annotation on these images, a high-quality training sample set can be obtained, improving the completeness and richness of the training sample set.

[0097] like Figure 3 As shown below, the specific execution process of the above-described glass insulator contamination identification method is described in detail with reference to a specific embodiment. The innovation of the detection scheme in this application embodiment is mainly reflected in the network model training stage, where a network model for glass insulator contamination detection is built, utilizing a multi-head self-attention network and a shallow feature fusion algorithm to identify glass insulator contamination. This network consists of a multi-head self-attention network backbone and a feature fusion part.

[0098] Specifically, the multi-head self-attention network backbone: The convolutional network backbone of this embodiment adopts TransNeXt, a leading achievement in the field of vision. By combining aggregated pixel-focused attention and convolutional GLU, it simulates the biological visual system, especially for visual perception of the fovea. This method enables each pixel to achieve global perception and enhances the model's information mixing and natural visual perception capabilities. TransNeXt has shown excellent performance in various visual tasks, including image classification, object detection, and semantic segmentation. The network structure is as follows: Figure 4 As shown, the network structure has four layers. The first three layers each contain a convolutional GLU layer and a focus attention layer. The last layer uses a multi-head self-attention layer. The resolution of the feature maps can be adjusted by downsampling through image segmentation (Patch Embedding) between each layer.

[0099] For the pixel-focused attention mechanism, this mechanism has fine-grained perception in the vicinity of each query while maintaining coarse-grained awareness of global information. To achieve the pixel-level translation equivalence inherent in eye movements, this application's embodiments employ a dual-path design, including a query-centered sliding window attention and pooling attention. Furthermore, to induce coupling between the two attention paths, the server can use the same softmax to calculate the query-key similarity results for both paths. This leads to competition between fine-grained and coarse-grained features, transforming pixel-focused attention into a multi-scale attention mechanism. Now, we focus on the operation on a single pixel on the input feature map. Define the set of pixels in the sliding window centered at (i,j) on the input feature map as p(i,j). For a fixed window size k*k, ||p(i,j)||=k 2 Meanwhile, the set of pixels obtained from feature map pooling is defined as σ(X). For pooling size H... p *H p ||σ(X)||=H p W p Therefore, pixel-focused attention (PFA) can be described as follows.

[0100]

[0101]

[0102]

[0103]

[0104]

[0105] For the feature fusion part: An FPN+PAN structure is adopted. FPN can transfer deep semantic information to shallow features with higher resolution, making large targets clearer. PAN, on the other hand, transfers fine semantic information from shallow features to deep features, making small targets clearer as well. Unlike the YOLO series, this embodiment fuses features from four different levels extracted by the multi-head self-attention network backbone, as shown in the following structure. Figure 5 As shown, the backbone network obtains features at each of the four levels, S1, S2, S3, and S4, through downsampling. Then, the FPN is used to upsample S1, S2, S3, and S4, and the PAN is used to downsample the FPN sampling results, thus completing feature fusion.

[0106] Finally, the network structure overview of the embodiments of this application is as follows: Figure 6As shown, the input image to be identified is used to obtain multi-level features through TransNext, and feature fusion is performed through FPN+PAN to obtain the final feature map. Then, the feature map is input to the detection head to obtain the pollution identification result of the glass insulator.

[0107] It should be understood that although the steps in the flowcharts of the embodiments described above are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the embodiments described above may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages of other steps.

[0108] Based on the same inventive concept, this application also provides a glass insulator contamination identification device for implementing the glass insulator contamination identification method described above. The solution provided by this device is similar to the solution described in the above method; therefore, the specific limitations of the one or more glass insulator contamination identification device embodiments provided below can be found in the limitations of the glass insulator contamination identification method described above, and will not be repeated here.

[0109] In one exemplary embodiment, such as Figure 7 As shown, a glass insulator contamination identification device 700 is provided, including: an image acquisition module 701, a feature determination module 702, a feature fusion module 703, and a contamination identification module 704, wherein:

[0110] Image acquisition module 701 is used to acquire images of each glass insulator to be identified taken by the drone;

[0111] The feature determination module 702 is used to determine multi-scale feature maps of the image to be identified based on a pre-constructed backbone network. The backbone network is determined based on a network model of pixel-focused attention mechanism and multi-head self-attention network. The pixel-focused attention mechanism is used to determine the local features of each pixel according to the degree of correlation between pixels and to determine the context information of each pixel. The multi-head self-attention network is used to determine the triples of the linear transformation of the image and to independently calculate the attention weights corresponding to each pixel based on the attention heads corresponding to the query, key, and value contained in the triples. The multi-scale feature map is a feature map containing the local features and context information of each pixel, obtained by calculating the attention weights corresponding to each pixel. The multi-scale feature map includes multiple feature maps of different resolutions.

[0112] The feature fusion module 703 is used to input multi-scale feature maps into the feature fusion network, and perform feature fusion on the multi-scale feature maps through the feature pyramid network FPN and the path aggregation network PAN in the feature fusion network to obtain a fused feature map.

[0113] The contamination recognition module 704 is used to input the fused feature map into the detection head to obtain the contamination recognition result corresponding to the image to be recognized; the detection head is a classification network composed of multiple convolutional layers; the contamination recognition result includes the output image with the glass insulator labeled, and the contamination category of each glass insulator in the output image; the contamination category includes contaminated and uncontaminated.

[0114] Furthermore, the multi-scale feature map contains multiple target feature maps. The feature determination module 702 is specifically used for: segmenting the image to be identified based on the patch embedding layer of the backbone network to obtain feature vectors corresponding to multiple patches, and determining them as the initial feature map corresponding to the image to be identified; performing multiple downsampling processes on the initial feature map to obtain multiple target feature maps of different resolutions; the downsampling process is determined by weighted summation of the feature vectors of each pixel after convolution based on the pixel focusing attention mechanism; for the target feature map with the lowest resolution, the triplet of each pixel after convolution is weighted and summed through a multi-head self-attention network to obtain the updated target feature map with the lowest resolution; and determining the updated target feature map with the lowest resolution, as well as other target feature maps of different resolutions, as the multi-scale feature map.

[0115] Further, the feature fusion module 703 is specifically used for: inputting the multi-scale feature map into the FPN in the feature fusion network, and performing upsampling processing on the feature maps of different resolutions in the multi-scale feature map through the FPN to obtain the initial fused feature map corresponding to the image to be identified; the FPN is used to transfer the semantic information of the high-resolution feature map in the multi-scale feature map to the low-resolution feature map; inputting the initial fused feature map into the PAN in the feature fusion network, and performing downsampling processing on the feature maps of different resolutions in the initial fused feature map through the PAN to obtain the fused feature map composed of multiple feature maps of different resolutions; the PAN is used to transfer the position information of the low-resolution feature map in the initial fused feature map to the corresponding high-resolution feature map.

[0116] Further, the contamination identification module 704 is specifically used for: inputting the fused feature map into multiple convolutional layers of the trained detection head to obtain the output result of the detection head; the output result includes the bounding box parameters, class probability, and confidence level of each glass insulator in the image to be identified; for each glass insulator, if the confidence level corresponding to the current glass insulator is greater than a first threshold and the class probability corresponding to the current glass insulator is greater than a second threshold, then the contamination class of the current glass insulator is determined to be contaminated; the bounding box parameters and contamination class corresponding to the current glass insulator are marked in the image to be identified to obtain a marked image, and the contamination class of the current glass insulator is stored to obtain a stored contamination class; after traversing each glass insulator, the marked image is determined as the output image, and the stored contamination class is determined as the contamination class of each glass insulator in the output image.

[0117] Furthermore, the device also includes a model training module, specifically used for: determining the backbone network, feature fusion network, and detection head as the recognition model to be trained, and obtaining a training sample set for the recognition model to be trained; the training sample set includes images containing pollution categories labeled with glass insulators; inputting the training sample set into the recognition model to be trained to obtain the loss value of the recognition model to be trained; the loss value is determined based on the actual results and prediction results of the training sample set; adjusting the model parameters in the recognition model to be trained to obtain an updated recognition model to be trained, and returning to execute the step of inputting the training sample set into the recognition model to be trained to obtain the loss value of the recognition model to be trained, until the loss value meets the training termination condition, and obtaining the trained backbone network, feature fusion network, and detection head.

[0118] Furthermore, the training sample set includes multiple images of insulators labeled with their location information and pollution categories. The model training module is specifically used for: taking initial insulator images of the glass insulators on each tower based on images captured by a drone; performing image preprocessing on each initial insulator image to obtain preprocessed insulator images; image preprocessing includes rotation, cropping, and enhancement; labeling the location of each glass insulator and its pollution category in the preprocessed insulator images to obtain labeled insulator images; and determining multiple labeled insulator images as the training sample set.

[0119] Each module in the aforementioned glass insulator contamination identification device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in a computer device, or stored in the memory of a computer device as software, so that the processor can call and execute the corresponding operations of each module.

[0120] In one exemplary embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be as follows: Figure 8 As shown, this computer device includes a processor, memory, input / output (I / O) interfaces, and a communication interface. The processor, memory, and I / O interfaces are connected via a system bus, and the communication interface is also connected to the system bus via the I / O interfaces. The processor provides computational and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system, computer programs, and a database. The internal memory provides the environment for the operating system and computer programs stored in the non-volatile storage media. The database stores training sample sets, images to be identified taken by a drone, etc. The I / O interfaces are used for exchanging information between the processor and external devices. The communication interface is used for communication with external terminals via a network connection. When the computer program is executed by the processor, it implements a method for identifying contamination in glass insulators.

[0121] Those skilled in the art will understand that Figure 8 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.

[0122] In one exemplary embodiment, a computer device is also provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps in the above-described method embodiments.

[0123] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon that, when executed by a processor, implements the steps in the above method embodiments.

[0124] In one embodiment, a computer program product is provided, including a computer program that, when executed by a processor, implements the steps in the above method embodiments.

[0125] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of the relevant data must comply with relevant regulations.

[0126] Those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments described above. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, etc., and are not limited to these.

[0127] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0128] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.

Claims

1. A glass insulator contamination identification method, characterized in that, The method comprises: acquiring a to-be-recognized picture of each glass insulator photographed by a UAV; determining a multi-scale feature map of the to-be-recognized picture based on a pre-constructed backbone network; the backbone network is determined based on a pixel focus attention mechanism and a multi-head self-attention network; the pixel focus attention mechanism is used to determine local features of each pixel according to a correlation degree between the pixels and determine context information of each pixel; the multi-head self-attention network is used to determine a triple of a picture linear transformation and independently calculate an attention weight value corresponding to each pixel based on attention heads corresponding to a query, a key and a value contained in the triple; the multi-scale feature map is obtained after the attention weight value corresponding to each pixel is calculated and contains a feature map of the local features and the context information of each pixel; the multi-scale feature map comprises a plurality of feature maps with different resolutions; inputting the multi-scale feature map into a feature fusion network to perform feature fusion on the multi-scale feature map through a feature pyramid network FPN and a path aggregation network PAN in the feature fusion network, and obtaining a fused feature map; inputting the fused feature map into a detection head to obtain a pollution recognition result corresponding to the to-be-recognized picture; the detection head is a classification network composed of a plurality of convolution layers; the pollution recognition result comprises an output picture in which glass insulators are labeled and a pollution category of each glass insulator in the output picture; the pollution category comprises pollution and no pollution; wherein the multi-scale feature map contains a plurality of target feature maps; the determination of the multi-scale feature map of the to-be-recognized picture based on the pre-constructed backbone network comprises: segmenting the to-be-recognized picture based on a patch embedding layer of the backbone network to obtain feature vectors corresponding to a plurality of image blocks and determine an initial feature map corresponding to the to-be-recognized picture; performing multiple down-sampling processes on the initial feature map to obtain a plurality of target feature maps with different resolutions; the down-sampling process is determined based on the pixel focus attention mechanism to weight and sum feature vectors of each pixel after convolution; for the target feature map with the lowest resolution, performing weighted summation on triples of each pixel after convolution through the multi-head self-attention network to obtain an updated target feature map with the lowest resolution; determining the updated target feature map with the lowest resolution and other target feature maps with different resolutions as the multi-scale feature map.

2. The method of claim 1, wherein, the feature fusion of the multi-scale feature map through the FPN and the PAN in the feature fusion network to obtain the fused feature map comprises: inputting the multi-scale feature map into the FPN in the feature fusion network to perform up-sampling processing on each feature map with different resolutions in the multi-scale feature map through the FPN to obtain an initial fused feature map corresponding to the to-be-recognized picture; the FPN is used to transfer semantic information of a high-resolution feature map in the multi-scale feature map to a low-resolution feature map; The initial fusion feature map is input into a PAN in the feature fusion network, each feature map with different resolutions in the initial fusion feature map is down-sampled by the PAN, and a fusion feature map composed of multiple feature maps with different resolutions is obtained; the PAN is used to transfer position information of a low-resolution feature map in the initial fusion feature map to a corresponding high-resolution feature map.

3. The method of claim 1, wherein, The fusion feature map is input into a detection head to obtain a dirt identification result corresponding to the picture to be identified. The fusion feature map is input into multiple convolution layers of the trained detection head to obtain an output result of the detection head; the output result includes a bounding box parameter, a class probability and a confidence of each glass insulator in the picture to be identified. For each glass insulator, if the confidence corresponding to the current glass insulator is greater than a first threshold value, and the class probability corresponding to the current glass insulator is greater than a second threshold value, it is determined that the dirt class of the current glass insulator is dirty. The bounding box parameter and the dirt class corresponding to the current glass insulator are marked in the picture to be identified to obtain a marked picture, and the dirt class of the current glass insulator is stored to obtain a stored dirt class. After the traversal of each glass insulator is completed, the marked picture is determined as an output picture, and the stored dirt class is determined as the dirt class of each glass insulator in the output picture.

4. The method of claim 1, wherein, The method further comprises: The backbone network, the feature fusion network and the detection head are determined as a to-be-trained identification model, and a training sample set of the to-be-trained identification model is obtained; the training sample set includes pictures containing the dirt class of the glass insulator marked; The training sample set is input into the to-be-trained identification model to obtain a loss value of the to-be-trained identification model; the loss value is determined based on an actual result and a predicted result of the training sample set; The model parameters in the to-be-trained identification model are adjusted to obtain an updated to-be-trained identification model, and the step of inputting the training sample set into the to-be-trained identification model to obtain the loss value of the to-be-trained identification model is returned to be executed until the loss value meets a training end condition, thereby obtaining a trained backbone network, feature fusion network and detection head.

5. The method of claim 4, wherein, The training sample set includes multiple insulator pictures with position information and dirt classes of marked glass insulators; the training sample set of the to-be-trained identification model is obtained by: An initial insulator picture corresponding to the glass insulator of each tower is photographed by a drone; An image preprocessing is performed on each initial insulator picture to obtain a preprocessed insulator picture; the image preprocessing includes rotation, cropping and enhancement processing; The positions of each glass insulator in the preprocessed insulator picture and the dirt class are marked to obtain a marked insulator picture, and multiple marked insulator pictures are determined as the training sample set.

6. A glass insulator pollution identification device, characterized in that, The device comprises: A picture acquisition module is configured to acquire a picture to be identified of each glass insulator photographed by a drone; A feature determination module is used to determine a multi-scale feature map of the image to be identified based on a pre-constructed backbone network. The backbone network is determined based on a pixel-focused attention mechanism and a multi-head self-attention network model. The pixel-focused attention mechanism is used to determine the local features of each pixel based on the correlation between pixels and to determine the contextual information of each pixel. The multi-head self-attention network is used to determine the triples of the linear transformation of the image and, based on the attention heads corresponding to the query, key, and value contained in the triples, independently calculates the attention weights corresponding to each pixel. The multi-scale feature map is a feature map containing the local features and contextual information of each pixel, obtained by calculating the attention weights corresponding to each pixel. The multi-scale feature map includes multiple feature maps of different resolutions. The feature map contains multiple target feature maps; the feature determination module is specifically used to segment the image to be identified based on the patch embedding layer of the backbone network, obtain feature vectors corresponding to multiple patches, and determine them as the initial feature map corresponding to the image to be identified; the initial feature map is subjected to multiple downsampling processes to obtain multiple target feature maps of different resolutions; the downsampling process is determined by weighted summation of the feature vectors of each pixel after convolution based on the pixel focusing attention mechanism; for the target feature map with the lowest resolution, the triples of each pixel after convolution are weighted summation through the multi-head self-attention network to obtain the updated target feature map with the lowest resolution; the updated target feature map with the lowest resolution, and other target feature maps of different resolutions are determined as multi-scale feature maps; The feature fusion module is used to input the multi-scale feature map into the feature fusion network, and perform feature fusion on the multi-scale feature map through the feature pyramid network FPN and the path aggregation network PAN in the feature fusion network to obtain a fused feature map; A contamination identification module is used to input the fused feature map into a detection head to obtain a contamination identification result corresponding to the image to be identified; the detection head is a classification network composed of multiple convolutional layers; the contamination identification result includes an output image with glass insulators labeled, and the contamination category of each glass insulator in the output image; the contamination category includes contaminated and uncontaminated. 7.A computer device, comprising a memory and a processor, wherein the memory stores a computer program, and the computer device is configured to perform the method according to any one of claims 1-6 when the computer program is executed by the processor. When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 5.

8. A computer-readable storage medium having stored thereon a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 5.

9. A computer program product comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 5.

Citation Information

Patent Citations

  • PCB defect detection method based on model compression

    CN114897845A

  • High resolution and pixel relationship enhance attention-based strong fusion remote sensing image segmentation method

    CN114936993A