Intelligent detection method of power equipment based on Efficientdet
The power equipment detection method optimized by Efficientdet-D6 model and CSP structure solves the problems of poor anchor box adaptability and high model complexity, and achieves efficient and accurate power equipment detection.
Patent Information
- Application Number
- CN202210586610.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-05-26
- Publication Date
- 2024-11-26
- Estimated Expiration
- 2042-05-26
AI Technical Summary
In existing power equipment detection methods, the large difference between the anchor box size and the target size leads to poor detection results. The model training system is large and has many parameters, resulting in low detection accuracy and slow speed, making it difficult to adapt to the detection needs of various power equipment.
The Efficientdet-D6 model is adopted, and k-means clustering is used to generate anchor boxes that conform to the dataset. It is combined with depthwise separable convolution and depthwise convolution of CSP structure for end-to-end network training to optimize the number of model parameters and detection speed. Efficientnet-B6 is used to extract features for the location and category detection of power equipment.
It improves the accuracy and recall rate of power equipment testing, is applicable to a variety of power equipment, and has an average accuracy and recall rate of over 92%, with some equipment reaching 100%.
Smart Images

Figure CN114898102B_ABST
Abstract
Description
Technical Field
[0001] The invention relates to position detection of electric equipment, in particular to an intelligent detection method of electric equipment based on Efficientdet. Background Art
[0002] At present, the method of power equipment detection is mainly based on infrared images, and visual observation is used to manually identify the type of equipment photographed. However, there are many types of power equipment, and there are similarities between various equipment. In addition, infrared images contain multiple pseudo-colors, which increases the difficulty of manual identification. The method of using model network to detect data generally obtains data first, pre-processes the data, and then trains the model. During the detection, the data to be detected is imported into the trained model for detection. During the model training process, the anchor box is generally preset in advance. This operation cannot guarantee that the anchor will be well suitable for the data set of the engineering project. If the size of the anchor is different from the size of the target, it will affect the detection effect of the model and reduce the detection accuracy. Moreover, for a large number of different types of detection data, in order to be suitable for the detection of a large amount of data, the trained model system is large, with more parameters, the inference speed of the model is slow, and it is prone to errors, and the detection accuracy cannot be well guaranteed. Summary of the invention
[0003] The purpose of the present invention is to provide an intelligent detection method for power equipment based on Efficientdet, which has the characteristics of improving detection accuracy and accelerating detection speed.
[0004] The technical solution of the present invention: based on the Efficientdet power equipment intelligent detection method, comprises the following steps:
[0005] S1. Use an infrared thermal imager to collect information about power equipment, obtain an infrared thermal image, and extract temperature data from it to obtain a two-dimensional temperature matrix;
[0006] S2, marking and preprocessing the two-dimensional temperature matrix, and then randomly dividing it into a training set, a validation set, and a test set;
[0007] S3, Efficientdet-D6 model training: Import the training set for model training, use Efficientnet-B6 as the basic network, use the width and height of the 9 anchor boxes obtained by k-means clustering to replace the preset anchor box width and height to form a priori boxes, generate positive and negative samples to extract features, use the Efficientdet-D6 target detection algorithm to fuse the features extracted by the basic network to obtain 5 detection layers, add the CSP structure to each detection layer at the end, use Adam as the optimizer for end-to-end network training, realize the location and category detection of the detection target, and obtain the target detection model of power equipment;
[0008] S4. Convert the raw temperature data of the unknown power equipment into a two-dimensional temperature matrix, then perform data preprocessing and input it into the target detection model. Use Efficientnet-B6 to extract features and use Efficientdet-D6 to fuse features. After classification and bounding box regression, obtain the location and category information of all power equipment in the infrared thermal image. Then, select the power equipment located at the center of the infrared thermal image to obtain the location and category information of the power equipment.
[0009] In the aforementioned intelligent detection method for electric power equipment based on Efficientdet, the data marking in step S2 is to mark the data of the two-dimensional temperature matrix with the equipment type and position, wherein the position is marked with a detection frame.
[0010] In the aforementioned intelligent detection method for electric power equipment based on Efficientdet, the data preprocessing in steps S2 and S4 is as follows:
[0011] a. Splice the two-dimensional temperature matrix into a three-dimensional temperature matrix in the depth direction;
[0012] b. Normalize the three-dimensional temperature matrix and map it to between 0 and 255, then fill it up and down to convert it into a three-dimensional array.
[0013] In the aforementioned intelligent detection method for electric power equipment based on Efficientdet, in step S3, the k-means clustering method is:
[0014] a. Read all training sets and define them as boxes;
[0015] b. Randomly select 9 boxes as the initial anchor boxes, take the upper left corner of the box as the coordinate origin, calculate the IOU between the box and the 9 initialized anchors respectively, and mark the box as the anchor class with the largest IOU. In this way, traverse and calculate the IOU between all boxes and each anchor;
[0016] c. Calculate the average width and height of all boxes in an anchor class, and update the width and height of the anchor until all 9 anchor boxes are updated;
[0017] d. Repeat steps b and c until the anchor class of all boxes does not change, and get the width and height of 9 anchor boxes to form a priori boxes.
[0018] In the aforementioned intelligent detection method for electric power equipment based on Efficientdet, the value of each element in the two-dimensional temperature matrix of step S1 represents the actual temperature value of the corresponding pixel point in the infrared thermal image.
[0019] In the aforementioned intelligent detection method for power equipment based on Efficientdet, the network training in step S3 is: using the transfer learning method, a total of 500 iterations are set, and in the first 200 iterations, only the weight value of the feature fusion part is trained, and the learning rate is set to a dynamic learning rate that changes with the number of iterations. The initial value is set to 1e-4, and the batch_size is set to 16. After 200 iterations, the learning rate is set to 1e-5, and the batch_size is set to 4. The dynamic learning rate is also used to train the weight value of the entire network, and an early stopping strategy is introduced. When the loss of the verification set does not decrease for 10 consecutive iterations, the training is stopped to prevent overfitting of the model. Each iteration is train_num / batch_size steps, where train_num is the number of training data.
[0020] In the aforementioned intelligent detection method for power equipment based on Efficientdet, the CSP structure is a structure combining depthwise separable convolution and depthwise convolution.
[0021] In the aforementioned intelligent detection method for electric power equipment based on Efficientdet, in step S4, the location screening method of the electric power equipment located at the center of the infrared thermal image is:
[0022] a. According to the positions of all the power equipment in the infrared thermal image, calculate the Euclidean distance Dis between the detection frame of each power equipment and the center point of the infrared thermal image: Among them, (left, top) is the coordinate of the upper left corner of the detection box of the power equipment, (right, bottom) is the coordinate of the lower right corner of the detection box of the power equipment, and widthh and height are the width and height of the infrared thermal image.
[0023] b. Keep the detection frame with the smallest Dis, which is the location of the power equipment at the center of the infrared thermal image.
[0024] In the aforementioned intelligent detection method for electric power equipment based on Efficientdet, the electric power equipment includes substation electric power equipment, transmission equipment and distribution equipment.
[0025] In the aforementioned intelligent detection method for power equipment based on Efficientdet, the substation power equipment includes lightning arresters, circuit breakers, current transformers, bushings, voltage transformers, disconnectors, insulators, wire clamps, transformers, reactors, wall bushings, power cables, oil pillows, heat sinks, discharge gaps, soft connections, wave arresters, end screens, high-voltage fuses, GIS tanks, incoming line bins, drop-out fuses and discharge coils; the transmission equipment includes connecting pipes, tension clamps, insulators, grounding clamps, pipe mothers, crimping pipes, parallel groove clamps, power cables, lightning arresters, hardware and cable terminals; the distribution equipment includes tension clamps, drop-out fuses, bushings, transformers, lightning arresters, pile heads, power cables, circuit breakers, disconnectors, wire clamps, switch boxes, electric meters and cable terminals.
[0026] Compared with the prior art, the present invention has the following beneficial effects:
[0027] According to the training set, the present invention uses k-means clustering to generate anchors that conform to the current data set during the model training process, which can improve the detection effect and accuracy to a certain extent; and adds a CSP structure in feature fusion, and replaces the standard convolution in the original Efficientdet-D6 target detection algorithm with deep separable convolution and deep convolution, which can reduce the number of model parameters and speed up the reasoning speed while ensuring the performance of the model. Moreover, this method is suitable for the detection of various types of power equipment, and the average detection accuracy and recall rate of power equipment can reach more than 92%, and the average detection accuracy and detection recall rate of some power equipment can even reach 100%. BRIEF DESCRIPTION OF THE DRAWINGS
[0028] Figure 1 It is a detection flow chart of unknown power equipment;
[0029] Figure 2 It is a structural diagram of the CSP structure. DETAILED DESCRIPTION
[0030] The present invention will be further described below in conjunction with the embodiments, but they are not intended to limit the present invention.
[0031] Example:
[0032] Based on the Efficientdet power equipment intelligent detection method, the following steps are included:
[0033] S1. Use an infrared thermal imager to collect information about power equipment, obtain an infrared general data file storage format image, i.e., an infrared thermal image, and extract temperature data from it to obtain a 640x480 two-dimensional temperature matrix; the value of each element in the two-dimensional temperature matrix represents the actual temperature value of the corresponding pixel point in the infrared thermal image.
[0034] S201, data tag:
[0035] The 640x480 two-dimensional temperature matrix is marked with device types and locations, where the locations are marked with detection boxes.
[0036] S202, data preprocessing:
[0037] a. Splice the marked 640x480 two-dimensional temperature matrix into a three-dimensional temperature matrix in the depth direction;
[0038] b. Normalize the three-dimensional temperature matrix and map it to 0-255. Fill 80 rows of 0 at the top and bottom of the three-dimensional temperature matrix and convert it into a 640x640 three-dimensional array.
[0039] S203, randomly divide the three-dimensional array into a training set, a validation set, and a test set in a ratio of 7:1:2.
[0040] S3, Efficientdet-D6 model training: import the training set for model training, use Efficientnet-B6 as the basic network, use the width and height of the 9 anchor boxes obtained by k-means clustering to replace the preset anchor box width and height to form a priori boxes, generate positive and negative samples to extract features, and use the Efficientdet-D6 target detection algorithm to fuse the features extracted by the basic network to obtain 5 detection layers. Finally, add the CSP structure to each detection layer. The CSP structure is as follows Figure 2 As shown in the figure, the original standard convolution is replaced by the depthwise separable convolution and the depthwise convolution to reduce the number of model parameters. Adam is used as the optimizer for end-to-end network training to achieve the position and category detection of the detection target and obtain the target detection model of the power equipment.
[0041] Among them, the k-means clustering method is:
[0042] a. Read all training sets containing training device types and location information and define them as boxes;
[0043] b. Randomly select 9 boxes as the initial anchor boxes, take the upper left corner of the box as the coordinate origin, calculate the IOU between the box and the 9 initialized anchors respectively, and mark the box as the anchor class with the largest IOU. In this way, traverse and calculate the IOU between all boxes and each anchor;
[0044] c. Calculate the average width and height of all boxes in an anchor class, and update the width and height of the anchor until all 9 anchor boxes are updated;
[0045] d. Repeat steps b and c until the anchor classes of all boxes do not change, and get the widths and heights of 9 anchor boxes.
[0046] The network training is as follows: the transfer learning method is used, with a total of 500 iterations. In the first 200 iterations, only the weight value of the feature fusion part is trained. The learning rate is set to a dynamic learning rate that changes with the number of iterations. The initial value is set to 1e-4, and the batch_size is set to 16. After 200 iterations, the learning rate is reduced to 1e-5, and the batch_size is set to 4. The dynamic learning rate is also used to train the weight value of the entire network, and an early stopping strategy is introduced. When the loss of the validation set does not decrease for 10 consecutive iterations, the training is stopped to prevent overfitting of the model. Each iteration is train_num / batch_size steps, where train_num is the number of training data.
[0047] S4, such as Figure 1 As shown in the figure, the raw temperature data of the unknown power equipment is converted into a two-dimensional temperature matrix, and then the data is preprocessed and input into the target detection model. Efficientnet-B6 is used to extract features, and Efficientdet-D6 is used to fuse features and add the CSP structure. After classification and bounding box regression, the location, category and confidence information of all power equipment in the infrared thermal image are obtained. Then, the location and category information of the power equipment located in the center of the infrared thermal image is screened out to determine whether the equipment fails due to excessive temperature.
[0048] Among them, the screening method is:
[0049] a. According to the positions of all power equipment in the infrared thermal image, that is, the detection frame coordinates, calculate the Euclidean distance Dis between the detection frame of each power equipment and the center point of the infrared thermal image: Among them, (left, top) is the coordinate of the upper left corner of the detection box of the power equipment, (right, bottom) is the coordinate of the lower right corner of the detection box of the power equipment, and widthh and height are the width and height of the infrared thermal image.
[0050] b. Keep the detection frame with the smallest Dis and its corresponding equipment type, that is, the location and category of the power equipment at the center of the infrared thermal image.
[0051] The type, location and confidence information are saved in the form of a list as the final detection result, so as to determine whether the power equipment fails due to excessive temperature.
[0052] The power equipment includes substation power equipment, power transmission equipment and power distribution equipment.
[0053] The substation power equipment includes lightning arresters, circuit breakers, current transformers, bushings, voltage transformers, disconnectors, insulators, wire clamps, transformers, reactors, wall bushings, power cables, oil pillows, heat sinks, discharge gaps, flexible connections, wave arresters, end screens, high-voltage fuses, GIS tanks, incoming line bins, drop-out fuses, and discharge coils; the transmission equipment includes connecting pipes, tension clamps, insulators, grounding clamps, pipe mothers, crimping pipes, parallel groove clamps, power cables, lightning arresters, hardware, and cable terminals; the distribution equipment includes tension clamps, drop-out fuses, bushings, transformers, lightning arresters, pile heads, power cables, circuit breakers, disconnectors, wire clamps, switch boxes, electric meters, and cable terminals. Among them, 2,000 temperature data are selected for the substation power equipment to form a training set.
[0054] Under the same experimental environment and network structure, 400 test data are selected for each power device. The detection results of the precision and recall rate of each power device under IOU=0.5 are shown in Table 1-3:
[0055] Table 1 Substation equipment test results
[0056] Substation equipment AP(%) Recall(%) Substation equipment AP(%) Recall(%) lightning arrester 92.8 93.27 Discharge gap 96.15 91.62 breaker 94.72 94.01 GIS tank 97.22 98.59 Current transformer 97.72 95.54 Incoming warehouse 93.02 100.00 casing 95.51 96.58 Drop-out fuse 98.45 97.44 Voltage transformer 94.76 95.1 Discharge coil 91.67 93.29 Soft connection 100.00 100.00 Last screen 99.71 98.59 Disconnector 94.48 98.85 High voltage fuse 99.74 98.71 insulator 96.28 97.24 Heat sink 98.76 97.30 Cable clip 97.83 96.99 Wall Bushing 96.01 94.46 transformer 92.21 95.74 Power Cable 94.83 91.75 Wave Traps 99.69 99.09 Oil pillow 98.31 98.79 Reactor 98.24 97.26
[0057] Table 2 Transmission equipment test results
[0058] Power transmission equipment AP(%) Recall(%) Connecting pipe 99.77 99.77 Strain Clamp 99.49 99.75 insulator 98.75 99.75 Grounding clamp 98.02 99.5 Mother 100.00 100.00 Compression tube 98.22 98.81 Parallel groove clamp 99.75 97.05 Power Cable 97.12 97.12 lightning arrester 96.18 96.64 Cable terminal 99.77 99.32 Goldware 99.12 99.12
[0059] Table 3 Distribution network equipment test results
[0060]
[0061]
[0062] It can be seen that the detection method of the present invention is applicable to a variety of different types of power equipment, and the measurement results are highly accurate and have a high recall rate.
Claims
1. Based on the Efficientdet intelligent detection method for power equipment, the following features are featured: The following steps are involved: S1. Use an infrared thermal imager to collect information about the power equipment, obtain an infrared thermal image, and extract temperature data from it to obtain a two-dimensional temperature matrix; S2. Data labeling and data preprocessing are performed on the two-dimensional temperature matrix, and then the matrix is divided into a training set, a validation set, and a test set. S3. Efficientdet-D6 model training: Import the training set for model training, use Efficientnet-B6 as the base network, use the width and height of the nine anchor boxes obtained by k-means clustering to replace the preset anchor box width and height to form a priori boxes, generate positive and negative samples to extract features, use the Efficientdet-D6 target detection algorithm to fuse the extracted features to obtain five detection layers, finally add the CSP structure to each detection layer, and use Adam as the optimizer for end-to-end network training to achieve target location and category detection, and obtain the target detection model for power equipment; S4. Convert the raw temperature data of unknown electrical equipment into a two-dimensional temperature matrix, then perform data preprocessing and input it into the target detection model. Use Efficientnet-B6 to extract features and Efficientdet-D6 to fuse features. After classification and bounding box regression, obtain the location and category information of all electrical equipment in the infrared thermal image. Then, filter out the electrical equipment located at the center of the infrared thermal image to obtain the location and category information of the electrical equipment.
2. The intelligent detection method for power equipment based on Efficientdet according to claim 1, characterized in that: The data marking in step S2 is to mark the data of the two-dimensional temperature matrix with the device type and position, wherein the position is marked with a detection frame.
3. The intelligent detection method for power equipment based on Efficientdet according to claim 1, characterized in that: The data preprocessing in steps S2 and S4 is as follows: a. Splice the two-dimensional temperature matrix into a three-dimensional temperature matrix in the depth direction; b. Normalize the three-dimensional temperature matrix and map it to 0-255, then fill it up and down to convert it into a three-dimensional array.
4. The intelligent detection method for power equipment based on Efficientdet according to claim 1, characterized in that: In step S3, the k-means clustering method is: a. Read all training sets and define them as boxes; b. Randomly select 9 boxes as the initial anchor box, take the upper left corner of the box as the coordinate origin, calculate the IOU between the box and the 9 initialized anchors respectively, and mark the box as the anchor class with the largest IOU. In this way, traverse and calculate the IOU of all boxes and each anchor; c. Calculate the average width and height of all boxes in an anchor class, and update the width and height of the anchor until all 9 anchor boxes are updated; d. Repeat steps b and c until the anchor class of all boxes does not change, and obtain the width and height of 9 anchor boxes to form a priori boxes.
5. The intelligent detection method for power equipment based on Efficientdet according to claim 1, characterized in that: The value of each element in the two-dimensional temperature matrix of step S1 represents the actual temperature value of the corresponding pixel in the infrared thermal image.
6. The intelligent detection method for power equipment based on Efficientdet according to claim 1, characterized in that: The network training in step S3 is as follows: a transfer learning method is adopted, a total of 500 iterations are set, and in the first 200 iterations, only the weight value of the feature fusion part is trained, and the learning rate is set to a dynamic learning rate that changes with the number of iterations. The initial value is set to 1e-4, and the batch_size is set to 16. After 200 iterations, the learning rate is reduced to 1e-5, and the batch_size is set to 4. The dynamic learning rate is also adopted to train the weight value of the entire network, and an early stopping strategy is introduced. When the loss of the validation set does not decrease for 10 consecutive iterations, the training is stopped to prevent overfitting of the model. Each iteration is train_num / batch_size steps, where train_num is the number of training data.
7. The intelligent detection method for power equipment based on Efficientdet according to claim 1, characterized in that: The CSP structure is a structure that combines depthwise separable convolution and depthwise convolution.
8. The intelligent detection method for power equipment based on Efficientdet according to claim 1, characterized in that: In step S4, the method for screening the location of the power equipment located at the center of the infrared thermal image is as follows: a. According to the positions of all electrical equipment in the infrared thermal image, calculate the Euclidean distance Dis between the detection frame of each electrical equipment and the center point of the infrared thermal image: Where (left, top) is the coordinate of the upper left corner of the detection box of the power equipment, (right, bottom) is the coordinate of the lower right corner of the detection box of the power equipment, widthh and height are the width and height of the infrared thermal image; b. Keep the detection frame with the smallest Dis, which is the location of the power equipment at the center of the infrared thermal image.
9. The intelligent detection method for power equipment based on Efficientdet according to claim 1, characterized in that: The power equipment includes substation power equipment, power transmission equipment and power distribution equipment.
10. The intelligent detection method for power equipment based on Efficientdet according to claim 9, characterized in that: The substation power equipment includes lightning arresters, circuit breakers, current transformers, bushings, voltage transformers, disconnectors, insulators, wire clamps, transformers, reactors, wall bushings, power cables, oil pillows, heat sinks, discharge gaps, flexible connectors, wave arresters, end screens, high-voltage fuses, GIS tanks, incoming line compartments, drop-out fuses and discharge coils; the transmission equipment includes connecting pipes, strain clamps, insulators, grounding clamps, pipe mothers, crimping pipes, parallel groove clamps, power cables, lightning arresters, hardware and cable terminals; the distribution equipment includes strain clamps, drop-out fuses, bushings, transformers, lightning arresters, pile heads, power cables, circuit breakers, disconnectors, wire clamps, switch boxes, electric meters and cable terminals.
