A method and system for robustness improvement of target detection in complex power scenarios

By generating enhanced samples through boundary attacks and probability diffusion, and combining them with a purification model and a pre-trained target detection model for training, the problem of insufficient robustness of target detection in complex power scenarios is solved, and accurate identification and reliable judgment of smoke and flames in complex environments are achieved.

CN121033401BActive Publication Date: 2026-05-08STATE GRID ZHEJIANG ELECTRIC POWER CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
STATE GRID ZHEJIANG ELECTRIC POWER CO LTD
Filing Date
2025-10-30
Publication Date
2026-05-08

AI Technical Summary

Technical Problem

Existing artificial intelligence models lack robustness in target detection under complex power scenarios, making it difficult to effectively cope with complex and variable conditions and specific interferences in the natural environment, thus affecting the high reliability and real-time performance of the power system.

Method used

By acquiring images and image annotations under a preset power scenario, boundary attacks and probability diffusion are performed to generate enhanced samples, a training sample set is constructed, and adversarial loss is used to train the model in combination with a cleanup model and a pre-trained target detection model to improve the robustness of the model.

Benefits of technology

By making judgments and decisions about smoke and flames based on cleaner and more reliable data, the robustness of the model in the face of complex interference is significantly improved, ensuring the accuracy and reliability of smoke detection and flame recognition.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121033401B_ABST
    Figure CN121033401B_ABST
Patent Text Reader

Abstract

The application discloses a method and system for improving robustness of target detection in a complex power scene, and relates to the technical field of smart grids.The power target detection model is formed by a purification model and a pre-training typical target detection model, and the power target detection model is trained by combining with enhanced data with specific interference.In the model training process, the pre-training typical target detection model is pre-trained first, then the parameters of the pre-training typical target detection model are fixed, and the adversarial loss output by the pre-training typical target detection model is used as the training guide of the purification model to adjust the parameters of the purification model.The purification model and the enhanced data expand the anti-interference boundary of the power target detection model, so that key tasks such as smoke detection and flame identification can be judged and decided on the basis of cleaner and more reliable data, and the model can accurately focus on the target of smoke or flame, and the robustness of the model when facing complex interference is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of smart grid technology, and in particular to a method and system for improving the robustness of target detection in complex power scenarios. Background Technology

[0002] With the development of smart grids and digital transformation, large-scale power business systems are gradually integrating artificial intelligence model services to improve operation and maintenance efficiency and safety.

[0003] In key application scenarios such as smoke hazard identification of power transmission lines and fire hazard detection of substation equipment, most existing artificial intelligence models in the target detection model branch use general image enhancement techniques to improve image quality. However, natural environmental conditions are complex and changeable, and image enhancement alone is insufficient to deal with the specific interference in actual operation.

[0004] Currently, target detection models in power grids lack robustness in complex power scenarios, which restricts the achievement of high reliability and real-time requirements of power systems. Summary of the Invention

[0005] The present invention aims to provide a method and system for improving the robustness of target detection in complex power scenarios, enabling key tasks such as smoke detection and flame recognition to make judgments and decisions based on cleaner and more reliable data, accurately focusing on targets of smoke or flame, and improving the robustness of the model in the face of complex interference.

[0006] In a first aspect, embodiments of the present invention provide a method for improving the robustness of target detection in complex power scenarios, including:

[0007] Acquire images and image annotations under a preset power scenario to form an original scene sample; the image annotations include smoke target annotations and flame target annotations.

[0008] The original scene sample is subjected to boundary attack and probability diffusion to obtain an enhanced sample;

[0009] A training sample set is constructed based on the original scene samples and the enhanced samples;

[0010] A power target detection model is constructed, comprising a purification model and a pre-trained typical target detection model. The purification model is used to purify the perturbation and noise data of the power target detection model to generate purified data. The pre-trained typical target detection model is used to generate target detection results and adversarial loss based on the purified data.

[0011] The purification model is trained using the training sample set. During the training process, the parameters of the pre-trained typical target detection model are fixed, and the adversarial loss is used as the loss function of the purification model.

[0012] The data from the area to be tested is input into the trained power target detection model to obtain smoke targets and flame targets in the area to be tested.

[0013] As an improvement to the above scheme, the step of performing boundary attacks and probability diffusion on the original scene samples to obtain enhanced samples includes:

[0014] Based on a preset intersection-union ratio (IU / U) metric, the original scene samples are subjected to boundary attacks to generate boundary adversarial samples.

[0015] Extract the edge visual features and semantic features of the original scene sample, and perform probability diffusion on the original scene sample based on the edge visual features and the semantic features to generate a hybrid sample;

[0016] An enhanced sample is obtained based on the edge adversarial sample and the hybrid sample.

[0017] As an improvement to the above scheme, the step of performing boundary attacks on the original scene samples based on a preset intersection-union ratio (IU) index to generate boundary adversarial samples includes:

[0018] Perform boundary attacks on the original scene samples to generate initial boundary adversarial samples with blurred or occluded target boundaries;

[0019] The classification loss, IOU loss, and perturbation loss of the initial boundary adversarial sample are calculated as the boundary attack loss;

[0020] Based on the preset intersection-union ratio (IU) and the boundary attack loss, the initial boundary adversarial samples are screened to obtain boundary adversarial samples.

[0021] As an improvement to the above scheme, the step of extracting the edge visual features and semantic features of the original scene sample, and performing probability diffusion on the original scene sample based on the edge visual features and the semantic features to generate a mixed sample, includes:

[0022] An edge detection algorithm is used to extract the edge visual features of the original scene sample and generate a visual prior edge map;

[0023] Extract the semantic features of the original scene sample, and construct text prompt words based on the semantic features;

[0024] The visual prior edge map and the text prompt are input into a pre-trained probability diffusion model, and the output of the diffusion model is mixed with the original scene sample to obtain an initial mixed sample.

