Insulator defect detection method based on optimized YOLO attention interaction and related equipment
By improving the YOLOv8 model and introducing the Transformer feature interaction module, the accuracy problem of insulator defect detection in complex scenarios was solved, achieving higher recognition accuracy and lower false detection rate, thus ensuring the safe operation of transmission lines.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- FIBRLINK NETWORKS
- Filing Date
- 2026-03-11
- Publication Date
- 2026-06-05
AI Technical Summary
Existing technologies face challenges in detecting insulator defects in complex scenarios, such as interference from rain and fog, background interference, scarcity of insulator defect images, and difficulty in extracting features of minute defects, resulting in low recognition accuracy.
An improved YOLOv8 model is adopted, combined with the Transformer feature extraction and feature interaction module, and BiFPN and C2fSTR modules are added to enhance feature extraction capabilities. Detection accuracy is improved through multi-scale feature maps and attention-interactive features.
This improved the accuracy of insulator defect detection, reduced the probability of missed and false detections, and provided a guarantee for the safe operation of transmission lines.
Smart Images

Figure CN122156770A_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of data processing technology, and in particular to an insulator defect detection method and related equipment based on optimized YOLO attention interaction. Background Technology
[0002] Insulators are fundamental components of power transmission lines, and the detection of insulator defects is crucial for the stable operation of these lines. However, manual inspections of insulators for visual checks and insulation tests suffer from low accuracy in identifying insulator defects.
[0003] Therefore, improving the accuracy of insulator defect identification in transmission lines has become an urgent technical problem to be solved. Summary of the Invention
[0004] In view of this, the purpose of this disclosure is to propose an insulator defect detection method and related equipment based on optimized YOLO attention interaction to solve or partially solve the above-mentioned technical problems.
[0005] To achieve the above objectives, the first aspect of this disclosure proposes an insulator defect detection method based on optimized YOLO attention interaction, the method comprising:
[0006] Acquire images of insulators of the transmission line and input the insulator images into a pre-trained defect detection model; The defect detection model is used to perform target detection processing on the insulator image to obtain an insulator feature map; The insulator feature map is processed by feature extraction to obtain the first mode defect level feature and the second mode defect level feature; Channel sharing features are determined based on the first modal defect hierarchy features and the second modal defect hierarchy features, and attention interaction features are determined based on the channel sharing features; Using the aforementioned defect detection model, the insulator defect detection results are determined based on the attention interaction features.
[0007] Based on the same inventive concept, a second aspect of this disclosure proposes an insulator defect detection device based on optimized YOLO attention interaction, comprising: An insulator image acquisition module is configured to acquire insulator images of transmission lines and input the insulator images into a pre-trained defect detection model; The target detection processing module is configured to use the defect detection model to perform target detection processing on the insulator image to obtain an insulator feature map; The feature extraction processing module is configured to perform feature extraction processing on the insulator feature map to obtain first mode defect level features and second mode defect level features; The fusion feature determination module is configured to determine channel-sharing features based on the first modal defect hierarchy features and the second modal defect hierarchy features, and to determine attention interaction features based on the channel-sharing features; The defect detection result determination module is configured to use the defect detection model to determine the insulator defect detection result based on the attention interaction features.
[0008] Based on the same inventive concept, a third aspect of this disclosure proposes an electronic device including a memory, a processor, and a computer program stored in the memory and executable by the processor, wherein the processor implements the method described above when executing the computer program.
[0009] Based on the same inventive concept, a fourth aspect of this disclosure provides a non-transitory computer-readable storage medium that stores computer instructions for causing a computer to perform the methods described above.
[0010] As described above, this disclosure provides an insulator defect detection method and related equipment based on optimized YOLO attention interaction. The method involves acquiring images of insulators in a transmission line and inputting these images into a pre-trained defect detection model. The defect detection model then performs target detection processing on the insulator images to obtain insulator feature maps. These feature maps allow for precise location of the insulators within the images, providing reliable data for subsequent insulator defect detection. Feature extraction is performed on the insulator feature maps to obtain first-mode defect-level features and second-mode defect-level features. These features capture subtle features of insulator defects from different perspectives, effectively avoiding feature loss issues that may result from single-feature extraction. Channel-shared features are determined based on the first-mode and second-mode defect-level features, and attention interaction features are then determined based on these features. These attention interaction features further enhance the defect detection model's ability to focus on key defect features. Finally, the defect detection model is used to determine the insulator defect detection results based on the attention interaction features. This enables the defect detection model to more accurately identify various insulator defects, improves the identification accuracy of insulator defects in transmission lines, reduces the probability of missed and false detections, and provides strong protection for the safe operation of transmission lines. Attached Figure Description
[0011] To more clearly illustrate the technical solutions in this disclosure or related technologies, 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 embodiments of this disclosure. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0012] Figure 1 This is a flowchart of an embodiment of the insulator defect detection method based on optimized YOLO attention interaction according to this disclosure; Figure 2 This is a schematic diagram of the structure of the improved YOLOv8 model according to an embodiment of the present disclosure; Figure 3 This is a schematic diagram of the structure of the C2fSTR module according to an embodiment of the present disclosure; Figure 4 This is a schematic diagram of the structure of the Transformer feature extraction model according to an embodiment of the present disclosure; Figure 5 This is a schematic diagram of the structure of the BiFPN module according to an embodiment of the present disclosure; Figure 6 This is a schematic diagram of the structure of the insulator defect detection device based on optimized YOLO attention interaction according to an embodiment of this disclosure; Figure 7 This is a schematic diagram of the structure of an electronic device according to an embodiment of the present disclosure. Detailed Implementation
[0013] To make the objectives, technical solutions, and advantages of this disclosure clearer, the following detailed description is provided in conjunction with specific embodiments and the accompanying drawings.
[0014] It should be noted that, unless otherwise defined, the technical or scientific terms used in the embodiments of this disclosure should have the ordinary meaning understood by one of ordinary skill in the art to which this disclosure pertains. The terms "first," "second," and similar terms used in the embodiments of this disclosure do not indicate any order, quantity, or importance, but are merely used to distinguish different components. Terms such as "comprising" or "including" mean that the element or object preceding the word encompasses the elements or objects listed following the word and their equivalents, without excluding other elements or objects. Terms such as "connected" or "linked" are not limited to physical or mechanical connections, but can include electrical connections, whether direct or indirect. Terms such as "upper," "lower," "left," and "right" are used only to indicate relative positional relationships; when the absolute position of the described object changes, the relative positional relationship may also change accordingly.
[0015] Based on the background description, the safe operation of power systems is the cornerstone of modern social stability and prosperity. Power system failures not only affect production and daily life but can also trigger safety accidents, causing significant losses. Transmission lines, as the link in power transmission, require safe and stable operation as a crucial prerequisite for energy transmission. Insulators play a vital role in transmission lines, providing insulation and mechanical support, and their sheer number makes them irreplaceable. Transmission lines are susceptible to natural environmental and climatic influences, leading to aging of insulator insulation materials and subsequent insulation failure. Furthermore, long-term load operation of transmission lines causes changes in internal stress within insulators, resulting in damage such as breakage, string slippage, and fracture, causing power outages and threatening the safe operation of the power system. Insulator inspection, as a key link in power line inspection, plays a crucial role in ensuring reliable power supply from transmission lines. Transmission line insulator inspection methods mainly include manual inspection, helicopter inspection, and drone inspection. However, the complex operating environment of transmission lines presents challenges, including difficulties in ensuring worker safety, low efficiency, and low accuracy. While helicopter inspections can reduce the risks of manual inspections, their high cost makes them unsuitable for inspections in extreme geographical conditions such as high altitudes, low oxygen levels, and cold weather, failing to meet the current requirements for safe, stable, and efficient power line inspections. Drones equipped with high-definition cameras, combined with deep learning-based target detection algorithms, can effectively and accurately obtain the operating status of insulators, enabling intelligent inspections. Despite the numerous advantages of drone-based transmission line inspections, drone-based insulator defect detection models suffer from poor generalization ability and weak robustness in complex scenarios. Therefore, insulator defect detection in complex scenarios remains a challenging task, and research on algorithms for insulator defect detection in complex scenarios is of great significance for ensuring the safe operation of power systems.
[0016] In recent years, the rapid development of deep learning theories and methods has brought new solutions and approaches to insulator defect detection. Key advancements include: a novel object detection algorithm based on convolutional neural networks, which improves detection efficiency while maintaining speed; an attention module added to the YOLOv5 network framework, which enhances insulator defect features and reduces the impact of complex backgrounds on the model, effectively improving insulator identification results; a small object detection algorithm that effectively detects abnormal states of transmission line insulators; an insulator detection algorithm based on an optimized YOLOv5 network under all-weather conditions, achieving good identification results; a two-stage insulator self-explosion defect detection method for foggy insulator images, effectively addressing insulator defect detection in foggy conditions; and the generation of a foggy simulated insulation dataset using a dark channel prior algorithm, along with an insulator defect detection method based on a Center Point Network (CenterNet). A Hybrid-YOLO-based insulator defect detection algorithm is proposed, which integrates YOLO (You Only Look Once) and Convolutional Neural Network (CNN) structures. This method can effectively identify various types of insulator defect states and achieves good model performance. A dual-stream CNN backbone network-based insulator feature extraction method is also presented. This method embeds a self-attention mechanism (Transformer) with an attention interaction strategy and a weight-sharing group attention strategy in its fusion stage, enabling cross-modal feature interaction. A Swin-Transformer encoder-decoder network can analyze cross-modal generality and complementarity to achieve insulator defect detection. A similarity attention mechanism is constructed using Transformer to achieve integrated modeling of multi-scale and multi-modal features, improving insulator defect detection performance. A conditional generative adversarial architecture is introduced into a CNN and Transformer fusion network, enabling multi-modal insulator defect detection. An optimized Swin-Transformer-based network architecture can extract hierarchical features from the input image and perform edge guidance and sine / cosine fusion modules to optimize cross-modal insulator defect feature fusion. Insulator defect features are extracted using two parallel PVT structures, and a CNN-based modal transfer and interaction module is designed to bridge the semantic gap between insulator image data of different modes. A comprehensive analysis and evaluation of the defect detection performance of the YOLO series models in industrial production scenarios is presented, highlighting the advantages and disadvantages of YOLO algorithms in defect detection applications.Based on the target detection algorithm of YOLOv9-YOLOv10 fusion, this method can provide new ideas and approaches for insulator defect detection.
[0017] The above analysis shows that although many deep learning detection methods have been proposed in the field of insulator surface defect detection, challenges remain for insulator defect detection in complex scenarios, including interference from rain and fog, background interference from power towers and buildings, scarcity of insulator defect images, and difficulty in extracting features from minute defects. Therefore, designing a method that can extract feature information from minute defects in insulators while fully exploring the hierarchical features and complementary information of insulators of different modes, thereby obtaining richer morphological feature information of insulators and improving the accuracy of insulator defect recognition, remains a core problem that urgently needs to be solved in insulator defect detection methods. In summary, to date, no relatively good insulator defect detection algorithm has been proposed for YOLOv8-Transformer-based insulator defect detection.
[0018] As mentioned above, improving the accuracy of insulator defect identification in transmission lines has become an important research issue.
[0019] Based on the above description, such as Figure 1 As shown in this embodiment, the insulator defect detection method based on optimized YOLO attention interaction includes: Step 101: Obtain an image of the insulator of the transmission line and input the insulator image into a pre-trained defect detection model.
[0020] In practical implementation, insulators are key components in transmission lines, primarily used for insulating and mechanically supporting conductors. The process involves inputting insulator images into a pre-trained defect detection model, enabling the model to perform defect detection on insulators within the transmission line based on these images.
[0021] The original YOLOv8 object detection network captures global information in feature maps to enhance the model's receptive field, but it fails to obtain important entity feature information in high-similarity data. Therefore, embodiments of this disclosure propose an improved YOLOv8 model.
[0022] The defect detection model is obtained by pre-training an improved YOLOv8 model. Figure 2 This is a schematic diagram of the structure of the improved YOLOv8 model according to an embodiment of this disclosure. Figure 2As shown, the improved YOLOv8 model includes a backbone, a neck, and a head. The improved YOLOv8 model adds Transformer feature extraction and feature interaction modules to the backbone and neck, enabling the network to perform global self-focus modeling throughout the feature extraction process. It replaces the original YOLOv8 model's Feature Pyramid Network (FPN) and Path Aggregation Network (PAN) structures with an improved Bidirectional Feature Pyramid Network (BiFPN) structure, allowing the improved YOLOv8 model to dynamically balance features across different scales using different weights. Furthermore, a small target detection layer is added to improve the network's ability to detect minute defects in insulators.
[0023] like Figure 2 As shown, the backbone network consists of multiple Convolution-BatchNorm-SiLU (CBS) activation functions, a Cross-Stage Partial 2f Swin Transformer (C2fSTR) feature extractor, and Spatial Pyramid Pooling Fast (SPPF). The backbone network is used to extract low-level texture features and high-level semantic information from insulator images and output multi-scale feature maps. The CBS module extracts preliminary features through standard convolution operations, reduces noise interference, and enhances edge information. The C2fSTR module improves the diversity and expressive power of feature extraction through cross-layer feature reuse and grouped convolutional structures. The SPPF module extracts global contextual information through multi-scale pooling operations, fuses features from different receptive fields, and enhances the network's ability to model complex backgrounds and long-distance dependencies.
[0024] Secondly, multi-scale feature maps are fed into the neck network. The neck network concatenates the multi-scale feature maps extracted by the backbone network multiple times through the CBS module, C2fSTR module, concatenation, upsampling, and downsampling to obtain high-quality insulator feature maps. Concatenation merges feature maps from different scales and levels through channel-level feature concatenation, improving the network's ability to integrate contextual information. Upsampling upsamples low-resolution feature maps to restore spatial resolution, allowing fine-grained information to be passed to subsequent detection layers. Downsampling downsamples high-resolution feature maps to reduce spatial resolution. Finally, the head network uses a detector to determine the insulator defect detection results from the attention interaction features.
[0025] Currently, convolutional structures are limited by the size of the convolutional kernel, focusing only on local regions of the feature map and lacking sensitivity to global information. To address this issue, this disclosure proposes a C2fSTR module, designed to overcome the limitations of convolutional structures and enable the model to better capture global gradient flow information while maintaining a lightweight design. The convolutional module of the C2f module can effectively fuse feature maps of different scales, improving the model's receptive field and detection accuracy.
[0026] Figure 3 This is a schematic diagram of the C2fSTR module according to an embodiment of this disclosure. Figure 3 As shown, the C2fSTR module includes: convolution-batch normalization-SiLU activation function (CBS), data partitioning (Split), bottleneck (Bottle neck), concatenation (Concat), and self-attention mechanism (Transformer).
[0027] Step 102: Use the defect detection model to perform target detection processing on the insulator image to obtain an insulator feature map.
[0028] In practice, the weak target detection module and the improved Bi FPN module in the defect detection model are used to perform target detection processing on the insulator image to obtain the insulator feature map.
[0029] Specifically, to improve the detection performance of small targets, a small target detection module was added to the original YOLOv8 algorithm. This module incorporates the second feature layer into the feature fusion network, thereby preserving more shallow semantic information. Specifically, two previously unfused 320×320 feature maps were introduced into the feature extraction network to enhance the network's ability to detect small targets and incorporate more information about them. To effectively process this new feature map, one upsampling and one downsampling operation were performed in the feature fusion network. This series of operations increased the number of detection layers in the final output to four, thereby improving the network's perceptual ability and sensitivity to small targets.
[0030] The improved architecture described above enables the network to capture semantic information in images more comprehensively, especially when dealing with small targets. By making these adjustments to the existing YOLOv8s algorithm, embodiments of this disclosure achieve superior performance in object detection tasks, particularly in handling small targets.
[0031] Step 103: Perform feature extraction processing on the insulator feature map to obtain the first mode defect level feature and the second mode defect level feature.
[0032] In specific implementation, to further improve model performance, this embodiment introduces a third Transformer feature extraction module after the C2f module. The Transformer feature extraction module extracts global features through a self-attention mechanism and a sliding window, enhancing the global information interactivity of the feature map and further improving the robustness and accuracy of the model.
[0033] Figure 4 This is a schematic diagram of the Transformer feature extraction model according to an embodiment of this disclosure. Figure 4 As shown, the first modal image (first modal defect level features) and the second modal image (second modal defect level features) are input into their respective encoders. Attention interaction is performed on the first and second modal defect level features to obtain channel-shared features. The channel perception interaction module determines channel attention parameters based on these channel-shared features. The spatial cross-guidance module determines the first modal interaction features based on the first modal defect level features, and the spatial cross-guidance module determines the second modal interaction features based on the second modal defect level features. The first and second modal interaction features are then input into their respective decoders, and insulator defect detection is performed based on the decoded first and second modal interaction features.
[0034] The defect detection model incorporates Transformer-based feature extraction modules in both the backbone and neck networks. To transfer the high performance of the Transformer to the visual domain and address the shortcomings of Convolutional Neural Networks (CNNs) in extracting global features, the model introduces the locality of convolutional operations from CNNs, confining attention computation to a small window to save computational resources. To balance model complexity and computational efficiency, two independent sliding window feature extractors (Swin-B extractors) are used to construct different modal defect levels of the insulator. The backbone network consists of five stages, each reducing the resolution of the input insulator feature map, expanding the receptive field layer by layer, similar to CNNs. Within each Swing Transformer layer, multi-head self-attention is used to achieve interaction within the local window; furthermore, sliding window operations establish long-range dependencies between windows.
[0035] Specifically, when the network receives two modes of insulator images with a resolution of 640×640, the pre-trained backbone network divides the input insulator image into a series of non-overlapping small blocks. At each stage, the number of channels in the input feature map is doubled, and the resolution is halved, thus expanding the receiving field layer by layer. This results in two sets of feature maps from the two modes, each containing eight different resolutions, representing the defect-level features of the first mode. Second-mode defect hierarchical features .
[0036] Step 104: Determine channel sharing features based on the first modal defect hierarchy features and the second modal defect hierarchy features, and determine attention interaction features based on the channel sharing features.
[0037] In specific implementation, the channel-aware interaction module is used to select the saliency consistency features of channel correlation between the first modality defect hierarchy features and the second modality defect hierarchy features. This allows for the extraction of more discriminative features for salient target understanding. In the channel-aware interaction module, features are derived from the first modality defect hierarchy. Second-mode defect hierarchical features Determine channel sharing characteristics The channel attention module is used to determine the channel attention parameters based on channel sharing characteristics. .
[0038] In the spatial cross-guidance module, the first spatial attention parameters are determined based on the first modal defect hierarchy features. The second spatial attention parameters are determined based on the second modality defect hierarchy features. According to the second spatial attention parameters and channel attention parameters Determine first-modal interactive attention Attention to first-modal interactions Features of the first mode defect hierarchy The first modality interaction features are obtained by performing fusion processing. Based on the first spatial attention parameters and channel attention parameters Determine the second modality of interactive attention Second-modal interaction attention Features of the second mode defect hierarchy The second modality interaction features are obtained by performing fusion processing. .
[0039] Step 105: Using the defect detection model, determine the insulator defect detection result based on the attention interaction features.
[0040] In specific implementation, the first modal interaction features Second-mode interaction features Input is fed into the defect detection model. The defect detection model is then used to analyze the interaction features of the first modality. Second-mode interaction features Insulator defect detection was performed, and the results were obtained. The defect detection model was an optimized YOLOv8 target detection model.
[0041] Through the above embodiments, insulator images of transmission lines are acquired and input into a pre-trained defect detection model. The defect detection model performs target detection processing on the insulator images to obtain insulator feature maps. This allows for precise location of the insulator within the image based on the feature maps, providing reliable data for subsequent insulator defect detection. Feature extraction processing is performed on the insulator feature maps to obtain first-mode defect-level features and second-mode defect-level features. These features capture subtle features of insulator defects from different angles, effectively avoiding feature loss issues that may occur with single-feature extraction. Channel-shared features are determined based on the first-mode and second-mode defect-level features, and attention interaction features are also determined based on these features. These attention interaction features further enhance the defect detection model's ability to focus on key defect features. The defect detection model then uses these attention interaction features to determine the insulator defect detection result. This enables the defect detection model to more accurately identify various insulator defects, improves the accuracy of insulator defect identification in transmission lines, reduces the probability of missed and false detections, and provides strong protection for the safe operation of transmission lines.
[0042] In some embodiments, step 102 includes: Step 1021: Using the bidirectional feature pyramid network in the defect detection model, the insulator image is upsampled to obtain an upsampled feature map.
[0043] Step 1022: Using the bidirectional feature pyramid network in the defect detection model, the upsampled feature map is downsampled to obtain a downsampled feature map, and the downsampled feature map is used as the insulator feature map.
[0044] In practical implementation, the traditional FPN structure performs feature fusion only through a top-down unidirectional information flow in the object detection network. The PANet network adds a bottom-up path to enhance information transmission and retain more shallow features. The Bi FPN module is a further improvement on the PANet network. The Bi FPN module selects layers 3 to 7 of the 7 feature layers for fusion and employs a specific fusion strategy. To further enhance the feature extraction and detection capabilities of small targets, the embodiments of this disclosure further improve upon the Bi FPN module. Figure 5 This is a schematic diagram of the structure of the BiFPN module according to an embodiment of this disclosure. Figure 5 As shown, the improved Bi FPN module includes a top-down path passing through P6, P5, P4, P3, and P2, as well as a bottom-up path passing through P2, P3, P4, P5, and P6. Furthermore, the improved Bi FPN module does not significantly increase computational complexity compared to the original Bi FPN module. The advantage of this structure is that it retains more shallow semantic information without losing relatively deep semantic information, thus giving the network a more global awareness.
[0045] By utilizing the bidirectional feature pyramid network (Bi FPN module) in the defect detection model, the insulator image is upsampled to obtain an upsampled feature map, and the upsampled feature map is downsampled to obtain a downsampled feature map. The downsampled feature map is then used as the insulator feature map, which can further improve the feature extraction and detection capabilities of small targets.
[0046] The above scheme utilizes a bidirectional feature pyramid network in the defect detection model to upsample the insulator image, obtaining an upsampled feature map. Then, using the same network, the upsampled feature map is downsampled to obtain a downsampled feature map, which is then used as the insulator's feature map. This approach further enhances the feature extraction and detection capabilities for small targets without significantly increasing computational complexity.
[0047] In some embodiments, the insulator feature map includes: a first mode insulator feature map and a second mode insulator feature map; step 103 includes: Step 1031: Using the sliding window feature extractor in the defect detection model, adjust the channels and resolution of the first mode insulator feature map to obtain the first mode multi-scale feature, and compress the first mode multi-scale feature to obtain the first mode defect hierarchical feature.
[0048] In practice, the sliding window feature extractor can use multi-head self-attention to achieve interaction within a local window, and at the same time, establish remote dependencies between windows through sliding window operations.
[0049] Using the sliding window feature extractor in the defect detection model, the channels of the first-mode insulator feature map are doubled, and the resolution of the first-mode insulator feature map is halved to obtain the first-mode multi-scale features. For example, when the resolution of the first-mode insulator feature map is... The backbone network divides the first-mode insulator feature map into a series of non-overlapping small blocks. At each stage, the channels of the first-mode insulator feature map are doubled and the resolution is halved, thereby expanding the receiving field layer by layer to obtain the first-mode multi-scale features. .
[0050] Using the sliding window feature extractor in the defect detection model, two sets of kernels are used respectively and The concatenated convolution operation uniformly compresses the multi-scale features of the first modality to 16 channels to obtain the defect-level features of the first modality. .
[0051] Step 1032: Using the sliding window feature extractor in the defect detection model, adjust the channels and resolution of the second mode insulator feature map to obtain the second mode multi-scale features, and compress the second mode multi-scale features to obtain the second mode defect hierarchical features.
[0052] In practice, the sliding window feature extractor can use multi-head self-attention to achieve interaction within a local window, and at the same time, establish remote dependencies between windows through sliding window operations.
[0053] Using the sliding window feature extractor in the defect detection model, the channels of the second-mode insulator feature map are doubled, and the resolution of the second-mode insulator feature map is halved to obtain the second-mode multi-scale features. For example, when the resolution of the second-mode insulator feature map is... The backbone network divides the second-mode insulator feature map into a series of non-overlapping small blocks. At each stage, the channels of the second-mode insulator feature map are doubled and the resolution is halved, thereby expanding the receiving field layer by layer to obtain the second-mode multi-scale features. .
[0054] Using the sliding window feature extractor in the defect detection model, two sets of kernels are used respectively and The concatenated convolution operation uniformly compresses the multi-scale features of the second modality to 16 channels to obtain the defect-level features of the second modality. .
[0055] The above scheme utilizes a sliding window feature extractor in the defect detection model to adjust the channels and resolution of the first-mode insulator feature map to obtain first-mode multi-scale features. These first-mode multi-scale features are then compressed to obtain first-mode defect hierarchical features. Similarly, the sliding window feature extractor in the defect detection model adjusts the channels and resolution of the second-mode insulator feature map to obtain second-mode multi-scale features. These second-mode multi-scale features are then compressed to obtain second-mode defect hierarchical features. The sliding window feature extractor employs multi-head self-attention to achieve interaction within local windows, while simultaneously establishing long-range dependencies between windows through sliding window operations, resulting in more accurate first-mode and second-mode defect hierarchical features.
[0056] In some embodiments, step 104 includes: Step 1041: Perform convolution processing on the first modal defect hierarchical features to obtain the first modal convolutional features, and perform convolution processing on the second modal defect hierarchical features to obtain the second modal convolutional features.
[0057] In specific implementation, the first mode defect hierarchy features conduct and The convolutional processing is then followed by batch normalization layers and the PReLU activation function to obtain the first modality convolutional features. .
[0058] Second-mode defect hierarchical features conduct and The convolutional processing is then followed by batch normalization layers and the PReLU activation function to obtain the second modality convolutional features. .
[0059] Step 1042: Perform pixel multiplication on the first modality convolutional features and the second modality convolutional features to obtain the target convolutional features.
[0060] In practice, the first modality convolution features Second modality convolution features Pixel multiplication is performed to obtain the target convolutional features. ,in, For first-mode convolution features, This is a second-modal convolutional feature. This is a pixel-by-pixel multiplication.
[0061] Step 1043: The target convolutional feature, the first modality convolutional feature, and the second modality convolutional feature are concatenated to obtain the channel-shared feature.
[0062] In practice, to enhance strongly similar pixels while filtering out blurry pixels in the feature mapping, pixel-level multiplication is used to obtain channel-shared features. The target convolutional features are then applied. First-mode convolution features Second modality convolution features The channel-shared feature is obtained by splicing the data. The formula for calculating the channel-shared feature is as follows: ,in, As a channel-sharing feature, For splicing operations, For first-mode convolution features, This is a second-modal convolutional feature. This is a pixel-by-pixel multiplication.
[0063] The above scheme involves convolutional processing of the first modality defect level features to obtain first modality convolutional features, and convolutional processing of the second modality defect level features to obtain second modality convolutional features. Pixel multiplication of the first and second modality convolutional features yields the target convolutional feature. The target convolutional feature, the first modality convolutional feature, and the second modality convolutional feature are then concatenated to obtain channel-shared features. These channel-shared features incorporate both the first and second modality defect level features, making the resulting channel-shared features more accurate.
[0064] In some embodiments, step 104 includes: Step 1044: Determine the channel attention parameters of the channel shared features, and determine the spatial attention parameters of the first modal defect hierarchical features and the second modal defect hierarchical features.
[0065] In practice, the channel-sharing features are input into the channel attention module. The channel attention module then determines the channel attention parameters based on the channel-sharing features. .
[0066] In the spatial dimension, a spatial cross-guidance module is proposed to handle cross-modal interactions of insulator images. The first modal branch is supervised by basic frame labels, focusing on the subject saliency of the target; the second modal branch is supervised by contour labels, focusing on the edge continuity of the target. In some challenging scenarios, single-modal features are prone to losing some details. Spatial cross-guidance enables the two modalities to complement each other and be flexibly adjusted, improving the robustness of the model under extreme conditions.
[0067] Specifically, the spatial cross-guidance module first derives the spatial attention parameters for the two modalities separately, and then cross-adds the spatial attention features to the modal defect hierarchy features of the two modalities. The spatial attention parameters include: the first spatial attention parameters of the first modal defect hierarchy features. Second spatial attention parameters of second modal defect hierarchical features .
[0068] Step 1045: Determine interactive attention based on the channel attention parameters and the spatial attention parameters, and determine interactive features based on the interactive attention.
[0069] In practice, to extract effective salient target cues from both modalities and perform cross-modal adjustment, while avoiding excessive interference between the two modalities, the output two sets of attention interaction mappings are designated as first-modal interaction attention. Second-modal interactive attention .
[0070] First modality interactive attention Add to the corresponding first-mode defect level feature First modal interaction features are obtained. Second modal interaction attention Add to the corresponding second-mode defect hierarchy feature Second modal interaction features were obtained. Thus, the first modality interaction features Second-mode interaction features It is an interactive feature that complements and regulates each other in the dimensions of channels and space.
[0071] The above scheme determines the channel attention parameters for channel-shared features and the spatial attention parameters for first-modal and second-modal defect-level features. Interactive attention is then determined based on the channel and spatial attention parameters, and interactive features are determined based on the interactive attention. This integrates both channel and spatial attention parameters into the interactive features.
[0072] In some embodiments, step 1044 includes: Step 1044A: Using the channel attention module in the defect detection model, determine the channel attention parameters based on the channel shared features.
[0073] In practice, the channel attention module in the defect detection model is used to determine the channel attention parameters based on the channel shared features.
[0074] ,in, For channel attention parameters, For the swish activation function, For multilayer perceptrons, As a channel-sharing feature, To enable channel sharing features Perform a global max pooling operation. To enable channel sharing features Perform average pooling. To enable channel sharing features Perform median pooling operation. For multiplication via dimension broadcast.
[0075] Step 1044B: Using the spatial cross-guidance module in the defect detection model, determine the first spatial attention parameter based on the first modal defect hierarchy features.
[0076] In practice, the spatial cross-guidance module in the defect detection model is used to determine the first spatial attention parameters based on the first modality defect hierarchy features.
[0077] , in, For the first spatial attention parameters, For the swish activation function, For filter size Convolution operation, This refers to the splicing operation along the channel direction. This represents the first-mode defect level feature. To analyze the hierarchical features of the first mode defect Global max pooling is performed at each point along the channel axis. To analyze the hierarchical features of the first mode defect Average pooling is performed at each point along the channel axis. To analyze the hierarchical features of the first mode defect Median pooling is performed at each point along the channel axis. For filter size Convolution operation, For multiplication via dimension broadcast.
[0078] Step 1044C: Using the spatial cross-guidance module in the defect detection model, determine the second spatial attention parameter based on the second modal defect hierarchy features.
[0079] In practice, the spatial cross-guidance module in the defect detection model is used to determine the second spatial attention parameters based on the second modality defect hierarchy features.
[0080] , in, For the second spatial attention parameters, For the swish activation function, For filter size Convolution operation, This refers to the splicing operation along the channel direction. This represents the second-mode defect level feature. To analyze the hierarchical features of the second mode defect Global max pooling is performed at each point along the channel axis. To analyze the hierarchical features of the second mode defect Average pooling is performed at each point along the channel axis. To analyze the hierarchical features of the second mode defect Median pooling is performed at each point along the channel axis. For filter size Convolution operation, For multiplication via dimension broadcast.
[0081] The above scheme utilizes the channel attention module in the defect detection model to determine channel attention parameters based on channel shared features. It also utilizes the spatial cross-guidance module in the defect detection model to determine the first spatial attention parameters based on the first modality defect hierarchy features. Furthermore, it utilizes the spatial cross-guidance module in the defect detection model to determine the second spatial attention parameters based on the second modality defect hierarchy features. In this way, the channel attention module can accurately determine the channel attention parameters, and the spatial cross-guidance module can accurately determine the first and second spatial attention parameters.
[0082] In some embodiments, the spatial attention parameters include: a first spatial attention parameter of the first modal defect hierarchy features and a second spatial attention parameter of the second modal defect hierarchy features; step 1045 includes: Step 1045A: Determine the first modal interaction attention based on the second spatial attention parameter and the channel attention parameter, and perform fusion processing on the first modal interaction attention and the first modal defect hierarchical features to obtain the first modal interaction features.
[0083] In practice, the first modal interactive attention is determined based on the second spatial attention parameters and the channel attention parameters. ,in, For first-modal interaction attention, For the second spatial attention parameters, Channel attention parameters for channel-shared features. For filter size Convolution operation, For filter size The convolution operation.
[0084] The first modal interaction features are obtained by fusing the first modal interaction attention and the first modal defect hierarchical features. Specifically, the first modal interaction attention is added to the corresponding first modal defect hierarchical features to obtain the first modal interaction features. ,in, For first-modal interaction features, This represents the first-mode defect level feature. This is for first-modal interactive attention.
[0085] Step 1045B: Determine the second modal interaction attention based on the first spatial attention parameter and the channel attention parameter, and perform fusion processing on the second modal interaction attention and the second modal defect hierarchical features to obtain the second modal interaction features.
[0086] In practice, the second modal interactive attention is determined based on the first spatial attention parameters and the channel attention parameters. ,in, For second-modal interaction attention, For the first spatial attention parameters, Channel attention parameters for channel-shared features. For filter size Convolution operation, For filter size The convolution operation.
[0087] The second modal interaction attention and the second modal defect hierarchical features are fused to obtain the second modal interaction features. Specifically, the second modal interaction attention is added to the corresponding second modal defect hierarchical features to obtain the second modal interaction features. ,in, For second-modal interaction features, This represents the second-mode defect level feature. This is for second-modal interactive attention.
[0088] The above scheme determines the first modal interaction attention based on the second spatial attention parameters and channel attention parameters. The first modal interaction attention is then fused with the first modal defect hierarchy features to obtain the first modal interaction features. This integrates the second spatial attention parameters and the first modal defect hierarchy features, making the obtained first modal interaction features more accurate. Similarly, the second modal interaction attention is determined based on the first spatial attention parameters and channel attention parameters. This second modal interaction attention is then fused with the second modal defect hierarchy features to obtain the second modal interaction features. This second modal interaction features integrate the first spatial attention parameters and the second modal defect hierarchy features, making the obtained second modal interaction features more accurate, thus enabling insulator defect detection based on both the first and second modal interaction features.
[0089] Through the above embodiments, insulator images of transmission lines are acquired and input into a pre-trained defect detection model. The defect detection model performs target detection processing on the insulator images to obtain insulator feature maps. This allows for precise location of the insulator within the image based on the feature maps, providing reliable data for subsequent insulator defect detection. Feature extraction processing is performed on the insulator feature maps to obtain first-mode defect-level features and second-mode defect-level features. These features capture subtle features of insulator defects from different angles, effectively avoiding feature loss issues that may occur with single-feature extraction. Channel-shared features are determined based on the first-mode and second-mode defect-level features, and attention interaction features are also determined based on these features. These attention interaction features further enhance the defect detection model's ability to focus on key defect features. The defect detection model then uses these attention interaction features to determine the insulator defect detection result. This enables the defect detection model to more accurately identify various insulator defects, improves the accuracy of insulator defect identification in transmission lines, reduces the probability of missed and false detections, and provides strong protection for the safe operation of transmission lines.
[0090] Technical effects of the embodiments disclosed herein: (1) The present invention first considers the problem that the convolutional structure is not sensitive enough to global information due to the limitation of the convolutional kernel size. The present invention proposes a C2fstr module, which enables the model to obtain global gradient flow information better while being lightweight, thereby further improving the robustness and accuracy of the model.
[0091] (2) This embodiment of the present disclosure proposes a weak target detection module. Two 320×320 feature maps that were not originally fused are introduced into the feature extraction network. One upsampling and one downsampling operation are performed in the feature fusion network. The number of detection layers in the final output is increased to 4 layers, which improves the network's perception capability and sensitivity to weak targets.
[0092] (3) In this embodiment, a bottom-up path is added to the PANet network. The third to seventh layers of the seven feature layers are selected for fusion, and a specific fusion strategy is adopted. This can retain more shallow semantic information while reducing the loss of relatively deep semantic information, thereby making the network more globally perceptive.
[0093] (4) In this embodiment, two independent Swing-B extractors are designed to construct hierarchical features of insulator defects of different modes. The backbone network is divided into 7 stages, and each stage will reduce the resolution of the input feature map and expand the receptive field layer by layer.
[0094] (5) In this embodiment, the cross-modal features of the insulator are separated in the channel and spatial dimensions. A channel perception interaction module and a spatial cross-guidance module are designed. They can interact and fuse in strongly similar channel dimensions and cross-guide in strongly complementary spatial dimensions, resulting in two sets of attention interaction feature maps. This enables the optimal extraction of insulator defect features and thus defect identification.
[0095] (6) The insulator defect detection method using the optimized YOLOv8-Transformer in this embodiment has adaptive capability and robustness. It can optimize the defect detection method according to the insulator conditions in different scenarios, and the insulator defect detection method meets the requirements of insulator defect detection in different scenarios.
[0096] (7) The optimized YOLOv8-Transformer insulator defect detection method of this disclosure can achieve good insulator defect identification effect, and also has good exploratory value for the development of related theories and technologies. This disclosure can be widely applied in the field of insulator defect detection of power transmission and distribution lines.
[0097] It should be noted that the method of this disclosure embodiment can be executed by a single device, such as a computer or server. The method of this embodiment can also be applied to a distributed scenario, where multiple devices cooperate to complete the task. In such a distributed scenario, one of these devices may execute only one or more steps of the method of this disclosure embodiment, and the multiple devices will interact with each other to complete the method described.
[0098] It should be noted that the above description describes some embodiments of this disclosure. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in a different order than that shown in the above embodiments and still achieve the desired result. Furthermore, the processes depicted in the drawings do not necessarily require a specific or sequential order to achieve the desired result. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0099] Based on the same inventive concept, and corresponding to any of the above embodiments, this disclosure also provides an insulator defect detection device based on optimized YOLO attention interaction.
[0100] refer to Figure 6 The insulator defect detection device based on optimized YOLO attention interaction includes: The insulator image acquisition module 301 is configured to acquire insulator images of transmission lines and input the insulator images into a pre-trained defect detection model; The target detection processing module 302 is configured to perform target detection processing on the insulator image using the defect detection model to obtain an insulator feature map; The feature extraction processing module 303 is configured to perform feature extraction processing on the insulator feature map to obtain first mode defect level features and second mode defect level features; The fusion feature determination module 304 is configured to determine channel-sharing features based on the first modal defect hierarchy features and the second modal defect hierarchy features, and to determine attention interaction features based on the channel-sharing features; The defect detection result determination module 305 is configured to use the defect detection model to determine the insulator defect detection result based on the attention interaction features.
[0101] In some embodiments, the target detection processing module 302 includes: The upsampling processing unit is configured to use the bidirectional feature pyramid network in the defect detection model to perform upsampling processing on the insulator image to obtain an upsampled feature map. The downsampling processing unit is configured to use the bidirectional feature pyramid network in the defect detection model to perform downsampling processing on the upsampling feature map to obtain a downsampling feature map, and use the downsampling feature map as the insulator feature map.
[0102] In some embodiments, the insulator feature map includes: a first-mode insulator feature map and a second-mode insulator feature map; the feature extraction and processing module 303 includes: The first modal defect hierarchy feature determination unit is configured to use the sliding window feature extractor in the defect detection model to adjust the channels and resolution of the first modal insulator feature map to obtain the first modal multi-scale features, and to compress the first modal multi-scale features to obtain the first modal defect hierarchy features. The second modal defect hierarchy feature determination unit is configured to use the sliding window feature extractor in the defect detection model to adjust the channels and resolution of the second modal insulator feature map to obtain the second modal multi-scale features, and to compress the second modal multi-scale features to obtain the second modal defect hierarchy features.
[0103] In some embodiments, the fusion feature determination module 304 includes: The convolution processing unit is configured to perform convolution processing on the first modal defect hierarchical features to obtain first modal convolution features, and to perform convolution processing on the second modal defect hierarchical features to obtain second modal convolution features; The pixel multiplication processing unit is configured to perform pixel multiplication processing on the first modality convolutional features and the second modality convolutional features to obtain the target convolutional features; The splicing processing unit is configured to splice the target convolutional feature, the first modal convolutional feature, and the second modal convolutional feature to obtain channel-shared features.
[0104] In some embodiments, the fusion feature determination module 304 includes: The spatial attention parameter determination unit is configured to determine the channel attention parameters of the channel shared features and to determine the spatial attention parameters of the first modal defect hierarchy features and the second modal defect hierarchy features; The interaction feature determination unit is configured to determine interaction attention based on the channel attention parameters and the spatial attention parameters, and to determine interaction features based on the interaction attention.
[0105] In some embodiments, the spatial attention parameter determination unit includes: The channel attention parameter determination subunit is configured to determine the channel attention parameters based on the channel shared features using the channel attention module in the defect detection model. The first spatial attention parameter determination subunit is configured to use the spatial cross-guided module in the defect detection model to determine the first spatial attention parameter based on the first modal defect hierarchical features. The second spatial attention parameter determination subunit is configured to use the spatial cross-guided module in the defect detection model to determine the second spatial attention parameter based on the second modal defect hierarchical features.
[0106] In some embodiments, the spatial attention parameters include: a first spatial attention parameter of the first modal defect hierarchy features and a second spatial attention parameter of the second modal defect hierarchy features; the interaction feature determination unit includes: The first modal interaction feature determination unit is configured to determine the first modal interaction attention based on the second spatial attention parameter and the channel attention parameter, and to perform fusion processing on the first modal interaction attention and the first modal defect hierarchical feature to obtain the first modal interaction feature; The second modal interaction feature determination unit is configured to determine the second modal interaction attention based on the first spatial attention parameter and the channel attention parameter, and to perform fusion processing on the second modal interaction attention and the second modal defect hierarchical features to obtain the second modal interaction feature.
[0107] For ease of description, the above apparatus is described in terms of its functions, divided into various modules. Of course, in implementing this disclosure, the functions of each module can be implemented in one or more software and / or hardware.
[0108] The apparatus of the above embodiments is used to implement the corresponding insulator defect detection method based on optimized YOLO attention interaction in any of the foregoing embodiments, and has the beneficial effects of the corresponding method embodiments, which will not be repeated here.
[0109] Based on the same inventive concept, corresponding to the methods of any of the above embodiments, this disclosure also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the program, it implements the insulator defect detection method based on optimized YOLO attention interaction as described in any of the above embodiments.
[0110] Figure 7 This embodiment illustrates a more specific hardware structure of an electronic device. The device may include a processor 1010, a memory 1020, an input / output interface 1030, a communication interface 1040, and a bus 1050. The processor 1010, memory 1020, input / output interface 1030, and communication interface 1040 are interconnected internally via the bus 1050.
[0111] The processor 1010 can be implemented using a general-purpose CPU (Central Processing Unit), microprocessor, application-specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of this specification.
[0112] The memory 1020 can be implemented in the form of ROM (Read Only Memory), RAM (Random Access Memory), static storage device, dynamic storage device, etc. The memory 1020 can store the operating system and other applications. When the technical solutions provided in the embodiments of this specification are implemented by software or firmware, the relevant program code is stored in the memory 1020 and is called and executed by the processor 1010.
[0113] The input / output interface 1030 is used to connect input / output modules to realize information input and output. Input / output modules can be configured as components within the device (not shown in the figure) or externally connected to the device to provide corresponding functions. Input devices may include keyboards, mice, touchscreens, microphones, various sensors, etc., while output devices may include displays, speakers, vibrators, indicator lights, etc.
[0114] The communication interface 1040 is used to connect the communication module (not shown in the figure) to enable communication between this device and other devices. The communication module can communicate via wired means (such as USB (Universal Serial Bus), network cable, etc.) or wireless means (such as mobile network, WIFI (Wireless Fidelity), Bluetooth, etc.).
[0115] Bus 1050 includes a pathway for transmitting information between various components of the device, such as processor 1010, memory 1020, input / output interface 1030, and communication interface 1040.
[0116] It should be noted that although the above-described device only shows the processor 1010, memory 1020, input / output interface 1030, communication interface 1040, and bus 1050, in specific implementations, the device may also include other components necessary for normal operation. Furthermore, those skilled in the art will understand that the above-described device may only include the components necessary for implementing the embodiments of this specification, and not necessarily all the components shown in the figures.
[0117] The electronic devices described above are used to implement the corresponding insulator defect detection method based on optimized YOLO attention interaction in any of the foregoing embodiments, and have the beneficial effects of the corresponding method embodiments, which will not be repeated here.
[0118] Based on the same inventive concept, corresponding to the methods of any of the above embodiments, this disclosure also provides a non-transitory computer-readable storage medium storing computer instructions for causing the computer to execute the insulator defect detection method based on optimized YOLO attention interaction as described in any of the above embodiments.
[0119] The computer-readable medium of this embodiment includes permanent and non-permanent, removable and non-removable media, and information storage can be implemented by any method or technology. Information can be computer-readable instructions, data structures, program modules, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other non-transfer medium that can be used to store information accessible by a computing device.
[0120] The computer instructions stored in the storage medium of the above embodiments are used to cause the computer to execute the insulator defect detection method based on optimized YOLO attention interaction as described in any of the above embodiments, and have the beneficial effects of the corresponding method embodiments, which will not be repeated here.
[0121] Based on the same inventive concept, corresponding to any of the above embodiments, this application also provides a computer program product, including computer program instructions. When the computer program instructions are run on a computer, the computer executes the insulator defect detection method based on optimized YOLO attention interaction as described in any of the above embodiments, and has the beneficial effects of the corresponding method embodiments, which will not be repeated here.
[0122] It is understood that before using the technical solutions of the various embodiments in this disclosure, users will be informed of the type, scope of use, and usage scenarios of the personal information involved in an appropriate manner, and user authorization will be obtained.
[0123] For example, upon receiving a user's active request, a prompt message is sent to the user to explicitly inform them that the requested operation will require the acquisition and use of the user's personal information. This allows the user to independently choose, based on the prompt message, whether to provide personal information to the software or hardware such as electronic devices, applications, servers, or storage media performing the operations of this disclosed technical solution.
[0124] As an optional but not limited implementation, in response to a user's active request, sending a prompt message to the user can be done via a pop-up window, where the prompt message can be presented in text format. Furthermore, the pop-up window can also include a selection control allowing the user to choose "agree" or "disagree" to provide personal information to the electronic device.
[0125] It is understood that the above notification and user authorization process are merely illustrative and do not constitute a limitation on the implementation of this disclosure. Other methods that comply with relevant laws and regulations may also be applied to the implementation of this disclosure.
[0126] Those skilled in the art should understand that the discussion of any of the above embodiments is merely exemplary and is not intended to imply that the scope of this disclosure is limited to these examples; within the framework of this disclosure, the technical features of the above embodiments or different embodiments can also be combined, the steps can be implemented in any order, and there are many other variations of different aspects of the embodiments of this disclosure as described above, which are not provided in detail for the sake of brevity.
[0127] Additionally, to simplify the description and discussion, and to avoid obscuring the embodiments of this disclosure, the provided drawings may or may not show well-known power / ground connections to integrated circuit (IC) chips and other components. Furthermore, the apparatus may be shown in block diagram form to avoid obscuring the embodiments of this disclosure, and this also takes into account the fact that the details of implementation of these block diagram apparatuses are highly dependent on the platform on which the embodiments of this disclosure will be implemented (i.e., these details should be fully understood by those skilled in the art). While specific details (e.g., circuits) have been set forth to describe exemplary embodiments of this disclosure, it will be apparent to those skilled in the art that the embodiments of this disclosure can be implemented without these specific details or with variations thereof. Therefore, these descriptions should be considered illustrative rather than restrictive.
[0128] Although this disclosure has been described in conjunction with specific embodiments thereof, many substitutions, modifications, and variations of these embodiments will be apparent to those skilled in the art from the foregoing description. For example, other memory architectures (e.g., dynamic RAM (DRAM)) may be used with the embodiments discussed.
[0129] This disclosure is intended to cover all such substitutions, modifications, and variations that fall within the broad scope of this disclosure. Therefore, any omissions, modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this disclosure should be included within the protection scope of this disclosure.
Claims
1. A method for detecting insulator defects based on optimized YOLO attention interaction, characterized in that, The method includes: Acquire images of insulators of the transmission line and input the insulator images into a pre-trained defect detection model; The defect detection model is used to perform target detection processing on the insulator image to obtain an insulator feature map; The insulator feature map is processed by feature extraction to obtain the first mode defect level feature and the second mode defect level feature; Channel sharing features are determined based on the first modal defect hierarchy features and the second modal defect hierarchy features, and attention interaction features are determined based on the channel sharing features; Using the aforementioned defect detection model, the insulator defect detection results are determined based on the attention interaction features.
2. The method according to claim 1, characterized in that, The step of using the defect detection model to perform target detection processing on the insulator image to obtain the insulator feature map includes: The insulator image is upsampled using the bidirectional feature pyramid network in the defect detection model to obtain an upsampled feature map; Using the bidirectional feature pyramid network in the defect detection model, the upsampled feature map is downsampled to obtain a downsampled feature map, which is then used as the insulator feature map.
3. The method according to claim 1, characterized in that, The insulator feature map includes: a first-mode insulator feature map and a second-mode insulator feature map; The step of performing feature extraction processing on the insulator feature map to obtain first-mode defect level features and second-mode defect level features includes: Using the sliding window feature extractor in the defect detection model, the channels and resolution of the first mode insulator feature map are adjusted to obtain the first mode multi-scale feature, and the first mode multi-scale feature is compressed to obtain the first mode defect hierarchical feature; Using the sliding window feature extractor in the defect detection model, the channels and resolution of the second-mode insulator feature map are adjusted to obtain the second-mode multi-scale features. The second-mode multi-scale features are then compressed to obtain the second-mode defect hierarchical features.
4. The method according to claim 1, characterized in that, The step of determining channel-sharing features based on the first modal defect hierarchy features and the second modal defect hierarchy features includes: The first modal defect hierarchical features are convolved to obtain the first modal convolutional features, and the second modal defect hierarchical features are convolved to obtain the second modal convolutional features. The target convolutional feature is obtained by performing pixel multiplication on the first modality convolutional feature and the second modality convolutional feature; The target convolutional feature, the first modality convolutional feature, and the second modality convolutional feature are concatenated to obtain the channel-shared feature.
5. The method according to claim 1, characterized in that, The step of determining attention interaction features based on the channel-sharing features includes: Determine the channel attention parameters of the channel-shared features, and determine the spatial attention parameters of the first modal defect hierarchical features and the second modal defect hierarchical features; Interactive attention is determined based on the channel attention parameters and the spatial attention parameters, and interactive features are determined based on the interactive attention.
6. The method according to claim 5, characterized in that, The process of determining the channel attention parameters of the channel-shared features and the spatial attention parameters of the first modal defect hierarchical features and the second modal defect hierarchical features includes: The channel attention module in the defect detection model is used to determine the channel attention parameters based on the channel shared features; Using the spatial cross-guidance module in the defect detection model, the first spatial attention parameter is determined based on the first modal defect hierarchy features; Using the spatial cross-guidance module in the defect detection model, the second spatial attention parameter is determined based on the second modality defect hierarchy features.
7. The method according to claim 5, characterized in that, The spatial attention parameters include: first spatial attention parameters of the first modal defect hierarchical features and second spatial attention parameters of the second modal defect hierarchical features; The step of determining interaction attention based on the channel attention parameters and the spatial attention parameters, and determining interaction features based on the interaction attention, includes: The first modal interaction attention is determined based on the second spatial attention parameter and the channel attention parameter, and the first modal interaction attention is fused with the first modal defect hierarchical feature to obtain the first modal interaction feature; The second modal interaction attention is determined based on the first spatial attention parameter and the channel attention parameter. The second modal interaction attention and the second modal defect hierarchical features are then fused to obtain the second modal interaction features.
8. An insulator defect detection device based on optimized YOLO attention interaction, characterized in that, include: An insulator image acquisition module is configured to acquire insulator images of transmission lines and input the insulator images into a pre-trained defect detection model; The target detection processing module is configured to use the defect detection model to perform target detection processing on the insulator image to obtain an insulator feature map; The feature extraction processing module is configured to perform feature extraction processing on the insulator feature map to obtain first mode defect level features and second mode defect level features; The fusion feature determination module is configured to determine channel-sharing features based on the first modal defect hierarchy features and the second modal defect hierarchy features, and to determine attention interaction features based on the channel-sharing features; The defect detection result determination module is configured to use the defect detection model to determine the insulator defect detection result based on the attention interaction features.
9. An electronic device, characterized in that, It includes a memory, a processor, and a computer program stored in the memory and running on the processor, wherein the processor, when executing the program, implements the method as claimed in any one of claims 1 to 7.
10. A non-transitory computer-readable storage medium, characterized in that, The non-transitory computer-readable storage medium stores computer instructions for causing a computer to perform the method according to any one of claims 1 to 7.