A method for detecting components of power equipment based on infrared images

The infrared detection model of power equipment through GhostNet, SPP, PAN and YOLO_Head modules solves the problem of low efficiency in infrared image detection of power equipment, achieves fast and accurate identification of power equipment components and temperature acquisition, and improves detection efficiency and accuracy.

CN117197097BInactive Publication Date: 2024-09-17SOUTHWEAT UNIV OF SCI & TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311183447.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-09-13
Publication Date
2024-09-17
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

In the existing technology, the detection efficiency of infrared images of power equipment is low, and there are problems such as poor resolution, low contrast, many noise points, random shooting angles, target occlusion, and sample imbalance, resulting in low efficiency of power equipment status detection.

Method used

An infrared detection model for power equipment based on GhostNet, SPP, PAN and YOLO_Head modules is used to construct an infrared detection model through training set screening and annotation. GhostNet is used to generate feature maps, the SPP module extracts candidate area features, the PAN module aggregates features, and the YOLO_Head module performs Classification and positioning, combined with loss function and back propagation to update model parameters, realize automatic identification of power equipment component temperature.

Benefits of technology

It achieves fast and accurate automatic identification of power equipment components and acquisition of temperature data, improves detection efficiency, enhances the model's ability to capture target scale differences and contextual information, and improves the accuracy of detection results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117197097B
    Figure CN117197097B
Patent Text Reader

Abstract

The present invention discloses a method for detecting electric equipment components based on infrared images, comprising the following steps: screening and labeling the image information of the entire electric equipment collected by an infrared camera to obtain a training set; constructing an infrared detection model for electric equipment, and using the training set for training to obtain a trained infrared detection model for electric equipment; acquiring an infrared image of a target electric equipment, and detecting it through the trained infrared detection model for electric equipment to obtain the position data of the electric equipment components; performing temperature recognition on the infrared image of the target electric equipment to obtain the temperature value of the electric equipment components, and completing the detection of the electric equipment components. The present invention can quickly and accurately automatically identify the electric equipment components in the infrared image, and obtain its temperature data, and efficiently complete the detection of the electric equipment components.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of power equipment component detection, and in particular to a power equipment component detection method based on infrared images. Background Art

[0002] As part of the power system, power equipment is the cornerstone of the power system. The status of power equipment affects the safety of power generation, transformation, transmission, distribution and use. Power equipment operates under high voltage for a long time, and the equipment is prone to loose connections, corrosion, overload, load imbalance, parts defects, wire wear, etc., which poses certain safety hazards and may lead to safety accidents, causing large-scale regional power outages, and seriously endangering the safe operation of the power grid. Therefore, regular inspection of power equipment is an important task for the safe and reliable operation of the power grid.

[0003] An important indicator for power equipment inspection is the equipment temperature. Infrared thermal imaging technology provides a non-contact detection method to obtain the thermal status information of power equipment, so that the status detection of power equipment can be carried out without power outage. It is widely used in live detection of power equipment. At present, the analysis and diagnosis of infrared image data of power equipment still need to rely on experienced power engineers. Each power system inspection may require inspection of several thousand equipment points for temperature measurement, and infrared detection generally adopts a single-point temperature measurement method, that is, a single temperature measurement can only identify the highest temperature point in the infrared thermometer, which consumes a lot of manpower and time costs.

[0004] Compared with visible light images of ordinary targets, the detection and identification of power equipment under infrared images is a complex problem. There are many difficulties in the process, as follows: (1) Infrared images have the disadvantages of poor resolution, low contrast, low signal-to-noise ratio and blurred target edges, which bring great challenges to the detection and identification of power equipment; (2) Power equipment is generally located in outdoor power transmission and substation scenes. During the infrared detection of power equipment, it will be affected by electromagnetic fields, bad weather and other factors, resulting in a large number of noise points in the infrared images of power equipment; (3) When collecting infrared images of power equipment, the shooting angle and distance are highly random, and it is easy for power equipment to block each other, resulting in incorrect positioning of power equipment and missed detection; (4) There are many types of power equipment and the background is complex, resulting in an imbalance in the positive and negative samples of the infrared image, which makes the generalization ability of the detection model weak; (5) The length and width of different power equipment are relatively large and the sizes are different, which makes it difficult to accurately locate the power equipment and greatly reduces the efficiency of power equipment status detection and evaluation. Summary of the invention

[0005] In view of the above-mentioned deficiencies in the prior art, the present invention provides an infrared image-based power equipment component detection method that solves the problem of low efficiency in the existing power equipment status detection and evaluation.

[0006] In order to achieve the above-mentioned object of the invention, the technical solution adopted by the present invention is:

[0007] A method for detecting power equipment components based on infrared images is provided, which comprises the following steps:

[0008] S1. Screen and annotate the image information of the entire power equipment collected by the infrared camera to obtain a training set;