[0025] The semantic similarity between the initial mixed sample and the text prompt word is calculated using the CLIP model. Based on the semantic similarity, a mixed sample is obtained by filtering from the initial mixed sample.

[0026] As an improvement to the above scheme, both the purification model and the pre-trained typical target detection model are obtained by pre-training the original scene samples; the pre-trained typical target detection model includes an attention module, which is used to calculate spatial attention and channel attention.

[0027] As an improvement to the above scheme, the pre-trained typical target detection model is a multi-scale bidirectional feature fusion convolutional neural network model. During the feature fusion process, a dynamic weight mechanism is used to perform convolutional weighted fusion of features at different scales.

[0028] As an improvement to the above scheme, the step of training the purification model using the training sample set, fixing the parameters of the pre-trained typical target detection model during training, and using the adversarial loss as the loss function of the purification model includes:

[0029] Random Gaussian noise is generated and added to the training sample set to generate noisy training samples.

[0030] Based on a predefined mask, the noise-enhanced training samples are randomly transformed to generate mask samples;

[0031] When the preset model training termination condition is met, the power target detection model is obtained based on the parameters of the purification model and the pre-trained typical target detection model.

[0032] Otherwise, the parameters of the pre-trained typical object detection model are fixed, and the loss of the pre-trained typical object detection model is used as the loss function of the purification model to iteratively train the parameters of the purification model.

[0033] As an improvement to the above scheme, the step of randomly transforming the noisy training samples based on a predefined mask to generate mask samples includes:

[0034] The first random transformation algorithm is obtained by multiplying the predefined mask element by element with the sample.

[0035] Gaussian noise is added to the samples, and a predefined mask is multiplied element-wise with the samples after adding Gaussian noise, which is the second random transformation algorithm;

[0036] By applying the first random transformation algorithm or the second random transformation algorithm to the same sample multiple times, a third random transformation algorithm is obtained;

[0037] The first random transformation algorithm, the second random transformation algorithm, or the third random transformation algorithm are used to randomly transform the noise-enhanced training samples to generate mask samples.

[0038] As an improvement to the above scheme, the step of fixing the parameters of the pre-trained typical object detection model, using the loss of the pre-trained typical object detection model as the loss function of the purification model, and iteratively training the parameters of the purification model includes:

[0039] Fix the parameters of the pre-trained typical target detection model;

[0040] The masked sample is input into the purification model, which uses the training sample set as the output target to purify the masked sample and obtain purified data.

[0041] The cleaned data is input into a pre-trained typical target detection model to obtain the target detection results, and adversarial loss is obtained based on the target detection results and the training sample set.

[0042] Based on the adversarial loss, the loss function of the purification model is obtained;

[0043] A gradient regularization term is introduced as a gradient penalty, and the parameters of the purification model are iteratively adjusted according to the loss function and the gradient penalty.

[0044] Secondly, embodiments of the present invention also provide a robustness improvement system for target detection in complex power scenarios, applicable to target detection in power scenarios, comprising:

[0045] The original scene sample acquisition module is used to acquire images and image annotations under a preset power scene to form an original scene sample; the image annotations include smoke target annotations and flame target annotations.

[0046] An enhanced sample generation module is used to perform boundary attacks and probability diffusion on the original scene sample to obtain an enhanced sample.

[0047] The training sample set construction module is used to construct a training sample set based on the original scene samples and the enhanced samples;

[0048] The model building module is used to construct a power target detection model, including a purification model and a pre-trained typical target detection model. The purification model is used to purify the perturbation and noise data of the power target detection model to generate purified data. The pre-trained typical target detection model is used to generate target detection results and adversarial loss based on the purified data.

[0049] The model training module is used to train the purification model using the training sample set. During the training process, the parameters of the pre-trained typical target detection model are fixed, and the adversarial loss is used as the loss function of the purification model.

[0050] The model application module is used to input the data of the area to be tested into the trained power target detection model to obtain the smoke target and flame target of the area to be tested.

[0051] Compared with existing technologies, this invention discloses a robustness improvement method and system for target detection in complex power scenarios. The method involves acquiring images and image annotations of a preset power scenario to form original scene samples; the image annotations include smoke target annotations and flame target annotations; performing boundary attacks and probability diffusion on the original scene samples to obtain enhanced samples; constructing a training sample set based on the original scene samples and the enhanced samples; constructing a power target detection model including a purification model and a pre-trained typical target detection model; the purification model is used to purify the perturbation and noise data of the power target detection model to generate purified data; the pre-trained typical target detection model is used to generate target detection results and adversarial loss based on the purified data; training the power target detection model using the training sample set, fixing the parameters of the pre-trained typical target detection model during training, and using the adversarial loss as the loss function of the purification model; and inputting the data of the target area into the trained power target detection model to obtain smoke and flame targets in the target area. By employing embodiments of the present invention, key tasks such as smoke detection and flame recognition can be judged and decided on the basis of cleaner and more reliable data, accurately focusing on the target of smoke or flame, and improving the robustness of the model in the face of complex interference. Attached Figure Description

[0052] Figure 1 This is a flowchart illustrating the steps of a method for improving the robustness of target detection in complex power scenarios, as provided in an embodiment of the present invention.

[0053] Figure 2 This is a schematic flowchart of a method for data augmentation of original scene samples provided in an embodiment of the present invention;

[0054] Figure 3 This is a model architecture diagram of a typical target detection model provided in an embodiment of the present invention;

[0055] Figure 4 This is a schematic flowchart of a method for training a purification model provided in an embodiment of the present invention;

[0056] Figure 5This is a schematic diagram of the structure of a robustness improvement system for target detection in complex power scenarios provided by an embodiment of the present invention. Detailed Implementation

