High-voltage switch cabinet relay crack detection method and related device

Through the improved U-Net network structure and feature fusion module, the problem of low recognition accuracy in relay crack detection in traditional networks is solved, and the precise identification and positioning of relay cracks is achieved, and the engineering application value of detection is improved.

CN119741295AInactive Publication Date: 2025-04-01ELECTRIC POWER RES INST CHINA SOUTHERN POWER GRID CO LTD

Patent Information

Application Number
CN202411989482.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-31
Publication Date
2025-04-01
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

Traditional segmentation networks have low recognition accuracy in high-voltage switch cabinet relay crack detection, making it difficult to accurately identify narrow cracks and inaccurate segmentation edges.

Method used

The improved U-Net network structure is adopted, combined with the improved ResNet50 backbone network, the feature fusion module based on attention mechanism and the feature refinement head, extract and fusion multi-scale features of relay cracks to improve the recognition accuracy of the model.

Benefits of technology

It realizes accurate positioning and identification of cracks in high-voltage switch cabinet relays, improves detection accuracy, meets the needs of engineering applications, and facilitates timely maintenance and replacement of relays.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119741295A_ABST
    Figure CN119741295A_ABST
Patent Text Reader

Abstract

The invention discloses a high-voltage switch cabinet relay crack detection method and a related device, and the method comprises the steps: firstly extracting image features through employing an improved ResNet50 backbone network, embedding a SelfNorm module and a CrossNorm module in a residual error convolution module, designing a feature fusion module based on an attention mechanism, improving the jump connection of a U-Net network structure, and carrying out the detection of a crack of a relay of a high-voltage switch cabinet. And finally, fusing and inputting the multi-scale crack feature map and feature maps extracted at different stages of the backbone network into a feature refinement head to complete a segmentation task, thereby realizing accurate positioning of the relay crack. The high-voltage switch cabinet relay crack detection method provided by the invention can effectively identify and detect the space details and context information of the fused crack feature map of the relay for the high-voltage switch cabinet, can meet the requirements of engineering application, facilitates the timely maintenance and replacement of the relay, and improves the reliability of the relay. The technical problem that a traditional segmentation network is low in recognition precision in relay crack detection is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to the technical field of computer image processing, and in particular to a method for detecting cracks in a high-voltage switch cabinet relay and a related device. Background Art

[0002] High-voltage switchgear is a widely used switchgear in power grids. In the actual operation of power grids, high-voltage switchgear will repeat the opening and closing operations according to actual needs. Whether the high-voltage switchgear can be opened and closed reliably plays a key role and influence on the safe and stable operation of the power grid system. The inability of high-voltage switchgear to open and close electrically is a common type of fault in the operation of switchgear related equipment. This fault is usually caused by a control relay failure, and cracks are one of the causes of control relay failure. Therefore, it is of great significance to detect cracks in the control relay of high-voltage switchgear.

[0003] Traditional segmentation networks have problems in the segmentation of relay surfaces, such as insufficient crack contour details, difficulty in identifying narrow cracks, and inaccurate segmentation edges, resulting in low recognition accuracy. How to accurately identify cracks in relays is a technical problem that needs to be solved urgently by those skilled in the art. Summary of the invention

[0004] The present invention provides a method and a related device for detecting cracks in a high-voltage switch cabinet relay, which are used to solve the technical problem of low recognition accuracy of a traditional segmentation network in relay crack detection.

[0005] In view of this, a first aspect of the present invention provides a method for detecting cracks in a high-voltage switch cabinet relay, comprising:

[0006] Collect relay crack images and build a relay crack image dataset;

[0007] Based on the relay crack image dataset, the crack detection model with improved U-Net network structure is trained to obtain a trained crack detection model.

[0008] Use the trained crack detection model to detect cracks in relays;

[0009] The crack detection model with improved U-Net network structure includes an improved ResNet50 backbone network, a feature fusion module based on attention mechanism, and a feature refinement head connected in sequence;

[0010] The residual convolution module of the improved ResNet50 backbone network adds a series of CrossNorm and SelfNorm modules after the 3×3 convolution, and removes the Relu activation layer after the residual connection.

