Enhanced recognition method of power equipment defect images using generative adversarial networks
By constructing an integrated adversarial generation and recognition framework guided by structure perception, the problems of scarce and uneven quality of defect image samples of power equipment are solved, defect images that conform to the physical structure of the equipment are generated, and the recognition accuracy and generalization ability are improved, which is suitable for power equipment inspection and status assessment.
Patent Information
- Application Number
- CN202511083612.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-04
- Publication Date
- 2025-09-30
- Estimated Expiration
- 2045-08-04
AI Technical Summary
In the existing technology, the number of power equipment defect image samples is scarce and the quality is uneven, resulting in poor model training results, low recognition accuracy, and insufficient generalization ability. Directly applying the adversarial generative network has problems such as large differences between the generated images and the real defect features and unstable training.
A structure-aware guided integrated adversarial generation and recognition framework is constructed. The device features are extracted through the structure parsing network, a feature embedding space is constructed, and enhanced defect images are generated. Through collaborative optimization of the dual discriminator and generator, the generator generates defect images that conform to the physical structure of the device through the structure-preserving module and the association discriminator, and is trained in combination with the attention mechanism and recognition network.
Under the conditions of insufficient defect samples and complex structures, the diversity and availability of the generated defect image samples are improved, and the recognition accuracy and generalization ability are significantly improved, making it suitable for power inspection and status assessment.
Smart Images