[0057] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0058] In the description and claims, it should be understood that the terms "first," "second," etc., used in the description and claims are only for the purpose of distinguishing the description of the same technical features, and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated, nor necessarily the order of description or chronological order. The terms are interchangeable where appropriate. Therefore, a feature defined as "first" or "second" may explicitly or implicitly include at least one of that feature.

[0059] This invention provides a method for improving the robustness of target detection in complex power scenarios. Please refer to... Figure 1 In this embodiment, the robustness improvement method for target detection in complex power scenarios is specifically executed through steps S1 to S6:

[0060] S1. Obtain images and image annotations under a preset power scenario to form an original scene sample; the image annotations include smoke target annotations and flame target annotations.

[0061] It should be noted that the preset power scenarios are typical power scenarios such as transmission lines, substations, and converter stations. The image annotations focus on core power hazards such as smoke, fire, and flames, and provide a data foundation for subsequent model learning and training.

[0062] S2. Perform boundary attacks and probability diffusion on the original scene samples to obtain enhanced samples.

[0063] The existing image enhancement technology aims to improve image quality. However, in actual operating environments, power facilities are susceptible to adversarial attacks or unexpected interference caused by factors such as reflections from high-voltage equipment and cluttered backgrounds of transmission towers. Image enhancement technologies that aim to optimize the image itself are difficult to combat the specific interference of power scenarios.

[0064] This invention employs a systematic enhancement process across two dimensions to improve the robustness of artificial intelligence models in complex scenarios. Firstly, it enhances large-scale samples through boundary attack, generating over ten enhanced boundary samples from each original image, effectively improving the recognition and robustness against extreme boundary conditions that may occur in the real world. Secondly, it simulates specific interference through probability diffusion, addressing the problem of insufficient image samples for certain rare or complex scenarios in practical power system applications. Through this dual-path enhancement strategy, this invention significantly improves the diversity and representativeness of training data, providing solid data support for target detection tasks targeting key hazards such as smoke and flames in power systems.

[0065] S3. Construct a training sample set based on the original scene samples and the enhanced samples.

[0066] S4. Construct a power target detection model that includes a purification model and a pre-trained typical target detection model; the purification model is used to purify the disturbance and noise data of the power target detection model to generate purified data; the pre-trained typical target detection model is used to generate target detection results and adversarial loss based on the purified data.

[0067] This invention preprocesses perturbation and noise data during the training and inference phases by using a purification model, effectively removing potential noise disturbances or attack interference, enabling key tasks such as smoke detection and flame recognition to make judgments and decisions based on cleaner and more reliable data.

[0068] It should be noted that, in the embodiments of the present invention, the parameters of the typical target detection model are obtained through pre-training, and the pre-training process of the typical target detection model does not involve the purification model.

[0069] S5. The purification model is trained using the training sample set. During the training process, the parameters of the pre-trained typical target detection model are fixed, and the adversarial loss is used as the loss function of the purification model.

[0070] It should be noted that, unlike traditional methods that rely on the consistency loss of the purification model itself for optimization, this invention innovatively introduces the adversarial loss output by a pre-trained typical target detection model as the training guide for the purification model. This makes the purification process closely fit the needs of specific tasks such as smoke recognition and equipment fire detection in power systems, thereby significantly improving the robustness of the model in the face of complex natural interference and potential attacks.

[0071] S6. Input the data of the area to be tested into the trained power target detection model to obtain the smoke target and flame target of the area to be tested.

[0072] The power target detection model formed by coupling the trained purification model with the pre-trained typical target detection model can be deployed in the power grid system to detect smoke and flame hazards based on real-time image data.

[0073] In the above scheme, a power target detection model is formed by combining a purification model and a pre-trained typical target detection model. This purified model is then trained using augmented data with added specific interference. During training, the parameters of the pre-trained typical target detection model are kept constant, and the adversarial loss output by the pre-trained typical target detection model is used as training guidance for the purification model to adjust its parameters. By combining the purification model with augmented data, the anti-interference boundary of the power target detection model is expanded. This allows key tasks such as smoke detection and flame recognition to make judgments and decisions based on cleaner and more reliable data, accurately focusing on smoke or flame targets and improving the model's robustness against complex interference.

[0074] As a preferred implementation, step S2, performing boundary attack and probability diffusion on the original scene sample to obtain an enhanced sample, is executed through steps S21-S23:

[0075] S21. Based on a preset intersection-union ratio (IUU) index, perform boundary attacks on the original scene samples to generate boundary adversarial samples.

[0076] S22. Extract the edge visual features and semantic features of the original scene sample, and perform probability diffusion on the original scene sample based on the edge visual features and the semantic features to generate a mixed sample;

[0077] S23. Based on the edge adversarial sample and the hybrid sample, an enhanced sample is obtained.

[0078] Boundary attacks are a typical black-box adversarial attack method that can generate boundary samples that can mislead the power model's output category and detection object box by searching near the decision boundary of scene samples captured by drones or cameras without knowing the internal structure and parameters of the model.

[0079] By introducing the intersection-union ratio (IUGR) metric, we can measure the degree of overlap between the predicted bounding boxes of newly generated samples in critical power scenarios such as smoke and wildfires and the actual target bounding boxes during the boundary attack process. This can be used as a constraint condition for boundary attacks to ensure the generation of reliable boundary adversarial samples.

[0080] By extracting edge visual features and semantic features, robust hybrid samples with diverse and complex scene features and controllable semantics can be generated, thereby significantly improving the generalization ability and stability of the target detection model in tasks such as smoke recognition and flame hazard detection of power equipment such as power transmission lines.

[0081] The aforementioned boundary attack and probability diffusion are two significant and complementary data augmentation strategies. By augmenting data in two dimensions, the diversity and representativeness of training data can be significantly improved, providing solid data support for target detection tasks of key hazards such as smoke and flames in power systems.

