Voltage transformer target detection method and system based on dynamic confrontation supervision strategy
Through the voltage transformer object detection method of dynamic adversarial supervision strategy, the problem of voltage transformer detection in complex environments is solved, the detection accuracy and robustness are improved, overfitting is avoided, and the effective application of anti-perturbation strategy is achieved.
Patent Information
- Application Number
- CN202411303708.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-19
- Publication Date
- 2024-12-10
- Estimated Expiration
- 2044-09-19
AI Technical Summary
In complex environments, traditional detection algorithms have difficulty accurately identifying voltage transformers, especially due to edge ambiguity and irregular geometric structures caused by background noise, dimensional changes and physical occlusion, which makes the target detection more difficult.
The voltage transformer object detection method based on dynamic adversarial supervision strategy is adopted, and the basic data set is obtained for iterative training, the dynamic data set is divided and the anti-perturbation strategy is applied, the supervised network model is updated, and the model is improved.
It effectively improves the detection accuracy and robustness of voltage transformers in complex environments, avoids overfitting and repetitive learning of simple samples, and enhances the adaptability and generalization ability of the model.
Smart Images

Figure CN118823487B_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the technical field of voltage transformer detection, and in particular relates to a voltage transformer target detection method and system based on a dynamic confrontation supervision strategy. Background Art
[0002] The surrounding environment of voltage transformers installed in substations and transmission lines is complex and diverse, filled with metal structures, dense wires and various electrical facilities. These factors together constitute a high-interference background environment, which poses a severe test for the accuracy of target detection. Traditional detection algorithms often find it difficult to effectively identify and accurately locate voltage transformers in such noisy visual scenes, because background noise seriously hinders the clear identification of targets.
[0003] Furthermore, due to the variability of the camera's viewing angle and distance, the size of the voltage transformer in the image can fluctuate greatly, from being as small as a few pixels to being as large as almost covering the entire view. This urgently requires a scale-adaptive target detection strategy that ensures high detection accuracy regardless of the target's proportion in the image.
[0004] In addition, physical occlusions in complex environments (such as adjacent equipment, supporting structures, and even natural environmental factors) often partially cover the edges of voltage transformers, resulting in many obstacles for edge-based feature extraction. Occlusion not only interrupts the continuity of the edges, but may also induce the detection algorithm to misjudge and output incorrect detection conclusions.
[0005] In addition, the structure of the voltage transformer itself is also complex, especially in its structural details and connections, which show irregular geometric shapes. These complex structural features make it very easy for edge detection algorithms to get into trouble when distinguishing the target body from the surrounding environment or attached parts, especially when the edge boundary is blurred or the gradient is soft, the detection difficulty is significantly increased. Summary of the invention
[0006] The present invention provides a voltage transformer target detection method and system based on a dynamic confrontation supervision strategy, which is used to solve the technical problem of high detection difficulty when distinguishing a target body from a surrounding environment or ancillary components, especially when the edge boundary is blurred or gradually changes.
[0007] In a first aspect, the present invention provides a voltage transformer target detection method based on a dynamic confrontation supervision strategy, comprising:
[0008] Acquire a basic data set, and iteratively train a preset supervision network according to the basic data set to obtain a supervision model, wherein a certain data in the basic data set is a certain image data containing voltage transformer annotation information;
[0009] The basic data set is divided into dynamic data sets according to a preset division rule, and the dynamic data set is updated according to a preset anti-disturbance strategy to obtain a target dynamic data set;
[0010] Iteratively training a preset supervised network according to the target dynamic data set, and in each iterative training process, updating the model parameters of the supervised network according to a preset adversarial supervised learning strategy to obtain a final target detection model;
[0011] The real-time image data containing the voltage transformer is input into the target detection model, and the target detection model outputs a detection result corresponding to the real-time image data.
[0012] In a second aspect, the present invention provides a voltage transformer target detection system based on a dynamic confrontation supervision strategy, comprising:
[0013] An acquisition module is configured to acquire a basic data set, and iteratively train a preset supervision network according to the basic data set to obtain a supervision model, wherein a certain data in the basic data set is a certain image data containing voltage transformer annotation information;
[0014] An updating module is configured to divide the basic data set into dynamic data sets using a preset division rule, and update the dynamic data set according to a preset anti-disturbance strategy to obtain a target dynamic data set;
[0015] A training module is configured to iteratively train a preset supervised network according to the target dynamic data set, and in each iterative training process, update the model parameters of the supervised network according to a preset adversarial supervised learning strategy to obtain a final target detection model;
[0016] The output module is configured to input the real-time image data containing the voltage transformer into the target detection model, and the target detection model outputs the detection result corresponding to the real-time image data.
[0017] According to a third aspect, an electronic device is provided, comprising: at least one processor, and a memory communicatively connected to the at least one processor, wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can perform the steps of the voltage transformer target detection method based on a dynamic adversarial supervision strategy according to any embodiment of the present invention.
[0018] In a fourth aspect, the present invention further provides a computer-readable storage medium having a computer program stored thereon, wherein when the program instructions are executed by a processor, the processor executes the steps of the voltage transformer target detection method based on a dynamic adversarial supervision strategy of any embodiment of the present invention.
[0019] The voltage transformer target detection method and system based on the dynamic adversarial supervision strategy of the present application, the dynamic data set is obtained from the basic data set through dynamic adjustment. The purpose of using the dynamic data set is to speed up the training speed of the supervised network while avoiding overfitting and repeated learning of simple samples. The adversarial perturbation strategy is to add a tiny disturbance to the image data so that the model cannot accurately identify the target. By combining the unperturbed data set with the perturbed data set as a new data set to train the algorithm model, the robustness and stability of the network model can be effectively improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0021] Figure 1 A flow chart of a voltage transformer target detection method based on a dynamic confrontation supervision strategy provided by an embodiment of the present invention;
[0022] Figure 2 A structural block diagram of a voltage transformer target detection system based on a dynamic confrontation supervision strategy provided by an embodiment of the present invention;
[0023] Figure 3 It is a schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0024] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0025] See also Figure 1 , which shows a flow chart of a voltage transformer target detection method based on a dynamic confrontation supervision strategy of the present application.
[0026] like Figure 1 As shown, the voltage transformer target detection method based on the dynamic confrontation supervision strategy specifically includes the following steps:
[0027] Step S101, obtaining a basic data set, and iteratively training a preset supervision network according to the basic data set to obtain a supervision model, wherein a certain data in the basic data set is a certain image data containing voltage transformer annotation information.
[0028] In this step, the loss function of the supervised model is expressed as:
[0029] ,
[0030] In the formula, is the loss function of the supervised model, is the feature supervision loss function, is the classification supervision sub-loss function, is the regression supervision sub-loss function;
[0031] The expression of the feature supervision sub-loss function is:
[0032] ,
[0033] In the formula, is the sum of all pixels in the marked boxes in the feature map, is the width of the feature map, is the height of the feature map, is the number of channels of the feature map, is the boundary distance weight, is the value of the coordinate point (i, j) in the cth channel in the supervisory network feature map, is the value of the coordinate point (i, j) in the cth channel of the supervised network feature map, is the sum of all pixels in the feature map, is the value of the pixel at coordinate (i, j), is the set of foreground pixels in the real label of target detection;
[0034] The expression of boundary distance weight is:
[0035]
[0036] In the formula, is the basic weight, is the exponential operation with the natural base e as the base, is the shortest distance between the pixel with coordinates (i, j) and the foreground boundary. is a constant value for the distance decay rate.
[0037] The expression of the classification supervision sub-loss function is:
[0038] ,
[0039] In the formula, is the binary cross entropy loss weight, is the total number of pixels in the feature map, is the binary cross entropy loss function, For Take out Elements of For Take out Elements of To set the threshold to 0.3 Perform non-maximum suppression. To set the threshold to 0.3 Perform non-maximum suppression. is the classification output of the i-th pixel in the supervised network classification output, is the classification output of the i-th pixel of the supervision model;
[0040] Among them, the expression of the binary cross entropy loss function is:
[0041] ,
[0042] In the formula, is the total number of identifiable object categories, Whether there is a target detected in the pixel detection box, and whether the target is detected , when no target is detected , is the probability that the detection box belongs to category i.
[0043] The expression of the regression supervision sub-loss function is:
[0044] ,
[0045] ,
[0046] In the formula, is the regression loss function, is the regression loss weight, For Take out The value of For Take out The value of For Perform non-maximum suppression. For Perform non-maximum suppression. is the regression output of the ith pixel in the supervised network regression output, is the classification output of the i-th pixel of the supervision model.
[0047] Step S102: The basic data set is divided into dynamic data sets according to a preset division rule, and the dynamic data sets are updated according to a preset anti-disturbance strategy to obtain a target dynamic data set.
[0048] In this step, at least one data in the basic data set with a picture score greater than a preset threshold is divided into the dynamic data set using a preset division rule. The division rule is expressed as:
[0049] ,
[0050] In the formula, To score, Indicates whether the algorithm detection result is consistent with the real result, 1 is consistent and 0 is inconsistent. is the maximum object probability, is the second largest object probability, is the natural base, is the standard deviation of the probability distribution, is the mean of the probability distribution, is the slope of the probability distribution, is the kurtosis of the probability distribution.
[0051] Step S103, iteratively training the preset supervised network according to the target dynamic data set, and in each iterative training process, updating the model parameters of the supervised network according to the preset adversarial supervised learning strategy to obtain the final target detection model.
[0052] In this step, the loss function of the supervised network is expressed as:
[0053] ,
[0054] In the formula, is the loss function of the supervised network, is the total number of pixels in the feature map, is the binary cross entropy loss function, is the regression loss function, is the classification output of the i-th pixel in the supervised network classification output, is the regression output of the ith pixel in the supervised network regression output, For real classification, is the real detection frame;
[0055] Among them, the expression of the loss function for supervised training of the supervised network is:
[0056] ,
[0057] In the formula, is the weight parameter for adversarial supervised learning.
[0058] It should be noted that disturbance is added to each data in the dynamic data set, wherein the loss function of adding disturbance is expressed as:
[0059] ,
[0060] In the formula, Represents the value taken when the output value of the bracket loss function is the smallest value, is the binary cross entropy loss function, is the classification output of the i-th pixel in the supervised network classification output, is the original input, To combat disturbances, is the weight parameter of the regression loss function, is the total number of pixels in the feature map, is the regression loss function, is the regression output of the ith pixel in the supervised network regression output, The classification output of the i-th pixel in the classification output of the supervised model, is a collection of perturbations;
[0061] And according to the gradient and the preset learning rate, the perturbation value is updated according to the gradient descent method, where the expression for updating the perturbation value is:
[0062] ,
[0063] In the formula, is the adversarial perturbation searched for the kth iteration, is the learning rate, Indicates that the function in the brackets is The gradient of is the classification output of the i-th pixel of the supervision model, To temporarily counteract disturbances;
[0064] ,
[0065] In the formula, is the adversarial perturbation of the k+1th iteration, is the maximum range of disturbance, for Norm.
[0066] Step S104: input the real-time image data containing the voltage transformer into the target detection model, and the target detection model outputs a detection result corresponding to the real-time image data.
[0067] In summary, in the method of the present application, the dynamic data set is obtained from the basic data set through dynamic adjustment. The purpose of using a dynamic data set is to speed up the training of the supervised network while avoiding overfitting and repeated learning of simple samples. The adversarial perturbation strategy is to add a tiny perturbation to the image data so that the model cannot accurately identify the target. By combining the unperturbed data set with the perturbed data set as a new data set to train the algorithm model, the robustness and stability of the network model can be effectively improved. The dynamic adversarial supervision strategy uses a dynamic data set and an adversarial perturbation strategy to supervise the training of the supervised network.
[0068] In a specific embodiment, a voltage transformer target detection method based on a dynamic confrontation supervision strategy includes:
[0069] Basic data set production: collect and organize image data of voltage transformers and complete data annotation.
[0070] First, it is necessary to collect images of voltage transformers. This includes taking photos or videos of voltage transformers under different environmental conditions, such as sunny, cloudy, and overcast, as well as at different viewing angles and distances. The collected data should cover various actual working scenarios and include voltage transformer samples of different types and states as much as possible. The collected images need to be annotated, and a category label is assigned to each pixel in the image to identify the object category (such as voltage transformer) or background to which the pixel belongs. At the same time, a label or bounding box is added to the voltage transformer target in each image. After the annotation is completed, the data needs to be cleaned and filtered to remove low-quality or unreliable samples. This may involve removing blurred images, overlapping targets, incomplete targets, etc. In order to increase the diversity and richness of the data, the annotated data is enhanced. This includes operations such as rotation, flipping, scaling, cropping, and transformations such as adding noise and blurring. Data enhancement helps to improve the generalization ability of the model and make it more adaptable to voltage transformers in different scenarios and conditions. Finally, the dataset is divided into training set, validation set, and test set. The training set is used to train model parameters, the validation set is used to adjust model hyperparameters and monitor model performance, and the test set is used to finally evaluate the performance and generalization ability of the model. The holdout method is used to divide the data set to ensure the reliability of training, validation, and testing. The training set and test set are divided in a ratio of 8:2.
[0071] Dynamic dataset production: The dynamic dataset is obtained from the basic dataset through dynamic adjustment. The training set in the basic dataset is divided into a dynamic training set and a dynamic test set in a ratio of 3:7.
[0072] The dynamic dataset is obtained from the basic dataset through dynamic adjustment. The training set in the basic dataset is divided into a dynamic training set and a dynamic test set in a ratio of 3:7. When adopting the dynamic adversarial supervised learning strategy, we will use the dynamic training set for training. During the training process of the adversarial supervision strategy, the supervised model will score the dynamic test set after every 5 iterations. Based on the scoring results, we will re-divide the dynamic test set and select the same number of pictures as the dynamic training set. The scores of these pictures are not higher than the lowest score among the remaining pictures in the dynamic test set. These low-scoring pictures will be updated to the dynamic training set, and the previous version of the dynamic training set will be merged into the dynamic test set. The scoring calculation formula is:
[0073] ,
[0074] The goal of the adversarial perturbation strategy is to find an adversarial perturbation (after the perturbation is applied to the original input, the prediction behavior of the model changes so that the model obtains an incorrect prediction result, while ensuring that the perturbation is as small as possible and difficult to be noticed by humans), so that the model cannot correctly detect the target in the image. Simply put, we have an image, and we want to find a perturbation so that the image after the perturbation can deceive the detector. Adversarial training can be performed by incorporating adversarial samples into the training data set. This requires the model to not only learn to distinguish normal samples, but also learn to identify and correctly handle samples with adversarial perturbations to improve the robustness of the network model.
[0075] Supervised model training: A dynamic adversarial perturbation supervised model (YOLOv5-x) is used for full training.
[0076] The supervision model should have high performance and be able to achieve good results in target detection tasks. Usually, a pre-trained model that performs well in target detection tasks is selected as the supervision model, such as Faster R-CNN, YOLO, SSD, etc. The present invention uses the YOLOv5-x algorithm as the supervision model.
[0077] First, the supervised model needs to be fully trained using the adversarial perturbation strategy. This supervised model uses YOLOv5-x. YOLOv5-x is fully trained using the basic data set and the adversarial perturbation strategy to save the weights of the optimal YOLOv5-x (YOLOv5-extra large) for performance evaluation. The lightweight supervised model uses YOLOv5-tiny. Secondly, the supervised model is trained for 100 iterations using the adversarial supervision strategy. The 100 iterations are trained using a dynamic data set. At the end of each iteration, the dynamic data set is updated using the adversarial perturbation strategy to form a dynamic adversarial perturbation data set. When the adversarial supervised learning strategy is used for training, the supervised model and the supervised model use the dynamic perturbation data set as input during each iteration. Every 5 iterations of the supervised model training, the perturbation test data set (the perturbation test data set obtained after the test set in the basic data set is subjected to the adversarial perturbation strategy) is verified. After 100 iterations of training, the weight file of the supervised model with the best performance is saved.
[0078] The dynamic adversarial supervision strategy enables the supervisory model to effectively transfer the supervisory model knowledge to the supervised model. The supervised model uses the dynamic adversarial perturbation dataset for training, which effectively improves the robustness and detection effect of the lightweight supervised model. Feature supervision emphasizes edge features for the supervised model. The supervised model can learn more accurate image structure information, thereby performing better in target detection and recognition tasks. The soft labels (probability distribution rather than single category labels) generated by classification supervision and regression supervision allow the supervised model to learn similarity information between classes. This "dark knowledge" helps improve the generalization ability of the supervised model.
[0079] Supervised model training: Based on the dynamic training data set, an adversarial perturbation strategy is used to train the supervised model (YOLOv5-tiny) through a supervised learning strategy, and the optimal weights are saved. The adversarial supervised learning strategy is to train the supervised model through the supervised model, speed up the training of the supervised model, improve the robustness and generalization ability of the supervised model, and improve the detection effect of the supervised model.
[0080] Supervised models usually have a lighter structure. The supervised model uses YOLOv5-tiny to perform efficient reasoning in a resource-constrained environment.
[0081] In the supervised learning process, the supervised network is first trained and the parameters are updated using the training data set. Then, under the same conditions, a lightweight supervised network is trained using the same training data set as the supervised network. During the training of the supervised network, the above supervised learning strategy is adopted to guide the learning of the supervised network using the output information and process information of the supervised network. Through the guidance of the supervised network, the supervised network can learn more generalized feature representations, thereby improving the generalization ability of the model on unseen data. This process helps to reduce overfitting and improve the stability and robustness of the model.
[0082] See also Figure 2 , which shows a structural block diagram of a voltage transformer target detection system based on a dynamic confrontation supervision strategy of the present application.
[0083] like Figure 2 As shown, the voltage transformer target detection system 200 includes an acquisition module 210 , an update module 220 , a training module 230 and an output module 240 .
[0084] Among them, the acquisition module 210 is configured to acquire a basic data set, and iteratively train a preset supervised network according to the basic data set to obtain a supervised model, wherein a certain data in the basic data set is an image data containing voltage transformer annotation information; the update module 220 is configured to divide the basic data set into dynamic data sets using a preset division rule, and update the dynamic data set according to a preset adversarial perturbation strategy to obtain a target dynamic data set; the training module 230 is configured to iteratively train a preset supervised network according to the target dynamic data set, and in each iterative training process, update the model parameters of the supervised network according to a preset adversarial supervised learning strategy to obtain a final target detection model; the output module 240 is configured to input real-time image data containing a voltage transformer into the target detection model, and the target detection model outputs a detection result corresponding to the real-time image data.
[0085] It should be understood that Figure 2 Modules and references documented in Figure 1 Therefore, the operations and features described above for the method and the corresponding technical effects are also applicable to Figure 2 The modules in it will not be described in detail here.
[0086] In some other embodiments, the embodiments of the present invention further provide a computer-readable storage medium having a computer program stored thereon, wherein when the program instructions are executed by a processor, the processor is caused to execute the voltage transformer target detection method based on the dynamic confrontation supervision strategy in any of the above method embodiments;
[0087] As an implementation mode, the computer-readable storage medium of the present invention stores computer-executable instructions, and the computer-executable instructions are configured as follows:
[0088] Acquire a basic data set, and iteratively train a preset supervision network according to the basic data set to obtain a supervision model, wherein a certain data in the basic data set is a certain image data containing voltage transformer annotation information;
[0089] The basic data set is divided into dynamic data sets according to a preset division rule, and the dynamic data set is updated according to a preset anti-disturbance strategy to obtain a target dynamic data set;
[0090] Iteratively training a preset supervised network according to the target dynamic data set, and in each iterative training process, updating the model parameters of the supervised network according to a preset adversarial supervised learning strategy to obtain a final target detection model;
[0091] The real-time image data containing the voltage transformer is input into the target detection model, and the target detection model outputs a detection result corresponding to the real-time image data.
[0092] The computer-readable storage medium may include a program storage area and a data storage area, wherein the program storage area may store an operating system and an application required by at least one function; the data storage area may store data created according to the use of the voltage transformer target detection system based on the dynamic confrontation supervision strategy, etc. In addition, the computer-readable storage medium may include a high-speed random access memory, and may also include a memory, such as at least one disk storage device, a flash memory device, or other non-volatile solid-state storage device. In some embodiments, the computer-readable storage medium may optionally include a memory remotely arranged relative to the processor, and these remote memories may be connected to the voltage transformer target detection system based on the dynamic confrontation supervision strategy via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0093] Figure 3 is a schematic diagram of the structure of an electronic device provided by an embodiment of the present invention, such as Figure 3 As shown, the device includes: a processor 310 and a memory 320. The electronic device may also include: an input device 330 and an output device 340. The processor 310, the memory 320, the input device 330 and the output device 340 may be connected via a bus or other means. Figure 3In the example, the connection through the bus is taken as an example. The memory 320 is the above-mentioned computer-readable storage medium. The processor 310 executes various functional applications and data processing of the server by running the non-volatile software programs, instructions and modules stored in the memory 320, that is, the voltage transformer target detection method based on the dynamic confrontation supervision strategy of the above-mentioned method embodiment is realized. The input device 330 can receive input digital or character information, and generate key signal input related to the user setting and function control of the voltage transformer target detection system based on the dynamic confrontation supervision strategy. The output device 340 may include a display device such as a display screen.
[0094] The electronic device can execute the method provided by the embodiment of the present invention, and has the functional modules and beneficial effects corresponding to the execution method. For technical details not described in detail in this embodiment, please refer to the method provided by the embodiment of the present invention.
[0095] As an implementation mode, the electronic device is applied to a voltage transformer target detection system based on a dynamic confrontation supervision strategy, and is used for a client, and includes: at least one processor; and a memory connected to the at least one processor in communication; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can:
[0096] Acquire a basic data set, and iteratively train a preset supervision network according to the basic data set to obtain a supervision model, wherein a certain data in the basic data set is a certain image data containing voltage transformer annotation information;
[0097] The basic data set is divided into dynamic data sets according to a preset division rule, and the dynamic data set is updated according to a preset anti-disturbance strategy to obtain a target dynamic data set;
[0098] Iteratively training a preset supervised network according to the target dynamic data set, and in each iterative training process, updating the model parameters of the supervised network according to a preset adversarial supervised learning strategy to obtain a final target detection model;
[0099] The real-time image data containing the voltage transformer is input into the target detection model, and the target detection model outputs a detection result corresponding to the real-time image data.
[0100] Through the description of the above implementation modes, those skilled in the art can clearly understand that each implementation mode can be implemented by means of software plus a necessary general hardware platform, or of course by hardware. Based on such an understanding, the above technical solution can essentially or in other words be embodied in the form of a software product that contributes to the prior art. The computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a magnetic disk, an optical disk, etc., and includes a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods of each embodiment or some parts of the embodiment.
[0101] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A voltage transformer target detection method based on dynamic confrontation supervision strategy, characterized in that: include: Acquire a basic data set, and iteratively train a preset supervision network according to the basic data set to obtain a supervision model, wherein a certain data in the basic data set is a certain image data containing voltage transformer annotation information; The basic data set is divided into dynamic data sets by using a preset division rule, and the dynamic data set is updated according to a preset anti-disturbance strategy to obtain a target dynamic data set. The basic data set is divided into dynamic data sets by using a preset division rule, including: At least one data in the basic data set with a picture score greater than a preset threshold is divided into a dynamic data set using a preset division rule, and the expression of the division rule is: , In the formula, To score, Indicates whether the algorithm detection result is consistent with the real result, 1 is consistent and 0 is inconsistent. is the maximum object probability, is the second largest object probability, is the natural base, is the standard deviation of the probability distribution, is the mean of the probability distribution, is the slope of the probability distribution, is the kurtosis of the probability distribution; The updating of the dynamic data set according to the preset anti-disturbance strategy to obtain the target dynamic data set includes: Perturbations are added to each data in the dynamic data set, wherein the expression of the loss function of adding perturbations is: , In the formula, Represents the value taken when the output value of the bracket loss function is the smallest value, is the binary cross entropy loss function, is the classification output of the i-th pixel in the supervised network classification output, is the original input, To combat disturbances, is the weight parameter of the regression loss function, is the total number of pixels in the feature map, is the regression loss function, is the regression output of the ith pixel in the supervised network regression output, is the classification output of the i-th pixel in the classification output of the supervision model, is a collection of perturbations; And according to the gradient and the preset learning rate, the perturbation value is updated according to the gradient descent method, where the expression for updating the perturbation value is: , In the formula, is the adversarial perturbation searched for the kth iteration, is the learning rate, Indicates that the function in the brackets is The gradient of is the classification output of the i-th pixel of the supervision model, To temporarily counteract disturbances; , In the formula, is the adversarial perturbation of the k+1th iteration, is the maximum range of disturbance, for norm; Iteratively training a preset supervised network according to the target dynamic data set, and in each iterative training process, updating the model parameters of the supervised network according to a preset adversarial supervised learning strategy to obtain a final target detection model; The real-time image data containing the voltage transformer is input into the target detection model, and the target detection model outputs a detection result corresponding to the real-time image data.
2. A voltage transformer target detection method based on a dynamic confrontation supervision strategy according to claim 1, characterized in that: The expression of the loss function of the supervised model is: , In the formula, is the loss function of the supervised model, is the feature supervision loss function, is the classification supervision loss function, is the regression supervision sub-loss function; The loss function of the supervised network is expressed as: , In the formula, is the loss function of the supervised network, is the total number of pixels in the feature map, is the binary cross entropy loss function, is the regression loss function, is the classification output of the i-th pixel in the supervised network classification output, is the regression output of the ith pixel in the supervised network regression output, For real classification, is the real detection frame; The loss function when the supervised network is trained is expressed as: , In the formula, is the weight parameter for adversarial supervised learning.
3. A voltage transformer target detection method based on dynamic confrontation supervision strategy according to claim 2, characterized in that: The expression of the feature supervision sub-loss function is: , In the formula, is the sum of all pixels in the marked boxes in the feature map, is the width of the feature map, is the height of the feature map, is the number of channels of the feature map, is the boundary distance weight, is the value of the coordinate point (i, j) in the cth channel in the supervisory network feature map, is the value of the coordinate point (i, j) in the cth channel of the supervised network feature map, is the sum of all pixels in the feature map, is the value of the pixel at coordinate (i, j), is the set of foreground pixels in the real label of target detection; The expression of boundary distance weight is: In the formula, is the basic weight, is the exponential operation with the natural base e as the base, is the shortest distance between the pixel with coordinates (i, j) and the foreground boundary. is a constant value for the distance decay rate.
4. A voltage transformer target detection method based on dynamic confrontation supervision strategy according to claim 2, characterized in that: The expression of the classification supervision sub-loss function is: , In the formula, is the binary cross entropy loss weight, is the total number of pixels in the feature map, is the binary cross entropy loss function, For Take out Elements of For Take out Elements of To set the threshold to 0.3 Perform non-maximum suppression. To set the threshold to 0.3 Perform non-maximum suppression. is the classification output of the i-th pixel in the supervised network classification output, is the classification output of the i-th pixel of the supervision model; Among them, the expression of the binary cross entropy loss function is: , In the formula, is the total number of identifiable object categories, Whether there is a target detected in the pixel detection box, and whether the target is detected , when no target is detected , is the probability that the detection box belongs to category i.
5. The voltage transformer target detection method based on dynamic confrontation supervision strategy according to claim 2 is characterized in that: The expression of the regression supervision sub-loss function is: , , In the formula, is the regression loss function, is the regression loss weight, For Take out The value of For Take out The value of For Perform non-maximum suppression. For Perform non-maximum suppression. is the regression output of the ith pixel in the supervised network regression output, is the classification output of the i-th pixel of the supervision model.
6. A voltage transformer target detection system based on a dynamic confrontation supervision strategy according to the method described in claims 1-5, characterized in that: include: An acquisition module is configured to acquire a basic data set, and iteratively train a preset supervision network according to the basic data set to obtain a supervision model, wherein a certain data in the basic data set is a certain image data containing voltage transformer annotation information; An updating module is configured to divide the basic data set into dynamic data sets using a preset division rule, and update the dynamic data set according to a preset anti-disturbance strategy to obtain a target dynamic data set; A training module is configured to iteratively train a preset supervised network according to the target dynamic data set, and in each iterative training process, update the model parameters of the supervised network according to a preset adversarial supervised learning strategy to obtain a final target detection model; The output module is configured to input the real-time image data containing the voltage transformer into the target detection model, and the target detection model outputs the detection result corresponding to the real-time image data.
7. An electronic device, characterized in that: include: At least one processor, and a memory communicatively connected to the at least one processor, wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method described in any one of claims 1 to 5.
8. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the method according to any one of claims 1 to 5 is implemented.
Citation Information
Patent Citations
Adversarial sample defense training method and device, classification prediction method and device and electronic equipment
CN114758113A
Small sample target detection method based on self-supervised contrast constraint
CN114841257A