[0009] S2. Build an infrared detection model for power equipment and use the training set for training to obtain a trained infrared detection model for power equipment;

[0010] S3, obtaining an infrared image of the target power equipment, and detecting it using the trained power equipment infrared detection model to obtain the power equipment component location data;

[0011] S4. Perform temperature recognition on the infrared image of the target power equipment to obtain the temperature value of the power equipment component, and complete the power equipment component detection.

[0012] Further, in step S2, the infrared detection model of the electric power equipment includes a GhostNet module, an SPP module, a PAN module and a YOLO_Head module;

[0013] GhostNet module, used to generate feature maps based on the input infrared images of power equipment;

[0014] The SPP module is used to extract the candidate region features in the feature map corresponding to the infrared image of the power equipment;

[0015] The PAN module is used to perform parameter aggregation on the candidate region features corresponding to the infrared image output by the SPP module to obtain aggregated features corresponding to the infrared image;

[0016] The YOLO_Head module is used to classify the aggregated features corresponding to the infrared image, determine the target area and confidence, and obtain the detection results corresponding to the input infrared image of the power equipment.

[0017] Further, the GhostNet module includes a first CBR submodule, a first GB submodule, a second GB submodule, a third GB submodule, a fourth GB submodule and a fifth GB submodule connected in series; the input end of the first CBR submodule is the input end of the GhostNet module;

[0018] A first CBR submodule, comprising a CBR unit;

[0019] A first GB submodule, including a GB unit;

[0020] A second GB submodule includes two GB units connected in series;

[0021] A third GB submodule includes eight GB units connected in series;

[0022] a fourth GB submodule, comprising eight GB units connected in series;

[0023] a fifth GB submodule, comprising four GB units connected in series;

[0024] Among them, each CBR unit includes a series of convolutional layers, batch normalization layers and activation layers; each GB unit includes a first GBR unit, a CBR unit and a second GBR unit in series, and the input of the first GBR unit and the output of the second GBR unit are concatenated as the output of the GB unit; each GBR unit includes a series of Ghost modules, batch normalization layers and activation layers.

[0025] Furthermore, a second CBR submodule is arranged between the SPP module and the GhostNet module; the SPP module includes three parallel maximum pooling layers, and a first splicing submodule respectively connected to the outputs of the three maximum pooling layers, and the output end of the first splicing submodule is the output end of the SPP module; the second CBR submodule includes three series-connected CBR units.

[0026] Further, the PAN module includes a third CBR submodule, a first CU submodule, a second splicing submodule, a fourth CBR submodule, a second CU submodule, a third splicing submodule, a seventh CBR submodule, a first downsampling submodule, a fourth splicing submodule, an eighth CBR submodule, a second downsampling submodule, a fifth splicing submodule and a ninth CBR submodule connected in sequence;

[0027] Another input end of the second splicing submodule is connected to the output end of the sixth CBR submodule, and the input end of the sixth CBR submodule is connected to the output end of the fourth GB submodule;

[0028] Another input end of the third splicing submodule is connected to the output end of the fifth CBR submodule, and the input end of the fifth CBR submodule is connected to the output end of the third GB submodule;

[0029] The output end of the fourth CBR submodule is connected to the other input end of the fourth splicing submodule;

[0030] Another input end of the fifth splicing submodule is connected to the output end of the first splicing submodule;

[0031] The output end of the seventh CBR submodule, the output end of the eighth CBR submodule and the output end of the ninth CBR submodule are three output ends of the PAN module.

[0032] Furthermore, each CU submodule includes a CBR unit and an upsampling layer connected in series.

[0033] Furthermore, the YOLO_Head module includes three YOLO_Head submodules, the input ends of the three YOLO_Head submodules are respectively connected to the three output ends of the PAN module, and the outputs of the three YOLO_Head submodules are spliced ​​as the output of the YOLO_Head module;

[0034] Each YOLO_Head submodule consists of a CBR submodule, a convolution module, and a detection module connected in series.

[0035] Furthermore, in the process of training the infrared detection model of the power equipment using the training set, the infrared detection model of the power equipment is trained by obtaining the loss value of the infrared detection model of the power equipment and updating the parameters of the infrared detection model of the power equipment by back propagation; the loss function used is as follows:

[0036] Loss = L fl +Classloss+CIoUloss

[0037]

[0038]

[0039]