[0082] Further, preferably, step S21, based on a preset intersection-union ratio (IU) metric, performs boundary attacks on the original scene samples to generate boundary adversarial samples, including:

[0083] Perform boundary attacks on the original scene samples to generate initial boundary adversarial samples with blurred or occluded target boundaries;

[0084] The classification loss, IOU loss, and perturbation loss of the initial boundary adversarial sample are calculated as the boundary attack loss;

[0085] Based on the preset intersection-union ratio (IU) and the boundary attack loss, the initial boundary adversarial samples are screened to obtain boundary adversarial samples.

[0086] The blurred or occluded target boundary simulates the image that power targets may exist due to attached equipment or complex environments. However, the original scene samples are generally difficult to cover images in these complex scenarios. The boundary adversarial samples generated by the embodiments of the present invention can be deeply matched with power business scenarios. Through boundary attacks, the model learning can not only rely on clear target boundaries for recognition, thus broadening the recognition range of the model.

[0087] For example, the boundary attack loss Represented as:

[0088] ;

[0089] in, For classifying losses, Loss due to IOU For disturbance loss, and This is the preset loss weight factor.

[0090] Preferably, step S22, extracting the edge visual features and semantic features of the original scene sample, and performing probability diffusion on the original scene sample based on the edge visual features and the semantic features to generate a mixed sample, includes:

[0091] An edge detection algorithm is used to extract the edge visual features of the original scene sample and generate a visual prior edge map;

[0092] Extract the semantic features of the original scene sample, and construct text prompt words based on the semantic features;

[0093] The visual prior edge map and the text prompt are input into a pre-trained probability diffusion model, and the output of the diffusion model is mixed with the original scene sample to obtain an initial mixed sample.

[0094] The semantic similarity between the initial mixed sample and the text prompt word is calculated using the CLIP model. Based on the semantic similarity, a mixed sample is obtained by filtering from the initial mixed sample.

[0095] In some preferred embodiments, please refer to Figure 2 The generation of mixed samples is carried out through four core steps: visual prior generation, cue word construction, conditional diffusion, and post-filtering.

[0096] The visual prior generation step includes randomly sampling M image-label pairs from the original scene samples, and performing basic transformation operations such as flipping and cropping on the image-label pairs to increase sample diversity. Subsequently, the HED edge detection algorithm is used to extract the edge visual features of the original scene samples to generate a visual prior edge map.

[0097] The prompt word construction step converts the semantic information of each image into a natural language description. For different areas to be detected, such as smoke or flame areas of power equipment, corresponding text prompt words are automatically generated, such as "This is an image containing smoke" or "This is an image of a power transmission line on fire," as semantic guidance for the subsequent diffusion model to generate images.

[0098] The conditional diffusion step is performed through a probabilistic diffusion model. In some preferred embodiments, the probabilistic diffusion model is a cleanup model based on a probabilistic diffusion mechanism. In this embodiment of the invention, a visual prior edge map and textual prompts are jointly input into the probabilistic diffusion model to guide it in generating a synthetic image that meets semantic requirements and possesses complex interference characteristics.

[0099] Preferably, during the training of the probability diffusion model, two copies of the original pre-trained probability diffusion model are retained, one with all parameters frozen and the other allowing only partial encoder parameter updates. Based on this, the original image of the complex power scene and the synthetic image generated by the probability diffusion model are blended and stitched together in a certain proportion along the pixel and channel dimensions to form an initial mixed sample.

[0100] The post-filtering step uses the CLIP multimodal understanding model to calculate the semantic similarity between the mixed image and its corresponding prompt words, and sets a threshold for filtering. Only the initial mixed samples with high semantic matching are retained and added to the training set, effectively associating the information of the power images with the input text. The image data processed by the post-filtering step not only has rich visual variation characteristics, but also more closely resembles real business scenarios, thereby effectively enhancing the robustness and reliability of the power system target detection artificial intelligence model in the face of complex environments.

[0101] In a preferred embodiment, both the purification model and the pre-trained typical target detection model are obtained by pre-training the original scene samples; the pre-trained typical target detection model includes an attention module, which is used to calculate spatial attention and channel attention.

[0102] It should be noted that, in this embodiment of the invention, the backbone network of the typical target detection model has been improved to enhance its robustness and feature extraction capabilities in complex power system scenarios. For details, please refer to [link to relevant documentation]. Figure 3 This paper proposes to replace traditional simple convolutional networks with a novel network structure that incorporates an attention mechanism to overcome the problem that traditional convolutional neural networks are not capable of expressing features when faced with complex factors such as changes in lighting and background interference.

[0103] The attention module enhances the model's ability to identify and model key features by analyzing both spatial and channel dimensions in images of electric smoke and flames.

[0104] Spatial attention computation can identify key spatial regions with semantic significance in feature maps. In tasks such as detecting smoke hazards on power transmission lines and identifying wildfires in substations, it helps the model to focus more accurately on target areas of smoke or flames and improve the perception ability of key features.

[0105] Preferably, the spatial attention computation specifically involves: first, processing the input feature map through convolution operations and subsequent normalization steps to create a two-dimensional spatial attention map. Each element in this map reflects the criticality of its corresponding location. Then, the initial feature map is element-wise multiplied using the attention map to highlight important features and suppress irrelevant information. This mechanism ensures that the model can focus more on highly important regions within the image during processing.

[0106] Channel attention is calculated from the feature channel dimension, and the contribution of each feature map in the entire space is weighted to highlight the feature channels that are more discriminative for the current task and suppress redundant or interfering information.

