Instance segmentation method and system for infrared image of power equipment
Through the improved MobileNetV3-ECA-Deformable model and dynamic loss weight strategy, the problem of low detection accuracy and high computational complexity of infrared image instance segmentation method of power equipment is solved, and efficient and accurate segmentation effect is achieved and suitable for embedded devices.
Patent Information
- Application Number
- CN202510258992.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-06
- Publication Date
- 2025-04-04
- Estimated Expiration
- 2045-03-06
AI Technical Summary
The existing infrared image instance segmentation method of power equipment has low detection accuracy and high computational complexity, making it difficult to apply to embedded equipment environments with resource-constrained.
The improved MobileNetV3-ECA-Deformable model is used to replace the backbone network in the original Mask R-CNN model, enhance feature extraction through ECA attention mechanism and deformable convolution, and design dynamic loss weight and learning rate adjustment strategies.
Effectively alleviate the problem of segmentation fuzzy in complex environments, improve detection accuracy, reduce calculation complexity, support embedded device deployment, and significantly improve training efficiency.
Smart Images

Figure CN119762789A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of intelligent monitoring and fault diagnosis of electric power equipment, and in particular to an instance segmentation method and system for infrared images of electric power equipment. Background Art
[0002] As the scale of power equipment continues to expand, traditional manual inspections can no longer meet the needs of efficient and accurate monitoring. Especially in fault monitoring, rapid and accurate detection of potential problems is the key to improving system reliability and reducing equipment failures. Intelligent monitoring and fault diagnosis technology has become an important part of power system management, which can monitor equipment operation in real time and detect abnormalities in a timely manner.
[0003] Infrared images are widely used in fault diagnosis of power equipment. They can accurately identify temperature anomalies and infer the occurrence of faults. They are particularly sensitive to high-temperature fault detection. However, due to the diversity and complex environment of power equipment, targets in infrared images are often interfered by complex backgrounds, occlusions, and noise, which increases the difficulty of target detection and instance segmentation tasks.
[0004] Mask R-CNN (Regional Convolutional Neural Network) is a deep learning algorithm that excels in object detection and instance segmentation tasks. It can accurately identify multiple objects in an image and perform fine segmentation, and is widely used in medical imaging, autonomous driving, security monitoring and other fields. However, despite its significant advantage in accuracy, Mask R-CNN has high computational complexity and requires powerful computing resources and a large amount of memory, which makes it difficult to deploy on resource-constrained embedded devices or edge devices. In addition, traditional network structures have certain limitations in feature extraction, especially at low computational overhead, making it difficult to achieve efficient and accurate fault diagnosis.
[0005] Therefore, a network structure is needed that can both efficiently extract features and reduce computational complexity so as to be better applied to infrared image segmentation of power equipment. Summary of the invention
[0006] In view of the shortcomings of the prior art, the present invention provides a method and system for instance segmentation of infrared images of power equipment, which aims to solve the technical problems that the existing instance segmentation method of infrared images of power equipment has low detection accuracy, high computational complexity, and is difficult to apply to resource-constrained environments such as embedded devices.
[0007] To achieve the above object, the present invention provides the following technical solution: an instance segmentation method for infrared images of power equipment, comprising the following steps: Step S1: Acquire an infrared image of the power equipment; Step S2: preprocessing the infrared image, including denoising and enhancement processing; Step S3: annotating the power equipment area in the preprocessed infrared image; constructing a data set using the annotated infrared image, and dividing the data set into a training set, a validation set, and a test set; Step S4: construct an improved Mask R-CNN model; the improved Mask R-CNN model replaces the backbone network of the original Mask R-CNN model with the MobileNetV3 model, embeds a deformable depth-separable convolution in the bottleneck layer of the MobileNetV3 model, and uses the ECA attention mechanism to replace the SE attention mechanism of the MobileNetV3 model; Step S5: Use the training set to train the improved Mask R-CNN model, use the validation set to validate it, and at the same time, adjust the classification loss weight and mask loss weight of the improved Mask R-CNN model, and adjust the learning rate of the improved Mask R-CNN model in combination with the cosine annealing strategy and the Adam optimizer to obtain the optimal improved Mask R-CNN model; Step S6: Input the test set into the optimal improved Mask R-CNN model and output the segmentation result.
[0008] Furthermore, the specific process of constructing an improved Mask R-CNN model based on the MobileNetV3-ECA-Deformable backbone network is as follows: Build a MobileNetV3 model, replace the SE attention mechanism of the MobileNetV3 model with the ECA attention mechanism, and obtain the MobileNetV3-ECA model; In at least one bottleneck layer of the MobileNetV3-ECA model, the standard depthwise separable convolution is improved to a deformable depthwise separable convolution, thereby obtaining the MobileNetV3-ECA-Deformable model; the specific process of improving the standard depthwise separable convolution to the deformable depthwise separable convolution is as follows: replacing the standard convolution in the depthwise convolution within the depthwise separable convolution in the bottleneck layer of the MobileNetV3-ECA model with a deformable convolution, thereby obtaining the deformable depthwise separable convolution; Build a Mask R-CNN model and replace the backbone network ResNet101 in the Mask R-CNN model with the MobileNetV3-ECA-Deformable model to obtain an improved Mask R-CNN model.
[0009] Furthermore, we design and improve the classification loss function of the Mask R-CNN model. And the mask loss function ; Improving the classification loss function of the Mask R-CNN model It is expressed as: ,in, is the weight hyperparameter, represents the focal loss function, represents the center loss function; Improving the mask loss function of the Mask R-CNN model It is expressed as: ; In the formula, is the loss weight coefficient; is the average binary cross entropy mask loss function; is the Dice-Laplacian loss function; The loss function is expressed as: ; In the formula, is the index of the category; Indicates the total number of categories; Indicates The true labels of samples; Indicates Infrared images; Represents the total number of samples.
[0010] Furthermore, the specific process of step S5 is as follows: Step S5.1: Input the infrared image in the training set into the backbone network of the improved Mask R-CNN model to convert it into a high-dimensional feature map, generate a candidate region through the candidate box extraction network RPN, perform spatial alignment on the candidate region, and then adjust the classification loss weight and mask loss weight of the improved Mask R-CNN model; Step S5.2: Combine the cosine annealing strategy and the Adam optimizer to adjust the learning rate of the improved Mask R-CNN model and update the weights of the improved Mask R-CNN model during training; based on the total loss function and the current learning rate of the improved Mask R-CNN model, back propagate and optimize through the gradient descent method to adjust the parameters of the improved Mask R-CNN model; Step S5.3: Use the validation set to verify whether the improved Mask R-CNN model meets the expected requirements. If it does, stop training, output and save the improved Mask R-CNN model at this time, that is, the optimal improved Mask R-CNN model.
[0011] Furthermore, the specific process of adjusting the classification loss weight and mask loss weight of the improved Mask R-CNN model is as follows: According to the current training cycle of the improved Mask R-CNN model Adjust classification loss weight and mask loss weight , the first 10% training cycles: , , 10%-100% training cycle: , ;in, is the classification loss weight for the first 10% of training cycles, is the mask loss weight for 10%-100% training cycles, is the mask loss weight attenuation rate, is the mask loss weight attenuation period, To improve the total training cycle of the Mask R-CNN model; Improving the total loss function of the Mask R-CNN model for: ; Combined with the cosine annealing strategy and the Adam optimizer, the learning rate of the improved Mask R-CNN model is adjusted, and the weights during training of the improved Mask R-CNN model are updated, which is expressed as: ; ; In the formula, To improve the learning rate of the Mask R-CNN model; for The minimum value of for The maximum value of is the cosine function; and are estimates of the mean and variance of the gradient, respectively; A small constant to prevent division by zero; Indicated in Improve the values of Mask R-CNN model parameters at the iteration; Indicated in Improve the values of the Mask R-CNN model parameters at each iteration.
[0012] Furthermore, after obtaining the segmentation results, four evaluation indicators, namely precision, recall, average precision and frames per second, are used to evaluate the segmentation results.
[0013] An instance segmentation system for infrared images of power equipment, comprising: An image acquisition module, used for acquiring infrared images of power equipment; An image preprocessing module is used to preprocess infrared images, including denoising and enhancement processing; An image annotation and division module is used to annotate the power equipment area in the preprocessed infrared image; construct a data set using the annotated infrared image, and divide the data set into a training set, a validation set, and a test set; Model building module, used to build an improved Mask R-CNN model; Model training module: Use the training set to train the improved Mask R-CNN model and use the validation set for validation. At the same time, adjust the classification loss weight and mask loss weight of the improved Mask R-CNN model, and adjust the learning rate of the improved Mask R-CNN model in combination with the cosine annealing strategy and the Adam optimizer to obtain the optimal improved Mask R-CNN model. The result output module is used to input the test set into the optimal improved Mask R-CNN model and output the segmentation result.
[0014] An electronic device comprises a processor, a memory and a bus, wherein the processor and the memory are connected via the bus, wherein the memory is used to store a set of program codes, and the processor is used to call the program codes stored in the memory to execute an instance segmentation method for infrared images of power equipment.
[0015] A non-volatile computer storage medium stores computer executable instructions, which can execute an instance segmentation method for infrared images of electric power equipment.
[0016] Compared with the existing technology, the present invention has the following beneficial effects: the present invention adopts the improved MobileNetV3-ECA-Deformable model to replace the backbone network ResNet101 in the original Mask R-CNN model, and can effectively alleviate the segmentation ambiguity problem in complex environments by enhancing feature extraction through the ECA attention mechanism and deformable convolution; by designing the classification loss function and the mask loss function and introducing the dynamic loss weight, it can alleviate the mis-segmentation caused by category imbalance; by combining the cosine annealing strategy with the Adam optimizer, the learning rate is periodically adjusted to accelerate convergence and improve the optimization efficiency. The present invention is lightweight, has low computational and storage requirements, supports embedded device deployment, can quickly and accurately identify targets in complex environments, significantly improves training efficiency, and solves the problems of large number of parameters, category imbalance, insufficient segmentation accuracy and low training efficiency of the original Mask R-CNN model. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] Figure 1 The figure is a flow chart of the method of the present invention. DETAILED DESCRIPTION
[0018] like Figure 1 As shown, the present invention provides a technical solution: an instance segmentation method for infrared images of power equipment, comprising the following steps:
[0019] Step S1: Acquire an infrared image of the power equipment.
[0020] Use a drone equipped with an infrared imager to fly over power equipment (such as substations, distribution equipment, etc.) to obtain infrared images. For smaller areas or areas that are not easy to cover with drones, use a handheld infrared imager to take infrared images one by one.
[0021] Step S2: preprocessing the infrared image, including denoising and enhancement processing.
[0022] The original infrared images usually contain noise, so the images need to be denoised and enhanced.
[0023] Step S2.1: Use Gaussian filtering to remove noise from the infrared image, expressed as: ; In the formula, Represents the coordinates of the infrared image pixel; represents standard deviation; Represents the Gaussian function value.
[0024] Step S2.2: Use median filtering to replace each pixel in the infrared image with the median of the field pixels, expressed as: ; In the formula, Indicates the value of the infrared image after median filtering. The pixel value at the position; In the infrared image The pixel value at the position; for The median value of the neighborhood pixels; is the median function.
[0025] Step S2.3: Use wavelet transform to denoise the high-frequency part of the infrared image, expressed as: ; In the formula, is the signal of infrared image; For the wavelet basis functions; is the coefficient; Indicates time.
[0026] Step S2.4: Use histogram equalization to improve the contrast of the infrared image, expressed as: ; In the formula, is the pixel value range; , are the number of rows and columns of the infrared image, respectively; The gray value in the infrared image is The number of pixels; Indicates that the pixel value is less than or equal to The probability of Represents the pixel value in the infrared image; A variable representing the pixel values to be traversed and indexed.
[0027] Step S3: Use the Labelme tool to manually annotate the power equipment area in the preprocessed infrared image, and annotate the boundary of each power equipment in the power equipment area with a polygon; construct a data set using the annotated infrared image, and divide the data set into a training set, a validation set, and a test set in a ratio of 7:1:2.
[0028] Step S4: Build an improved Mask R-CNN model.
[0029] Step S4.1: Build a MobileNetV3 model, replace the SE attention mechanism of the MobileNetV3 model with the ECA attention mechanism, and obtain the MobileNetV3-ECA model; the process of calculating the channel attention weight using the ECA attention mechanism can be expressed as: ; In the formula, represents the convolution weight; Indicates Channel input; Represents the sigmoid activation function; is the number of channels; Indicates The attention weight of each channel; is the channel number.
[0030] Step S4.2: In at least one bottleneck layer of the MobileNetV3-ECA model, the standard depthwise separable convolution is improved to a deformable depthwise separable convolution to obtain the MobileNetV3-ECA-Deformable model; the specific process of improving the standard depthwise separable convolution to the deformable depthwise separable convolution (Depthwise separable Deformable Conv) is as follows: the standard convolution in the depthwise convolution in the depthwise separable convolution in the bottleneck layer of the MobileNetV3-ECA model is replaced with a deformable convolution to obtain a deformable depthwise separable convolution. The MobileNetV3-ECA-Deformable model can more flexibly adapt to the geometric shape, deformation and spatial changes of the object, thereby improving the effect of the model in segmenting infrared images.
[0031] The first layer of the MobileNetV3-ECA-Deformable model receives input as an RGB image of size 224×224×3, processes the input through a 3×3 convolution layer, and outputs a feature map of size 224×224×3, using the HS activation function (Hard-Swish); features are extracted from the input through multiple deformable bottleneck layers (DeformableBneck), each of which contains a deformable convolution that can flexibly adjust the position of the convolution kernel according to the geometric shape and spatial changes of the input image; in the second layer, the input feature map is 112×112×16, through 3×3 deformable convolution, combined with the ECA attention mechanism and the ReLU activation function; in the third and fourth layers of the model, the input feature maps are 56×56×16 and 28×28×24, respectively, through 3×3 standard bottleneck convolution, and the ReLU activation function is applied respectively; in the fifth and fourth layers of the model In the first to the tenth layer, multiple 5×5 deformable bottleneck convolutions are used to gradually reduce the size of the input feature map from 28×28×24 to 7×7×96, and each layer combines the ECA attention mechanism and the Hard-Swish activation function; in the eleventh layer of the model, the input feature map is 7×7×96, which is converted into a new feature map through a 1×1 convolution layer, and the Hard-Swish activation function is continued to be applied; the twelfth layer is a 7×7 pooling layer, which compresses the feature map size to 7×7×576; the thirteenth layer is a 1×1 convolution layer, which converts the feature map from 7×7×576 to 1×1×576, and the Hard-Swish activation function is continued to be applied; the fourteenth layer is a 1×1 convolution layer, which converts the feature map from 1×1×576 to 1×1×1024, and finally outputs the feature map for subsequent processing. By introducing deformable convolution and ECA attention mechanism, the network improves the computational efficiency and enhances the adaptability to object deformation.
[0032] Step S4.3: Build a Mask R-CNN model, replace the backbone network ResNet101 in the Mask R-CNN model with the MobileNetV3-ECA-Deformable model, and obtain an improved Mask R-CNN model.
[0033] The training set is input into the MobileNetV3-ECA-Deformable model for feature extraction, and then the candidate region is generated by the candidate box extraction network RPN, which is expressed as: ; ; In the formula, Indicates Infrared images, represents the features extracted from the input infrared image; and are the weights used for classification and regression respectively; Represents the classification prediction result of the i-th sample (infrared image); Represents the bounding box prediction result of the i-th sample; Represents a bounding box function that is used to calculate or predict the bounding box of a sample.
[0034] Perform pixel-level segmentation prediction on the candidate regions and use the convolutional layer to predict the binary mask of each candidate region, expressed as: ; In the formula, is the weight of the predicted binary mask; represents the predicted binary mask of the i-th candidate region.
[0035] The traditional cross entropy loss function tends to make the model biased towards the majority class and ignore the minority class samples when the categories are unbalanced, thus affecting the detection accuracy. Therefore, the present invention proposes a new classification loss function, which dynamically adjusts the sample weights by introducing a regulating factor to reduce the influence of the majority class and difficult-to-classify samples. At the same time, the center loss function is combined to constrain the relationship between the center of the category feature and the sample features, so that the features of the same class samples are more concentrated and the features of the different class samples are more distinguishable. This method helps to improve the intra-class consistency and inter-class separability, thereby enhancing the robustness and stability of the model in complex backgrounds.
[0036] Designing and improving the classification loss function of the Mask R-CNN model And the mask loss function .
[0037] Improving the classification loss function of the Mask R-CNN model It is expressed as: ,in, is the weight hyperparameter, which is controlled by and The weight of the two is used to coordinate the effects of represents the focal loss function, represents the center loss function.
[0038] It is expressed as: ; In the formula, represents the category weight; Represents the adjustment factor, which can effectively reduce the loss value of easy-to-classify samples, thereby improving the learning ability of the Mask R-CNN model for difficult-to-classify samples; Represents the predicted probability of the correct category by the improved Mask R-CNN model.
[0039] It is expressed as: ; In the formula, Indicates The feature vector of samples; represents the category center; Represents the total number of samples.
[0040] The original Mask R-CNN model uses the binary cross entropy loss function alone, which causes the edge loss to be ignored by the entire region information, resulting in poor target edge segmentation accuracy, which affects the accuracy of infrared fault diagnosis. The Dice loss is introduced and Laplace smoothing is added to reduce overfitting and prevent gradient explosion and disappearance.
[0041] Improving the mask loss function of the Mask R-CNN model It is expressed as: ; In the formula, is the loss weight coefficient; is the average binary cross entropy mask loss function; It is the Dice-Laplacian loss function, which is obtained by introducing Dice loss and adding Laplace smoothing.
[0042] Among them, the average binary cross entropy mask loss function It is expressed as: ; In the formula, Indicates the total number of categories; Indicates The true labels of the samples.
[0043] in, The loss function is expressed as: ; In the formula, is the index of the category, used to iterate over all categories.
[0044] Step S5: Use the training set to train the improved Mask R-CNN model and use the validation set for validation. At the same time, adjust the classification loss weight and mask loss weight of the improved Mask R-CNN model, and adjust the learning rate of the improved Mask R-CNN model in combination with the cosine annealing strategy and the Adam optimizer to obtain the optimal improved Mask R-CNN model.
[0045] Step S5.1: Input the training set into the backbone network of the improved Mask R-CNN model, convert the infrared images in the training set into high-dimensional feature maps, generate candidate regions through the high-dimensional feature maps through the candidate box extraction network RPN, and use the region of interest alignment (RoIAlign) to perform spatial alignment operations on the candidate regions so as to obtain the precise features of each candidate region on the high-dimensional feature map of fixed size; then adjust the classification loss weight and mask loss weight of the improved Mask R-CNN model.
[0046] Among them, the specific process of adjusting the classification loss weight and mask loss weight of the improved Mask R-CNN model is as follows: according to the current training cycle of the improved Mask R-CNN model Adjust classification loss weight and mask loss weight , the first 10% training cycles: , , 10%-100% training cycle: , ;in, is the classification loss weight of the first 10% training cycles. In this embodiment Can be set to 0.8, is the mask loss weight of the 10%-100% training cycle. Can be set to 0.2, is the mask loss weight attenuation rate. In this embodiment Can be set to 0.06, is the mask loss weight attenuation period. In this embodiment Can be set to 50, To improve the total training cycle of the Mask R-CNN model.
[0047] Improving the total loss function of the Mask R-CNN model for: .
[0048] Step S5.2: Combine the cosine annealing strategy and the Adam optimizer to adjust the learning rate of the improved Mask R-CNN model and update the weights during training of the improved Mask R-CNN model; based on the total loss function of the improved Mask R-CNN model and the current learning rate , adjust and improve the parameters of the Mask R-CNN model through back propagation and optimization by gradient descent method; Combined with the cosine annealing strategy and the Adam optimizer, the learning rate of the improved Mask R-CNN model is adjusted, and the weights during training of the improved Mask R-CNN model are updated, which is expressed as: ; ; In the formula, To improve the learning rate of the Mask R-CNN model; for The minimum value of for The maximum value of is the cosine function; and are estimates of the mean and variance of the gradient, respectively; A small constant to prevent division by zero; Indicated in Improve the values of Mask R-CNN model parameters at the iteration; Indicated in Improve the values of the Mask R-CNN model parameters at each iteration.
[0049] Step S5.3: Use the validation set to verify whether the improved Mask R-CNN model meets the expected requirements (maximum number of iterations is 3000 or the validation set loss value no longer decreases). If it does, stop training, output and save the improved Mask R-CNN model at this time, that is, the optimal improved Mask R-CNN model.
[0050] Step S6: Input the test set into the optimal improved Mask R-CNN model and output the segmentation result.
[0051] The segmentation results are evaluated using four evaluation indicators: precision, recall, average precision and frames per second.
[0052] The performance of the optimal improved Mask R-CNN model of the present invention and other models with different configurations in the target detection task are compared. The performance indicators include Map (mean average precision), MIoU (mean intersection over union), parameter quantity (in millions), FLOPs (number of floating-point operations, in billions) and inference speed (in frames per second). The comparison results are shown in Table 1.
[0053] Table 1 Comparison of different model configurations
[0054] As can be seen from Table 1, the optimal improved Mask R-CNN model of the present invention has achieved a breakthrough in performance indicators, with a Map (mean average precision) of 89.7% and a MIoU (mean intersection over union) of 89.3%, which are 1.4% and 1.2% higher than the original Mask R-CNN model respectively and reach the optimal value; compared with the Mask R-CNN model with MobileNetV3 as the backbone network, although the addition of the deformable convolution module causes the number of parameters to increase to 13.9M, the FLOPs consumption to increase to 74.8G, and the inference speed to decrease to 12.5 frames per second, the moderate increase in computational complexity effectively improves the segmentation accuracy. The design achieves an innovative balance between accuracy and computing power, and is suitable for scenarios with high accuracy requirements and insufficient computing power.
[0055] An instance segmentation system for infrared images of power equipment, comprising:
[0056] The image acquisition module is used to acquire infrared images of power equipment.
[0057] The image preprocessing module is used to preprocess the infrared image, including denoising and enhancement processing.
[0058] The image annotation and division module is used to annotate the power equipment area in the preprocessed infrared image; construct a data set using the annotated infrared image, and divide the data set into a training set, a verification set and a test set.
[0059] Model building module, used to build an improved Mask R-CNN model.
[0060] In the model training module, the training set is used to train the improved Mask R-CNN model, and the validation set is used for validation. At the same time, the classification loss weight and mask loss weight of the improved Mask R-CNN model are adjusted, and the learning rate of the improved Mask R-CNN model is adjusted in combination with the cosine annealing strategy and the Adam optimizer to obtain the optimal improved Mask R-CNN model.
[0061] The result output module is used to input the test set into the optimal improved Mask R-CNN model and output the segmentation result.
[0062] An electronic device comprises a processor, a memory and a bus, wherein the processor and the memory are connected via the bus, wherein the memory is used to store a set of program codes, and the processor is used to call the program codes stored in the memory to execute an instance segmentation method for infrared images of power equipment.
[0063] A non-volatile computer storage medium stores computer executable instructions, which can execute an instance segmentation method for infrared images of electric power equipment.
[0064] Although embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present invention, and that the scope of the present invention is defined by the appended claims and their equivalents.
Claims
1. A method for instance segmentation of infrared images of power equipment, characterized in that: The steps include: Step S1: Acquire an infrared image of the power equipment; Step S2: preprocessing the infrared image, including denoising and enhancement processing; Step S3: annotating the power equipment area in the preprocessed infrared image; constructing a data set using the annotated infrared image, and dividing the data set into a training set, a validation set, and a test set; Step S4: construct an improved Mask R-CNN model; the improved Mask R-CNN model replaces the backbone network of the original Mask R-CNN model with the MobileNetV3 model, embeds a deformable depth-separable convolution in the bottleneck layer of the MobileNetV3 model, and uses the ECA attention mechanism to replace the SE attention mechanism of the MobileNetV3 model; Step S5: Use the training set to train the improved Mask R-CNN model, use the validation set to validate it, and at the same time, adjust the classification loss weight and mask loss weight of the improved Mask R-CNN model, and adjust the learning rate of the improved Mask R-CNN model in combination with the cosine annealing strategy and the Adam optimizer to obtain the optimal improved Mask R-CNN model; Step S6: Input the test set into the optimal improved Mask R-CNN model and output the segmentation result.
2. The instance segmentation method for infrared images of power equipment according to claim 1, characterized in that: The specific process of building an improved Mask R-CNN model based on the MobileNetV3-ECA-Deformable backbone network is as follows: Build a MobileNetV3 model, replace the SE attention mechanism of the MobileNetV3 model with the ECA attention mechanism, and obtain the MobileNetV3-ECA model; In at least one bottleneck layer of the MobileNetV3-ECA model, the standard depthwise separable convolution is improved to a deformable depthwise separable convolution, thereby obtaining the MobileNetV3-ECA-Deformable model; the specific process of improving the standard depthwise separable convolution to the deformable depthwise separable convolution is as follows: replacing the standard convolution in the depthwise convolution within the depthwise separable convolution in the bottleneck layer of the MobileNetV3-ECA model with a deformable convolution, thereby obtaining the deformable depthwise separable convolution; Build a Mask R-CNN model and replace the backbone network ResNet101 in the Mask R-CNN model with the MobileNetV3-ECA-Deformable model to obtain an improved Mask R-CNN model.
3. The instance segmentation method for infrared images of power equipment according to claim 2, characterized in that: Designing and improving the classification loss function of the Mask R-CNN model And the mask loss function ; Improving the classification loss function of the Mask R-CNN model It is expressed as: ,in, is the weight hyperparameter, represents the focal loss function, represents the center loss function; Improving the mask loss function of the Mask R-CNN model It is expressed as: ; In the formula, is the loss weight coefficient; is the average binary cross entropy mask loss function; is the Dice-Laplacian loss function; The loss function is expressed as: ; In the formula, is the index of the category; Indicates the total number of categories; Indicates The true labels of samples; Indicates Infrared images; Represents the total number of samples.
4. The instance segmentation method for infrared images of power equipment according to claim 3 is characterized in that: The specific process of step S5 is: Step S5.1: Input the infrared image in the training set into the backbone network of the improved Mask R-CNN model to convert it into a high-dimensional feature map, generate a candidate region through the candidate box extraction network RPN, perform spatial alignment on the candidate region, and then adjust the classification loss weight and mask loss weight of the improved Mask R-CNN model; Step S5.2: Combine the cosine annealing strategy and the Adam optimizer to adjust the learning rate of the improved Mask R-CNN model and update the weights of the improved Mask R-CNN model during training; based on the total loss function and the current learning rate of the improved Mask R-CNN model, back propagate and optimize through the gradient descent method to adjust the parameters of the improved Mask R-CNN model; Step S5.3: Use the validation set to verify whether the improved Mask R-CNN model meets the expected requirements. If it does, stop training, output and save the improved Mask R-CNN model at this time, that is, the optimal improved Mask R-CNN model.
5. The instance segmentation method for infrared images of power equipment according to claim 4 is characterized in that: The specific process of adjusting the classification loss weight and mask loss weight of the improved Mask R-CNN model is as follows: According to the current training cycle of the improved Mask R-CNN model Adjust classification loss weight and mask loss weight , the first 10% training cycles: , , 10%-100% training cycle: , ;in, is the classification loss weight for the first 10% of training cycles, is the mask loss weight for 10%-100% training cycles, is the mask loss weight attenuation rate, is the mask loss weight attenuation period, To improve the total training cycle of the Mask R-CNN model; Improving the total loss function of the Mask R-CNN model for: ; Combined with the cosine annealing strategy and the Adam optimizer, the learning rate of the improved Mask R-CNN model is adjusted, and the weights during training of the improved Mask R-CNN model are updated, which is expressed as: ; ; In the formula, To improve the learning rate of the Mask R-CNN model; for The minimum value of for The maximum value of is the cosine function; and are estimates of the mean and variance of the gradient, respectively; A small constant to prevent division by zero; Indicated in Improve the values of Mask R-CNN model parameters at the iteration; Indicated in Improve the values of the Mask R-CNN model parameters at each iteration.
6. The instance segmentation method for infrared images of power equipment according to claim 5 is characterized in that: After obtaining the segmentation results, four evaluation indicators, namely precision, recall, average precision and frames per second, are used to evaluate the segmentation results.
7. An instance segmentation system for infrared images of power equipment, characterized in that: include: An image acquisition module, used for acquiring infrared images of power equipment; An image preprocessing module is used to preprocess infrared images, including denoising and enhancement processing; An image annotation and division module is used to annotate the power equipment area in the pre-processed infrared image; The labeled infrared images are used to construct a dataset, and the dataset is divided into a training set, a validation set, and a test set; Model building module, used to build an improved Mask R-CNN model; Model training module: Use the training set to train the improved Mask R-CNN model and use the validation set for validation. At the same time, adjust the classification loss weight and mask loss weight of the improved Mask R-CNN model, and adjust the learning rate of the improved Mask R-CNN model in combination with the cosine annealing strategy and the Adam optimizer to obtain the optimal improved Mask R-CNN model. The result output module is used to input the test set into the optimal improved Mask R-CNN model and output the segmentation results.
8. An electronic device, characterized in that: It includes a processor, a memory and a bus, wherein the processor and the memory are connected via the bus, wherein the memory is used to store a set of program codes, and the processor is used to call the program codes stored in the memory to execute an instance segmentation method for infrared images of power equipment as described in any one of claims 1-6.
9. A non-volatile computer storage medium storing computer executable instructions, characterized in that: The computer executable instructions execute the instance segmentation method for infrared images of power equipment described in any one of claims 1-6.
Citation Information
Patent Citations
Pig group image segmentation method and system based on transfer learning
CN114092699A
Lightweight DeepLabV3 + image semantic segmentation method and device
CN116704190A
Mining area unmanned aerial vehicle image sea-buckthorn identification method and system based on improved Mask R-CNN
CN117351359A
Remote sensing image road segmentation method based on improved DeeplabV3 +
CN117351372A
Method and system for synchronously identifying grades of multiple tobacco leaves based on improved YOLOv7
CN117456525A
Cited By
Deep interactive fusion double-branch edge detection method and system based on CNN and Transform
CN120635486A