[0011] Optionally, the feature refinement head includes a 3×3 convolution layer, a global pooling layer, a reduction and expansion layer, a first depth convolution layer, a first Sigmoid layer, a second Sigmoid layer, a first matrix product layer, a second matrix product layer, a first summation layer, a second depth convolution layer, a normalization layer, a first 1×1 convolution layer, a second summation layer, a ReLU layer, a second 1×1 convolution layer and an upsampling layer, and the 3×3 convolution layer is respectively connected to the global pooling layer and the first depth convolution layer, the global pooling layer, the reduction and expansion layer, the first Sigmoid layer and the first matrix product The layers are connected in sequence: the first deep convolution layer, the second Sigmoid layer, and the second matrix product layer are connected in sequence. The 3×3 convolution layer is also connected to the first matrix product layer and the second matrix product layer respectively. The first summation layer is connected to the first matrix product layer and the second matrix product layer respectively. The output of the first summation layer is connected to the second deep convolution layer, and the output of the second deep convolution layer is connected to the normalization layer and the second summation layer respectively. The first 1×1 convolution layer is connected to the normalization layer and the second summation layer respectively. The second summation layer is connected to the ReLU layer, the second 1×1 convolution layer, and the upsampling layer in sequence.

[0012] Optionally, the last layer of the improved ResNet50 backbone network is connected to a feature enhancement module, the feature enhancement module is connected to the last layer of the feature fusion module based on the attention mechanism, and the feature enhancement module includes a CrossNorm module and a SelfNorm module connected in series.

[0013] Optionally, collecting relay crack images and constructing a relay crack image dataset includes:

[0014] Collect relay crack image samples under different lighting conditions, shadows and debris scenes to build a relay crack image dataset;

[0015] The relay crack image dataset is divided into a training set and a test set in a ratio of 8:2, and the cracks are annotated using Labelme software.

[0016] Optionally, the relay crack image dataset is divided into a training set and a test set in a ratio of 8:2, and the cracks are annotated using Labelme software, which also includes:

[0017] Data enhancement processing is performed based on relay crack image samples to expand the relay crack image dataset.

[0018] Optionally, crack detection of the relay is performed using a trained crack detection model, which also includes:

[0019] The trained crack detection model is evaluated based on the evaluation indicators in the semantic segmentation field.

[0020] A second aspect of the present invention provides a high-voltage switch cabinet relay crack detection device, comprising:

[0021] A data set construction module, used for collecting relay crack images and constructing a relay crack image data set;

[0022] A model training module is used to train a crack detection model with an improved U-Net network structure based on a relay crack image dataset to obtain a trained crack detection model;

[0023] A crack detection module, used to perform crack detection on the relay using a trained crack detection model;

[0024] The crack detection model with improved U-Net network structure includes an improved ResNet50 backbone network, a feature fusion module based on attention mechanism, and a feature refinement head connected in sequence;

[0025] The residual convolution module of the improved ResNet50 backbone network adds a series of CrossNorm and SelfNorm modules after the 3×3 convolution, and removes the Relu activation layer after the residual connection.

[0026] Optionally, the feature refinement head includes a 3×3 convolution layer, a global pooling layer, a reduction and expansion layer, a first depth convolution layer, a first Sigmoid layer, a second Sigmoid layer, a first matrix product layer, a second matrix product layer, a first summation layer, a second depth convolution layer, a normalization layer, a first 1×1 convolution layer, a second summation layer, a ReLU layer, a second 1×1 convolution layer and an upsampling layer, and the 3×3 convolution layer is respectively connected to the global pooling layer and the first depth convolution layer, the global pooling layer, the reduction and expansion layer, the first Sigmoid layer and the first matrix product The layers are connected in sequence: the first deep convolution layer, the second Sigmoid layer, and the second matrix product layer are connected in sequence. The 3×3 convolution layer is also connected to the first matrix product layer and the second matrix product layer respectively. The first summation layer is connected to the first matrix product layer and the second matrix product layer respectively. The output of the first summation layer is connected to the second deep convolution layer, and the output of the second deep convolution layer is connected to the normalization layer and the second summation layer respectively. The first 1×1 convolution layer is connected to the normalization layer and the second summation layer respectively. The second summation layer is connected to the ReLU layer, the second 1×1 convolution layer, and the upsampling layer in sequence.