[0107] Preferably, the calculation of channel attention is as follows: When analyzing smoke and flame images of transmission lines and other power equipment in a power system, a global average pooling operation is first performed on each two-dimensional feature map, compressing each feature map into a single scalar value to extract overall information. Next, these scalar values ​​are processed through two fully connected layers to learn the weight coefficients corresponding to each channel. These coefficients reflect the importance of different feature channels for identifying smoke and flames. Then, the generated weight coefficients are used to create an attention map, and these weight coefficients are used to weight the corresponding channels of the original feature map, thereby achieving selective enhancement of key features.

[0108] The above scheme comprehensively considers the importance of information from both spatial and channel dimensions. It first applies a channel attention module to enhance the representation of key feature maps, and then uses a spatial attention module to further focus on key spatial locations within the feature maps, thus constructing a hierarchical and synergistic attention mechanism. This structure significantly enhances the perception capability and anti-interference performance of the power target detection model in complex environments, improving its accuracy and robustness in smoke and flame detection tasks for power equipment such as power transmission lines in power systems.

[0109] As a preferred embodiment, the typical target detection model is a multi-scale bidirectional feature fusion convolutional neural network model, in which a dynamic weighting mechanism is used to perform convolutional weighted fusion of features at different scales during the feature fusion process.

[0110] Considering the multi-scale characteristics of targets in power system images—that is, an image may simultaneously contain large-scale targets such as large-area flames and small-scale targets such as distant smoke—relying solely on features at a single scale for detection can lead to models missing some scale information, resulting in incomplete recognition or even missed detections, thus affecting overall robustness and practicality.

[0111] This invention introduces an improved multi-scale feature fusion method to effectively fuse these hierarchical features. It overcomes the limitations of unidirectional feature propagation in traditional FPN and PANet by creating a bidirectional feature fusion mechanism that combines a top-down semantic enhancement path and a bottom-up detail supplementation path, achieving more complete and richer feature propagation.

[0112] Furthermore, to address the issues arising from the fixed-weight additive fusion method used in traditional PANet, a learnable dynamic weight mechanism is introduced to perform convolutional weighted fusion of input information at different scale levels, enabling the network to adaptively adjust the importance of features at each layer according to the actual task requirements.

[0113] More preferably, to enhance the model's ability to perceive multi-scale targets, dilated convolution is introduced during feature fusion to expand the receptive field and improve the network's parameter representation ability.

[0114] In a preferred implementation, step S5 involves training the purification model using the training sample set. During training, the parameters of the pre-trained typical target detection model are fixed, and the adversarial loss is used as the loss function of the purification model. Steps S51-S52 are executed first. If the preset model training termination condition is met, step S53 is executed; otherwise, step S54 is executed.

[0115] S51. Generate random Gaussian noise and add the random Gaussian noise to the training sample set to generate noisy training samples.

[0116] S52. Based on a predefined mask, the noise-enhancing training samples are randomly transformed to generate mask samples;

[0117] S53. Based on the parameters of the purification model and the pre-trained typical target detection model, obtain the power target detection model;

[0118] S54. Fix the parameters of the pre-trained typical target detection model, use the loss of the pre-trained typical target detection model as the loss function of the purification model, and iteratively train the parameters of the purification model.

[0119] In some preferred embodiments, the preset model training termination conditions include a learning rate greater than a preset first threshold, a training iteration count greater than a preset second threshold, or model convergence. The specific model training termination conditions do not affect the beneficial effects of this invention.

[0120] For example, an early stopping strategy is adopted to monitor the performance of the validation set in real time. Once it is found that the validation index has not shown a significant improvement in several consecutive rounds, the training process is terminated in advance, thereby effectively suppressing overfitting and enhancing the stability of the power target detection model and the reliability of actual deployment.

[0121] In the above scheme, steps S51 and S52 both simulate real interference scenarios to increase the challenge of training samples, enabling the model to learn target detection capabilities with noisy and incomplete inputs. This process is only used during model training; in actual model applications, no additional interference signals need to be introduced. During model training, step S54 is executed. The parameters of the pre-trained typical target detection model remain fixed, allowing it to distinguish between real samples and cleaned samples. The cleaned model continuously adjusts its output to generate samples that can mislead the detection model, thereby improving the quality and semantic consistency of the cleaned data during adversarial processing. This training method not only ensures the authenticity and high quality of the cleaned samples but also makes them more suitable for the actual needs of tasks such as smoke recognition and equipment fire detection in power systems.

[0122] In some preferred embodiments, a mechanism for dynamically adjusting the learning rate is introduced during model training. This mechanism can automatically optimize the pace of learning rate changes according to the training phase, thereby accelerating model convergence and preventing the power detection model from getting stuck in local optima during training.

[0123] Further, preferably, step S52, based on a predefined mask, randomly transforms the noise-enhancing training samples to generate mask samples, including:

[0124] The first random transformation algorithm is obtained by multiplying the predefined mask element by element with the sample.

[0125] Gaussian noise is added to the samples, and a predefined mask is multiplied element-wise with the samples after adding Gaussian noise, which is the second random transformation algorithm;

[0126] By applying the first random transformation algorithm or the second random transformation algorithm to the same sample multiple times, a third random transformation algorithm is obtained;

[0127] The first random transformation algorithm, the second random transformation algorithm, or the third random transformation algorithm are used to randomly transform the noise-enhanced training samples to generate mask samples.

[0128] In some preferred embodiments, the preset mask is a binary mask m containing small blocks of pixels p×p, which are randomly lost at a missing rate r.

[0129] The second random transformation algorithm is almost identical to the first, but it adds Gaussian noise before applying the random mask, achieving random smoothing of the samples and significantly improving their robustness. The third random transformation algorithm involves multiple transformations of a single sample to remove disturbances as much as possible. The complexity of the three random transformation algorithms increases progressively, and by employing these three algorithms, masked samples of varying degrees can be obtained.

