Fusion progressive enhancement visual large model network matching defect identification method and electronic equipment
Patent Information
- Application Number
- CN202610910453.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-06-23
- Publication Date
- 2026-10-09
AI Technical Summary
[0005]本发明实施例提供了一种融合渐进增强的视觉大模型配网缺陷识别方法及电子设备,以解决现有视觉基础模型用于配网缺陷识别时,识别精度不高,泛化能力差的问题
[0008]本发明实施例提供了一种融合渐进增强的视觉大模型配网缺陷识别方法及电子设备。上述融合渐进增强的视觉大模型配网缺陷识别方法包括:构建基础配网识别模型;其中,基础配网识别模型包括:第一特征提取器、集成双向条带增强注意力模块的第二特征提取器、特征融合器及解码器;第一特征提取器用于提取输入图像的基础视觉特征,且网络参数设置为冻结状态;第二特征提取器用于提取输入图像的增强深度特征,且网络参数设置为可训练更新;特征融合器用于对基础视觉特征及增强深度特征进行融合,输出增强特征集;解码器用于根据增强特征集实现缺陷解码与识别;对基础配网识别模型进行训练,得到训练完成的配网识别模型;采用训练完成的配网识别模型对配网图像进行识别,得到识别结果。本发明实施例中设置并行的第一特征提取器和第二特征提取器两个特征提取通道,冻结参数的第一特征提取器复用成熟预训练视觉表征能力,稳定提取图像通用基础视觉特征;嵌入双向条带增强注意力模块的第二特征提取器以可训练方式自主学习,深度挖掘配网图像专属细节与双向空间上下文关联特征,精准聚焦配网细小缺陷、边缘缺陷,强化缺陷有效特征表达,弱化背景无用干扰信息;一冻一训的参数配置模式,锁定成熟骨干权重,仅优化增强分支与下游解码结构,降低模型过拟合风险,加快模型训练收敛效率,且有效提高了缺陷识别的精度。
Smart Images