[0040] Where Loss represents the final loss value; L fl represents the loss value of the Focalloss function; Classloss represents the classification loss value; CIoUloss represents the positioning loss value; α is a trade-off parameter, 0≤α≤1; y' is the predicted probability of the true category of the sample; y is the probability that the sample is accurately classified; log(·) represents the logarithm with the natural constant e as the base; Indicates the confidence that there is an object in the jth bounding box of the i-th grid; is the label of the i-th grid, when the i-th grid is a positive sample When the i-th grid is a negative sample C i The probability of predicting the positive class for the i-th grid; λ noobj Indicates the weight coefficient when there is no target in the bounding box; represents the confidence that there is no target in the jth bounding box of the i-th grid; K×K represents the size of the infrared image of the power equipment; M is the number of candidate boxes generated for each grid; when the needle point k belongs to category c, otherwise p h (c) represents the predicted probability that the anchor point h belongs to category c; IoU represents the intersection over union ratio between the annotation box and the prediction box; ρ(·) represents the Euclidean distance; b represents the center point position of the prediction box; b gt Represents the center point of the real box; d is the diagonal distance between the predicted box and the minimum enclosing rectangle of the real box; v is a parameter to measure the consistency of the aspect ratio.

[0041] Furthermore, the specific method of step S4 includes the following sub-steps:

[0042] S4-1, performing image segmentation, grayscale processing and normalization processing on the infrared image of the target power equipment to obtain a processed infrared image;

[0043] S4-2, recognizing the temperature text information in the processed infrared image by using an OCR text recognition method, and returning the recognized temperature text and coordinate position in json format;

[0044] S4-3. Based on the returned coordinate position and the power equipment component position data, the temperature text is matched with the power equipment component to obtain the temperature value of the power equipment component, thereby completing the power equipment component detection.

[0045] The beneficial effects of the present invention are:

[0046] 1. The present invention can quickly and accurately automatically identify power equipment components in infrared images, obtain their temperature data, and efficiently complete the detection of power equipment components.

[0047] 2. The SPP module proposed in the present invention is a fully convolutional structure that effectively retains the semantic features and position features contained in the feature map. In addition, it can improve the network's ability to capture contextual information and fuse the local and global features of the feature map, thereby improving the expressiveness of the feature map and helping the model detect targets with large scale differences in images.

[0048] 3. The PAN module proposed in the present invention uses tensor connection (concate) instead of the original shortcut connection (shortcut connection), and transmits the shallow strong positioning features through bottom-up downsampling. It is a supplementary optimization of the SPP module, further improving the expression ability of the feature map and enhancing the model's detection of targets with large scale differences in images. BRIEF DESCRIPTION OF THE DRAWINGS

[0049] Figure 1 is a schematic diagram of the process of this method;

[0050] Figure 2 This is the structural diagram of the infrared detection model for power equipment;

[0051] Figure 3 It is the structural block diagram of GB unit;

[0052] Figure 4 It is the structural block diagram of the SPP module;

[0053] Figure 5 A schematic diagram showing a partial structural comparison between an existing PAN module and the PAN module proposed in this application;

[0054] Figure 6 Schematic diagram of bounding box regression in an embodiment;

[0055] Figure 7 Schematic diagram of the change curve of the loss value during the training process in the embodiment;

[0056] Figure 8 The mAP change curve during the training process in the embodiment;

[0057] Fig. 9 is the infrared test image in the embodiment;

[0058] Fig.10 In the embodiment Fig. 9 The corresponding infrared device detects the image;

[0059] Fig.11 is the original test image A in the embodiment;

[0060] Fig.12 for Fig.11 The corresponding detection result image;

[0061] Fig.13 is the original test image B in the embodiment;

[0062] Fig.14 for Fig.13 The corresponding detection result image;

[0063] Fig.15 is the original test image C in the embodiment;

[0064] Fig.16 for Fig.15 The corresponding detection result image. DETAILED DESCRIPTION

[0065] The specific implementation modes of the present invention are described below so that those skilled in the art can understand the present invention. However, it should be clear that the present invention is not limited to the scope of the specific implementation modes. For those of ordinary skill in the art, as long as various changes are within the spirit and scope of the present invention as defined and determined by the attached claims, these changes are obvious, and all inventions and creations utilizing the concept of the present invention are protected.

[0066] like Figure 1 As shown, the infrared image-based power equipment component detection method includes the following steps:

[0067] S1. Screen and annotate the image information of the entire power equipment collected by the infrared camera to obtain a training set;

[0068] S2. Build an infrared detection model for power equipment and use the training set for training to obtain a trained infrared detection model for power equipment;

[0069] S3, obtaining an infrared image of the target power equipment, and detecting it using the trained power equipment infrared detection model to obtain the power equipment component location data;

[0070] S4. Perform temperature recognition on the infrared image of the target power equipment to obtain the temperature value of the power equipment component, and complete the power equipment component detection.

[0071] In one embodiment of the present invention, in order to enrich the data set, increase the diversity of the data, prevent the model from overfitting, and improve the accuracy of classification, step S1 is specifically as follows:

[0072] Considering the area to be repaired in the infrared image, the algorithm starts from the boundary of the area and enters the interior of the area, first gradually filling all the contents in the boundary. A small neighborhood is required around the pixel on the neighborhood to be repaired. The pixel is replaced by the normalized weighted sum of all nearby known pixels. By using affine transformation on the infrared image, the change of image shape, position and angle can be achieved. Affine transformation is mainly a combination of a series of basic operations on the image, such as translation, rotation, scaling, shearing and flipping. Cropping the original data can not only achieve the effect of expanding the data set, but also weaken the data noise to a certain extent and increase the stability of the model. The realization of random color and brightness transformation of the image is mainly through adding a small disturbance to each channel in the HSV color space. Considering that the captured infrared picture contains various types of noise, which will affect the training and testing effects of the subsequent neural network, the present invention adopts image enhancement technology to reduce the interference caused by noise, and also enables the subsequent deep convolutional neural network to more effectively extract the key features of the image and increase the segmentation accuracy. Bilateral filtering is a nonlinear filter that processes input data in a weighted average manner to achieve the effect of maintaining edges, reducing noise and smoothing. It can be used in this solution.

[0073] like Figure 2 As shown, the infrared detection model of the power equipment in step S2 includes a GhostNet module, an SPP module, a PAN module and a YOLO_Head module;

[0074] GhostNet module, used to generate feature maps based on the input infrared images of power equipment;

[0075] The SPP module is used to extract the candidate region features in the feature map corresponding to the infrared image of the power equipment;

[0076] The PAN module is used to perform parameter aggregation on the candidate region features corresponding to the infrared image output by the SPP module to obtain aggregated features corresponding to the infrared image;

[0077] The YOLO_Head module is used to classify the aggregated features corresponding to the infrared image, determine the target area and confidence, and obtain the detection results corresponding to the input infrared image of the power equipment.

[0078] The GhostNet module includes a first CBR submodule, a first GB submodule, a second GB submodule, a third GB submodule, a fourth GB submodule and a fifth GB submodule connected in series; the input end of the first CBR submodule is the input end of the GhostNet module;

[0079] A first CBR submodule, comprising a CBR unit;

[0080] A first GB submodule, including a GB unit;

[0081] A second GB submodule includes two GB units connected in series;

[0082] A third GB submodule includes eight GB units connected in series;

[0083] a fourth GB submodule, comprising eight GB units connected in series;

[0084] a fifth GB submodule, comprising four GB units connected in series;

[0085] Each CBR unit includes a series of convolutional layers, batch normalization layers, and activation layers; Figure 3 As shown, each GB unit includes a first GBR unit, a CBR unit, and a second GBR unit connected in series, and the input of the first GBR unit and the output of the second GBR unit are concatenated as the output of the GB unit; each GBR unit includes a Ghost module, a batch normalization layer, and an activation layer connected in series.

[0086] A second CBR submodule is also provided between the SPP module and the GhostNet module; Figure 4 As shown, the SPP module includes three parallel maximum pooling layers, and a first splicing submodule connected to the outputs of the three maximum pooling layers respectively, and the output end of the first splicing submodule is the output end of the SPP module; the second CBR submodule includes three series-connected CBR units.

[0087] The PAN module includes a third CBR submodule, a first CU submodule, a second splicing submodule, a fourth CBR submodule, a second CU submodule, a third splicing submodule, a seventh CBR submodule, a first downsampling submodule, a fourth splicing submodule, an eighth CBR submodule, a second downsampling submodule, a fifth splicing submodule and a ninth CBR submodule connected in sequence;

[0088] Another input end of the second splicing submodule is connected to the output end of the sixth CBR submodule, and the input end of the sixth CBR submodule is connected to the output end of the fourth GB submodule;

[0089] Another input end of the third splicing submodule is connected to the output end of the fifth CBR submodule, and the input end of the fifth CBR submodule is connected to the output end of the third GB submodule;

[0090] The output end of the fourth CBR submodule is connected to the other input end of the fourth splicing submodule;

[0091] Another input end of the fifth splicing submodule is connected to the output end of the first splicing submodule;

[0092] The output end of the seventh CBR submodule, the output end of the eighth CBR submodule and the output end of the ninth CBR submodule are three output ends of the PAN module.

[0093] Each CU submodule consists of a series of CBR units and upsampling layers.

[0094] The YOLO_Head module includes three YOLO_Head submodules, the input ends of the three YOLO_Head submodules are respectively connected to the three output ends of the PAN module, and the outputs of the three YOLO_Head submodules are spliced ​​as the output of the YOLO_Head module;

[0095] Each YOLO_Head submodule consists of a CBR submodule, a convolution module, and a detection module connected in series.

[0096] In the process of training the infrared detection model of power equipment using the training set, the infrared detection model of power equipment is trained by obtaining the loss value of the infrared detection model of power equipment and updating the parameters of the infrared detection model of power equipment by back propagation; the loss function used is as follows:

[0097] Loss = L fl +Classloss+CIoUloss

[0098]

[0099]

[0100]