[0027] Optionally, the last layer of the improved ResNet50 backbone network is connected to a feature enhancement module, the feature enhancement module is connected to the last layer of the feature fusion module based on the attention mechanism, and the feature enhancement module includes a CrossNorm module and a SelfNorm module connected in series.

[0028] Optionally, the dataset construction module is specifically used for:

[0029] Collect relay crack image samples under different lighting conditions, shadows and debris scenes to build a relay crack image dataset;

[0030] The relay crack image dataset is divided into a training set and a test set in a ratio of 8:2, and the cracks are annotated using Labelme software.

[0031] Optionally, the relay crack image dataset is divided into a training set and a test set in a ratio of 8:2, and the cracks are annotated using Labelme software, which also includes:

[0032] Data enhancement processing is performed based on relay crack image samples to expand the relay crack image dataset.

[0033] Optionally, a model evaluation module is also included;

[0034] The model evaluation module is used to evaluate the trained crack detection model based on the evaluation index in the semantic segmentation field before using the trained crack detection model to perform crack detection on the relay.

[0035] A third aspect of the present invention provides a high-voltage switch cabinet relay crack detection device, the device comprising a processor and a memory:

[0036] The memory is used to store program code and transmit the program code to the processor;

[0037] The processor is used to execute the high-voltage switch cabinet relay crack detection method described in any one of the first aspects according to the instructions in the program code.

[0038] A fourth aspect of the present invention provides a computer-readable storage medium, wherein the computer-readable storage medium is used to store program codes, and the program codes are used to execute the high-voltage switch cabinet relay crack detection method described in any one of the first aspects.

[0039] It can be seen from the above technical solutions that the high-voltage switch cabinet relay crack detection method provided by the present invention has the following advantages:

[0040] The high-voltage switchgear relay crack detection method provided by the present invention first uses an improved ResNet50 backbone network to extract image features, embeds SelfNorm and CrossNorm in its residual convolution module, improves the generalization ability of the model under distribution deviation, and then designs a feature fusion module based on the attention mechanism to improve the jump connection of the U-Net network structure, so that the decoding part obtains more context information, and finally, in order to effectively fuse the spatial details and context information of the crack feature map, the multi-scale crack feature map is fused with the feature map extracted at different stages of the backbone network and input into the feature refinement head to complete the segmentation task, thereby realizing the precise positioning of the relay crack. Compared with the traditional segmentation network model, the high-voltage switchgear relay crack detection method provided by the present invention can effectively identify and detect the spatial details and context information of the fused crack feature map of the high-voltage switchgear relay, can meet the needs of engineering applications, facilitate timely maintenance and replacement of relays, and solve the technical problem of low recognition accuracy of the traditional segmentation network in relay crack detection. BRIEF DESCRIPTION OF THE DRAWINGS

[0041] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.

[0042] Figure 1 A schematic flow chart of a method for detecting cracks in a high-voltage switch cabinet relay provided in an embodiment of the present invention;

[0043] Figure 2 A structural schematic diagram of a crack detection model of an improved U-Net network structure of a high-voltage switch cabinet relay crack detection method provided in an embodiment of the present invention;

[0044] Figure 3 It is the standard residual convolution block of ResNet50;

[0045] Figure 4 The improved ResNet50 residual convolution block provided in the embodiment of the present invention;

[0046] Figure 5 A schematic diagram of the structure of a feature fusion module based on an attention mechanism provided in an embodiment of the present invention;

[0047] Figure 6 A schematic diagram of the CBAM module structure provided in an embodiment of the present invention;

[0048] Figure 7It is a structural schematic diagram of a feature refinement head provided in an embodiment of the present invention;