Figure CN120580445B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of power equipment image recognition, and in particular to a generative adversarial network enhanced recognition method for power equipment defect images. Background Art
[0002] With the continuous improvement of the intelligent level of power systems, power equipment defect detection based on image recognition technology has been widely used in practical projects. Traditional image recognition methods mainly rely on large amounts of manually annotated data and convolutional neural network models to determine whether power equipment images contain defects by performing operations such as classification and segmentation. However, in practical applications, due to various factors such as on-site collection conditions, equipment aging, and defect manifestations, the number of power equipment defect image samples is scarce and the quality is uneven. In particular, defect image samples are difficult to obtain, resulting in poor model training results, low recognition accuracy, and insufficient generalization ability.
[0003] In recent years, generative adversarial networks (GANs) have made significant progress in image generation and enhancement, providing new approaches for tasks such as small-sample learning and image enhancement. However, directly applying GAN technology to image recognition of power equipment defects still faces challenges such as significant discrepancies between generated images and actual defect features, as well as unstable training. Therefore, developing a GAN recognition method that can incorporate power equipment image features, effectively enhance defect image samples, and improve recognition accuracy has become a pressing technical challenge. Summary of the Invention
[0004] The purpose of the present invention is to provide a generative adversarial network enhanced recognition method for power equipment defect images to address the shortcomings of the background technology.
[0005] To achieve the above objectives, the present invention provides the following technical solution: a method for enhancing recognition of power equipment defect images using a generative adversarial network, comprising:
[0006] Obtain the original power equipment image dataset and extract the structural feature map of the equipment body through the structure parsing network;
[0007] Construct a feature embedding space containing defect location labels and structural feature constraints, and embed the original defect image into the space to form a structural feature driving vector;
[0008] Based on the structural feature driving vector, the vector is input into a generative adversarial network having an associated discriminator and a structure-preserving module to generate an enhanced defect image, wherein the generative adversarial network includes a generator G and dual discriminators D1 and D2;
[0009] Perform structural consistency check on the generated enhanced defect image. If the set threshold is not met, perform parameter backpropagation optimization until convergence.
[0010] The original defect image and the enhanced defect image are combined to construct a high-confidence defect sample set, which is then input into the recognition network with the attention mechanism for training.
[0011] Based on the trained recognition network, unknown power equipment images are recognized and the defect category, location and confidence score are output.
[0012] Preferably, constructing the feature embedding space includes:
[0013] Perform weakly supervised object detection on the original defect image, extract the initial positioning label of the defect area, and generate the confidence-weighted defect bounding box through the position offset fitting method;
[0014] A structural semantic segmentation network is used to identify structural components in equipment images, outputting component type maps and boundary constraint maps, which are then mapped to defect location labels to form a joint structure-defect annotation map.
[0015] The joint annotation graph is embedded in the node level through the graph neural embedding network, and the spatial context and component relevance are integrated to finally generate the structural feature driving vector as the conditional input of the generative network.
[0016] Preferably, the generator G includes a structure-aware encoding module, a defect feature enhancement module and a conditional fusion decoding module, wherein the structure-aware encoding module performs multi-scale convolution extraction on the structure feature driving vector to retain the topological relationship between the device edge and the components; the defect feature enhancement module introduces local abnormal features of the original defect image through cross-layer residual connection; the conditional fusion decoding module spatially aligns the structure feature map with the defect representation and then decodes it to generate an enhanced defect image.
[0017] Preferably, the discriminator D2 adopts dual input channels in the discrimination process, respectively receiving the generated image and the structural feature map, and performing symmetry matching of the position information in the shared convolution kernel path; further, the structural consistency score output by D2 is fed back to the generator G and used as input for adaptive adjustment of the conditional discrimination weight.
[0018] Preferably, in the process of generating an image, the structural feature driving vector is first subjected to graph and vector synchronous modeling by a feature alignment encoder, and is fused with the high-dimensional semantic features of the defect image through a channel attention fusion unit; the fusion process adopts a channel-level attention gating mechanism to dynamically suppress low-correlation areas.
[0019] Preferably, the generated enhanced defect image is subjected to a structural consistency check. If the set threshold is not met, parameter backpropagation optimization is performed until convergence, specifically:
[0020] The component topology residual index is generated after analyzing whether the spatial connection relationship between the power components in the enhanced image maintains the topological distribution in the original image;
[0021] Based on the original structural feature graph and the generated graph, component center point graph matching is performed to extract the spatial center of each component and its adjacency matrix;
[0022] Calculate the node and edge consistency of the component connection graph of the generated graph and the original graph;
[0023] The component topology residual index is defined as: ;in and is the adjacency matrix, N is the number of components, and CTRI is the component topology residual index.
[0024] Preferably, whether the defect area in the enhanced defect image is reasonably located in the high-risk area of the original device structure and whether the spatial semantic consistency is maintained is analyzed to generate a consistent perception entropy of the defect structure;
[0025] Define a high-risk area mask in the structural feature map;
[0026] Analyze the spatial overlap between defect areas and high-risk areas in the generated graph;
[0027] Calculate the defect structure consistent perception entropy of the defect area , the expression is: ;in is the normalized overlap probability that the defect area falls within the structural risk area, is a defect area set, which represents a set of all pixel coordinate points of the defect area identified or generated in the enhanced defect image.
[0028] Preferably, the component topology residual index and the defect structure consistency perception entropy are converted into a comprehensive feature vector, and the comprehensive feature vector is used as the input of the machine learning model. The machine learning model uses the structural consistency score value label predicted by each group of comprehensive feature vectors as the prediction target, and minimizes the sum of the prediction errors of all structural consistency score value labels as the training target. The machine learning model is trained until the sum of the prediction errors reaches convergence, and the model training is stopped. The structural consistency score value is determined according to the model output results, wherein the machine learning model is a polynomial regression model.
[0029] Preferably, if the structural consistency score is greater than or equal to a preset threshold, the structural consistency is considered to be up to standard and the image is used for training or inference; otherwise, the optimized generator parameters need to be fed back.
[0030] In the above technical solution, the technical effects and advantages provided by the present invention are:
[0031] 1. This paper constructs an integrated adversarial generation and recognition framework guided by structure perception, achieving efficient image enhancement and recognition under challenging conditions such as insufficient defect samples, complex structures, and diverse defect morphologies in power equipment. The proposed feature embedding mechanism integrates the device structural topology with the semantics of the defect space. The generator, through the collaborative optimization of a structure-preserving module and a dual discriminator, generates defect images that are not only realistic but also strictly adhere to the physical structure of the equipment, effectively improving sample diversity and usability.
[0032] 2. During the recognition phase, this invention incorporates a structural attention mechanism and a defect saliency fusion strategy, enabling the model to perceive key components of power equipment and focus on fine-grained defects. Furthermore, a confidence control mechanism and a structural consistency feedback path enhance the system's discrimination stability and reliability in complex environments. This overall solution significantly improves recognition accuracy and generalization capabilities even when defect image samples are limited, making it suitable for industrial scenarios such as power inspection and condition assessment. BRIEF DESCRIPTION OF THE DRAWINGS
[0033] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments. Obviously, the drawings described below are only some embodiments described in the present invention. For ordinary technicians in this field, other drawings can also be obtained based on these drawings.
[0034] Figure 1 It is a structural diagram of the method of the present invention. DETAILED DESCRIPTION
[0035] To make the objectives, technical solutions, and advantages of the embodiments of the present invention more clear, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments of the present invention without making any creative efforts shall fall within the scope of protection of the present invention.
[0036] Example 1, please refer to Figure 1 As shown, the adversarial generative network enhanced recognition method for power equipment defect images described in this embodiment includes:
[0037] Obtain the original power equipment image dataset and extract the structural feature map of the equipment body through the structure parsing network;
[0038] Construct a feature embedding space containing defect location labels and structural feature constraints, and embed the original defect image into the space to form a structural feature driving vector;
[0039] Based on the structural feature driving vector, the vector is input into a generative adversarial network having an associated discriminator and a structure-preserving module to generate an enhanced defect image, wherein the generative adversarial network includes a generator G and dual discriminators D1 and D2;
[0040] Perform structural consistency check on the generated enhanced defect image. If the set threshold is not met, perform parameter backpropagation optimization until convergence.
[0041] The original defect image and the enhanced defect image are combined to construct a high-confidence defect sample set, which is then input into the recognition network with the attention mechanism for training.
[0042] Based on the trained recognition network, unknown power equipment images are recognized and the defect category, location and confidence score are output.
[0043] The original power equipment image dataset obtained comes from a variety of actual operation scenarios, including but not limited to drone inspections, ground camera monitoring, fixed-point acquisition, etc. The image resolution is not less than 1024×768 pixels, covering typical equipment types such as transformers, circuit breakers, insulators, and wire connectors.
[0044] The collected images are uniformly preprocessed, including color space normalization, image distortion correction, background noise removal and brightness histogram equalization, to reduce the interference of image noise on structure recognition results.
[0045] A multi-channel structure parsing network is used to parse the device structure of the pre-processed image. MSNet consists of the following three key modules:
[0046] Edge-aware path: used to capture the contour information of equipment components and extract fine-grained edge structures through multi-scale differential convolution;
[0047] Semantic component path: Based on a deep semantic network with dilated convolution, it models typical power components in the image by region and outputs a component category map.
[0048] Spatial context fusion module: The feature maps of the edge path and the semantic path are fused through the spatial attention mechanism to preserve the key structural position relationship and connection logic.
[0049] After the above three information are fused, a high-resolution structural feature map is generated. The structural feature map is presented in the form of a pixel-level label map, in which different colors or channel codes represent the type, spatial outline and interconnection relationship of the equipment components.
[0050] The output structural feature map not only has semantic distinguishability but also geometric topological consistency. It can be used as the structure-preserving condition input of the adversarial generative network to guide the structural compliance modeling in the defect image generation process.
[0051] Weakly supervised object detection is performed on the original defect image to extract the initial positioning label of the defect area, and a confidence-weighted defect bounding box is generated through the position offset fitting method. Specifically:
[0052] Use a weakly supervised object detection network based on image-level labels (such as WSDDN, OICR, or a customized lightweight version of the Two-Branch CAM Network) to analyze the input defect image without pixel-by-pixel or box-level annotation. It only relies on image-level defect category labels to achieve coarse positioning of the defect area.
[0053] The network outputs confidence heat maps of multiple candidate regions, obtains key region responses through global average pooling, and selects the region with the maximum response as the initial defect region. It combines saliency map guidance with IoU restriction to filter out redundant regions.
[0054] Based on the initial defect hotspot center, a Gaussian smoothing offset fitting algorithm is used to calculate the centroid migration of the hotspot outline, dynamically generating the bounding box position. A confidence scoring function (such as a Sigmoid–Softmax hybrid function) is then used to assign a weight to each bounding box to form a confidence-weighted bounding box.
[0055] A structural semantic segmentation network is used to identify the structural component level of the equipment image, outputting a component type map and a boundary constraint map, which are then mapped with the defect location labels to form a structure-defect joint annotation map. Specifically:
[0056] A multi-label component semantic segmentation network is designed. Its main body is based on the DeepLabv3+ structure, integrating the Atrous Spatial Pyramid Pooling (ASPP) module and the category-aware attention module to improve the recognition ability of fine-grained device components (such as casings, brackets, leads, etc.).
[0057] Component type diagram: The segmentation network classifies the power equipment image in pixels and outputs an image with C channels, where each channel corresponds to a component category.
[0058] Boundary constraint graph: Bypass the edge detection branch (such as Sobel-CNN Hybrid) in the backbone network to strengthen the connection boundary identification between device components and output a binary boundary map.
[0059] The defect bounding box is aligned with the component type map, and the bounding box coordinates are converted into a region of interest (ROI) in the component label space using a projection mapping algorithm. The component label region within the ROI is assigned a "defect status" label. The boundary map and defect region are further fused to generate a spatially constrained joint structure-defect annotation map, which guides subsequent embedding calculations.
[0060] The graph neural embedding network is used to perform node-level embedding calculations on the joint annotation graph, integrating spatial context and component relevance, and ultimately generating a structural feature driving vector. Specifically:
[0061] The structure-defect joint annotation graph is converted into graph-structured data. Each component region is abstracted as a graph node, each carrying features such as category, spatial location, and defect status. Edges are established based on the topological connections or adjacency relationships between components, forming a graph structure G = (V, E).
[0062] Using a modified graph attention network (MGAT), the following embedding calculation is performed for each node:
[0063] Introducing position encoding: adding absolute and relative position information to node features;
[0064] Attention mechanism: Weighted attention coefficient based on defect state guides information to spread more concentratedly from abnormal areas;
[0065] Multi-order aggregation: Adopt K-order neighbor feature aggregation strategy to enhance the ability of long-range structural information dissemination.
[0066] The final embedded node representation vector is convolved and aggregated according to its spatial position in the device image to form a low-dimensional structural feature map. This is then concatenated with the defect feature map and flattened to form the structural feature driving vector. This vector serves as the conditional input to the generative network, effectively constraining the structural compliance and defect generation direction during the image enhancement process.
[0067] Based on the structural feature driving vector, it is input into a generative adversarial network with an associated discriminator and a structure-preserving module to generate an enhanced defect image. The generative adversarial network includes a generator G and dual discriminators D1 and D2, specifically:
[0068] The structure-aware encoding module takes as input the structural feature driving vector. The module adopts a multi-scale convolution path with the convolution kernel sizes set to 3×3, 5×5, and 7×7 and runs in parallel.
[0069] A structural edge preservation factor is introduced to apply feature gain to the boundary area through a gradient control term to preserve the spatial topological relationship and connection edges between device components;
[0070] The output encoding feature map E1 has rich structural layout information.
[0071] The defect feature enhancement module extracts the mid- and high-level semantic features Fd of the local abnormal area from the original defect image through the precoding network;
[0072] Fd is injected into the feature space where E1 is located through the cross-layer residual connection channel, and weighted superposition is performed using the fusion factor α;
[0073] This structure not only preserves the salient features of the original defect image, but also improves the responsiveness of the generated image to defect-sensitive areas.
[0074] The output fused feature map E2 contains the dual expression of structure + defect.
[0075] The conditional fusion decoding module receives the fusion feature map E2 and the structural feature map, the former is the local defect expression, and the latter is the global component layout;
[0076] First, the semantic positions of the two are aligned through the spatial remapping network;
[0077] The fused features are then decoded into enhanced defect images through an attention-guided decoder;
[0078] The decoder adopts a decoding path + upsampling structure and dynamically adjusts the number of decoding channels to prevent structural distortion.
[0079] Discriminator D1 focuses on authenticity judgment between generated images and real images. Its training goal is to maximize the ability to distinguish the difference between real images and generated images.
[0080] Network structure: Using PatchGAN or WGAN discriminant framework, the local authenticity of the image is judged simultaneously at multiple receptive field scales;
[0081] Technical path: Introduce spectral normalization and contrast loss function to improve convergence stability and reduce the risk of mode collapse.
[0082] Discriminator D2 receives both the generated image (G_img) and the structural feature map (S_map);
[0083] The two extract local position encoding features through primary shared convolution channels respectively;
[0084] The extracted features are subjected to symmetry matching calculation to measure whether the generated graph retains key structural connection points.
[0085] The matching result generates a consistency score S_consistency, which ranges from [0,1];
[0086] This score is used as a conditional discriminant weight adjustment factor and fed back to the fusion path of the generator G;
[0087] Adaptively adjust the structure-aware weights in the generation process and perform discriminant-driven optimization on the “shape” of the generated graph.
[0088] The feature alignment encoder synchronizes the structural feature map (spatial image form) with the driving vector (embedded form) through position index hashing;
[0089] Establish a unified graph-vector expression space and generate the encoding feature block Z.
[0090] The channel attention fusion unit fuses Z with the high-order semantic features Y of the original defect image, using a channel-level attention gating mechanism;
[0091] During the fusion process, the importance score βi of each channel is calculated, and regions that are irrelevant to the defect or have structural conflicts are dynamically suppressed.
[0092] The generated enhanced defect image is tested for structural consistency. If the set threshold is not met, the parameters are optimized back until convergence. Specifically:
[0093] The spatial connection relationship between each power component in the enhanced image is analyzed to see whether it maintains the topological distribution in the original image, and then the component topology residual index is generated to evaluate the structural topological stability.
[0094] Calculation method:
[0095] Based on the original structural feature graph and the generated graph, component center point graph matching is performed to extract the spatial center of each component and its adjacency matrix;
[0096] Calculate the node and edge consistency of the component connection graph of the generated graph and the original graph;
[0097] The component topology residual index is defined as: ;in and is the adjacency matrix, N is the number of components, and CTRI is the component topology residual index;
[0098] CTRI not only considers pixel-level matching, but also introduces a structural graph model for high-level semantic comparison, which is different from traditional IoU or Dice indicators.
[0099] The defect area in the enhanced defect image is analyzed to determine whether it is reasonably located in the high-risk area of the original device structure and whether it maintains spatial semantic consistency. This is used to generate the defect structure consistent perception entropy for semantic perception direction consistency evaluation.
[0100] Calculation method:
[0101] Define high-risk area masks in the structural feature map (such as connectors, insulation interfaces, etc.);
[0102] Analyze the spatial overlap between defect areas and high-risk areas in the generated graph;
[0103] Calculate the defect structure consistent perception entropy of the defect area , the expression is: ;in is the normalized overlap probability that the defect area falls within the structural risk area, is a defect area set, which represents a set of all pixel coordinate points of the defect area identified or generated in the enhanced defect image.
[0104] DSAE is a cross-modal regional attention coupling indicator that not only evaluates the existence of defects but also emphasizes their "structural rationality". It is often used in advanced industrial image semantic detection and is rarely used in traditional GAN fields.
[0105] The component topology residual index and defect structure consistency perception entropy are converted into comprehensive feature vectors, which are used as inputs of the machine learning model. The machine learning model uses the structural consistency score value label predicted by each group of comprehensive feature vectors as the prediction target, and minimizes the sum of prediction errors of all structural consistency score value labels as the training target. The machine learning model is trained until the sum of prediction errors reaches convergence, and the model training is stopped. The structural consistency score value is determined according to the model output results. The machine learning model is a polynomial regression model.
[0106] If the structural consistency score is greater than or equal to the preset threshold, the structural consistency is considered to be met and the image can be used for training or inference; otherwise, the generator parameters need to be returned for optimization.
[0107] Jointly construct a high-confidence defect sample set, specifically:
[0108] The goal of this stage is to screen and fuse the original defect images and generated images according to consistency and reliability standards to form a high-confidence defect sample set for training.
[0109] Use an evaluation model based on image clarity and regional focus (such as BRISQUE or Laplacian Variance) to score the quality of the original defect image;
[0110] Set the quality threshold Qth to remove low-quality images with blur or severe occlusion.
[0111] Verify the generated images using the aforementioned structural consistency scoring metrics (such as CTRI and DSAE);
[0112] Only enhanced graphs with structural consistency scores greater than or equal to a preset threshold are retained.
[0113] Align the defect areas of the original image and the enhanced image;
[0114] If the defective area in the enhancement map does not deviate from the high-risk area of the structure (such as high-voltage connection points), the enhancement is considered effective.
[0115] Perform semantic consistency check on the labels of the original image and the enhanced image to ensure uniform category labeling;
[0116] If the enhanced image contains new defect types that are not covered by the original image, the labels are supplemented through manual or semi-automatic correction tools.
[0117] Perform image enhancement operations on both original and enhanced samples: including rotation, shearing, illumination perturbation, blurring, etc.
[0118] All samples have the same size (e.g. 512×512) and label format (e.g. COCO or Pascal VOC format).
[0119] The training sample pool is composed of the original image + the highly consistent enhanced image;
[0120] The sample set is balanced and resampled according to defect categories to avoid bias in model training.
[0121] The goal of this stage is to build a recognition network with structural perception and defect area focusing capabilities, and to efficiently train the joint sample set.
[0122] Model structure: Structure-guided Attention Recognition Network (SAGNet);
[0123] Backbone network: Use lightweight networks such as ResNet-50 and MobileNetV3 to extract the main features of the image;
[0124] The feature map is output as Fbase.
[0125] Structure-aware attention module:
[0126] The structural feature map Smap is used as auxiliary input to calculate the spatial attention map Astruct between it and the backbone features; Astruct(x,y)=Sigmoid(fs(Fbase(x,y),Smap(x,y))); Astruct is used to weight the backbone features so that the recognition network pays more attention to the key component areas.
[0127] Defect Saliency Attention Module:
[0128] Use a lightweight branch network to predict the defect saliency map Dsal of the image and introduce a channel attention gating mechanism;
[0129] Highly activated areas enhance the response of defect channels, while low-response channels are dynamically suppressed to avoid misidentification of background or pseudo-defects.
[0130] The weighted feature maps are fused and fed into the classification / segmentation head;
[0131] The output can be defect categories (classification tasks) or defect area masks (segmentation tasks).
[0132] The network training mechanism specifically includes:
[0133] Classification task: cross entropy loss + label balance loss (to prevent sample skew);
[0134] Segmentation task: Dice Loss + edge preservation loss (enhanced defect boundary recognition ability);
[0135] The structural consistency guided loss term Lstructure is introduced to force the network to maintain consistency between the prediction and the structure graph.
[0136] Use batch training (batch size is generally 8-16) and AdamW optimizer;
[0137] The initial learning rate is set to 1e-4, and cosine annealing or warmup strategy is used for optimization;
[0138] In each round of training, original samples and enhanced samples are alternately mixed to enhance generalization ability.
[0139] Unknown image recognition is performed based on the trained recognition network, specifically:
[0140] The input unknown power equipment image Itest is normalized (for example, RGB standardization, contrast stretching, and rescaling to 512×512); this ensures that the input distribution is consistent with the training sample distribution and enhances the model's transfer and generalization capabilities.
[0141] Itest is synchronously input into the structure parsing network to extract the structural feature graph Stest; the semantic information such as the position, boundary, component category, etc. of the equipment components are marked in the graph as the structure guidance input.
[0142] The image is passed through the recognition network backbone to extract the multi-layer semantic feature map Ftest;
[0143] At the same time, the structure graph Stest is input into the structure-aware attention module to generate the structure attention graph Astructtest;
[0144] The attention weighted formula is as follows: Where, Represents the original feature response of the cth channel at pixel position (x, y) in the feature map Ftest; Source: The semantic feature map obtained by convolutionally encoding the input power equipment image by the backbone network (such as ResNet or MobileNet); Represents the attention weight of the structure-aware attention map at pixel position (x, y); Source: The structural feature map Stest is generated by the structural attention module (such as spatial attention or conditional guided attention); It represents the weighted eigenvalue of the pixel position (x, y) and channel c after structural perception guidance. The weighted feature map strengthens the response to possible defect areas (such as wiring points, casing, etc.).
[0145] Introducing the defect saliency module to predict the potential defect area heat map Dsaltest in the image;
[0146] It is fused with the structure-guided feature map to form a comprehensive defect feature expression Fdefecttest.
[0147] The fused features are fed into the recognition head to perform the following tasks:
[0148] Classification head: Outputs the defect category probability vector Pcls={p1,p2,…,pk}, where k is the total number of defects; the category with the maximum value is taken as the recognition result;
[0149] Positioning head: regresses the defect bounding box coordinates (xmin, ymin, xmax, ymax) for defect area positioning;
[0150] Confidence score: The structural matching degree and classification probability are combined to generate a defect confidence score Sconf∈[0,1].
[0151] Each recognition result contains the following fields:
[0152] Defect type (such as insulation damage, rust, loose connection, etc.);
[0153] Position bounding box (in image coordinates);
[0154] confidence score (weighted by structural consistency);
[0155] Structure matching label (optional, used for engineering diagnosis and auxiliary interpretation).
[0156] If the recognition confidence Sconf < τ (e.g. 0.5), it will be automatically marked as "low confidence risk" and prompted for manual review;
[0157] If the confidence level ≧τ, the result is automatically stored and added to the defect dataset for incremental learning.
[0158] The above is only a specific implementation method of the present application, but the scope of protection of the present application is not limited thereto. Any technician familiar with this technical field can easily think of changes or replacements within the technical scope disclosed in this application, which should be covered by the scope of protection of the present application.
Claims
1. A generative adversarial network enhanced recognition method for power equipment defect images, characterized by: include: Obtain the original power equipment image dataset and extract the structural feature map of the equipment body through the structure parsing network; Construct a feature embedding space containing defect location labels and structural feature constraints, and embed the original defect image into the space to form a structural feature driving vector; Wherein, constructing the feature embedding space includes: Perform weakly supervised object detection on the original defect image, extract the initial positioning label of the defect area, and generate the confidence-weighted defect bounding box through the position offset fitting method; A structural semantic segmentation network is used to identify structural components in equipment images, outputting component type maps and boundary constraint maps, which are then mapped to defect location labels to form a joint structure-defect annotation map. A graph neural embedding network is used to perform node-level embedding calculations on the joint annotation graph, integrating spatial context and component relevance to ultimately generate a structural feature driving vector as the conditional input of the generative network. Based on the structural feature driving vector, the vector is input into a generative adversarial network having an associated discriminator and a structure-preserving module to generate an enhanced defect image, wherein the generative adversarial network includes a generator G and dual discriminators D1 and D2; Perform structural consistency check on the generated enhanced defect image. If the set threshold is not met, perform parameter backpropagation optimization until convergence. The original defect image and the enhanced defect image are combined to construct a high-confidence defect sample set, which is then input into the recognition network with the attention mechanism for training. Based on the trained recognition network, unknown power equipment images are recognized and the defect category, location and confidence score are output.
2. The method for enhancing recognition of power equipment defect images using a generative adversarial network according to claim 1 is characterized by: The generator G includes a structure-aware encoding module, a defect feature enhancement module, and a conditional fusion decoding module. The structure-aware encoding module performs multi-scale convolution extraction on the structural feature driving vector to preserve the topological relationship between the device edge and the components. The defect feature enhancement module introduces local abnormal features of the original defect image through cross-layer residual connections; the conditional fusion decoding module spatially aligns the structural feature map with the defect representation and then decodes it to generate an enhanced defect image.
3. The method for enhancing recognition of power equipment defect images using a generative adversarial network according to claim 2 is characterized by: The discriminator D2 adopts dual input channels in the discrimination process, receiving the generated image and the structural feature map respectively, and performing symmetry matching of the position information in the shared convolution kernel path; further, the structural consistency score output by D2 is fed back to the generator G and used as input for adaptive adjustment of the conditional discrimination weight.
4. The method for enhancing recognition of power equipment defect images using a generative adversarial network according to claim 3 is characterized by: During the image generation process, the structural feature driving vector is first modeled as a graph and vector simultaneously by a feature alignment encoder, and then fused with the high-dimensional semantic features of the defect image through a channel attention fusion unit; The fusion process adopts a channel-level attention gating mechanism to dynamically suppress low-correlation regions.
5. The method for enhancing recognition of power equipment defect images using a generative adversarial network according to claim 1 is characterized by: The generated enhanced defect image is tested for structural consistency. If the set threshold is not met, the parameters are optimized back until convergence. Specifically: The component topology residual index is generated after analyzing whether the spatial connection relationship between the power components in the enhanced image maintains the topological distribution in the original image; Based on the original structural feature graph and the generated graph, component center point graph matching is performed to extract the spatial center of each component and its adjacency matrix; Calculate the node and edge consistency of the component connection graph of the generated graph and the original graph; The component topology residual index is defined as: ;in and is the adjacency matrix, N is the number of components, and CTRI is the component topology residual index.
6. The method for enhanced recognition of power equipment defect images using a generative adversarial network according to claim 5, characterized in that: The defect area in the enhanced defect image is analyzed to determine whether it is reasonably located in the high-risk area of the original device structure and whether the spatial semantic consistency is maintained, and then the defect structure consistent perception entropy is generated; Define a high-risk area mask in the structural feature map; Analyze the spatial overlap between defect areas and high-risk areas in the generated graph; Calculate the defect structure consistent perception entropy of the defect area , the expression is: ;in, is the normalized overlap probability that the defect area falls within the structural risk area, is a defect area set, which represents a set of all pixel coordinate points of the defect area identified or generated in the enhanced defect image.
7. The method for enhancing recognition of power equipment defect images using a generative adversarial network according to claim 6, characterized in that: The component topology residual index and defect structure consistency perception entropy are converted into comprehensive feature vectors, which are used as inputs of the machine learning model. The machine learning model uses the structural consistency score value label predicted by each group of comprehensive feature vectors as the prediction target, and minimizes the sum of prediction errors of all structural consistency score value labels as the training target. The machine learning model is trained until the sum of prediction errors reaches convergence, and the model training is stopped. The structural consistency score value is determined according to the model output results. The machine learning model is a polynomial regression model.
8. The method for enhancing recognition of power equipment defect images using a generative adversarial network according to claim 7 is characterized by: If the structural consistency score is greater than or equal to the preset threshold, the structural consistency is considered to be qualified and the image can be used for training or inference; otherwise, the generator parameters need to be returned for optimization.