[0101] Where Loss represents the final loss value; L fl represents the loss value of the Focalloss function; Classloss represents the classification loss value; CIoUloss represents the positioning loss value; α is a trade-off parameter, 0≤α≤1; y' is the predicted probability of the true category of the sample; y is the probability that the sample is accurately classified; log(·) represents the logarithm with the natural constant e as the base; Indicates the confidence that there is an object in the jth bounding box of the i-th grid; is the label of the i-th grid, when the i-th grid is a positive sample When the i-th grid is a negative sample C i The probability of predicting the positive class for the i-th grid; λ noobj Indicates the weight coefficient when there is no target in the bounding box; represents the confidence that there is no target in the jth bounding box of the i-th grid; K×K represents the size of the infrared image of the power equipment; M is the number of candidate boxes generated for each grid; when the needle point k belongs to category c, otherwise p h (c) represents the predicted probability that the anchor point h belongs to category c; IoU represents the intersection over union ratio between the annotation box and the prediction box; ρ(·) represents the Euclidean distance; b represents the center point position of the prediction box; b gt Represents the center point of the real box; d is the diagonal distance between the predicted box and the minimum enclosing rectangle of the real box; v is a parameter to measure the consistency of the aspect ratio.

[0102] In the specific implementation process, the pixel is the most basic element in the image and the smallest unit in the image. Each pixel has its own position and pixel value. The grid is a way to divide the image into small blocks of equal size. Each grid can be composed of one or more pixels and is often used in tasks such as image segmentation and feature extraction. The bounding box is a rectangular box used to represent the position and range of an object, usually determined by the coordinates of the upper left corner and the lower right corner. Bounding boxes are widely used in tasks such as target detection, positioning and tracking, and can be used to mark and locate objects of interest. Anchors are a technique used in target detection and object recognition tasks. They are a predefined set of boxes, usually a series of rectangular boxes of different sizes and aspect ratios. During the target detection process, these anchors are placed at different positions in the image and matched with the bounding box to detect and identify the target object.

[0103] There is usually a certain size relationship between anchors and bounding boxes. Anchors are a set of predefined boxes used to generate candidate boxes in object detection tasks. These anchors usually have different sizes and aspect ratios to adapt to the shapes and sizes of various target objects as much as possible. In object detection, for each anchor, it will be offset and adjusted according to the prediction results of the model to obtain the final bounding box. Therefore, the size and aspect ratio settings of the anchor will affect the size of the final generated bounding box. Generally speaking, smaller anchors may correspond to smaller bounding boxes, while larger anchors may correspond to larger bounding boxes. At the same time, anchors with different aspect ratios can adapt to target objects of different shapes.

[0104] The specific method of step S4 includes the following sub-steps:

[0105] S4-1, performing image segmentation, grayscale processing and normalization processing on the infrared image of the target power equipment to obtain a processed infrared image;

[0106] S4-2, recognizing the temperature text information in the processed infrared image by using an OCR text recognition method, and returning the recognized temperature text and coordinate position in json format;

[0107] S4-3. Based on the returned coordinate position and the power equipment component position data, the temperature text is matched with the power equipment component to obtain the temperature value of the power equipment component, thereby completing the power equipment component detection.

[0108] In the specific implementation process, the infrared detection model of the power equipment identifies the regional location of the power equipment target. According to the temperature bar information of the infrared pseudo-color image, it can be known that when the temperature is higher, the color information corresponding to the image will be darker, and vice versa. In actual power equipment, the temperature difference between the power fault area and the temperature where the fault does not occur is often relatively large. In the infrared thermal imaging image, the color of the fault area is clearly distinguished from the color of other normal areas. The infrared image temperature bar processing part mainly performs image segmentation, grayscale processing and normalization processing on the image. After the temperature bar image area is cropped, the temperature bar image is grayed and binarized and then put into Huawei Cloud Text OCR for processing. After the image with temperature value is finally processed, it enters the OCR engine for page layout analysis, and the image will be cut in units of lines. Then, the image area containing the target block is obtained through the recognition engine analysis, and the adaptive classifier is used for numerical and symbol positioning and segmentation. After two character analysis and recognition processes, the OCR engine performs improvement operations on the image area and verifies whether the character recognition is correct, and then outputs the temperature numerical text on the recognized image; after obtaining the highest temperature pixel value and the lowest temperature pixel value in the temperature bar, the temperature value and infrared pseudo-color image mapping function are fitted through the RGB value mapping relationship using the least squares method; finally, the fuzzy C-means clustering algorithm is used to cluster the pixels in the detection area to obtain the temperature value of the power equipment component and complete the power equipment component detection.