[0049] Figure 8 A schematic structural diagram of a high-voltage switch cabinet relay crack detection device provided in an embodiment of the present invention;

[0050] Fig. 9 The present invention is a schematic structural diagram of a high-voltage switch cabinet relay crack detection device provided in an embodiment of the present invention. DETAILED DESCRIPTION

[0051] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0052] For easier understanding, see Figures 1 to 6 The present invention provides an embodiment of a method for detecting cracks in a high-voltage switch cabinet relay, comprising the following steps:

[0053] Step 101: Collect relay crack images and construct a relay crack image dataset.

[0054] It should be noted that, in an embodiment of the present invention, a relay crack image is first collected to construct a relay crack image data set. When collecting relay crack images, relay crack image samples under different lighting conditions, shadows and debris scenes are collected to construct a relay crack image data set, and then the relay crack image data set is divided into a training set and a test set according to a ratio of 8:2, and the cracks are annotated using Labelme software. In one embodiment, in order to improve the generalization ability of the model, data enhancement processing is performed based on relay crack image samples to expand the relay crack image data set, and the data enhancement processing adopts methods such as random cropping, random flipping and adding Gaussian noise.

[0055] Step 102: training a crack detection model with an improved U-Net network structure based on the relay crack image dataset to obtain a trained crack detection model.

[0056] It should be noted that the crack detection model based on the improved U-Net network structure is built. The crack detection model of the improved U-Net network structure includes an improved ResNet50 backbone network, a feature fusion module based on the attention mechanism, and a feature refinement head connected in sequence. The improved ResNet50 backbone network is used for feature extraction. The standard residual convolution module of the ResNet50 backbone network is as follows Figure 3 As shown in , the convolution block of each layer contains two 1×1 convolutions and one 3×3 convolution. A residual connection is added after the second 1×1 convolution, and the feature map is obtained by normalization (BN) and Relu activation. Figure 4 As shown in the figure, in the improved ResNet50 backbone network, the residual convolution module of the original ResNet50 backbone network removes the Relu activation layer after the residual connection, so that the output feature map can better learn the identity mapping, reduce the number of parameters and save computing costs. At the same time, in the improved ResNet50 backbone network, a series CrossNorm module and a SelfNorm module are added after the 3×3 convolution, that is, Figure 4 CNSN in,enhanced crack feature extraction.

[0057] Considering that during the encoding process of traditional neural networks, the backbone network will output feature maps of cracks on the relay surface of different scales. The feature map output by the shallow network has high spatial resolution, but weak semantic information, and mainly extracts low-level features such as edges and textures; the feature map output by the deep network has rich semantic information but low resolution, and has strong semantic expression capabilities, but contains less detail information. Therefore, in an embodiment of the present invention, in order to make full use of the shallow and deep information of cracks on the relay surface and avoid feature loss due to simple splicing, a feature fusion module (Attention-based Feature Fusion Module, AFM) based on the attention mechanism is designed. The feature fusion module based on the attention mechanism consists of a multi-scale feature fusion module and a CBAM module (Convolutional Block Attention Module), such as Figure 5 and Figure 6 The feature fusion module based on the attention mechanism first performs bilinear difference upsampling (UPSAMPLE) on the deep feature map to make its size similar to that of the shallow feature map. Figure 1 The two feature maps are then fused in the channel dimension to generate a new feature map containing richer relay crack spatial features and channel features. Then, the CBAM module is used to process the new feature map to enhance the feature capture ability of the convolutional neural network. The CBAM module combines the channel attention (CAM module) and spatial attention (SAM module) mechanisms. The channel attention adaptively selects important feature channels, while the spatial attention focuses on important image areas. The key to relay crack segmentation lies in the accurate identification of crack boundaries. The CBAM module combines channel and spatial attention to help the model capture crack features more comprehensively and improve segmentation accuracy. The fused new feature map is input into the CBAM module, and the channel and spatial features are weighted by the CAM module and the SAM module, as shown in the following formula, so that the network can effectively capture the key features of the crack and ignore irrelevant information, thereby improving performance.

[0058]

[0059]

[0060]

[0061]

