A method, apparatus, and medium for detecting abnormal changes on the surface of power equipment.
By constructing a change detection network model based on a self-attention mechanism, the problems of time-consuming and labor-intensive manual inspections of substations and low accuracy of traditional methods are solved, achieving efficient detection of abnormal changes on the surface of power equipment and ensuring the safe and stable operation of the equipment.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- NARI INFORMATION & COMM TECH
- Filing Date
- 2022-12-29
- Publication Date
- 2026-06-30
AI Technical Summary
Manual inspection of substations is time-consuming, labor-intensive, costly, and highly subjective. Traditional image processing methods have low detection accuracy and poor robustness in the field of power grid equipment.
A change detection network model based on a self-attention mechanism is adopted. By acquiring image data of power equipment for training and annotation, a lightweight feature extraction module, a self-attention fusion module, and a detection head module are constructed to achieve accurate detection of abnormal changes on the surface of power equipment.
It improves the detection accuracy of abnormal changes on the surface of power equipment, enabling timely detection of suspected faults and ensuring the safe and stable operation of equipment.
Smart Images

Figure CN116245807B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to a method, apparatus, and medium for detecting abnormal changes on the surface of power equipment, belonging to the field of power equipment technology. Background Technology
[0002] Substation inspection is a crucial part of ensuring the safe and stable operation of the power grid. Substations contain a wide variety of electrical equipment, such as disconnect switches, transformers, insulators, and various instruments. Traditional manual inspections are time-consuming and labor-intensive, resulting in high costs. Furthermore, manual inspections are often based on subjective judgment; different inspectors may make different assessments of the same equipment's condition, leading to misjudgments. Therefore, there is an urgent need to leverage advanced information technologies such as artificial intelligence to enhance substation inspection operations, thereby improving both efficiency and quality.
[0003] In existing technologies, image change detection methods are typically applied to the processing of remote sensing images for monitoring forest cover, urban building changes, etc. However, in the field of power grid equipment, there is relatively little research on the application of change detection technology for the inspection of key power grid equipment. Traditional image change detection generally adopts image processing-based techniques, mainly including difference image methods, image transformation methods, ratio image methods, principal component analysis methods, etc. Although these methods can find change areas to a certain extent, the detection accuracy will be greatly reduced as the lighting and background of the captured image change. Summary of the Invention
[0004] The purpose of this invention is to overcome the shortcomings of the prior art and provide a method, device and medium for detecting abnormal changes on the surface of power equipment, thereby solving the technical problems of manual inspection of substations being time-consuming, labor-intensive, costly and subjective, as well as the poor robustness and low accuracy of traditional image processing-based methods for detecting abnormal changes in equipment status.
[0005] To achieve the above objectives, the present invention is implemented using the following technical solution:
[0006] In a first aspect, the present invention provides a method for detecting abnormal changes on the surface of power equipment, comprising:
[0007] Acquire the surface image of the power equipment at any given moment as the image to be detected;
[0008] Acquire a baseline image of the power equipment;
[0009] Input the image to be detected and the reference image into the trained change detection network model to obtain the change detection results;
[0010] The training of the change detection network model includes:
[0011] Surface images of electrical equipment at different times are acquired as training images;
[0012] Based on the benchmark image, the abnormal changes in each training image are labeled to generate a labeled image set;
[0013] Construct a change detection network model based on a self-attention mechanism;
[0014] A change detection network model was trained using a set of labeled images.
[0015] Optionally, the annotation of anomalous changes in each training image includes:
[0016] Based on the baseline image, the Labelme image annotation tool is used to annotate the abnormal change regions in each training image, and an annotation file mask is generated.
[0017] Store the baseline images in the normal folder, the images to be trained in the change folder, and the label files (mask) in the label folder.
[0018] Optionally, the change detection network model includes a lightweight feature extraction module, a self-attention fusion module, and a detection head module.
[0019] Optionally, the lightweight feature extraction module uses a MobileNetV2 network, which includes 17 bottleneck layers. Features are extracted from the images input from the normal folder and the change folder through the bottleneck layers. The features output from the 3rd, 10th, and 16th bottleneck layers are differentially analyzed. The results of the differential analysis are concatenated and then added to the output of the 17th bottleneck layer to obtain the final feature map.
[0020] Optionally, the self-attention fusion module is used to receive the feature map output by the lightweight feature extraction module, further extract and fuse features using a residual self-attention network to generate an enhanced feature representation, and concat the enhanced feature representations to obtain the enhanced fused features.
[0021] Optionally, the detection head module includes an MLP layer, an Upsampling layer, and a Linear layer. The detection head module is used to receive the enhanced fusion features output by the self-attention fusion module and output the pixel classification results of the image.
[0022] Optionally, training the change detection network model using a labeled image set includes:
[0023] The labeled image set is divided into a training set, a validation set, and a test set;
[0024] The training set is input into the change detection network model, and the change detection network model is trained using cross-entropy as the loss evaluation function.
[0025] The parameters of the change detection network model are selected using the validation set, and the performance of the change detection network model with different parameters is tested using the test set to obtain the trained change detection network model.
[0026] Secondly, the present invention provides a detection device for abnormal changes on the surface of power equipment, the device comprising:
[0027] The first image acquisition module is used to acquire the surface image of the power equipment at any given time as the image to be detected.
[0028] The second image acquisition module is used to acquire a reference image of the power equipment;
[0029] The modeling module is used to input the image to be detected and the reference image into the trained change detection network model to obtain the change detection results;
[0030] The training of the change detection network model includes:
[0031] The third image acquisition module is used to acquire surface images of power equipment at different times as training images;
[0032] The image labeling module is used to annotate the abnormal changes in each training image based on the benchmark image, and generate a labeled image set;
[0033] The model building module is used to build a change detection network model based on the self-attention mechanism.
[0034] The model training module is used to train a change detection network model using a set of labeled images.
[0035] Thirdly, the present invention provides a detection device for abnormal changes on the surface of power equipment, including a processor and a storage medium;
[0036] The storage medium is used to store instructions;
[0037] The processor is used to perform the steps of the above method according to the instructions.
[0038] Fourthly, the present invention provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the above-described method.
[0039] Compared with the prior art, the beneficial effects achieved by the present invention are as follows:
[0040] This invention provides a method, apparatus, and medium for detecting abnormal changes on the surface of power equipment. The method involves acquiring images of the power equipment at different times from a fixed angle, labeling abnormal changes on the surface, and constructing a labeled image set. A change detection network model based on a self-attention mechanism is designed. The change detection network model is trained using the power equipment surface anomaly change dataset to obtain a feature map. Finally, each pixel in the feature map is classified to obtain the abnormal change region on the power equipment surface. This invention can effectively improve the detection accuracy of abnormal changes on the surface of power equipment, promptly detect suspected faults in power equipment, and ensure the safe and stable operation of power equipment. Attached Figure Description
[0041] Figure 1 This is a flowchart of a method for detecting abnormal changes on the surface of power equipment, provided in Embodiment 1 of the present invention;
[0042] Figure 2 This is a structural diagram of the change detection network model provided in Embodiment 1 of the present invention. Detailed Implementation
[0043] The present invention will be further described below with reference to the accompanying drawings. The following embodiments are only used to more clearly illustrate the technical solution of the present invention, and should not be used to limit the scope of protection of the present invention.
[0044] Example 1:
[0045] like Figure 1 As shown, the present invention provides a method for detecting abnormal changes on the surface of power equipment, comprising:
[0046] Reasoning stage:
[0047] 1. Acquire a surface image of the power equipment at any given time as the image to be detected; (all images are acquired at a fixed angle).
[0048] 2. Obtain a reference image of the power equipment;
[0049] 3. Input the image to be detected and the reference image into the trained change detection network model to obtain the change detection results;
[0050] Training phase:
[0051] The training of the change detection network model includes:
[0052] S1. Obtain surface images of power equipment at different times as training images;
[0053] S2. Based on the benchmark image, label the abnormal changes in each training image to generate a labeled image set;
[0054] S3. Construct a change detection network model based on a self-attention mechanism;
[0055] S4. Train a change detection network model using labeled image sets.
[0056] Specifically:
[0057] (1) Labeling abnormal changes in each training image, the labeling process is as follows:
[0058] (1.1) Based on the benchmark image, use the image annotation tool Labelme to annotate the abnormal change regions of each training image and generate an annotation file mask;
[0059] (1.2) Store the reference image in the normal folder, the training image in the change folder, and the label file mask in the label folder.
[0060] (2) Figure 2 As shown, the change detection network model includes a lightweight feature extraction module, a self-attention fusion module, and a detection head module.
[0061] (2.1) The lightweight feature extraction module adopts the MobileNetV2 network, which includes 17 bottleneck layers. The bottleneck layers are used to extract features from the images input from the normal folder and the change folder respectively. The features output from the 3rd, 10th and 16th bottleneck layers are subjected to difference operations. The difference operation results are concatted and then added to the output of the 17th bottleneck layer to obtain the final feature map.
[0062] (2.2) The self-attention fusion module receives the feature map output by the lightweight feature extraction module, uses the residual self-attention network to further extract and fuse features, generates enhanced feature representations, and concats the enhanced feature representations to obtain enhanced fused features.
[0063] The expression for the enhanced feature representation is:
[0064] Z = F(X) + X
[0065] In the formula, Z represents the enhanced feature representation, F(·) represents the self-attention mechanism, and X represents the feature map;
[0066] The self-attention mechanism is specifically as follows:
[0067]
[0068] In the formula, Q, K, and V are the query vector matrix, key vector matrix, and value vector matrix, respectively. For QKT The standard deviation of the matrix elements.
[0069] (2.3) The detection head module includes an MLP layer, an Upsampling layer and a Linear layer. The detection head module is used to receive the enhanced fusion features output by the self-attention fusion module and output the pixel classification results of the image.
[0070] (3) Training a change detection network model using labeled image sets includes:
[0071] (3.1) Divide the labeled image set into a training set, a validation set, and a test set;
[0072]
[0073] (3.2) Input the training set into the change detection network model and use cross-entropy as the loss evaluation function to train the change detection network model;
[0074]
[0075] In the formula, loss is the cross-entropy loss, N is the number of samples in the training set, and y i p represents the annotation result for the i-th sample. i Let be the probability that the prediction for the i-th sample is positive;
[0076] (3.3) Use the validation set to select the parameters of the change detection network model, and use the test set to test the performance of the change detection network model with different parameters, so as to obtain the trained change detection network model.
[0077] This invention embodiment conducts experiments on a dataset of real power equipment images from substations. This dataset contains 326 pairs of images showing surface changes on power equipment, with a resolution of 1024*1024. 80% of the dataset is used as the training set and 20% as the test set. An NVIDIA GV100 is used to train and test a change detection network model based on a self-attention mechanism. The experimental results are shown in the table below:
[0078] Accuracy (%) Recall rate (%) F1-Score (%) 88.35 85.43 86.35
[0079] The experimental results show that the change detection method provided by this invention can accurately identify abnormal change areas on the surface of power equipment, thereby enabling rapid location of power equipment faults, which has important practical significance in the field of power equipment inspection.
[0080] Example 2:
[0081] This invention provides a detection device for abnormal changes on the surface of power equipment. The device includes:
[0082] The first image acquisition module is used to acquire the surface image of the power equipment at any given time as the image to be detected.
[0083] The second image acquisition module is used to acquire a reference image of the power equipment;
[0084] The modeling module is used to input the image to be detected and the reference image into the trained change detection network model to obtain the change detection results;
[0085] The training of the change detection network model includes:
[0086] The third image acquisition module is used to acquire surface images of power equipment at different times as training images;
[0087] The image labeling module is used to annotate the abnormal changes in each training image based on the benchmark image, and generate a labeled image set;
[0088] The model building module is used to build a change detection network model based on the self-attention mechanism.
[0089] The model training module is used to train a change detection network model using a set of labeled images.
[0090] Example 3:
[0091] Based on Embodiment 1, the present invention provides a detection device for abnormal changes on the surface of power equipment, including a processor and a storage medium;
[0092] Storage media are used to store instructions;
[0093] The processor is used to perform the steps of the above method according to instructions.
[0094] Example 4:
[0095] Based on Example 1,
[0096] The present invention provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the above-described method.
[0097] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0098] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0099] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0100] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0101] The above description is only a preferred embodiment of the present invention. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the technical principles of the present invention, and these improvements and modifications should also be considered within the scope of protection of the present invention.
Claims
1. A method of detecting abnormal change in a surface of a power device, characterized by, include: Acquire the surface image of the power equipment at any given moment as the image to be detected; Acquire a baseline image of the power equipment; Input the image to be detected and the reference image into the trained change detection network model to obtain the change detection results; The training of the change detection network model includes: Surface images of electrical equipment at different times are acquired as training images; Based on the benchmark image, the abnormal changes in each training image are labeled to generate a labeled image set; Construct a change detection network model based on a self-attention mechanism; A change detection network model was trained using a labeled image set; The change detection network model includes a lightweight feature extraction module, a self-attention fusion module, and a detection head module. The lightweight feature extraction module uses the MobileNetV2 network, which includes 17 bottleneck layers. Features are extracted from the reference image and the image to be trained through the bottleneck layers. The features output from the 3rd, 10th, and 16th bottleneck layers are differentially analyzed. The results of the differential analysis are concatenated and then added to the output of the 17th bottleneck layer to obtain the final feature map. The self-attention fusion module is used to receive the feature map output by the lightweight feature extraction module, use the residual self-attention network to further extract and fuse features, generate enhanced feature representations, and concat the enhanced feature representations to obtain enhanced fused features. The detection head module includes an MLP layer, an Upsampling layer, and a Linear layer. The detection head module is used to receive the enhanced fusion features output by the self-attention fusion module and output the pixel classification results of the image.
2. The method for detecting abnormal changes on the surface of power equipment according to claim 1, characterized in that, The annotation of abnormal changes in each training image includes: Based on the baseline image, the Labelme image annotation tool is used to annotate the abnormal change regions in each training image, and an annotation file mask is generated. Store the baseline images in the normal folder, the images to be trained in the change folder, and the label files (mask) in the label folder.
3. The method for detecting abnormal changes on the surface of power equipment according to claim 1, characterized in that, The change detection network model trained using an labeled image set includes: The labeled image set is divided into a training set, a validation set, and a test set; The training set is input into the change detection network model, and the change detection network model is trained using cross-entropy as the loss evaluation function. The parameters of the change detection network model are selected using the validation set, and the performance of the change detection network model with different parameters is tested using the test set to obtain the trained change detection network model.
4. A detection device for abnormal changes on the surface of power equipment, characterized in that, The device includes: The first image acquisition module is used to acquire the surface image of the power equipment at any given time as the image to be detected. The second image acquisition module is used to acquire a reference image of the power equipment; The modeling module is used to input the image to be detected and the reference image into the trained change detection network model to obtain the change detection results. The training of the change detection network model includes: The third image acquisition module is used to acquire surface images of power equipment at different times as training images; The image labeling module is used to annotate the abnormal changes in each training image based on the benchmark image, and generate a labeled image set; The model building module is used to build a change detection network model based on the self-attention mechanism. The model training module is used to train a change detection network model using a labeled image set; The change detection network model includes a lightweight feature extraction module, a self-attention fusion module, and a detection head module. The lightweight feature extraction module uses the MobileNetV2 network, which includes 17 bottleneck layers. Features are extracted from the reference image and the image to be trained through the bottleneck layers. The features output from the 3rd, 10th, and 16th bottleneck layers are differentially analyzed. The results of the differential analysis are concatenated and then added to the output of the 17th bottleneck layer to obtain the final feature map. The self-attention fusion module is used to receive the feature map output by the lightweight feature extraction module, use the residual self-attention network to further extract and fuse features, generate enhanced feature representations, and concat the enhanced feature representations to obtain enhanced fused features. The detection head module includes an MLP layer, an Upsampling layer, and a Linear layer. The detection head module is used to receive the enhanced fusion features output by the self-attention fusion module and output the pixel classification results of the image.
5. A detection device for abnormal changes on the surface of power equipment, characterized in that, Including processor and storage media; The storage medium is used to store instructions; The processor is configured to operate according to the instructions to perform the steps of the method according to any one of claims 1-3.
6. A computer-readable storage medium having a computer program stored thereon, characterized in that, When executed by a processor, the program implements the steps of the method according to any one of claims 1-3.