[0109] In one embodiment of the present invention, GhostNet is a lightweight network launched by Huawei in 2020. The network uses some operations with lower computational complexity (Cheap Operations) to generate these redundant feature maps, so that the number of model parameters can be reduced and the execution speed of the model can be improved while ensuring good detection results. This is also a core idea of ​​GhostNet. GhostNet proposes a module called Ghost Module (GM), whose main function is to replace the traditional ordinary convolution. Ghost Module divides ordinary convolution into two parts. First, an ordinary 1x1 convolution is performed, which is a small number of convolutions. For example, a 32-channel convolution is normally used, and a 16-channel convolution is used here. The role of this 1x1 convolution is similar to feature integration, generating feature concentration of the input feature layer. Then a depth-separable convolution is performed. This depth-separable convolution is a layer-by-layer convolution, which is the Cheap Operations mentioned above. It uses the feature concentration obtained in the previous step to generate the Ghost feature map. Ghost Bottlenecks (GB) is a bottleneck structure composed of Ghost Modules. GhostNet is mainly composed of 5 GB modules, and the GB module is composed of the residual superposition of Ghost convolutional-Batch Normalization-Rectified Linear Unit6 (GBR) and convolutional-regularization-activation (CBR) components. Among them, the CBR component represents a complete convolution operation and is a classic combination of convolutional neural networks. The BN operation pulls the originally offset feature data back to the 0 mean, avoiding gradient vanishing and gradient explosion, and can also accelerate the convergence of the network and improve the generalization ability of the network. The linear rectifier function (Rectified Linear Unit6, ReLU6) is used as the activation function of CNN to perform activation operations in each convolution layer in a nonlinear manner to increase the feature size. Lightweight network.

[0110] In one embodiment of the present invention, the original design purpose of the traditional SPP module is to make the convolutional neural network free from the limitation of fixed input size, because it significantly increases the receptive field, separates the most important contextual features, and hardly reduces the running speed of the model. The traditional SPP module needs to convert the feature map into a low-dimensional feature vector of a fixed size, which not only limits the size of the input model, but also destroys the spatial structure characteristics of the original feature map, resulting in the loss of some feature information, thereby affecting the detection results of the model. In addition, after the traditional SPP module, a fully connected layer is required for target classification, which will greatly reduce the recognition speed of the model. The SPP module proposed in the present invention is divided into a skip layer and an SPP block with three maximum pooling layers, wherein the SPP module proposed in the present invention is divided into three sliding windows (13×13, 9×9, 5×5) for extracting candidate region features in the feature map. The processed feature map is spliced ​​with the skip layer and sent to the lower-level network. The SPP module proposed in the present invention is a fully convolutional structure that effectively retains the semantic features and position features contained in the feature map. In addition, it can improve the network's ability to capture contextual information and fuse the local and global features of the feature map, thereby improving the expressiveness of the feature map and helping the model detect targets with large scale differences in images.

[0111] In one embodiment of the present invention, a partial structure comparison between an existing PAN module and the PAN module proposed in this application is shown in FIG. Figure 5 As shown, the existing PAN module connects the two feature maps by shortcut, while the present application connects the two feature maps by tensor connection, and passes the shallow strong positioning features by bottom-up downsampling, which is a supplementary optimization of the SPP module, further improving the expression ability of the feature map and enhancing the model's detection of targets with large scale differences in images.

[0112] In one embodiment of the present invention, the YOLO_Head module downsamples the original image by 32 times, 16 times, and 8 times, respectively, to obtain three different receptive fields with resolutions of 19×19, 38×38, and 76×76. These receptive fields are used to locate large-scale, medium-scale, and small-scale objects, respectively. Finally, in the three receptive fields, the regression loss function Mean Square Error (MSE) is used to perform bounding box regression. Specifically, this part uses CNN to learn the relative position relationship between the anchor box and the label box, and then uses the relative position and the label box to inversely calculate the target position. The bounding box regression prediction process is as follows: Figure 6 As shown. Figure 6 In , the dotted box is the anchor box and the solid box is the prediction box. The conversion formula of each position parameter is as follows:

[0113]

[0114] where p w and p h is the length and width of the anchor box in the feature map; c x and c y is the coordinate of the grid where the center of the anchor box is located; t x ,t y ,t w and t h is the center offset of the bounding box predicted by the network and the scaling ratio of length and width, which is the actual prediction value of the model; σ(·) is the sigmoid function, which is used to compress the offset to between 0 and 1 to ensure faster convergence of model training; b x 、b y 、b w and b h are the center coordinates and length and width of the prediction box, which can be obtained by calculating the transformation. Each grid in the feature map is set with three anchor boxes, and each anchor box can predict a bounding box. The output of the YOLO_Head module is three N×N×27 tensors, where 27 is obtained by calculating (3×(4+1+4)); (3×(4+1+4)) represents 3 prediction boxes, 4 bounding box coordinate information, 1 confidence value, and 4 object categories in this article. Finally, the confidence and NMS algorithm are combined to determine the final bounding box.