[0062] Among them, F is the input feature map, It is a one-dimensional channel attention map generated by the CAM module. It is element-wise multiplication, that is, the values ​​of two feature maps at the same position are directly multiplied. is the intermediate output, To use the two-dimensional spatial attention map generated by the SAM module, For the final output, is the Sigmoid function, MLP is a multi-layer perceptron, AvgPool and MaxPool represent average pooling and maximum pooling respectively. To perform a 7×7 convolution operation.

[0063] In one embodiment, considering that distribution changes caused by illumination and background complexity will inevitably bring deviations, traditional normalization methods have limited effectiveness in dealing with new distributions. Figure 1As shown, in an embodiment of the present invention, the last layer of the improved ResNet50 backbone network is connected to a feature enhancement module, which is connected to the last layer of the feature fusion module based on the attention mechanism, and the feature enhancement module includes a CrossNorm module and a SelfNorm module connected in series. The CrossNorm module expands the training distribution by exchanging the channel mean and variance of the feature map, and interchanges the mean μA and variance σA of channel A with μB and σB of channel B, so that the network is more robust to the crack changes on the relay surface. The CrossNorm module transmits statistical information between channels, enriching the standardized features (zero mean and unit variance) and their statistical combinations. The SelfNorm module uses attention to recalibrate the difference between the training distribution and the test distribution. SelfNorm only focuses on key styles, recalibrates statistical data, and reduces the diversity of standardized features and statistical data combinations. The reason why the CrossNorm module and the SelfNorm module have opposite effects is mainly because they are aimed at different stages: the CrossNorm module is only applied in the training stage, while the SelfNorm module is used for style recalibration in the test stage. In addition, the CrossNorm module can improve the performance of the SelfNorm module by preventing it from over-adapting to a specific style through style enhancement. These two methods work together to form a unified mechanism for improving generalization robustness through normalized statistics.

[0064] In one embodiment, considering that cracks on the surface of relays usually present a variety of shapes, including linear, mesh, and cracked shapes. In the decoding part of the U-Net network structure, low-resolution features are mapped back to the original image size by upsampling. Traditional jump connections fail to fully utilize crack features, resulting in the lack of details and edge sharpness in the recovered features, and insufficient information interaction and integration. Therefore, a feature refinement head (FRH) is introduced in an embodiment of the present invention to narrow the semantic gap between feature maps and retain the details in the crack image, especially the shape and position of the slender structure. The structure of the feature refinement head is as follows: Figure 7As shown, it includes a 3×3 convolution layer (Conv3), a global pooling layer (Global Average Pool), a reduction and expansion layer (Reduce&Expand), a first depth convolution layer (Depth-wise Conv3), a first Sigmoid layer, a second Sigmoid layer, a first matrix multiplication layer (Matrix Multiplication), a second matrix multiplication layer (Matrix Multiplication), a first summation layer (Sum), a second depth convolution layer (Depth-wise Conv3), a normalization layer (Bath Norm), a first 1×1 convolution layer (Conv1), a second summation layer (Sum), a ReLU layer, a second 1×1 convolution layer (Conv1) and an upsample layer (Upsample). The 3×3 convolution layer is connected to the global pooling layer and the first deep convolution layer respectively. The global pooling layer, reduction and expansion layer, first Sigmoid layer and first matrix product layer are connected in sequence. The first deep convolution layer, second Sigmoid layer and second matrix product layer are connected in sequence. The 3×3 convolution layer is also connected to the first matrix product layer and the second matrix product layer respectively. The first summation layer is connected to the first matrix product layer and the second matrix product layer respectively. The output of the first summation layer is connected to the second deep convolution layer. The output of the second deep convolution layer is connected to the normalization layer and the second summation layer respectively. The first 1×1 convolution layer is connected to the normalization layer and the second summation layer respectively. The second summation layer is connected to the ReLU layer, the second 1×1 convolution layer and the upsampling layer in sequence. In the feature refinement head structure, a parallel branch is first constructed to strengthen useful features by enhancing the channel and spatial representation of the feature map. In the channel branch, the channel attention of the feature map is first mapped to , where C is the channel dimension and R is the overall size of the image. The reduction and expansion layer contains two 1×1 convolutional layers, which reduce the channel dimension to 1 / 4 of the original and then restore it to its original size. For the spatial feature enhancement branch, it is first generated by depth-wise convolution (Depth-wise Conv3) The spatial attention of the network is calculated by , where S is the spatial attention feature map, h and w are the height and width of the spatial attention feature map. Subsequently, the feature maps of the two branches are fused by summing. Finally, the residual connection is introduced to prevent network degradation, and the fused crack feature map is restored to its original size through convolutional layers and upsampling to generate a crack segmentation map.