[0130] In some preferred embodiments, the noise-enhanced training samples are divided into a first noise-enhanced training sample, a second noise-enhanced training sample, and a third noise-enhanced training sample according to a preset ratio. A first random transformation algorithm is used to randomly transform the first noise-enhanced training sample, a second random transformation algorithm is used to randomly transform the second noise-enhanced training sample, and a third random transformation algorithm is used to randomly transform the third noise-enhanced training sample, ultimately generating a mask sample. For example, the preset ratio is 2:3:5.

[0131] Preferably, step S53, fixing the parameters of the pre-trained typical object detection model, using the loss of the pre-trained typical object detection model as the loss function of the purification model, and iteratively training the parameters of the purification model, includes:

[0132] Fix the parameters of the pre-trained typical target detection model;

[0133] The masked sample is input into the purification model, which uses the training sample set as the output target to purify the masked sample and obtain purified data.

[0134] The cleaned data is input into a pre-trained typical target detection model to obtain the target detection results, and adversarial loss is obtained based on the target detection results and the training sample set.

[0135] Based on the adversarial loss, the loss function of the purification model is obtained;

[0136] A gradient regularization term is introduced as a gradient penalty, and the parameters of the purification model are iteratively adjusted according to the loss function and the gradient penalty.

[0137] It is worth noting that, in this embodiment of the invention, the adversarial loss generated by the pre-trained typical target detection model is not used to update the parameters of the original detection model, but is used as an optimization target for fine-tuning the purification model, making the purification process more task-oriented.

[0138] Furthermore, based on determining the loss function of the cleansing model according to the adversarial loss, introducing a gradient regularization term as a gradient penalty can enhance the stability of the training process.

[0139] Please see Figure 4 In the model training process of this invention embodiment, Gaussian noise is first added to simulate the natural disturbance of the power scene, and then a random mask is used to simulate the physical occlusion of the power scene, so that the training sample set covers various complex interference scenarios. Then, the masked samples simulated by the two levels of disturbance are input into the purification model for data purification. The purified data is input into the pre-trained typical target detection model for classification, and the adversarial loss of the pre-trained typical target detection model is obtained based on the classification result y. During training, the parameters of the pre-trained typical object detection model are... Fixed, and based on the loss gradient of a pre-trained typical object detection model. According to the loss gradient of the purification model Parameters of the purification model Reverse update.

[0140] In this embodiment of the invention, an optimized training strategy for adversarial purification technology is constructed. By introducing Gaussian noise and random mask, the ability of the purification model to remove interference information is further trained, thereby enhancing the robustness of the power target detection model from the training perspective.

[0141] The robustness improvement method for target detection in complex power scenarios provided by this invention expands the anti-interference boundary of the power target detection model by combining a clean model with enhanced data. This enables key tasks such as smoke detection and flame recognition to make judgments and decisions based on cleaner and more reliable data, accurately focusing on smoke or flame targets and improving the robustness of the model in the face of complex interference.

[0142] This invention provides a robustness improvement system for target detection in complex power scenarios. Please refer to... Figure 5 The robustness improvement system for target detection in complex power scenarios includes an original scene sample acquisition module 11, an enhanced sample generation module 12, a training sample set construction module 13, a model construction module 14, a model training module 15, and a model application module 16, wherein:

[0143] The original scene sample acquisition module 11 is used to acquire images and image annotations under a preset power scene to form an original scene sample; the image annotations include smoke target annotations and flame target annotations.

[0144] The enhanced sample generation module 12 is used to perform boundary attacks and probability diffusion on the original scene sample to obtain an enhanced sample;

[0145] The training sample set construction module 13 is used to construct a training sample set based on the original scene samples and the enhanced samples;

[0146] The model building module 14 is used to build a power target detection model including a purification model and a pre-trained typical target detection model; the purification model is used to purify the perturbation and noise data of the power target detection model to generate purified data; the pre-trained typical target detection model is used to generate target detection results and adversarial loss based on the purified data.

[0147] The model training module 15 is used to train the purification model using the training sample set. During the training process, the parameters of the pre-trained typical target detection model are fixed, and the adversarial loss is used as the loss function of the purification model.

[0148] The model application module 16 is used to input the data of the area to be tested into the trained power target detection model to obtain the smoke target and flame target of the area to be tested.

[0149] In a preferred embodiment, the enhanced sample generation module 12 includes:

[0150] The boundary attack unit is used to perform boundary attacks on the original scene sample based on a preset intersection-union ratio index, and generate boundary adversarial samples.

[0151] The probability diffusion unit is used to extract the edge visual features and semantic features of the original scene sample, and perform probability diffusion on the original scene sample based on the edge visual features and the semantic features to generate a hybrid sample;

[0152] An enhanced sample integration unit is used to obtain enhanced samples based on the edge adversarial samples and the hybrid samples.

[0153] Further, preferably, the boundary attack unit is specifically used for:

[0154] Perform boundary attacks on the original scene samples to generate initial boundary adversarial samples with blurred or occluded target boundaries;

[0155] The classification loss, IOU loss, and perturbation loss of the initial boundary adversarial sample are calculated as the boundary attack loss;

[0156] Based on the preset intersection-union ratio (IU) and the boundary attack loss, the initial boundary adversarial samples are screened to obtain boundary adversarial samples.

[0157] Preferably, the probability diffusion unit is specifically used for:

[0158] An edge detection algorithm is used to extract the edge visual features of the original scene sample and generate a visual prior edge map;

[0159] Extract the semantic features of the original scene sample, and construct text prompt words based on the semantic features;

[0160] The visual prior edge map and the text prompt are input into a pre-trained probability diffusion model, and the output of the diffusion model is mixed with the original scene sample to obtain an initial mixed sample.

[0161] The semantic similarity between the initial mixed sample and the text prompt word is calculated using the CLIP model. Based on the semantic similarity, a mixed sample is obtained by filtering from the initial mixed sample.

