Power equipment infrared image detection method and device, medium and computer equipment
By using an improved lightweight FSSD model and k-means++ clustering algorithm, the problems of low efficiency and false positives/missed detection in substation infrared detection are solved, realizing automated and high-precision detection of power equipment, which is suitable for edge devices.
Patent Information
- Application Number
- CN202510973222.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-15
- Publication Date
- 2026-02-10
AI Technical Summary
Existing infrared detection technology is inefficient in substations, prone to misjudgment or missed detection, and cannot meet the requirements of real-time and high efficiency. Moreover, relying on manual inspection poses safety hazards.
An improved lightweight FSSD model was adopted, which combined the k-means++ clustering algorithm and the aspect ratio of the anchor boxes to cluster the infrared image dataset and train the improved lightweight FSSD model for automated detection of power equipment.
It improves the automated detection capabilities and accuracy of substation power equipment, reduces missed detections and false detections, meets real-time detection requirements, and is suitable for resource-constrained edge devices.
Smart Images

Figure CN121504795A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of power equipment safety monitoring, in particular to a power equipment infrared image detection method and device, medium and computer equipment. BACKGROUND
[0002] Under the background of the rapid development of smart grid, the number and types of power equipment have increased significantly. The safe and stable operation of substations, as the key hub of the power system, is of great importance. However, most of the equipment in substations is located in complex outdoor environments and is easily affected by weather, terrain and other factors, leading to equipment damage or failure. Such failures not only affect local power supply, but also may cause large-scale power outages, fires and other serious accidents, resulting in significant economic losses and social impact. Therefore, continuous detection and preventive maintenance are of great significance to ensure the safe operation of substations. At present, the inspection of power equipment still mainly relies on manual methods, but this method is low in efficiency, heavy in workload and has safety hazards. Although infrared, ultraviolet, ultrasonic and other non-contact detection technologies have been widely used in power equipment state monitoring, especially infrared thermal imaging technology, which has become an important means of equipment defect diagnosis due to its non-contact, wide temperature measurement range and real-time detection advantages. However, the existing infrared detection still mainly relies on manual inspection, and technicians need to hold the equipment to collect data and analyze frame by frame, which is low in efficiency and easy to cause misjudgment or missed detection due to image noise, low contrast and other problems.
[0003] With the development of power big data, the amount of infrared image data generated by substations has increased dramatically, and traditional manual detection methods cannot meet the real-time and efficient needs. SUMMARY
[0004] Therefore, the present application provides a power equipment infrared image detection method and device, medium and computer equipment, which can improve the automatic detection capability and detection accuracy of power equipment in substations.
[0005] According to one aspect of the present application, a power equipment infrared image detection method is provided, which comprises: obtaining an infrared image data set containing multiple types of power equipment, wherein the infrared image data set includes multiple infrared images, the power equipment in the infrared image corresponds to an anchor box, and the anchor box corresponds to an aspect ratio; clustering the anchor boxes in the infrared image data set based on a k-means++ clustering algorithm and the aspect ratio of the anchor boxes to obtain a clustered infrared image training data set; improving the FSSD algorithm in a single-stage deep convolutional neural network to obtain an improved lightweight FSSD model, wherein the improved lightweight FSSD model includes an improved backbone network, a new feature pyramid structure and a shallow feature enhancement module; The improved lightweight FSSD model is trained based on the clustered infrared image training data set, so that the trained improved lightweight FSSD model outputs a detected infrared image containing a detection frame through a newly inputted infrared image to be detected, wherein the detected infrared image has a detected power equipment framed by the detection frame, and the detection frame corresponds to detection information including the type, position and confidence of the detected power equipment.
[0006] According to another aspect of the present application, there is provided an infrared image detection device for power equipment, comprising: a power equipment infrared image acquisition module, configured to acquire an infrared image data set containing a plurality of types of power equipment, wherein the infrared image data set includes a plurality of infrared images, and the power equipment in the infrared images corresponds to an anchor frame, and the anchor frame corresponds to an aspect ratio; a power equipment anchor frame clustering module, configured to cluster the anchor frames in the infrared image data set based on a k-means++ clustering algorithm and the aspect ratio of the anchor frames, to obtain a clustered infrared image training data set; an improved lightweight FSSD model construction module, configured to improve an FSSD algorithm in a single-stage deep convolutional neural network, to obtain an improved lightweight FSSD model, wherein the improved lightweight FSSD model includes an improved backbone network, a new feature pyramid structure and a shallow feature enhancement module; an improved lightweight FSSD model training and detection module, configured to train the improved lightweight FSSD model based on the clustered infrared image training data set, so that the trained improved lightweight FSSD model outputs a detected infrared image containing a detection frame through a newly inputted infrared image to be detected, wherein the detected infrared image has a detected power equipment framed by the detection frame, and the detection frame corresponds to detection information including the type, position and confidence of the detected power equipment.
[0007] According to still another aspect of the present application, there is provided a medium having a computer program stored thereon, wherein the program is executed by a processor to implement the above-mentioned infrared image detection method for power equipment.
[0008] According to still another aspect of the present application, there is provided a computer device, comprising a medium, a processor and a computer program stored on the medium and executable on the processor, wherein the processor implements the above-mentioned infrared image detection method for power equipment when executing the program.
[0009] Through the above technical solutions, the infrared image detection method and device for power equipment, medium and computer device provided by the present application can improve the automatic detection capability and detection accuracy of power equipment in a substation.
[0010] The above description is only a summary of the technical solutions of the present application. In order to enable one skilled in the art to better understand the technical means of the present application and implement the same according to the contents of the description, and in order to enable the above and other purposes, characteristics and advantages of the present application to be more apparent and easy to understand, the following specific embodiments of the present application are described. BRIEF DESCRIPTION OF DRAWINGS
[0011] The accompanying drawings, which are included to provide a further understanding of the present application, constitute a part of the present application and illustrate the illustrative embodiments of the present application and their description serve to explain the present application, and do not constitute an improper limitation on the present application. In the drawings: Figure 1 A flowchart of a power equipment infrared image detection method provided by an embodiment of the present application is shown; Figure 2 An improved lightweight FSSD model structure provided by an embodiment of the present application is shown; Figure 3 A shallow feature enhancement module structure provided by an embodiment of the present application is shown; Figure 4 A Fire module structure in Squeezenet provided by an embodiment of the present application is shown; Figure 5 Another shallow feature enhancement module structure provided by an embodiment of the present application is shown; Figure 6 Another improved lightweight FSSD model structure provided by an embodiment of the present application is shown; Figure 7 A detection result diagram of an improved lightweight FSSD model provided by an embodiment of the present application is shown; Figure 8 A detection result diagram of an improved lightweight FSSD model provided by an embodiment of the present application is shown; Figure 9 A structure diagram of a power equipment infrared image detection device provided by an embodiment of the present application is shown. DETAILED DESCRIPTION
[0012] The present application will be described in detail below with reference to the accompanying drawings and in conjunction with embodiments. It should be noted that the embodiments in the present application and the features in the embodiments can be combined with each other without conflict.
[0013] In the present embodiment, a power equipment infrared image detection method is provided, as shown in Figure 1 The method comprises the following steps. Step 101: Obtain an infrared image dataset containing multiple types of power equipment. The infrared image dataset includes multiple infrared images, and the power equipment in the infrared images corresponds to an anchor frame, which corresponds to an aspect ratio.
[0014] Currently, researching intelligent detection methods has become an inevitable trend. Artificial intelligence technology can effectively improve detection efficiency, reduce labor costs, and achieve automated, high-precision equipment condition assessment, providing reliable assurance for the safe operation of substations. The application of intelligent detection technology can improve the operation and maintenance efficiency of power equipment and promote the intelligent development of the power grid.
[0015] In the above embodiments of this application, by optimizing and improving the FSSD algorithm, the ability to extract features from infrared images of substation power equipment is enhanced, effectively solving the problem of accurate detection of infrared images of power equipment. Simultaneously, a detection method based on the improved lightweight FSSD (the improved lightweight FSSD model) is proposed, achieving model lightweighting while meeting the requirements of real-time detection, and can be used for lightweight real-time detection of power equipment. The proposed improved FSSD scheme can be used for the detection of infrared images of substation power equipment, and can utilize deep semantic information to improve the detection effect of the model, such as... Figure 2 As shown. Figure 2 In this context, VGG-16 is the foundational backbone network of the FSSD algorithm. Conv: short for "Convolution," a basic layer in convolutional neural networks used to extract image features. LinearInterp: short for "LinearInterpolation," used in image processing for operations such as adjusting image size. Concat: short for "Concatenate," used to concatenate different feature maps along the channel dimension. Feature Enhancement Module (also known as shallow feature enhancement module): used to further enhance the extracted features. Classifier: used to classify features and output detection results. "Conv:3x3x(Nx(Classes+4))" describes the specific parameters of the convolutional layers in the classifier, where "3x3" represents the kernel size, "Nx(Classes+4)" represents the number of channels in the kernel, and "Classes" represents the number of classes. The New Feature Pyramid Structure is a structure for multi-scale feature fusion that helps models better detect targets of different sizes.
[0016] The structure of the shallow feature enhancement module, which is an improvement design for FSSD, is as follows: Figure 3 As shown,Figure 3 In neural networks, Reluactivation, or ReLU activation function, is a commonly used activation function. Its full name is Rectified Linear Unit. It sets negative values in the input to 0 while keeping positive values unchanged, which helps increase the non-linearity of the network. 1×1 Conv, or 1×1 convolution, uses a 1×1 kernel for convolution operations and is often used to adjust the number of channels in a feature map. Sum, or summation operation, adds the values at corresponding positions in the input feature map. 3×3 Convrate = 1 / 5 / 3 / 7, etc., which are 3×3 convolutions with a kernel size of 3×3. "Rate" in dilated convolution represents the dilation rate; different dilation rates can expand the receptive field of the convolution kernel. 3×1 Conv, 1×3 Conv, etc., represent convolution operations with kernel sizes of 3×1 and 1×3, respectively. 7×1 Conv, 1×7 Conv, represent convolution operations with kernel sizes of 7×1 and 1×7, respectively. Shortcut, or shortcut connection, is commonly used in residual networks. It directly adds the input to the output of the convolution, which helps alleviate the vanishing gradient problem and promotes network training. Input refers to the data input into the network structure.
[0017] Specifically, in substations, electrical equipment includes transformers, circuit breakers, disconnect switches, current transformers, voltage transformers, etc.; in transmission lines, the main electrical equipment includes insulators, towers, conductor connection points, etc.
[0018] Based on the inspection requirements and the characteristics of the target equipment, select an infrared thermal imager with appropriate resolution, temperature measurement range, and accuracy. For example, for the inspection of long-distance transmission line equipment, a thermal imager with a telephoto lens and a high-sensitivity detector can be selected, while for the inspection of equipment at close range within substations, a thermal imager with ordinary resolution and accuracy can be used. The infrared image dataset can cover substations and transmission line towers of different geographical locations, sizes, and layouts to expand data diversity. For example, urban substations, mountain substations, and coastal substations can be selected to obtain infrared images of power equipment under different environments. Consider the operating status of the power equipment and environmental factors. For example, acquiring images when the equipment is running at full load can better reflect the equipment's heat generation; at the same time, avoid acquiring images under adverse weather conditions such as direct sunlight, strong winds, and heavy rain to avoid affecting image quality.
[0019] Next, the acquisition angles and distances are determined, meaning the power equipment is photographed from multiple angles and distances to obtain comprehensive image information. For example, transformers can be photographed from different angles such as the front, side, and top; transmission line insulators can be photographed from different heights and distances.
[0020] Next, following the planned data acquisition scheme, infrared thermal imagers were used to photograph various power equipment. During the imaging process, it was ensured that the images were clear and complete, accurately displaying the outline and heat distribution of the power equipment. For example, when photographing a transformer, it was necessary to ensure that the entire main body of the transformer was within the image range, and that the thermal imager's focus was properly adjusted to make the details of the equipment clearly visible in the image.
[0021] Next, anchor frames are added to the infrared images. This can be done manually, for example using professional image annotation tools such as LabelImg and RectLabel, to annotate the electrical equipment in the acquired infrared images. During annotation, a rectangular anchor frame is drawn that perfectly encloses the outline of each electrical device. For example, for a transformer in the image, the anchor frame is carefully drawn along the edge of the transformer, ensuring it closely matches its shape. During the annotation process, the aspect ratio of each anchor frame is recorded. The aspect ratio is the ratio of the anchor frame's width to its height, reflecting the shape characteristics of the electrical equipment in the image. For example, if a transformer's anchor frame is 200 pixels wide and 150 pixels high, then its aspect ratio is 200:150 = 4:3.
[0022] Next, all the labeled infrared images and their corresponding anchor frame information (including aspect ratio) are compiled into a dataset. This dataset can be categorized and stored according to device type, acquisition location, acquisition time, etc., for later use and management. For example, all infrared images of transformers can be placed in one folder, while the anchor frame information for each image can be recorded in a text file.
[0023] By following the steps above, an infrared image dataset containing various types of power equipment can be obtained, and anchor frames with aspect ratio information can be added to the power equipment in the images, providing basic data for subsequent power equipment detection and analysis.
[0024] Step 102: Based on the k-means++ clustering algorithm and the aspect ratio of the anchor boxes, cluster the anchor boxes in the infrared image dataset to obtain the clustered infrared image training dataset.
[0025] Furthermore, in traditional object detection models, the aspect ratio of the default bounding boxes (i.e., prior boxes, anchor boxes) is usually a fixed preset value, which is difficult to adapt to the diverse anchor box shapes of power equipment. By clustering the aspect ratios of the anchor boxes using the k-means++ clustering algorithm, we can obtain default bounding box aspect ratios that better match the actual anchor box shapes of power equipment. For example, when detecting transformers, different models and installation angles of transformers exhibit significant differences in aspect ratios in infrared images. The clustered default bounding boxes can more accurately cover the shape of the transformer, enabling the model to more precisely locate targets during detection, reducing missed detections and false detections, thereby improving detection accuracy.
[0026] The clustering process considers the aspect ratio information of the anchor boxes for all power equipment in the infrared image dataset, enabling it to capture the shape features of different types of power equipment and the same type of power equipment under different states. Taking circuit breakers as an example, the thermal distribution and shape of circuit breakers in normal operation and fault states may differ in infrared images. The default boxes obtained through clustering can cover these shape changes under different states, allowing the model to accurately detect new and unseen infrared images of power equipment, thus enhancing the model's generalization ability.
[0027] The k-means++ clustering algorithm can divide a dataset into different clusters based on the similarity of the aspect ratios of the anchor frames. This division helps analyze the distribution of electrical equipment of different shapes in the dataset. For example, clustering can reveal that anchor frames of certain specific shapes of electrical equipment account for a large proportion of the dataset, while anchor frames of other shapes are relatively fewer. Based on this information, the dataset can be expanded or adjusted in a targeted manner, such as increasing the number of infrared images corresponding to rare anchor frames, making the distribution of the dataset more balanced, and improving the quality and utilization efficiency of the data.
[0028] In the original infrared image dataset, there may be anchor frames of electrical equipment with similar shapes. Clustering can group these similar anchor frames into one class, avoiding redundant calculations on similar data during training. For example, multiple transformers of the same model may have very similar shapes in infrared images; after clustering, they can be treated as the same type of data, reducing data redundancy and improving training efficiency.
[0029] Because the clustered default boxes better match the shapes of the anchor boxes on actual power equipment, the model can learn the features of the target more quickly during training. Compared to using default boxes with a fixed aspect ratio, the clustered default boxes provide the model with more accurate initial information, enabling the model to adjust parameters more quickly during iteration, accelerating the convergence process, and shortening training time.
[0030] In practical applications, such as real-time monitoring systems for power equipment, rapid detection of power equipment in infrared images is required. Clustered default boxes can reduce the time spent by the model in filtering and adjusting mismatched default boxes during the detection process. For example, when detecting insulators on transmission lines, clustered default boxes can more quickly locate the insulators, improving the speed of real-time detection and meeting the needs of real-time monitoring of power equipment.
[0031] Specifically, Table 1 shows the test results of several different models after processing the dataset (infrared image dataset) using the k-means++ algorithm. The models Faster R-CNN, SSD, FSSD, and YOLOv3, along with the improved FSSD model, are represented by numbers 1 to 5. Table 1 provides the detection accuracy, single-image detection time, and model size of this model and the other models on the target dataset. As shown in Table 1, the mAP values of the five models are 91.86%, 89.94%, 91.52%, 89.86%, and 95.60%, respectively. The improved FSSD has a higher mAP value than the other four models. Although the single-image detection time is slightly slower than SSD, FSSD, and YOLOv3, it still meets the needs of practical applications.
[0032] Table 1
[0033] Optionally, step 102, "clustering the anchor boxes in the infrared image dataset based on the k-means++ clustering algorithm and the aspect ratio of the anchor boxes," specifically includes: Step 1021: When clustering the anchor frames of power equipment in the infrared image dataset based on the k-means++ clustering algorithm, the aspect ratio of the anchor frames in the infrared image is used as the key feature, and an aspect ratio is randomly selected in the infrared image dataset as the initial cluster center.
[0034] Step 1022: Calculate the distance between the aspect ratio of the remaining anchor frames and the selected initial cluster center, and select the next cluster center according to the distance probability distribution until a preset number of cluster centers are determined.
[0035] Step 1023: Assign the aspect ratio of all anchor frames to the nearest cluster based on their distance from the cluster center.
[0036] Step 1024: Recalculate the center of each cluster and iteratively allocate and update the center until the center no longer changes.
[0037] In the embodiments described above, the k-means++ clustering algorithm is used to cluster the aspect ratios of anchor boxes in the infrared image dataset of power equipment. This allows for a better match between the default bounding box and the actual anchor box at each location in the feature map. In the actual scenario of a substation, due to factors such as the infrared image shooting angle and interference from other equipment during image acquisition, it is impossible to determine the aspect ratio of power equipment based on other datasets. Therefore, using the k-means++ clustering algorithm to select better cluster centers significantly reduces the error of the final clustering result. By setting the number of cluster centers in the clustering algorithm, the aspect ratio information of the prior boxes (anchor boxes) is obtained, which helps the model to more effectively separate the target from the background. The accuracy of clustering is represented by calculating the average IOU value between different cluster centers and the actual coordinates. By using the aspect ratio information to match the default bounding box and the actual anchor box at each location in the feature map, the model can more effectively separate the target from the background.
[0038] Based on the k-means++ clustering algorithm, this study uses the aspect ratio of the anchor frames of power equipment in infrared images as the key feature dimension. First, an anchor frame aspect ratio is randomly selected from the infrared image dataset as the initial cluster center. Then, the distance between the aspect ratios of the remaining anchor frames and the initial cluster center is calculated. The next cluster center is selected based on a probability distribution according to the distance, and this process is repeated until a predetermined number of k cluster centers are determined. Next, the aspect ratios of all anchor frames in the infrared image dataset are assigned to the nearest clusters based on their distance from each cluster center. Finally, the cluster center of each cluster is recalculated, and this process of assigning and updating cluster centers is iterated until the cluster centers no longer change significantly. This completes the clustering of the anchor frames in the infrared image dataset, resulting in a clustered infrared image training dataset. The purpose is to enable the aspect ratio of the default frames to adapt adaptively, better matching the shape characteristics of the anchor frames of different power equipment.
[0039] Furthermore, the k-means++ clustering algorithm is used to select better cluster centers. By adjusting the number of cluster centers in the clustering algorithm, the aspect ratio information of the prior bounding boxes is obtained. The accuracy of clustering is represented by calculating the average IOU value between different cluster centers and the ground truth coordinates. The aspect ratio information is used to match the default bounding box at each location in the feature map with the ground truth anchor box, enabling the model to more effectively separate the target from the background.
[0040] Next, the position loss and confidence loss of the matched default boxes (anchor boxes) are calculated. The total objective loss function is defined as a weighted sum of the confidence loss and the position loss. The model's loss function formula is as follows:
[0041] in, mA value of 0 or 1 indicates whether the default box matches the actual anchor box. n For the confidence level of the category, o It is the actual information of the detection frame. p This represents the actual information of the anchor boxes, and N is the number of default boxes matched. L conf Indicates confidence loss. L loc This represents the location loss, where 'a' is the weight of the two values, which can be set to 1. The confidence loss is the SoftMax loss, and its calculation formula is shown below:
[0042] in, pos Represents the positive sample set, ( cx , cy ) represents the center of the default box after regression to the offset, ( w , h The ) represents the width and height of the default box. Indicates the first i The first detection box and the first j Does the first real anchor frame match the first...? k A successful match is indicated by a value of 1, while a mismatch is indicated by a value of 0. Indicates the detection box. This represents the actual anchor frame.
[0043] The localization loss is the SmoothL1 loss between the parameters of the detection box and the ground truth anchor box, and its calculation formula is as follows:
[0044] in, neg Represents the negative sample set. Indicates the first i The first detection box and the first j A real anchor box for the category p If the match is found, then p The higher the detection probability, the smaller the loss function value. If there is no object in the detection box, the higher the probability of detecting it as background, the smaller the loss function value.
[0045] Finally, based on the clustering results, the clustering results for the target aspect ratios were 0.6753, 0.4012, 0.3484, 1.9141, 0.3303, 0.9820, 2.4495, 1.0089, 3.1087, and 2.9818, respectively. Therefore, in addition to the original model aspect ratios of 1 / 3, 1 / 2, 1, 2, and 3, two more aspect ratios, 2 / 5 and 5 / 2, were added.
[0046] Step 103: Improve the FSSD algorithm in the single-stage deep convolutional neural network to obtain the improved lightweight FSSD model, wherein the improved lightweight FSSD model includes an improved backbone network, a new feature pyramid structure, and a shallow feature enhancement module.
[0047] Next, in order to facilitate the deployment of detection models that can meet real-time detection and have good detection accuracy in constrained environments (such as embedded devices), the FSSD algorithm can be improved by combining the network structure characteristics of Squeezenet. The last two fully connected layers of VGG-16 can be replaced with convolutional layers, which can significantly reduce the number of parameters (fully connected layers have a high proportion of parameters), reduce the model size and computational complexity, and make it easier to deploy on resource-constrained edge devices (such as power inspection drones and embedded terminals in substations).
[0048] Replacing fully connected layers with convolutional layers preserves more spatial dimensional information, avoids the destruction of spatial structure caused by fully connected layers, enhances the semantic integrity of feature maps, and provides richer underlying information for subsequent feature fusion. Bilinear interpolation adjusts deep features (FC7, Conv7_2) to the same size as shallow features (Conv4_3), and different proportions of feature maps are fused to integrate high-level semantic information (such as target category) with low-level detail information (such as edges and textures), improving detection accuracy for small targets (such as distant insulators) and complex backgrounds. Traditional SSDs only utilize single-layer features for target detection, while the new feature pyramid, through cross-layer fusion, makes features of different depths complementary, reducing missed detections due to single features, especially in the detection of thermal faults in power equipment (such as localized overheating), enabling more accurate localization of abnormal regions. The shallow feature enhancement module extracts features from different receptive fields through a multi-branch structure, and after aggregation, increases semantic diversity, enhancing the model's adaptability to variations in the shape of power equipment (such as transformers at different angles). Replacing a 5×5 convolution with two 3×3 convolutions reduces the number of parameters (25 for a 5×5 convolution and 18 for two 3×3 convolutions) while maintaining the receptive field, thus reducing computational cost. Spatially separable convolutions (decomposed into 1×k and k×1) further reduce computational complexity and improve inference speed. Dilated convolutions expand the receptive field, capturing broader contextual information (such as the influence of the surrounding environment on heat distribution), improving detection robustness in complex scenarios. Channel attention mechanisms enable the model to focus on key feature channels (such as the channel corresponding to the heat-generating area of power equipment), suppressing redundant information. Batch normalization accelerates training convergence, stabilizes model performance, and reduces sensitivity to hyperparameters.
[0049] To address this, lightweight design reduces model resource requirements, while the feature pyramid and shallow enhancement modules compensate for potential accuracy loss due to lightweighting, achieving a balance between high accuracy (such as improved accuracy in power equipment defect detection) and high efficiency (such as increased real-time detection frame rate). Through the collaboration of clustering adaptive default boxes (preceding steps) and feature enhancement modules, the model is more adaptable to the diverse forms of power equipment (such as different models and installation angles), exhibiting more stable performance in cross-scenario detection (such as substations and transmission lines). The reduced model size and faster inference speed meet the power industry's demands for real-time performance (such as online monitoring) and resource constraints (such as edge computing), providing an efficient tool for intelligent operation and maintenance of power equipment.
[0050] Specifically, the process of improving the FSSD algorithm in single-stage deep convolutional neural networks, for example: First, bilinear interpolation is used to adjust the feature layers FC7 and Conv7_2 to the same size as Conv4_3. Then, these feature maps with different proportions are fused to form a new feature pyramid. To address the issue that Conv4_3 has a small receptive field and weaker semantic information than deep feature maps, a shallow feature enhancement module is designed. Batch normalization is used at the top of the convolutional layer in each branch to process the operational information. This reduces computational cost while allowing feature extraction from different directions, thus accelerating the model's convergence speed.
[0051] In designing the shallow feature module, multiple branches are first used to extract features, and then these branches are aggregated to increase semantic information. Each branch first undergoes dimensionality reduction through a 1x1 filter, and then extracts features through filters of different sizes. Since each branch has a different convolutional form, multiple channels contain semantic and detail information at different depths. By fusing the output information of these branches, the network's ability to detect targets at different scales in complex backgrounds can be improved.
[0052] To reduce computational cost, this module replaces the 5x5 filter in the branch with two cascaded 3x3 convolutions, maintaining the receptive field while deepening the nonlinear layer. Simultaneously, spatially separable convolutions are used to divide the kxk filter into 1xk and kx1 filters to avoid repetitive feature extraction. Furthermore, the last filter in each branch uses dilated convolutions with different dilation rates, enabling the network to capture more feature information.
[0053] Finally, batch normalization is used at the top of the convolutional layer of each branch to normalize the operational information, thereby accelerating the convergence speed of the model.
[0054] Optionally, step 103, "improving the FSSD algorithm in a single-stage deep convolutional neural network to obtain an improved lightweight FSSD model," specifically includes: Step 1031: Replace the last two fully connected layers in the basic backbone network of the FSSD algorithm with convolutional layers to obtain an improved backbone network, wherein the improved backbone network is used for feature extraction.
[0055] Step 1032: Construct a new feature pyramid structure, wherein the new feature pyramid structure adjusts the feature layer size and fuses feature maps of different proportions through bilinear interpolation.
[0056] Step 1033: Construct a shallow feature enhancement module, wherein the shallow feature enhancement module uses multiple branches to extract features and aggregates the features extracted by each branch. The shallow feature enhancement module improves upon convolutional forms, applies spatially separable convolutions, uses dilated convolutions, performs batch normalization operations, and introduces a channel attention mechanism.
[0057] Step 1034: Based on the improved backbone network, the new feature pyramid structure, and the shallow feature enhancement module, the improved lightweight FSSD model is obtained.
[0058] In the above embodiments of this application, the basic backbone network of the FSSD algorithm is VGG-16. Specifically, the improved novel feature fusion form SSD is a novel feature fusion FSSD. First, a backbone network is constructed, which transforms the last two fully connected layers of VGG-16 into convolutional layers. The second part is a new feature pyramid structure. First, bilinear interpolation is used to adjust the feature layers FC7 and Conv7_2 to the same size as Conv4_3. Then, these feature maps with different proportions are fused to form a new feature pyramid. For this shallow feature enhancement module, multiple branches are used to extract features and aggregate them to increase semantic information. Each branch first undergoes dimensionality reduction through a 1*1 filter, and then extracts features through filters of different sizes. The output information of these branches is fused to improve the network's ability to detect targets of different scales in complex backgrounds. At the same time, two 3*3 convolutional cascades are used to replace the 5*5 filter in the branch, keeping the receptive field unchanged while deepening the nonlinear layer. In addition, spatially separable convolutions are used to divide the k*k filter into 1*k and k*1 filters. Dilated convolutions with different dilation rates are used on the last filter of each branch. This allows the network to capture more feature information. Finally, batch normalization is used at the top of the convolutional layer of each branch to normalize the operational information, accelerating the convergence speed of the model.
[0059] Specifically, using filters of different sizes and spatially separable convolutions in different branches reduces computational cost when filter sizes are the same, allowing extracted image features to have different orientations and avoiding feature repetition. To avoid gradient vanishing and gradient exploding, batch normalization (BN) is added to each convolutional layer to improve model convergence. Since residual connections are effective for training deeper structures, a residual connection incorporating channel attention is added to enhance the network's representational power and the ability of branches to extract features from different channels.
[0060] To address this, the model is lightweighted by modifying the backbone network of FSSD. At the same time, different connection branches are added to the backbone network to enhance the transmission of feature information, thereby reducing the impact of lightweighting on detection accuracy.
[0061] Optionally, in step 1031, the last two fully connected layers in the basic backbone network of the FSSD algorithm are replaced with convolutional layers, specifically including: Step 10311: Based on the basic backbone network of the FSSD algorithm, remove Conv10 and the global max pooling layer, and add Fire10.
[0062] In the embodiments described above, the backbone network of FSSD is modified based on the network structure characteristics of Squeezenet to improve the utilization of shallow detailed feature information and enhance the model's detection performance. Conv10 and global max pooling layers are removed from the Squeezenet network, and Fire10 is added. The modified structure then replaces the VGG-16 structure as the basic backbone network of FSSD. The addition of progressively smaller convolutional layers after the backbone network improves the model's feature extraction capabilities. Furthermore, to enhance the utilization of shallow detailed feature information and ensure good detection performance, a multi-scale detection approach combining shallow and deep feature maps can be used.
[0063] The most important part of SqueezeNet is the Fire module. The Fire module's structure mainly consists of two different convolutional layers: the squeeze layer and the expand layer. For example... Figure 4 The squeeze layer is essentially a convolutional layer composed of multiple 1x1 filters, and the expand layer is essentially a convolutional layer composed of the same number of 1x1 filters and 3x3 filters. Because the Fire module embodies the first two design strategies of SqueezeNet, using this module can significantly reduce the number of model parameters. Figure 4In neural networks, "squeeze" refers to compressing the feature map. "Expand" refers to expanding the feature map. "ReLU" stands for Rectified Linear Unit, a commonly used activation function. "1×1 convolutional filter" refers to a filter with a 1×1 kernel. "1×1 and 3×3 convolutional filters" refers to filters containing both 1×1 and 3×3 kernel sizes.
[0064] Specifically, experiments were conducted to investigate the impact of various SqueezeNet structures on detection performance, and a detailed study and discussion of the detection results were carried out. All models employed a strategy of random weight initialization. By controlling the number of iterations and the ratio of the training set, the experimental results were analyzed to obtain the optimal model. Simultaneously, a "warmup" strategy was used to address the instability caused by loss fluctuations during training. The input data size was 300*300 pixels, with 16 images trained in batches. The learning rate was set to 0.001, momentum to 0.9, weight decay to 0.0005, and the number of iterations to 200,000. The default value for the Intersection over Union (IOU) between the prior bounding boxes and the ground truth anchor boxes was set to 0.5.
[0065] Finally, the improved lightweight models with different structures were compared with lightweight networks and prototypes such as Mobile-SSD, Squeeze-SSD, and Tiny-yolov3. The results are shown in Tables 2, 3, and 4.
[0066] Table 2
[0067] Table 3
[0068] Table 4
[0069] Table 2 shows the detection time and model size of different models on the infrared image dataset of power equipment. It can be seen that the detection results of the models increase with the increase of the training set. For comparison, Sq1_0 and Sq1_1 can be used to represent the improved models with Squeezenet1_0 and Squeezenet1_1 as network backbones, respectively. a, b, and c can be used to represent the improved models without bypass, with simple bypass, and with complex bypass, respectively. 1 represents Mobile-SSD, 2 represents Squeeze-SSD, 3 represents Tiny-yolov3, 4-6 represent the three networks a, b, and c of Sq1_0, 7-9 represent the three networks a, b, and c of Sq1_1, and 10 represents SSD. It can be seen that using bypass can effectively improve detection accuracy with a slight increase in detection time, while maintaining the same model size.
[0070] Table 3 shows the detection time and model size for different models, and Table 4 shows the detection accuracy of different models for five different types of power equipment. Compared with other models, Sq1_0_c's model size is nearly 1.6 times smaller than Mobile-SSD, its detection speed is also improved, and its detection accuracy is higher than Mobile-SSD. Although Sq1_0_c's detection time is slightly longer than Tiny-Yolov3, its model size is 1.75 times smaller than Tiny-Yolov3, and its detection accuracy is much higher than Tiny-Yolov3. Compared with other improved models, although Sq1_0_c's model size and detection time are slightly increased, its detection accuracy is the highest, and its model size is very small compared to SSD. Therefore, compared with other improved models, the slightly increased time cost and model size of Sq1_0_c are negligible. Sq1_0_c's model size is nearly 5 times smaller than SSD, and its detection speed is 3.8 times faster than SSD. Although its accuracy is lower than SSD, it can still achieve a high detection accuracy of 87.82% when using the model weight initialization strategy, and its detection speed meets the requirements for real-time detection. Therefore, considering all factors, Sq1_0_c has the best overall performance.
[0071] Optionally, each branch in the shallow feature enhancement module undergoes dimensionality reduction using a 1*1 filter and feature extraction using filters of different sizes. The shallow feature enhancement module replaces the 5*5 filter in the branch with two cascaded 3*3 convolutions. The shallow feature enhancement module utilizes spatially separable convolution to divide the k*k filter into 1*k and k*1 filters. The shallow feature enhancement module applies dilated convolutions with different dilation rates to the last filter of each branch. The shallow feature enhancement module uses batch normalization to normalize the operation information at the top of the convolutional layer of each branch.
[0072] In the above embodiments of this application, Figure 5The structure of the feature enhancement module is shown. Each branch first uses a 1x1 filter for dimensionality reduction, and the last convolutional layer of each branch uses dilated convolutions with different dilation rates for downsampling. Dilated convolutions can expand the receptive field without reducing spatial resolution or increasing computational cost, thus obtaining more global information. By adding dilation to the filters, the filters can be expanded to a certain size, and by using different dilation rates, multi-scale information can be introduced. Using filters of different sizes in different branches with spatially segregating convolutions reduces the computational cost when the filter size is the same, allowing the extracted image features to have features in different directions, avoiding feature repetition. To avoid gradient vanishing and gradient exploding, batch normalization (BN) is added to each convolutional layer to improve the model's convergence.
[0073] Specifically, using a 1×1 filter for dimensionality reduction in each branch reduces the number of channels in the feature map. A reduced number of channels means less data needs to be processed in subsequent convolutional operations, thus lowering computational complexity. For example, if the input feature map has 256 channels, reducing it to 64 channels after 1×1 filtering significantly reduces the computational cost of subsequent convolutional operations, improving the model's inference speed.
[0074] 1×1 convolutions not only change the number of channels but also linearly combine input features to extract feature correlations between different channels. This enhances feature representation, enabling the model to better capture key features in infrared images of power equipment. Replacing a 5×5 filter with two cascaded 3×3 convolutions significantly reduces the number of parameters: a single 5×5 convolution kernel has 5×5=25 parameters, while two 3×3 kernels have 3×3+3×3=18 parameters. This reduces model complexity, mitigates overfitting, and decreases storage and computational costs. The cascaded 3×3 convolutions pass through an activation function, introducing more nonlinearity. This nonlinearity allows the model to learn more complex feature mappings, improving its ability to fit power equipment features and thus increasing detection accuracy. Dividing a k×k filter into 1×k and k×1 filters, spatially separable convolutions greatly reduces the computational cost of convolution operations. For example, a standard 3×3 convolution requires 9 multiplication operations, while spatially separable convolutions (1×3 and 3×1) require only 6. This reduction in computational complexity allows the model to run quickly even on resource-constrained devices. Spatially separable convolutions can extract features independently in different directions, more effectively capturing horizontal and vertical features of an image. In infrared images of power equipment, spatially separable convolutions can better extract features from equipment with distinct directional characteristics (such as transmission lines). Dilated convolutions with different dilation rates can expand the receptive field of the convolution kernel without increasing the number of parameters. For example, a dilated convolution with a dilation rate of 2 has a receptive field equivalent to a larger kernel, but the number of parameters remains the same. This allows the model to capture a wider range of contextual information, which is very helpful for detecting the overall features of power equipment and information about its surrounding environment. By using dilated convolutions with different dilation rates in different branches, features at different scales can be extracted. Features at different scales can better adapt to the detection needs of power equipment of varying sizes and complexities, improving the model's multi-scale detection capabilities. Batch normalization can stabilize the distribution of input data and reduce internal covariate bias. This allows the model to converge faster during training, reducing training time. In infrared image detection tasks for power equipment, it enables faster model training and improves development efficiency. Batch normalization normalizes the input data, making the model more robust to changes in the input data. It can alleviate the vanishing and exploding gradient problems, improve the model's stability and generalization ability, and enable the model to perform well in different power equipment detection scenarios.
[0075] Optionally, the new feature pyramid structure is used to connect feature layers of different depths, including Maxpool2, Maxpool3, and Fire10.
[0076] In the above embodiments of this application, a better lightweight FSSD model is proposed, that is, a new feature enhancement module is used to connect feature layers of different depths (Maxpool2, Maxpool3, Fire10) and a channel attention mechanism is introduced, which can further enhance the semantic details of the features and improve the model's ability to detect targets at different scales.
[0077] Specifically, a lightweight feature fusion approach is adopted, forming a new feature pyramid by connecting feature layers of different depths (Maxpool2, Maxpool3, and Fire10) to fully utilize shallow feature information and improve detection accuracy. Simultaneously, two feature maps are extracted from the backbone network for detection. A novel feature enhancement module is used to improve its ability to extract infrared image features from power equipment, addressing the issues of small receptive fields and weak semantic information in shallow networks, and improving the model's detection capabilities in spatial dimensions and channels. This allows for further optimization and enhances the model's detection performance.
[0078] To address this, a lightweight feature fusion approach is adopted, forming a new feature pyramid by connecting feature layers of different depths (Maxpool2, Maxpool3, and Fire10) to fully utilize shallow feature information and improve detection accuracy. Simultaneously, two feature maps are extracted from the backbone network for detection. A novel feature enhancement module is employed to improve its ability to extract infrared image features from power equipment, addressing the issues of small receptive fields and weak semantic information in shallow networks. The improved lightweight FSSD model structure is as follows: Figure 6 As shown. Furthermore, a channel attention mechanism is introduced in the new feature enhancement module, enabling the model to adaptively learn the relationships between feature map channels, emphasizing useful information and suppressing redundant information, thereby improving the model's detection capabilities in terms of spatial dimension and channels.
[0079] Optionally, the improved backbone network is detected by being input two feature maps and is introduced with a channel attention mechanism, which is used to adaptively learn the relationship between the channels of the feature maps.
[0080] In the embodiments described above, the improved backbone network, through the combination of dual feature map detection and channel attention mechanism, achieves enhanced multi-scale target detection capabilities, optimized feature quality, and improved computational efficiency, while expanding its application potential in small target detection and complex scene adaptation. These beneficial effects have been empirically supported in multiple fields such as target detection, image classification, and medical image analysis, providing an effective solution for the design of high-performance lightweight models.
[0081] Step 104: Train the improved lightweight FSSD model based on the clustered infrared image training dataset, so that the trained improved lightweight FSSD model can output a detected infrared image containing detection boxes from a new input infrared image to be detected. The detected infrared image contains detection boxes that select the detected power equipment. The detection boxes correspond to detection information, which includes the type and location of the detected power equipment and the confidence level of the detected type.
[0082] Next, the clustered infrared image dataset (e.g., divided into 5 categories of power equipment targets using k-means++ clustering) can be divided into training and validation sets in a 7:3 ratio to ensure a balanced distribution of targets in each category. Anchor box files (XML / JSON format) are generated, recording the target category and bounding box coordinates. The improved lightweight FSSD model is then trained using the clustered infrared image training dataset, with an input size of, for example, 300×300×3 (three channels of infrared image). For multi-scale feature map allocation during training, anchor boxes can be assigned to different feature layers (e.g., Conv4_3, Conv7, Conv8_2, etc.) to match the target scale.
[0083] also, Figure 7 The results of the improved lightweight FSSD model after training demonstrate its ability to accurately detect equipment categories and locate electrical equipment precisely in infrared images. The detection results for surge arresters, circuit breakers, disconnectors, transformers, and insulators correspond to the white, cyan, yellow, green, and red bounding boxes in the image, respectively. These bounding boxes represent the locations of the targets identified by the model, and the values next to these bounding boxes represent the confidence level of the detected categories. Figure 7 In this context, FLIR stands for Forward Looking Infrared, indicating the use of infrared thermal imaging technology. These images are infrared thermal images captured by FLIR equipment. A switch, in a power system, is a device used to control the opening and closing of circuits. A circuit breaker is a device that automatically disconnects a circuit, used to protect power systems from overloads, short circuits, and other faults. An instrument transformer, including current transformers and voltage transformers, is used to convert high voltage and large current into low voltage and small current for use by measurement and protection devices. An insulator, in a power system, provides electrical insulation and mechanical support, ensuring good insulation performance between live parts and grounded parts. Figure 7 The values in the table can correspond to location information.
[0084] Specifically, to evaluate the impact of various design strategies in the model on the detection results, a series of ablation experiments were conducted on the infrared image dataset of power equipment. During training, Batch Normalization (BN) was used to reduce the dependence on parameter initialization, resulting in more stable loss changes and gradient changes, thus avoiding the gradient explosion problem and improving generalization ability to some extent. Therefore, the improved model incorporates BN in the convolutional layers to balance the impact of the lightweight backbone network on training. The improved lightweight model was compared with SSD, FSSD, SSD-mobilenet (denoted as F-mnet), and the improved FSSD method, denoted as Ours1. 1 represents the model with a modified FSSD backbone network and added BN layers; 2 represents the model with a modified activation function based on 1; 3 represents the model with a new feature enhancement module added based on 2; and 4 represents the model with a channel attention mechanism added based on 3. The results of the ablation experiments are shown in Table 5. To verify the model's performance, all models were trained and tested under the same conditions, and all adopted a strategy of random weight initialization. Since the parameters of all convolutional layers are randomized at the start of training, a "warmup" strategy is still used to prevent instability in the training process due to numerical instability. Table 5 shows the detailed experimental results for different models. Figure 8 The results demonstrate the detection performance of Ours2 on infrared images of five types of power equipment.
[0085] Table 5
[0086] As shown in Table 5, Ours1 has the highest detection accuracy, but Ours3 still achieves good accuracy. Furthermore, Ours3's model size is only 54.72% of Ours1's, and its detection speed is also faster. Although other lightweight models are faster than Ours3, their detection accuracy is lower. Ours3 achieves both lightweight design and meets the requirements for real-time detection with good results. Ours2 has the smallest model size. Although its detection accuracy is slightly lower, its model size is only 43.43% of FSSD's, and its detection speed is the fastest, meeting both lightweight and real-time detection requirements. Ours2's model size is only 51.32% of Ours3's, and its speed is faster than Ours3's. Although Ours2's accuracy is lower than Ours3's, it is still satisfactory. Therefore, considering all factors, the improved lightweight FSSD model with modified activation function is the optimal detection model and is suitable for situations with significant environmental constraints (such as drones and handheld cameras on mobile terminals).
[0087] By applying the technical solution of this embodiment, an improved FSSD-based detection method is proposed. This method combines multi-scale feature maps with a feature enhancement module to improve its ability to extract infrared image features of substation power equipment. Detailed experiments and discussions were conducted on the impact of different SqueezeNet structures on the SSD model's detection performance, and an improved lightweight SSD-based detection method was proposed. This method achieves model lightweighting by modifying the backbone network and improves feature extraction and model fitting capabilities by adding multiple different connection branches and convolutional layers to compensate for the impact of model lightweighting on detection accuracy. Based on the aforementioned research, an improved lightweight FSSD real-time detection method was proposed through ablation experiments and analysis. The training stability of the model was improved by optimizing the activation function and other optimization strategies. Experimental results show that the proposed model not only has a smaller size but also improved accuracy compared to the original model, enabling fast and accurate classification and localization.
[0088] Furthermore, as Figure 1 In terms of specific implementation, this application provides an infrared image detection device for power equipment, such as... Figure 9 As shown, the device includes: The power equipment infrared image acquisition module 201 is used to acquire an infrared image dataset containing multiple types of power equipment. The infrared image dataset includes multiple infrared images, and the power equipment in the infrared images corresponds to an anchor frame, and the anchor frame corresponds to an aspect ratio. The power equipment anchor frame clustering module 202 is used to cluster anchor frames in the infrared image dataset based on the k-means++ clustering algorithm and the aspect ratio of the anchor frames, so as to obtain the clustered infrared image training dataset. The improved lightweight FSSD model construction module 203 is used to improve the FSSD algorithm in a single-stage deep convolutional neural network to obtain an improved lightweight FSSD model. The improved lightweight FSSD model includes an improved backbone network, a new feature pyramid structure, and a shallow feature enhancement module. The improved lightweight FSSD model training and detection module 204 is used to train the improved lightweight FSSD model based on the clustered infrared image training dataset, so that the trained improved lightweight FSSD model can output a detected infrared image containing detection boxes from a newly input infrared image to be detected. The detected infrared image contains detection boxes that select the detected power equipment, and the detection boxes correspond to detection information, including the type, location and confidence level of the detected power equipment.
[0089] It should be noted that other corresponding descriptions of the functional units involved in the infrared image detection device for power equipment provided in this application embodiment can be found by referring to... Figure 1 The corresponding descriptions in the method will not be repeated here.
[0090] Based on the above, Figure 1 Accordingly, this application also provides a medium on which a computer program is stored, which, when executed by a processor, implements the above-described method. Figure 1 The method for detecting power equipment using infrared images is shown.
[0091] Based on this understanding, the technical solution of this application can be embodied in the form of a software product, which can be stored in a non-volatile medium (such as CD-ROM, USB flash drive, mobile hard drive, etc.) and includes several instructions to cause a computer device (such as personal computer, server, or network device, etc.) to execute the methods described in various implementation scenarios of this application.
[0092] Based on the above, Figure 1 The method shown, and Figure 9 To achieve the above objectives, the present application also provides a computer device, specifically a personal computer, server, network device, etc., as shown in the virtual device embodiment. This computer device includes a medium and a processor; the medium stores a computer program; the processor executes the computer program to achieve the above-described objectives. Figure 1 The method for detecting power equipment using infrared images is shown.
[0093] Optionally, the computer device may also include a user interface, a network interface, a camera, radio frequency (RF) circuitry, sensors, audio circuitry, a Wi-Fi module, etc. The user interface may include a display screen, input units such as a keyboard, etc., and optional user interfaces may also include USB ports, card reader ports, etc. The network interface may optionally include standard wired interfaces, wireless interfaces (such as Bluetooth interfaces, Wi-Fi interfaces), etc.
[0094] Those skilled in the art will understand that the computer device structure provided in this embodiment does not constitute a limitation on the computer device, and may include more or fewer components, or combine certain components, or have different component arrangements.
[0095] The medium may also include an operating system and a network communication module. The operating system is a program that manages and stores the hardware and software resources of a computer device, supporting the operation of information processing programs and other software and / or programs. The network communication module is used to enable communication between the various components within the medium, as well as communication with other hardware and software within the physical device.
[0096] Through the above description of the implementation methods, those skilled in the art can clearly understand that this application can be implemented by means of software plus necessary general-purpose hardware platforms, or by hardware implementation using the K-Means++ clustering algorithm to cluster the aspect ratio information of power equipment targets in infrared image datasets, and to achieve adaptive changes in the aspect ratio of default boxes (anchor boxes); an improved lightweight FSSD (Feature Fusion Single Shot MultiBox Detector) model is proposed, which utilizes the network structure characteristics of Squeezenet (a lightweight and efficient convolutional neural network model); by modifying the FSSD backbone network, the model is made lightweight, and the final experimental model is determined through ablation experiments. The model is trained and tested on infrared image datasets of various power equipment, which can quickly and accurately detect power equipment. Furthermore, by adding multiple convolutional layers and connection branches, the impact of model lightweighting on detection accuracy is compensated, which can improve the automated detection capability and detection accuracy of power equipment in substations.
[0097] Those skilled in the art will understand that the accompanying drawings are merely schematic diagrams of a preferred embodiment, and the modules or processes shown in the drawings are not necessarily essential for implementing this application. Those skilled in the art will understand that the modules in the apparatus of the embodiment can be distributed within the apparatus of the embodiment as described, or can be modified to be located in one or more apparatuses different from this embodiment. The modules of the above-described embodiment can be combined into one module, or further divided into multiple sub-modules.
[0098] The serial numbers in this application are for descriptive purposes only and do not represent the superiority or inferiority of any particular implementation scenario. The above disclosures are merely a few specific implementation scenarios of this application; however, this application is not limited thereto, and any modifications that can be made by those skilled in the art should fall within the protection scope of this application.
Claims
1. A method for infrared image detection of power equipment, characterized in that, The method includes: Obtain an infrared image dataset containing various types of power equipment, wherein the infrared image dataset includes multiple infrared images, and the power equipment in the infrared images corresponds to an anchor frame, and the anchor frame corresponds to an aspect ratio; Based on the k-means++ clustering algorithm and the aspect ratio of the anchor boxes, the anchor boxes in the infrared image dataset are clustered to obtain the clustered infrared image training dataset. An improved lightweight FSSD model is obtained by improving the FSSD algorithm in a single-stage deep convolutional neural network. The improved lightweight FSSD model includes an improved backbone network, a new feature pyramid structure, and a shallow feature enhancement module. An improved lightweight FSSD model is trained based on a clustered infrared image training dataset. The trained improved lightweight FSSD model can output a detected infrared image containing detection boxes from a new input infrared image to be detected. The detected infrared image contains detection boxes that select the detected electrical equipment. Each detection box corresponds to detection information, which includes the type and location of the detected electrical equipment and the confidence level of the detected type.
2. The method according to claim 1, characterized in that, The improvement of the FSSD algorithm in a single-stage deep convolutional neural network, resulting in an improved lightweight FSSD model, includes: The last two fully connected layers in the basic backbone network of the FSSD algorithm are replaced with convolutional layers to obtain an improved backbone network, which is used for feature extraction. A new feature pyramid structure is constructed, wherein the new feature pyramid structure adjusts the feature layer size and fuses feature maps of different proportions through bilinear interpolation; A shallow feature enhancement module is constructed, wherein the shallow feature enhancement module uses multiple branches to extract features and aggregates the features extracted by each branch. The shallow feature enhancement module improves the convolution form, applies spatially separable convolution, uses dilated convolution, performs batch normalization, and introduces a channel attention mechanism. Based on the improved backbone network, the new feature pyramid structure, and the shallow feature enhancement module, an improved lightweight FSSD model is obtained.
3. The method according to claim 2, characterized in that, The step of replacing the last two fully connected layers in the basic backbone network of the FSSD algorithm with convolutional layers includes: Based on the FSSD algorithm's backbone network, Conv10 and the global max pooling layer are removed, and Fire10 is added.
4. The method according to claim 2, characterized in that, In the shallow feature enhancement module, each branch undergoes dimensionality reduction using a 1*1 filter and feature extraction using filters of different sizes. The shallow feature enhancement module replaces the 5*5 filter in the branch with two cascaded 3*3 convolutions. The shallow feature enhancement module utilizes spatially separable convolution to divide the k*k filter into 1*k and k*1 filters. The shallow feature enhancement module applies dilated convolutions with different dilation rates to the last filter of each branch. The shallow feature enhancement module uses batch normalization to normalize the operation information at the top of the convolutional layer of each branch.
5. The method according to claim 1, characterized in that, The new feature pyramid structure is used to connect feature layers of different depths, including Maxpool2, Maxpool3, and Fire10.
6. The method according to claim 1, characterized in that, The improved backbone network is detected by being fed two feature maps and is equipped with a channel attention mechanism, which is used to adaptively learn the relationship between the channels of the feature maps.
7. The method according to any one of claims 1 to 6, characterized in that, The method of clustering anchor boxes in the infrared image dataset based on the k-means++ clustering algorithm and the aspect ratio of the anchor boxes includes: When clustering anchor frames of power equipment in infrared image datasets using the k-means++ clustering algorithm, the aspect ratio of the anchor frames in the infrared images is used as the key feature, and an aspect ratio is randomly selected in the infrared image dataset as the initial cluster center. Calculate the aspect ratio of the remaining anchor frames and the distance to the selected initial cluster center, and select the next cluster center according to the distance probability distribution until the preset number of cluster centers are determined; All anchor frames are assigned to the nearest cluster based on their aspect ratios and distances from the cluster center. The center of each cluster is recalculated, and the process of iteratively allocating and updating the center is performed until the center no longer changes.
8. An infrared image detection device for power equipment, characterized in that, The device includes: An infrared image acquisition module for power equipment is used to acquire an infrared image dataset containing multiple types of power equipment. The infrared image dataset includes multiple infrared images, and the power equipment in the infrared images corresponds to an anchor frame, which corresponds to an aspect ratio. The power equipment anchor frame clustering module is used to cluster anchor frames in the infrared image dataset based on the k-means++ clustering algorithm and the aspect ratio of the anchor frames, so as to obtain the clustered infrared image training dataset. An improved lightweight FSSD model construction module is used to improve the FSSD algorithm in a single-stage deep convolutional neural network to obtain an improved lightweight FSSD model. The improved lightweight FSSD model includes an improved backbone network, a new feature pyramid structure, and a shallow feature enhancement module. The improved lightweight FSSD model training and detection module is used to train the improved lightweight FSSD model based on the clustered infrared image training dataset. The trained improved lightweight FSSD model can output a detected infrared image containing detection boxes from a newly input infrared image to be detected. The detected infrared image contains detection boxes that select the detected electrical equipment. The detection boxes correspond to detection information, which includes the type and location of the detected electrical equipment and the confidence level of the detected type.
9. A medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the method for infrared image detection of power equipment as described in any one of claims 1 to 7.
10. A computer device, comprising a medium, a processor, and a computer program stored on the medium and executable on the processor, characterized in that, When the processor executes the computer program, it implements the method for infrared image detection of power equipment as described in any one of claims 1 to 7.