[0065] Step 103: Use the trained crack detection model to perform crack detection on the relay.

[0066] It should be noted that after the crack detection model is trained, the crack detection model is used to detect cracks on the relay, that is, the image of the relay to be detected is input into the trained crack detection model to detect whether there are cracks in the image of the relay to be detected. In one embodiment, before the crack detection model is used to detect cracks on the relay, the trained crack detection model can be tested with a test set. After the test passes, the trained crack detection model is used to detect cracks on the relay. If the test fails, the crack detection model with an improved U-Net network structure is continuously trained.

[0067] In one embodiment, before using the trained crack detection model to detect cracks in relays, the trained crack detection model can also be evaluated based on evaluation indicators in the semantic segmentation field. The evaluation indicators based on the semantic segmentation field include mean intersection over union (mIoU), mean pixel accuracy (mPA) and precision. The corresponding calculation formula is:

[0068]

[0069]

[0070]

[0071] Among them, TP represents the number of true positives, FP represents the number of false positives, FN represents the number of false negatives, and n is the number of categories. Represents the pixel accuracy of the i-th category.

[0072] For easier understanding, see Figure 8 The present invention provides an embodiment of a high-voltage switch cabinet relay crack detection device, comprising the following modules:

[0073] A data set construction module, used for collecting relay crack images and constructing a relay crack image data set;

[0074] A model training module is used to train a crack detection model with an improved U-Net network structure based on a relay crack image dataset to obtain a trained crack detection model;

[0075] A crack detection module, used to perform crack detection on the relay using a trained crack detection model;

[0076] The crack detection model with improved U-Net network structure includes an improved ResNet50 backbone network, a feature fusion module based on attention mechanism, and a feature refinement head connected in sequence;

[0077] The residual convolution module of the improved ResNet50 backbone network adds a series of CrossNorm and SelfNorm modules after the 3×3 convolution, and removes the Relu activation layer after the residual connection.

[0078] In one embodiment, the feature refinement head includes a 3×3 convolution layer, a global pooling layer, a reduction and expansion layer, a first depth convolution layer, a first Sigmoid layer, a second Sigmoid layer, a first matrix product layer, a second matrix product layer, a first summation layer, a second depth convolution layer, a normalization layer, a first 1×1 convolution layer, a second summation layer, a ReLU layer, a second 1×1 convolution layer and an upsampling layer, and the 3×3 convolution layer is respectively connected to the global pooling layer and the first depth convolution layer, the global pooling layer, the reduction and expansion layer, the first Sigmoid layer and the first matrix The product layers are connected in sequence, the first depth convolution layer, the second Sigmoid layer and the second matrix product layer are connected in sequence, the 3×3 convolution layer is also connected to the first matrix product layer and the second matrix product layer respectively, the first summation layer is connected to the first matrix product layer and the second matrix product layer respectively, the output of the first summation layer is connected to the second depth convolution layer, the output of the second depth convolution layer is connected to the normalization layer and the second summation layer respectively, the first 1×1 convolution layer is connected to the normalization layer and the second summation layer respectively, the second summation layer is connected to the ReLU layer, the second 1×1 convolution layer and the upsampling layer in sequence.

[0079] In one embodiment, the last layer of the improved ResNet50 backbone network is connected to a feature enhancement module, which is connected to the last layer of a feature fusion module based on an attention mechanism. The feature enhancement module includes a CrossNorm module and a SelfNorm module connected in series.