[0162] In a preferred embodiment, both the purification model and the pre-trained typical target detection model are obtained by pre-training the original scene samples; the pre-trained typical target detection model includes an attention module, which is used to calculate spatial attention and channel attention.

[0163] As a preferred embodiment, the pre-trained typical target detection model is a multi-scale bidirectional feature fusion convolutional neural network model, in which a dynamic weighting mechanism is used to perform convolutional weighted fusion of features at different scales during the feature fusion process.

[0164] In a preferred embodiment, the model training module 15 includes:

[0165] A noise amplification unit is used to generate random Gaussian noise and add the random Gaussian noise to the training sample set to generate noisy training samples.

[0166] A random masking unit is used to randomly transform the noisy training samples based on a predefined mask to generate masked samples;

[0167] The model parameter determination unit is used to obtain the power target detection model based on the parameters of the purification model and the pre-trained typical target detection model when the preset model training termination condition is met.

[0168] An iterative training unit is used to, otherwise, fix the parameters of the pre-trained typical object detection model, use the loss of the pre-trained typical object detection model as the loss function of the purification model, and iteratively train the parameters of the purification model.

[0169] Further, preferably, the random mask unit is specifically used for:

[0170] The first random transformation algorithm is obtained by multiplying the predefined mask element by element with the sample.

[0171] Gaussian noise is added to the samples, and a predefined mask is multiplied element-wise with the samples after adding Gaussian noise, which is the second random transformation algorithm;

[0172] By applying the first random transformation algorithm or the second random transformation algorithm to the same sample multiple times, a third random transformation algorithm is obtained;

[0173] The first random transformation algorithm, the second random transformation algorithm, or the third random transformation algorithm are used to randomly transform the noise-enhanced training samples to generate mask samples.

[0174] Preferably, the iterative training unit is specifically used for:

[0175] Fix the parameters of the pre-trained typical target detection model;

[0176] The masked sample is input into the purification model, which uses the training sample set as the output target to purify the masked sample and obtain purified data.

[0177] The cleaned data is input into a pre-trained typical target detection model to obtain the target detection results, and adversarial loss is obtained based on the target detection results and the training sample set.

[0178] Based on the adversarial loss, the loss function of the purification model is obtained;

[0179] A gradient regularization term is introduced as a gradient penalty, and the parameters of the purification model are iteratively adjusted according to the loss function and the gradient penalty.

[0180] The robustness enhancement system for target detection in complex power scenarios provided by this invention expands the anti-interference boundary of the power target detection model by combining a clean model with enhanced data. This enables key tasks such as smoke detection and flame recognition to make judgments and decisions based on cleaner and more reliable data, accurately focusing on smoke or flame targets and improving the robustness of the model in the face of complex interference.

[0181] Those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware. The program can be stored in a computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. The storage medium can be a magnetic disk, optical disk, read-only memory (ROM), or random access memory (RAM), etc.

[0182] The above description represents the preferred embodiments of the present invention. It should be noted that those skilled in the art can make various improvements and modifications without departing from the principles of the present invention, and these improvements and modifications are also considered to be within the scope of protection of the present invention.

Claims

1. A method for improving the robustness of target detection in complex power scenarios, characterized in that, include: Acquire images and image annotations under a preset power scenario to form an original scene sample; The image annotations include smoke target annotations and flame target annotations; The original scene sample is subjected to boundary attack and probability diffusion to obtain an enhanced sample; A training sample set is constructed based on the original scene samples and the enhanced samples; A power target detection model is constructed, which includes a purification model and a pre-trained typical target detection model; the purification model is used to purify the perturbation and noise data of the power target detection model to generate purified data. The pre-trained typical target detection model is used to generate target detection results and adversarial loss based on the cleaned data; The purification model is trained using the training sample set. During the training process, the parameters of the pre-trained typical target detection model are fixed, and the adversarial loss is used as the loss function of the purification model. The data of the area to be tested is input into the trained power target detection model to obtain the smoke target and flame target in the area to be tested; The step of training the purification model using the training sample set, fixing the parameters of the pre-trained typical target detection model during training, and using the adversarial loss as the loss function of the purification model includes: Random Gaussian noise is generated and added to the training sample set to generate noisy training samples. Based on a predefined mask, the noise-enhanced training samples are randomly transformed to generate mask samples; When the preset model training termination condition is met, the power target detection model is obtained based on the parameters of the purification model and the pre-trained typical target detection model. Otherwise, the parameters of the pre-trained typical object detection model are fixed, and the loss of the pre-trained typical object detection model is used as the loss function of the purification model to iteratively train the parameters of the purification model. The step of fixing the parameters of the pre-trained typical object detection model, using the loss of the pre-trained typical object detection model as the loss function of the purification model, and iteratively training the parameters of the purification model includes: Fix the parameters of the pre-trained typical target detection model; The masked sample is input into the purification model, which uses the training sample set as the output target to purify the masked sample and obtain purified data. The cleaned data is input into a pre-trained typical target detection model to obtain the target detection results, and adversarial loss is obtained based on the target detection results and the training sample set. Based on the adversarial loss, the loss function of the purification model is obtained; A gradient regularization term is introduced as a gradient penalty, and the parameters of the purification model are iteratively adjusted according to the loss function and the gradient penalty. The process of performing boundary attacks and probability diffusion on the original scene samples to obtain enhanced samples includes: Based on a preset intersection-union ratio (IU / U) metric, the original scene samples are subjected to boundary attacks to generate boundary adversarial samples. Extract the edge visual features and semantic features of the original scene sample, and perform probability diffusion on the original scene sample based on the edge visual features and the semantic features to generate a hybrid sample; Based on the boundary adversarial samples and the hybrid samples, an enhanced sample is obtained; The step of extracting the edge visual features and semantic features of the original scene sample, and performing probability diffusion on the original scene sample based on the edge visual features and the semantic features to generate a mixed sample includes: An edge detection algorithm is used to extract the edge visual features of the original scene sample and generate a visual prior edge map; Extract the semantic features of the original scene sample, and construct text prompt words based on the semantic features; The visual prior edge map and the text prompt are input into a pre-trained probability diffusion model, and the output of the diffusion model is mixed with the original scene sample to obtain an initial mixed sample. The semantic similarity between the initial mixed sample and the text prompt word is calculated using the CLIP model. Based on the semantic similarity, a mixed sample is obtained by filtering from the initial mixed sample.