[0115] In one embodiment of the present invention, the loss change curve of the infrared detection model of power equipment during the training process is as follows: Figure 7 As shown in Figure 2, the change curve of mAP during training is as follows: Figure 8 As shown in the figure, by comparing the training parameters 100 times, the model with the best result is selected for prediction on the test set. In order to more intuitively show the detection effect, this project infers the test set of all power equipment infrared data sets, and the detection results are visualized as shown in the figure. Fig. 9 and Fig.10 As shown in the figure. The loss value is drawn by counting the test validation set indicators after each round of model training, and the accuracy mAP is calculated by calculating the area of ​​the PR curve drawn by counting the relationship between the accuracy and recall rate of the test validation set indicators after each round of model training.

[0116] Depend on Fig. 9 and Fig.10It can be seen that this method has a good recognition effect on infrared images. At the same time, in order to verify the effectiveness of the proposed algorithm, the network model is compared and evaluated with YOLOv3, YOLOv4, YOLOv5S, YOLOX and DenseNet121 in five aspects: model parameter quantity, model calculation quantity, execution time, model size and experimental parameters on the self-made infrared image dataset under the above configuration and the same experimental parameters. The results are shown in Table 1. Among them, the model parameter quantity is the amount of video memory occupied during training; the model calculation quantity is a floating-point operation number, which is used to measure the complexity of the model; the execution time is obtained by comparing the prediction of each model for a single image; the model size is the space occupied by the model after training; the experimental parameter mAP is obtained by calculating the area of ​​the PR curve that represents the relationship between precision and recall.

[0117] Table 1: Network model comparison evaluation table

[0118]

[0119] As can be seen from Table 1, the experimental parameters of the infrared detection model of power equipment constructed by this method reach 11.429M, 3.578G, 0.0683s, 42.5MB and 93.88% in terms of model parameter quantity, model calculation quantity, execution time, model size and mAP respectively. It is better than the existing network in terms of model parameter quantity, model calculation quantity and mAP, better than YOLOv3, YOLOv4, YOLOX and DenseNet121 in terms of execution time and model size, and worse than YOLOv5S. Taking all indicators into consideration, it can be proved that the infrared detection model of power equipment proposed by the present invention has excellent characteristics and can play a good role in multi-target infrared image detection.

[0120] In one embodiment of the present invention, the infrared detection model of electric power equipment proposed in the present invention is used to obtain the type and coordinate information of the electric power equipment in the detection map, and the temperature mapping relationship of each pixel point is generated using Huawei Cloud OCR digital recognition technology and pseudo-color map. Finally, the temperature of the electric power equipment in the regional coordinates is obtained according to the detection coordinate traversal, and the minimum temperature and the maximum temperature are marked on the result map, thereby realizing multi-target infrared temperature measurement of electric power equipment based on deep learning. The results are as follows: Fig.11 , Fig.12 , Fig.13 , Fig.14 , Fig.15 and Fig.16 The infrared temperature measurement results of power equipment are shown in Table 2.

[0121] Table 2: Infrared temperature measurement results of power equipment

[0122]

[0123] When the image in Table 2 contains multiple targets, they are sorted in descending order according to the recognition accuracy of this method. The origin of the pixel coordinate is the upper left corner of the image, from left to right is the positive direction of the x-axis, and from top to bottom is the positive direction of the y-axis. Table 2 records the upper left coordinates of the area where each target is located, the length and width of the detection frame size, and thus obtains the temperature measurement area of ​​the detection frame. After eliminating the background temperature, the corresponding temperature values ​​of all pixels in the area frame are obtained, and the maximum Celsius value and the minimum Celsius value in the temperature measurement area are marked in the figure.

Claims

1. A method for detecting power equipment components based on infrared images, characterized in that: The following steps are involved: S1. Screen and annotate the image information of the entire power equipment collected by the infrared camera to obtain a training set; S2. Build an infrared detection model for power equipment and use the training set for training to obtain a trained infrared detection model for power equipment; S3, obtaining an infrared image of the target power equipment, and detecting it using the trained power equipment infrared detection model to obtain the power equipment component location data; S4, performing temperature recognition on the infrared image of the target power equipment, obtaining the temperature value of the power equipment component, and completing the power equipment component detection; In step S2, the infrared detection model of the power equipment includes a GhostNet module, an SPP module, a PAN module and a YOLO_Head module; GhostNet module, used to generate feature maps based on the input infrared images of power equipment; The SPP module is used to extract the candidate region features in the feature map corresponding to the infrared image of the power equipment; The PAN module is used to perform parameter aggregation on the candidate region features corresponding to the infrared image output by the SPP module to obtain aggregated features corresponding to the infrared image; The YOLO_Head module is used to classify the aggregated features corresponding to the infrared image, determine the target area and confidence level, and obtain the detection results corresponding to the input infrared image of the power equipment; The GhostNet module includes a first CBR submodule, a first GB submodule, a second GB submodule, a third GB submodule, a fourth GB submodule and a fifth GB submodule connected in series; the input end of the first CBR submodule is the input end of the GhostNet module; A first CBR submodule, comprising a CBR unit; A first GB submodule, including a GB unit; A second GB submodule includes two GB units connected in series; A third GB submodule includes eight GB units connected in series; a fourth GB submodule, comprising eight GB units connected in series; a fifth GB submodule, comprising four GB units connected in series; Among them, each CBR unit includes a series of convolutional layers, batch normalization layers and activation layers; each GB unit includes a first GBR unit, a CBR unit and a second GBR unit in series, and the input of the first GBR unit and the output of the second GBR unit are concatenated as the output of the GB unit; each GBR unit includes a series of Ghost modules, batch normalization layers and activation layers.