[0080] In one embodiment, the data set construction module is specifically used to:

[0081] Collect relay crack image samples under different lighting conditions, shadows and debris scenes to build a relay crack image dataset;

[0082] The relay crack image dataset is divided into a training set and a test set in a ratio of 8:2, and the cracks are annotated using Labelme software.

[0083] In one embodiment, the relay crack image dataset is divided into a training set and a test set in a ratio of 8:2, and the cracks are annotated using Labelme software, which also includes:

[0084] Data enhancement processing is performed based on relay crack image samples to expand the relay crack image dataset.

[0085] In one embodiment, a model evaluation module is also included;

[0086] The model evaluation module is used to evaluate the trained crack detection model based on the evaluation index in the semantic segmentation field before using the trained crack detection model to perform crack detection on the relay.

[0087] For easier understanding, see Fig. 9 The present invention also provides an embodiment of a high-voltage switch cabinet relay crack detection device, the device comprising a processor and a memory:

[0088] The memory is used to store the program code and transmit the program code to the processor;

[0089] The processor is used to execute any one of the aforementioned implementation methods of the high-voltage switch cabinet relay crack detection method according to the instructions in the program code.

[0090] The present invention also provides an embodiment of a computer-readable storage medium, which is used to store program codes, and the program codes are used to execute any one of the aforementioned embodiments of the high-voltage switch cabinet relay crack detection method.

[0091] The present invention also provides an embodiment of a computer program product including instructions, which, when executed on a computer, enables the computer to execute any one of the aforementioned embodiments of the high-voltage switch cabinet relay crack detection method.

[0092] The high-voltage switch cabinet relay crack detection device, equipment, computer-readable storage medium and computer program product including instructions provided in the present invention are all used to execute the high-voltage switch cabinet relay crack detection method provided in the present invention. The principles and technical effects achieved are the same as those of the high-voltage switch cabinet relay crack detection method provided in the present invention, and will not be repeated here.

[0093] The terms "first", "second", etc. in the specification of the present invention are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein, for example. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0094] As described above, the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features thereof may be replaced by equivalents. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method for detecting cracks in a high-voltage switch cabinet relay, characterized in that: include: Collect relay crack images and build a relay crack image dataset; Based on the relay crack image dataset, the crack detection model with improved U-Net network structure is trained to obtain a trained crack detection model. Use the trained crack detection model to detect cracks in relays; The crack detection model with improved U-Net network structure includes an improved ResNet50 backbone network, a feature fusion module based on attention mechanism, and a feature refinement head connected in sequence; The residual convolution module of the improved ResNet50 backbone network adds a series of CrossNorm and SelfNorm modules after the 3×3 convolution, and removes the Relu activation layer after the residual connection.

2. The method for detecting cracks in a high-voltage switch cabinet relay according to claim 1, characterized in that: The feature refinement head includes a 3×3 convolution layer, a global pooling layer, a reduction and expansion layer, a first depth convolution layer, a first Sigmoid layer, a second Sigmoid layer, a first matrix product layer, a second matrix product layer, a first summation layer, a second depth convolution layer, a normalization layer, a first 1×1 convolution layer, a second summation layer, a ReLU layer, a second 1×1 convolution layer and an upsampling layer. The 3×3 convolution layer is connected to the global pooling layer and the first depth convolution layer respectively. The global pooling layer, the reduction and expansion layer, the first Sigmoid layer and the first matrix product layer are connected in sequence. The first deep convolution layer, the second Sigmoid layer and the second matrix product layer are connected in sequence. The 3×3 convolution layer is also connected to the first matrix product layer and the second matrix product layer respectively. The first summation layer is connected to the first matrix product layer and the second matrix product layer respectively. The output of the first summation layer is connected to the second deep convolution layer, and the output of the second deep convolution layer is connected to the normalization layer and the second summation layer respectively. The first 1×1 convolution layer is connected to the normalization layer and the second summation layer respectively. The second summation layer is connected to the ReLU layer, the second 1×1 convolution layer and the upsampling layer in sequence.