2. The robustness improvement method for target detection in complex power scenarios as described in claim 1, characterized in that, The method of performing boundary attacks on the original scene samples based on a preset intersection-union ratio (IU) metric to generate boundary adversarial samples includes: Perform boundary attacks on the original scene samples to generate initial boundary adversarial samples with blurred or occluded target boundaries; The classification loss, IOU loss, and perturbation loss of the initial boundary adversarial sample are calculated as the boundary attack loss; Based on the preset intersection-union ratio (IU) and the boundary attack loss, the initial boundary adversarial samples are screened to obtain boundary adversarial samples.

3. The robustness improvement method for target detection in complex power scenarios as described in claim 1, characterized in that, Both the purification model and the pre-trained typical target detection model are obtained by pre-training the original scene samples; the pre-trained typical target detection model includes an attention module, which is used to calculate spatial attention and channel attention.

4. The robustness improvement method for target detection in complex power scenarios as described in claim 1, characterized in that, The pre-trained typical target detection model is a multi-scale bidirectional feature fusion convolutional neural network model. During the feature fusion process, a dynamic weighting mechanism is used to perform convolutional weighted fusion of features at different scales.

5. The robustness improvement method for target detection in complex power scenarios as described in claim 1, characterized in that, The step of randomly transforming the noisy training samples based on a predefined mask to generate mask samples includes: The first random transformation algorithm is obtained by multiplying the predefined mask element by element with the sample. Gaussian noise is added to the samples, and a predefined mask is multiplied element-wise with the samples after adding Gaussian noise, which is the second random transformation algorithm; By applying the first random transformation algorithm or the second random transformation algorithm to the same sample multiple times, a third random transformation algorithm is obtained; The first random transformation algorithm, the second random transformation algorithm, or the third random transformation algorithm are used to randomly transform the noise-enhanced training samples to generate mask samples.

6. A robustness improvement system for target detection in complex power scenarios, characterized in that, include: The original scene sample acquisition module is used to acquire images and image annotations under a preset power scenario to form original scene samples; The image annotations include smoke target annotations and flame target annotations; An enhanced sample generation module is used to perform boundary attacks and probability diffusion on the original scene sample to obtain an enhanced sample. The training sample set construction module is used to construct a training sample set based on the original scene samples and the enhanced samples; The model building module is used to build a power target detection model that includes a purification model and a pre-trained typical target detection model; the purification model is used to purify the disturbance and noise data of the power target detection model to generate purified data. The pre-trained typical target detection model is used to generate target detection results and adversarial loss based on the cleaned data; The model training module is used to train the purification model using the training sample set. During the training process, the parameters of the pre-trained typical target detection model are fixed, and the adversarial loss is used as the loss function of the purification model. The model application module is used to input the data of the area to be tested into the trained power target detection model to obtain the smoke target and flame target of the area to be tested; The model training module includes: A noise amplification unit is used to generate random Gaussian noise and add the random Gaussian noise to the training sample set to generate noisy training samples. A random masking unit is used to randomly transform the noisy training samples based on a predefined mask to generate masked samples; The model parameter determination unit is used to obtain the power target detection model based on the parameters of the purification model and the pre-trained typical target detection model when the preset model training termination condition is met. An iterative training unit is used to, otherwise, fix the parameters of the pre-trained typical object detection model, use the loss of the pre-trained typical object detection model as the loss function of the purification model, and iteratively train the parameters of the purification model. The iterative training unit is specifically used for: Fix the parameters of the pre-trained typical target detection model; The masked sample is input into the purification model, which uses the training sample set as the output target to purify the masked sample and obtain purified data. The cleaned data is input into a pre-trained typical target detection model to obtain the target detection results, and adversarial loss is obtained based on the target detection results and the training sample set. Based on the adversarial loss, the loss function of the purification model is obtained; A gradient regularization term is introduced as a gradient penalty, and the parameters of the purification model are iteratively adjusted according to the loss function and the gradient penalty. The enhanced sample generation module includes: The boundary attack unit is used to perform boundary attacks on the original scene sample based on a preset intersection-union ratio index, and generate boundary adversarial samples. The probability diffusion unit is used to extract the edge visual features and semantic features of the original scene sample, and perform probability diffusion on the original scene sample based on the edge visual features and the semantic features to generate a hybrid sample; An enhanced sample integration unit is used to obtain enhanced samples based on the boundary adversarial samples and the hybrid samples; The probability diffusion unit is specifically used for: An edge detection algorithm is used to extract the edge visual features of the original scene sample and generate a visual prior edge map; Extract the semantic features of the original scene sample, and construct text prompt words based on the semantic features; The visual prior edge map and the text prompt are input into a pre-trained probability diffusion model, and the output of the diffusion model is mixed with the original scene sample to obtain an initial mixed sample. The semantic similarity between the initial mixed sample and the text prompt word is calculated using the CLIP model. Based on the semantic similarity, a mixed sample is obtained by filtering from the initial mixed sample.

Citation Information

Patent Citations

  • Image confrontation sample cleaning method based on pixel reconstruction

    CN119048376A