2. The method for detecting power equipment components based on infrared images according to claim 1, characterized in that: A second CBR submodule is also arranged between the SPP module and the GhostNet module; the SPP module includes three parallel maximum pooling layers, and a first splicing submodule respectively connected to the outputs of the three maximum pooling layers, and the output end of the first splicing submodule is the output end of the SPP module; the second CBR submodule includes three series-connected CBR units.

3. The method for detecting power equipment components based on infrared images according to claim 1, characterized in that: The PAN module includes a third CBR submodule, a first CU submodule, a second splicing submodule, a fourth CBR submodule, a second CU submodule, a third splicing submodule, a seventh CBR submodule, a first downsampling submodule, a fourth splicing submodule, an eighth CBR submodule, a second downsampling submodule, a fifth splicing submodule and a ninth CBR submodule connected in sequence; Another input end of the second splicing submodule is connected to the output end of the sixth CBR submodule, and the input end of the sixth CBR submodule is connected to the output end of the fourth GB submodule; Another input end of the third splicing submodule is connected to the output end of the fifth CBR submodule, and the input end of the fifth CBR submodule is connected to the output end of the third GB submodule; The output end of the fourth CBR submodule is connected to the other input end of the fourth splicing submodule; Another input end of the fifth splicing submodule is connected to the output end of the first splicing submodule; The output end of the seventh CBR submodule, the output end of the eighth CBR submodule and the output end of the ninth CBR submodule are three output ends of the PAN module.

4. The method for detecting power equipment components based on infrared images according to claim 3 is characterized in that: Each CU submodule consists of a series of CBR units and upsampling layers.

5. The method for detecting electric power equipment components based on infrared images according to claim 3, characterized in that: The YOLO_Head module includes three YOLO_Head submodules, the input ends of the three YOLO_Head submodules are respectively connected to the three output ends of the PAN module, and the outputs of the three YOLO_Head submodules are spliced ​​as the output of the YOLO_Head module; Each YOLO_Head submodule consists of a CBR submodule, a convolution module, and a detection module connected in series.

6. The method for detecting electric power equipment components based on infrared images according to claim 5, characterized in that: In the process of training the infrared detection model of power equipment using the training set, the infrared detection model of power equipment is trained by obtaining the loss value of the infrared detection model of power equipment and updating the parameters of the infrared detection model of power equipment by back propagation; the loss function used is as follows: in Represents the final loss value; Represents the loss value of the Focalloss function; Represents the classification loss value; Indicates the positioning loss value; To balance the parameters, ; is the predicted probability of the true category of the sample; y The probability of accurate classification of samples; It represents the logarithm with the natural constant e as the base; Indicates i The grid j The confidence that an object exists in a bounding box; For the i The label of the grid, when the i When the grid is a positive sample , when i When the grid is a negative sample ; For the i The probability of a grid being predicted as a positive class; Indicates the weight coefficient when there is no target in the bounding box; Indicates i The grid j The confidence that there is no object in the bounding box; represents the size of the infrared image of the power equipment; M is the number of candidate boxes generated for each grid; When the needle point k When it belongs to category c, ,otherwise ; Indicates anchor point h The predicted probability of belonging to category c; Represents the intersection-over-union ratio of the annotation box and the prediction box; represents the Euclidean distance; b Indicates the center point position of the prediction box; Indicates the center point position of the real frame; d is the diagonal distance between the predicted box and the minimum enclosing rectangle of the real box; v is a parameter to measure the consistency of aspect ratio.

7. The method for detecting electric power equipment components based on infrared images according to claim 1, characterized in that: The specific method of step S4 includes the following sub-steps: S4-1, performing image segmentation, grayscale processing and normalization processing on the infrared image of the target power equipment to obtain a processed infrared image; S4-2, recognizing the temperature text information in the processed infrared image by using an OCR text recognition method, and returning the recognized temperature text and coordinate position in json format; S4-3. Based on the returned coordinate position and the power equipment component position data, the temperature text is matched with the power equipment component to obtain the temperature value of the power equipment component, thereby completing the power equipment component detection.