3. The method for detecting cracks in a high-voltage switch cabinet relay according to claim 1, characterized in that: The last layer of the improved ResNet50 backbone network is connected to a feature enhancement module, which is connected to the last layer of the feature fusion module based on the attention mechanism. The feature enhancement module includes a CrossNorm module and a SelfNorm module connected in series.

4. The method for detecting cracks in a high-voltage switch cabinet relay according to claim 1, characterized in that: Collect relay crack images and build a relay crack image dataset, including: Collect relay crack image samples under different lighting conditions, shadows and debris scenes to build a relay crack image dataset; The relay crack image dataset is divided into a training set and a test set in a ratio of 8:2, and the cracks are annotated using Labelme software.

5. The method for detecting cracks in a high-voltage switch cabinet relay according to claim 4, characterized in that: The relay crack image dataset is divided into training set and test set in a ratio of 8:2, and the cracks are annotated using Labelme software, which also includes: Data enhancement processing is performed based on relay crack image samples to expand the relay crack image dataset.

6. The method for detecting cracks in a high-voltage switch cabinet relay according to claim 1, characterized in that: Use the trained crack detection model to detect cracks in relays, which also includes: The trained crack detection model is evaluated based on the evaluation indicators in the semantic segmentation field.

7. A high-voltage switch cabinet relay crack detection device, characterized in that: include: A data set construction module, used for collecting relay crack images and constructing a relay crack image data set; A model training module is used to train a crack detection model with an improved U-Net network structure based on a relay crack image dataset to obtain a trained crack detection model; A crack detection module, used to perform crack detection on the relay using a trained crack detection model; The crack detection model with improved U-Net network structure includes an improved ResNet50 backbone network, a feature fusion module based on attention mechanism, and a feature refinement head connected in sequence; The residual convolution module of the improved ResNet50 backbone network adds a series of CrossNorm and SelfNorm modules after the 3×3 convolution, and removes the Relu activation layer after the residual connection.

8. The high-voltage switch cabinet relay crack detection device according to claim 7, characterized in that: The feature refinement head includes a 3×3 convolution layer, a global pooling layer, a reduction and expansion layer, a first depth convolution layer, a first Sigmoid layer, a second Sigmoid layer, a first matrix product layer, a second matrix product layer, a first summation layer, a second depth convolution layer, a normalization layer, a first 1×1 convolution layer, a second summation layer, a ReLU layer, a second 1×1 convolution layer and an upsampling layer. The 3×3 convolution layer is connected to the global pooling layer and the first depth convolution layer respectively. The global pooling layer, the reduction and expansion layer, the first Sigmoid layer and the first matrix product layer are connected in sequence. The first deep convolution layer, the second Sigmoid layer and the second matrix product layer are connected in sequence. The 3×3 convolution layer is also connected to the first matrix product layer and the second matrix product layer respectively. The first summation layer is connected to the first matrix product layer and the second matrix product layer respectively. The output of the first summation layer is connected to the second deep convolution layer, and the output of the second deep convolution layer is connected to the normalization layer and the second summation layer respectively. The first 1×1 convolution layer is connected to the normalization layer and the second summation layer respectively. The second summation layer is connected to the ReLU layer, the second 1×1 convolution layer and the upsampling layer in sequence.

9. A high voltage switch cabinet relay crack detection device, characterized in that: The device comprises a processor and a memory: The memory is used to store program code and transmit the program code to the processor; The processor is used to execute the high-voltage switch cabinet relay crack detection method according to any one of claims 1 to 5 according to the instructions in the program code.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium is used to store program codes, and the program codes are used to execute the high-voltage switch cabinet relay crack detection method according to any one of claims 1 to 5.

Citation Information

Patent Citations

  • Pavement crack detection method for improving UNet network structure

    CN116309485A

  • Quick and intelligent IR7-EC network based classification method for concrete image crack type

    US20240029402A1

Cited By

  • Tunnel crack automatic identification method based on deep learning

    CN121259586A

  • A Deep Learning-Based Automatic Tunnel Crack Identification Method

    CN121259586B