Figure CN122887780A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of distribution network detection technology, and in particular to a method and electronic device for identifying distribution network defects using a large visual model with progressive enhancement. Background Technology
[0002] Distribution network equipment operates in complex outdoor environments for extended periods, and is susceptible to various defects such as insulator cracks, surface damage, broken conductor strands, hardware corrosion, and equipment surface peeling due to factors like weather corrosion, external disturbances, electrical aging, and dust accumulation. These defects directly impact the reliability of the distribution network's power supply, and in severe cases, can lead to safety accidents such as line tripping, equipment breakdown, and even power outages. Therefore, it is necessary to conduct on-site inspections of the distribution network to promptly identify defects and prevent accidents.
[0003] With the continuous advancement of the construction of new power systems, the digital and intelligent transformation of power grid infrastructure is accelerating. Intelligent manufacturing technology and visual perception algorithms are deeply integrated into the field of power operation and maintenance. Defect recognition technology based on machine vision is gradually becoming a core technical means for distribution network equipment status inspection, line health monitoring, and power grid quality and safety management. It is widely used in various distribution network facility operation and maintenance testing scenarios such as overhead transmission lines, distribution insulators, cable accessories, ring main units, and tower hardware, providing important technical support for automated distribution network inspection, early warning of hidden dangers, and accurate fault diagnosis.
[0004] In existing technologies, traditional visual models (e.g., SAM2) are typically used for power distribution network defect identification. However, the available labeled datasets for power distribution network identification are often very limited, and training with small samples can easily lead to catastrophic overfitting, causing the model to lose the ability to express general visual features acquired during pre-training. Furthermore, when faced with complex outdoor power distribution network scenarios, the model is highly susceptible to background interference, leading to misjudgments and poor overall identification accuracy and generalization performance. Summary of the Invention
[0005] This invention provides a method and electronic device for identifying distribution network defects using a visual large model that incorporates progressive enhancement, in order to solve the problems of low identification accuracy and poor generalization ability when existing visual basic models are used for distribution network defect identification.
[0006] In a first aspect, embodiments of the present invention provide a method for identifying distribution network defects using a fusion progressively enhanced visual large model, comprising: A basic power distribution network identification model is constructed, comprising: a first feature extractor, a second feature extractor integrating a bidirectional stripe enhanced attention module, a feature fusion unit, and a decoder. The first feature extractor extracts basic visual features from the input image, and the network parameters are set to a frozen state. The second feature extractor extracts enhanced depth features from the input image, and the network parameters are set to be trainable and updatable. The feature fusion unit fuses the basic visual features and enhanced depth features to output an enhanced feature set. The decoder is used to perform defect decoding and identification based on the enhanced feature set. The basic distribution network identification model is trained to obtain the trained distribution network identification model; The trained distribution network identification model is used to identify the distribution network image, and the identification results are obtained.
[0007] In a second aspect, embodiments of the present invention provide an electronic device, including a memory and a processor. The memory stores a computer program, and the processor executes the computer program to implement the method for identifying defects in a large visual model of a distribution network by fusion progressive enhancement as described in the first aspect or any possible implementation of the first aspect.
[0008] This invention provides a method and electronic device for identifying distribution network defects using a fusion-based progressively enhanced visual large-scale model. The method includes: constructing a basic distribution network identification model; wherein the basic distribution network identification model includes: a first feature extractor, a second feature extractor integrating a bidirectional striped enhanced attention module, a feature fusion unit, and a decoder; the first feature extractor is used to extract basic visual features of the input image, and the network parameters are set to a frozen state; the second feature extractor is used to extract enhanced depth features of the input image, and the network parameters are set to be trainable and updatable; the feature fusion unit is used to fuse the basic visual features and enhanced depth features to output an enhanced feature set; the decoder is used to perform defect decoding and identification based on the enhanced feature set; the basic distribution network identification model is trained to obtain a trained distribution network identification model; and the trained distribution network identification model is used to identify the distribution network image to obtain the identification result. In this embodiment of the invention, two feature extraction channels are set up in parallel: a first feature extractor and a second feature extractor. The first feature extractor with frozen parameters reuses mature pre-trained visual representation capabilities to stably extract general basic visual features of the image. The second feature extractor, which embeds a bidirectional strip enhanced attention module, learns autonomously in a trainable manner, deeply mining the unique details and bidirectional spatial context features of the power distribution network image, accurately focusing on minor defects and edge defects in the power distribution network, strengthening the effective feature expression of defects, and weakening useless background interference information. The parameter configuration mode of one-freeze and one-train locks the mature backbone weights and only optimizes the enhanced branches and downstream decoding structure, reducing the risk of model overfitting, accelerating the model training convergence efficiency, and effectively improving the accuracy of defect recognition. Attached Figure Description
[0009] Figure 1 This is a flowchart illustrating the implementation of a method for identifying distribution network defects using a fusion progressively enhanced visual large model, as provided in an embodiment of the present invention. Figure 2 This is a network architecture diagram of a basic distribution network identification model provided in an embodiment of the present invention; Figure 3 This is a network architecture diagram of a bidirectional stripe enhanced attention module provided in an embodiment of the present invention; Figure 4 This is a schematic diagram of the structure of the fusion progressive enhancement visual large model distribution network defect identification device provided in the embodiment of the present invention; Figure 5 This is a schematic diagram of an electronic device provided in an embodiment of the present invention. Detailed Implementation
[0010] The embodiments of the present invention will now be described in detail with reference to the accompanying drawings.
[0011] See Figure 1 and Figure 2 The document illustrates a flowchart of the implementation of a method for identifying distribution network defects using a fusion-enhanced visual large model, as provided in an embodiment of the present invention. Details are as follows: The aforementioned method for identifying distribution network defects using a progressively enhanced visual large model includes: S101: Construct a basic power distribution network identification model; wherein, the basic power distribution network identification model includes: a first feature extractor, a second feature extractor integrating a bidirectional strip enhanced attention module, a feature fusion unit, and a decoder; the first feature extractor is used to extract basic visual features of the input image, and the network parameters are set to a frozen state; the second feature extractor is used to extract enhanced depth features of the input image, and the network parameters are set to be trainable and updatable; the feature fusion unit is used to fuse the basic visual features and enhanced depth features to output an enhanced feature set; the decoder is used to perform defect decoding and identification based on the enhanced feature set.
[0012] refer to Figure 2The first and second feature extractors extract features in parallel. The first feature extractor, with its parameters frozen, retains its powerful and generalized visual cognitive prior knowledge obtained through massive data pre-training, reusing mature pre-trained visual representation capabilities to stably extract general basic visual features of the image. The second feature extractor, embedded with a bidirectional strip enhanced attention module, learns autonomously in a trainable manner, deeply mining the specific details and bidirectional spatial context features of the distribution network image, accurately focusing on minor and edge defects in the distribution network, strengthening the effective feature expression of defects, and weakening useless background interference information. The parameter configuration mode of "freezing and training" locks mature backbone weights, optimizing only the enhanced branches and downstream decoding structures, reducing the risk of model overfitting, and accelerating the model training convergence efficiency. The basic distribution network recognition model provided in this application can effectively alleviate the instability and overfitting risk of fine-tuning under limited data conditions, successfully achieving an efficient balance between large model capacity and small sample domain adaptation; and can effectively filter and suppress high-frequency noise interference generated by complex backgrounds, improving recognition accuracy.
[0013] In one possible implementation, refer to Figure 2 The second feature extractor uses a ResNet18 backbone network and may include: a basic convolutional pooling layer, a first set of residual blocks, a second set of residual blocks, a third set of residual blocks, a bidirectional strip-enhanced attention module, a fourth set of residual blocks, and a dimension reduction convolutional layer connected in sequence. The bidirectional striped attention module is used for bidirectional global contextual information enhancement; The dimensionality reduction convolutional layer is used to reduce the channel dimensionality of the features output by the fourth set of residual blocks, so that the number of channels of the enhanced depth features is aligned with the number of channels of the basic visual features.
[0014] ResNet18 is a lightweight network with only 15.71M parameters. It can accurately learn the domain mapping relationship of specific defects, has low training cost, high convergence efficiency, is not prone to overfitting, and has better generalization. At the same time, the lightweight backbone has low computational pressure. When running in parallel with the frozen first feature extractor, the overall model has a balanced computational load. The two branches of feature extraction do not drag each other down, and the whole machine runs smoothly and stably.
[0015] This application embeds a bidirectional strip enhanced attention module into the ResNet18 backbone network, which bidirectionally models global context dependencies, strengthens the expression of defect target features, suppresses interference from complex background noise, and significantly improves the identification of small and hidden distribution network defects.
[0016] For example, basic visual features , Enhanced deep features ;in, For the current stage, For batch size, and For spatial dimensions, For channel dimensions. To achieve channel alignment, the dimensionality-reducing convolutional layer can be... Convolution is used for channel reduction transformation.
[0017] In one possible implementation, refer to Figure 3 A bidirectional strip enhanced attention module may include: a first branch, a second branch, and a fusion layer; The first branch is used to rotate the input features counterclockwise by 90° along the W axis to obtain the first transposed features, and to perform strip pooling and channel similarity modeling on the first transposed features to extract and enhance the contextual features in the vertical direction. The second branch is used to rotate the input features counterclockwise by 90° along the H-axis to obtain the second transposed features, and to perform strip pooling and channel similarity modeling on the second transposed features to extract and enhance the contextual features in the horizontal direction; The fusion layer is used to fuse the context features in the vertical direction and the context features in the horizontal direction to output interactive features.
[0018] refer to Figure 3 The bidirectional strip-enhanced attention module has two branches. The first branch rotates the features counterclockwise along the width axis to transform the dimension, compresses the spatial dimension using strip pooling, and then mines the dependencies between channels through channel similarity modeling to complete the extraction and enhancement of global contextual features in the vertical direction. The second branch rotates the features counterclockwise along the height axis and uses the same processing method to achieve horizontal contextual information modeling and feature enhancement. The two branches achieve independent modeling in the horizontal and vertical orthogonal directions through feature rotation transformation, while capturing the interaction information of spatial and channel dimensions, flexibly capturing anisotropic context, and exploring the intrinsic dependencies between any two channels. The strip pooling method simplifies redundant spatial information, which can greatly enhance the network's sensitivity to multi-directional small defects, balancing feature extraction efficiency and lightweight requirements. Channel similarity modeling accurately determines the importance of each channel feature, automatically highlights effective defect features, suppresses useless background noise, and significantly improves the feature representation ability of small and narrow defects. Finally, the fusion layer integrates and merges the enhanced feature information from both directions, opening up the interaction channels between feature information from different directions. This results in richer semantic features, stronger spatial correlation, and can effectively filter and suppress high-frequency noise interference from complex backgrounds. It is suitable for identifying long strip-shaped targets such as power distribution lines and components, thus improving the accuracy of defect identification.
[0019] For example, input features The first transpose feature is obtained after rotation. and the second transpose feature , , .
[0020] In one possible implementation, refer to Figure 3 The first transposed feature is subjected to strip pooling and channel similarity modeling to extract and enhance the contextual features in the vertical direction, which may include: 1. For the first transposed feature, perform strip pooling operation in conjunction with the first formula to obtain the first global feature; 2. Calculate the similarity between channels in the first global feature using the second formula; 3. Based on similarity and the first transpose feature, the vertical context features are obtained by combining the third formula to reshape the features. The first formula may include: in, As the first global feature, ; This is the first transpose feature. .
[0021] The second formula may include: in, for The first in Characteristics of the channel for The first in Characteristics of the channel for The Middle Channel and the Similarity between channels Total number of channels; The third formula may include: in, For vertical context features, ; and They are respectively The first in Channel characteristics and the first Characteristics of the channel To learn scaling parameters.
[0022] Similarly, refer to Figure 3 The horizontal context features can be calculated using the formulas described above. The fusion layer will and Corresponding addition and fusion to obtain .
[0023] This application first uses strip pooling to compress spatial dimensions, aggregating local effective information to obtain the first global feature with simplified dimensions; then, it quantifies the correlation between channels through a similarity calculation formula, accurately distinguishing effective feature channels from useless background channels, and achieving autonomous judgment of feature importance; finally, it weights and aggregates the original transposed features with channel similarity weights to strengthen the vertical contextual dependency, fully capture the defect texture and structural correlation of vertical arrangement, and introduces residual connections to retain the basic information of the original features, avoiding information loss during deep feature enhancement, alleviating gradient decay, and improving the stability of feature representation.
[0024] Meanwhile, the computational complexity of the bidirectional strip enhanced attention module provided in the above embodiments is only [missing information]. It can efficiently process high-resolution feature maps without significantly increasing the computational burden and directly insert them into existing networks.
[0025] In one possible implementation, refer to Figure 2 The first feature extractor can be a SAM 2 backbone image encoder, and the network parameters of the SAM 2 backbone image encoder are fixed.
[0026] This application leverages the superior image perception and multi-scale feature extraction capabilities of SAM2, achieving high feature extraction accuracy and strong generalization. Furthermore, the parameters are frozen throughout the process, eliminating the need for backpropagation to update weights, thus reducing the number of training parameters and computational load, shortening model training time, and saving hardware computing resources. It also balances recognition accuracy and operational efficiency, meeting the needs of rapid inspection in automated distribution networks.
[0027] In one possible implementation, refer to Figure 3 The decoder can use a SAM 2 mask decoder, and the network parameters of the SAM 2 mask decoder can be trained and updated.
[0028] The decoder directly extracts task-related segmentation representations to obtain defect identification results. It forms a differentiated configuration from the frozen SAM 2 image encoder, with a fixed backbone retaining general features. This allows the decoder to be trained to specialize in specific scene tasks, effectively improving defect detection and identification accuracy.
[0029] In one possible implementation, the basic distribution network identification model may further include: a SAM 2 prompt encoder, and network parameters set to a frozen state; The SAM 2 cue encoder does not accept external human interaction cue input and is used to provide preset constant cue markers for the SAM 2 mask decoder.
[0030] Traditional SAM 2 mask decoders rely on external manual input (such as manual clicks or drawing frames) to segment targets, which cannot meet the needs of automated and high-speed inspection.
[0031] In this application, the SAM 2 mask decoder inputs constant cue markers and directly extracts task-related segmentation representations from enhanced multi-scale features. This eliminates the need for manual operation, adapts to batch, automated, and high-speed inspection scenarios, quickly focuses on defect targets, and improves defect localization and segmentation efficiency.
[0032] This application directly freezes the SAM 2 cue encoder, providing a pre-set constant cue marker for the SAM 2 mask decoder. It retains the original cue encoder architecture without modifying the original model structure, thus satisfying the format requirement of the SAM 2 mask decoder to have cue input while completely eliminating the reliance on manual interaction.
[0033] In one possible implementation, the feature fusion unit may include a first-layer multilayer perceptron and a second-layer multilayer perceptron connected in sequence. The first layer of the multilayer perceptron is used to generate prompt information based on basic visual features and enhanced depth features, combined with the fourth formula. The second layer of the multilayer perceptron is used to generate an enhanced feature set based on the prompt information and basic visual features, combined with the fifth formula; The fourth formula may include: in, For the purpose of displaying information, To enhance the third deep feature Characteristics of the channel The first of the basic visual features Characteristics of the channel; The fifth formula may include: in, To enhance the feature set, Based on visual features.
[0034] This application employs a lightweight MLP layer with a prompt mechanism to achieve feature fusion and modulation, making full use of the pre-trained prior knowledge of the SAM2 encoder to improve recognition accuracy.
[0035] In one possible implementation, the loss function of the basic distribution network identification model can be: in, This represents the total number of pixels in the image. , , and Pixels The predicted value and the actual value at that location, It is a local minimum.
[0036] The loss function balances the IoU of the foreground and background regions, ensuring effective optimization of both the target and background regions. A minimum value is also introduced. Avoid dividing by zero.
[0037] S102: Train the basic distribution network identification model to obtain the trained distribution network identification model; S103: The trained distribution network identification model is used to identify the distribution network image and obtain the identification result.
[0038] The basic distribution network identification model described above requires few training parameters and computational resources, has a short training time, and exhibits strong generalization ability. The trained distribution network identification model can accurately identify distribution network defects. Experiments show that the distribution network defect identification method provided in this application demonstrates excellent robustness and practical value in handling extremely low-contrast backgrounds and small target segmentation tasks.
[0039] It should be understood that the sequence number of each step in the above embodiments does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present invention.
[0040] The following are device embodiments of the present invention. For details not described in detail, please refer to the corresponding method embodiments described above.
[0041] Figure 4 The diagram shows a schematic of the structure of the fusion progressive enhancement visual large model distribution network defect identification device provided in an embodiment of the present invention. For ease of explanation, only the parts related to the embodiment of the present invention are shown, and are described in detail below: like Figure 4 As shown, the device for identifying distribution network defects using a progressively enhanced visual large model includes: The model building module 21 is used to build a basic power distribution network identification model. The basic power distribution network identification model includes: a first feature extractor, a second feature extractor integrating a bidirectional strip enhanced attention module, a feature fusion unit, and a decoder. The first feature extractor is used to extract basic visual features of the input image, and the network parameters are set to a frozen state. The second feature extractor is used to extract enhanced depth features of the input image, and the network parameters are set to be trainable and updatable. The feature fusion unit is used to fuse the basic visual features and enhanced depth features to output an enhanced feature set. The decoder is used to perform defect decoding and identification based on the enhanced feature set.
[0042] Model training module 22 is used to train the basic distribution network identification model to obtain the trained distribution network identification model; The defect identification module 23 is used to identify the distribution network image using the trained distribution network identification model and obtain the identification result.
[0043] In one possible implementation, the second feature extractor may employ a ResNet18 backbone network, comprising: a base convolutional pooling layer, a first set of residual blocks, a second set of residual blocks, a third set of residual blocks, a bidirectional striped attention module, a fourth set of residual blocks, and a dimension reduction convolutional layer connected in sequence. The bidirectional striped attention module is used for bidirectional global contextual information enhancement; The dimensionality reduction convolutional layer is used to reduce the channel dimensionality of the features output by the fourth set of residual blocks, so that the number of channels of the enhanced depth features is aligned with the number of channels of the basic visual features.
[0044] In one possible implementation, the bidirectional strip enhanced attention module may include: a first branch, a second branch, and a fusion layer; The first branch is used to rotate the input features counterclockwise by 90° along the W axis to obtain the first transposed features, and to perform strip pooling and channel similarity modeling on the first transposed features to extract and enhance the contextual features in the vertical direction. The second branch is used to rotate the input features counterclockwise by 90° along the H-axis to obtain the second transposed features, and to perform strip pooling and channel similarity modeling on the second transposed features to extract and enhance the contextual features in the horizontal direction; The fusion layer is used to fuse the context features in the vertical direction and the context features in the horizontal direction to output interactive features.
[0045] In one possible implementation, the first transposed feature is subjected to strip pooling and channel similarity modeling to extract and enhance the contextual features in the vertical direction, including: 1. For the first transposed feature, perform strip pooling operation in conjunction with the first formula to obtain the first global feature; 2. Calculate the similarity between channels in the first global feature using the second formula; 3. Based on similarity and the first transpose feature, the vertical context features are obtained by combining the third formula to reshape the features. The first formula may include: in, As the first global feature, This is the first transpose feature; The second formula may include: in, for The first in Characteristics of the channel for The first in Characteristics of the channel for The Middle Channel and the Similarity between channels Total number of channels; The third formula may include: in, For vertical context features, and They are respectively The first in Channel characteristics and the first Characteristics of the channel To learn scaling parameters.
[0046] In one possible implementation, the first feature extractor may employ a SAM 2 backbone image encoder, and the network parameters of the SAM 2 backbone image encoder are fixed.
[0047] In one possible implementation, the decoder may employ a SAM 2 mask decoder, and the network parameters of the SAM 2 mask decoder can be trained and updated.
[0048] In one possible implementation, the basic distribution network identification model may further include: a SAM 2 prompt encoder, and network parameters set to a frozen state; The SAM 2 cue encoder does not accept external human interaction cue input and is used to provide preset constant cue markers for the SAM 2 mask decoder.
[0049] In one possible implementation, the feature fusion unit may include a first-layer multilayer perceptron and a second-layer multilayer perceptron connected in sequence. The first layer of the multilayer perceptron is used to generate prompt information based on basic visual features and enhanced depth features, combined with the fourth formula. The second layer of the multilayer perceptron is used to generate an enhanced feature set based on the prompt information and basic visual features, combined with the fifth formula; The fourth formula may include: in, For the purpose of displaying information, To enhance the third deep feature Characteristics of the channel The first of the basic visual features Characteristics of the channel; The fifth formula may include: in, To enhance the feature set, Based on visual features.
[0050] In one possible implementation, the loss function of the basic distribution network identification model can be: in, This represents the total number of pixels in the image. , , and Pixels The predicted value and the actual value at that location, It is a local minimum.
[0051] Figure 5 This is a schematic diagram of an electronic device provided in an embodiment of the present invention. For example... Figure 5 As shown, the electronic device 3 of this embodiment includes a processor 30 and a memory 31. The memory 31 stores a computer program 32. When the processor 30 executes the computer program 32, it implements the steps in the various method embodiments described above. Alternatively, when the processor 30 executes the computer program 32, it implements the functions of each module / unit in the various device embodiments described above.
[0052] For example, computer program 32 may be divided into one or more modules / units, which are stored in memory 31 and executed by processor 30 to complete the present invention. The one or more modules / units may be a series of computer program instruction segments capable of performing a specific function, which describe the execution process of computer program 32 in electronic device 3.
[0053] Electronic device 3 may include, but is not limited to, processor 30 and memory 31. Those skilled in the art will understand that... Figure 5 This is merely an example of electronic device 3 and does not constitute a limitation on electronic device 3. It may include more or fewer components than shown, or combine certain components, or different components. For example, electronic device 3 may also include input / output devices, network access devices, buses, etc.
[0054] For the sake of simplicity and clarity, only the above-described functional modules / units are used as examples. In practical applications, the functions described above can be assigned to different functional modules / units as needed. These modules / units can be implemented in hardware, software, or a combination of both.
[0055] In the above embodiments, the descriptions of each embodiment have their own emphasis. Parts not detailed or described in a particular embodiment can be referred to in the relevant descriptions of other embodiments. Unless otherwise specified or in conflict with logic, the terminology and / or descriptions between different embodiments are consistent and can be referenced interchangeably. Technical features in different embodiments can be combined to form new embodiments based on their inherent logical relationships.
[0056] The above embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit it. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should all be included within the protection scope of the present invention.
Claims
1. A method for identifying defects in power distribution networks using a large visual model with progressive enhancement, characterized in that, include: A basic power distribution network identification model is constructed, comprising: a first feature extractor, a second feature extractor integrating a bidirectional stripe enhanced attention module, a feature fusion unit, and a decoder; the first feature extractor is used to extract basic visual features of the input image, and the network parameters are set to a frozen state; the second feature extractor is used to extract enhanced depth features of the input image, and the network parameters are set to be trainable and updatable; the feature fusion unit is used to fuse the basic visual features and the enhanced depth features to output an enhanced feature set; the decoder is used to perform defect decoding and identification based on the enhanced feature set. The basic distribution network identification model is trained to obtain the trained distribution network identification model; The trained distribution network identification model is used to identify the distribution network image to obtain the identification result.
2. The method for identifying distribution network defects using a fusion-progressive-enhanced visual large model as described in claim 1, characterized in that, The second feature extractor uses a ResNet18 backbone network, which includes: a basic convolutional pooling layer, a first set of residual blocks, a second set of residual blocks, a third set of residual blocks, the bidirectional strip enhanced attention module, a fourth set of residual blocks, and a dimension reduction convolutional layer connected in sequence. The bidirectional strip enhanced attention module is used for bidirectional global contextual information enhancement; The dimensionality reduction convolutional layer is used to perform channel dimensionality reduction on the features output by the fourth set of residual blocks, so that the number of channels of the enhanced depth features is aligned with the number of channels of the basic visual features.
3. The method for identifying distribution network defects using a fusion-progressive-enhanced visual large model according to claim 2, characterized in that, The bidirectional strip enhanced attention module includes: a first branch, a second branch, and a fusion layer; The first branch is used to rotate the input features counterclockwise by 90° along the W axis to obtain the first transposed features, and to perform strip pooling and channel similarity modeling on the first transposed features to extract and enhance the context features in the vertical direction. The second branch is used to rotate the input feature counterclockwise by 90° along the H-axis to obtain the second transposed feature, and to perform strip pooling and channel similarity modeling on the second transposed feature to extract and enhance the contextual features in the horizontal direction; The fusion layer is used to fuse the context features in the vertical direction and the context features in the horizontal direction to output interactive features.
4. The method for identifying distribution network defects using a fusion-progressive-enhanced visual large model according to claim 3, characterized in that, The step of performing strip pooling and channel similarity modeling on the first transposed feature to extract and enhance the contextual features in the vertical direction includes: The first transposed feature is combined with the first formula to perform strip pooling to obtain the first global feature; The similarity between channels in the first global feature is calculated using the second formula; Based on the similarity and the first transpose feature, the vertical context features are obtained by combining the third formula to reshape the features. The first formula includes: in, This is the first global feature. This is the first transpose feature; The second formula includes: in, for The first in Characteristics of the channel for The first in Characteristics of the channel for Middle Channel and the Similarity between channels Total number of channels; The third formula includes: in, For the contextual features in the vertical direction, and They are respectively The first in Channel characteristics and the first Characteristics of the channel To learn scaling parameters.
5. The method for identifying distribution network defects using a fusion-progressive-enhanced visual large model according to any one of claims 1 to 4, characterized in that, The first feature extractor uses a SAM 2 backbone image encoder, and the network parameters of the SAM 2 backbone image encoder are fixed.
6. The method for identifying distribution network defects using a fusion-progressive-enhanced visual large model according to claim 5, characterized in that, The decoder uses a SAM 2 mask decoder, and the network parameters of the SAM 2 mask decoder can be trained and updated.
7. The method for identifying distribution network defects using a fusion-progressive-enhanced visual large model according to claim 6, characterized in that, The basic distribution network identification model also includes: a SAM 2 prompt encoder, and the network parameters are set to a frozen state; The SAM 2 prompt encoder does not receive external human interaction prompts and is used to provide preset constant prompt markers for the SAM 2 mask decoder.
8. The method for identifying distribution network defects using a fusion-progressive-enhanced visual large model according to any one of claims 1 to 4, characterized in that, The feature fusion unit includes a first-layer multilayer perceptron and a second-layer multilayer perceptron connected in sequence. The first layer of the multilayer perceptron is used to generate prompt information based on the basic visual features and the enhanced depth features, combined with the fourth formula; The second layer multilayer perceptron is used to generate the enhanced feature set based on the prompt information and the basic visual features, combined with the fifth formula; The fourth formula includes: in, The aforementioned prompt message, For the enhanced depth features, the first Characteristics of the channel The first of the basic visual features Characteristics of the channel; The fifth formula includes: in, For the enhanced feature set, These are the basic visual features.
9. The method for identifying distribution network defects using a fusion progressively enhanced visual large model according to any one of claims 1 to 4, characterized in that, The loss function of the basic distribution network identification model is: in, This represents the total number of pixels in the image. , , and Pixels The predicted value and the actual value at that location, It is a local minimum.
10. An electronic device, characterized in that, The method includes a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the method for identifying defects in a large visual model of a distribution network as described in any one of claims 1 to 9.