Cable insulation layer defect detection method, device and equipment and readable storage medium

By using a defect extraction model including a super-resolution module, a multi-scale feature extraction module, an attention mechanism module, a feature fusion module and a decision-making layer to detect defects in cable insulation layer images, the lack of accuracy and reliability in cable insulation layer defect detection is solved. problem, achieving high-precision defect identification and analysis.

CN119359674AActive Publication Date: 2025-01-24GUANGZHOU POWER SUPPLY BUREAU GUANGDONG POWER GRID CO LTD

Patent Information

Application Number
CN202411453435.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-17
Publication Date
2025-01-24
Estimated Expiration
2044-10-17

AI Technical Summary

Technical Problem

The cable insulation layer is prone to defects during production and use, such as small holes, scratches, damage to the insulation skin, cracks, bubbles, corrosion and wear, resulting in a reduced service life of the cable and an increase in safety hazards.

Method used

Adopt the defect extraction model that includes the defective extraction of overfduation modules, multi -scale feature extraction modules, attention mechanism modules, characteristic fusion modules and decision -making layers. By obtaining the image of the cable insulation layer, optimizing and reconstruction of characteristics, analyzing the characteristics of the insulation layer to detect the insulation layer to detect the detection defect.

Benefits of technology

It improves the precision and accuracy of cable insulation layer defect detection, can identify defects of different sizes and types, and enhances the comprehensiveness and reliability of detection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119359674A_ABST
    Figure CN119359674A_ABST
Patent Text Reader

Abstract

The invention discloses a cable insulation layer defect detection method, device and equipment and a readable storage medium. According to the method, a cable insulation layer graph and a defect extraction model comprising a super-resolution module, a multi-scale feature extraction module, an attention mechanism module, a feature fusion module and a decision layer can be obtained; and utilizing the defect extraction model to optimize and reconstruct the cable insulation layer image to form a super-resolution cable image, extracting insulation layer characteristics of the super-resolution cable image, analyzing the insulation layer characteristics, and detecting whether the cable insulation layer image has insulation layer defects. On the basis, the resolution and definition of the cable insulation layer graph can be improved by using the super-resolution module; the multi-scale feature extraction module is used for identifying defects of different sizes and different types, so that the detection comprehensiveness is improved; and the attention mechanism module is utilized to suppress interference of redundant features and improve the detection precision. Therefore, the precision, the accuracy and the reliability of defect detection of the cable insulation layer can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of cable technology, and more specifically, to a cable insulation layer defect detection method, device, equipment and readable storage medium. Background Art

[0002] Cables are the main connection equipment for power grids. Therefore, the safety of cables is crucial to the safe and stable operation of the entire power grid. However, during the production and use of cables, defects such as small holes, scratches, insulation damage, cracks, bubbles, corrosion and wear will inevitably appear in the cable insulation layer. These defects will not only reduce the service life and transmission efficiency of the cable, but may also cause serious safety hazards, posing a threat to economic benefits and public safety.

[0003] Therefore, there is an urgent need to provide a cable insulation layer defect detection method to detect whether there are defects in the cable insulation layer, so as to deal with the insulation layer defects in time and maintain the safe and stable operation of the power grid. Summary of the invention

[0004] In view of this, the present application provides a cable insulation layer defect detection method, device, equipment and readable storage medium for detecting whether there are defects in the cable insulation layer.

[0005] In order to achieve the above objectives, the proposed solution is as follows:

[0006] A method for detecting defects in a cable insulation layer, comprising:

[0007] Obtaining a cable insulation layer image, and a defect extraction model including a super-resolution module, a multi-scale feature extraction module, an attention mechanism module, a feature fusion module and a decision layer, wherein the super-resolution module is trained for the purpose of improving the resolution and clarity of the input cable image;

[0008] The defect extraction model is used to optimize and reconstruct the cable insulation layer image to form a super-resolution cable image, and the insulation layer features of the super-resolution cable image are extracted and analyzed to detect whether there are insulation layer defects in the cable insulation layer image.

[0009] Optionally, the use of the defect extraction model to optimize and reconstruct the cable insulation layer image to form a super-resolution cable image, extract insulation layer features of the super-resolution cable image, analyze the insulation layer features, and detect whether there are insulation layer defects in the cable insulation layer image, including:

[0010] Utilizing the super-resolution module, optimizing and reconstructing the cable insulation layer image to form a super-resolution cable image;

[0011] Utilizing the multi-scale feature extraction module and the attention mechanism module, extracting spatial features and channel features of the super-resolution cable image;

[0012] Using the feature fusion module, the spatial feature and the channel feature are fused to form an insulating layer feature;

[0013] The decision layer is used to analyze the similarity between the insulation layer characteristics and various insulation layer defects, and to evaluate whether there are insulation layer defects in the cable insulation layer image.

[0014] Optionally, the extracting spatial features and channel features of the super-resolution cable image by using the multi-scale feature extraction module and the attention mechanism module includes:

[0015] Using the multi-scale feature extraction module, performing step-by-step feature extraction and downsampling on the super-resolution cable image to generate feature maps of different scales;

[0016] By using the attention mechanism module, a detection frame for marking a detection area is generated in the super-resolution cable image. Based on the detection area, the spatial attention weights of the feature maps of each scale in each spatial dimension and the channel attention weights of the feature maps of each scale in each channel dimension are calculated. Based on each feature map, each spatial attention weight and each channel attention weight, the spatial features and channel features of the super-resolution cable image are calculated.

[0017] Optionally, using the attention mechanism module, based on each feature map, each spatial attention weight, and each channel attention weight, calculating the spatial features and channel features of the super-resolution cable image includes:

[0018] The attention mechanism module is used to extract the feature information of each feature map in different spatial dimensions and the feature information of each feature map in different channel dimensions. The spatial features of each feature map are calculated based on the feature information and spatial attention weights corresponding to each feature map in each spatial dimension, and the channel features of each feature map are calculated based on the feature information and channel attention weights corresponding to each feature map in each channel dimension.

[0019] Optionally, the using the feature fusion module to fuse the spatial feature and the channel feature to form an insulating layer feature includes:

[0020] The feature fusion module is used to perform weighted fusion on the spatial features of feature maps of different scales to form spatial fusion features, and to perform weighted fusion on the channel features of feature maps of different scales to form channel fusion features. The spatial fusion features and the channel fusion features are weighted integrated to form insulation layer features.

[0021] Optionally, obtain a defect extraction model, including:

[0022] Construct an initial defect extraction model having an initial super-resolution module, an initial multi-scale feature extraction module, an initial attention mechanism module, an initial feature fusion module and an initial decision layer;

[0023] A training set consisting of two types of cable insulation layer training images is obtained, wherein one type of cable insulation layer training images is images of cable insulation layers in different environments collected by a high-definition camera, and the other type is images of cable insulation layers that have been downsampled, added with Gaussian noise, and homogenized, each cable insulation layer training image is annotated with a defect result indicating whether the corresponding cable insulation layer training image represents an insulation layer defect, and the cable insulation layer training images corresponding to insulation layer defects are also annotated with defect types and bounding boxes for marking defect areas;

[0024] Utilizing the initial defect extraction model, the resolution of each cable insulation layer training image is optimized to form an optimized training image, a prediction bounding box is constructed in each optimized training image to indicate a defect-related area of ​​the corresponding optimized training image, and based on the area where each prediction bounding box is located, the insulation layer training features of the corresponding optimized training image are extracted, and the prediction result of the corresponding optimized training image is determined based on the insulation layer training features;

[0025] Calculating the prediction loss of the initial defect extraction model based on the predicted bounding box, the predicted result and the corresponding annotation of each optimized training image;

[0026] Based on each prediction loss, the gradient descent method is used to optimize the initial super-resolution module, the initial multi-scale feature extraction module, the initial attention mechanism module, the initial feature fusion module and / or the initial decision layer until the prediction loss is lower than the preset loss threshold, and the final initial defect extraction model is used as the defect extraction model.

[0027] Optionally, the calculating the prediction loss of the initial defect extraction model based on the predicted bounding box, the prediction result and the corresponding annotation of each optimized training image includes:

[0028] Determining a multi-task loss function group that combines a bounding box position error function, a result error function, and a region offset error function;

[0029] In combination with the multi-task loss function group, the prediction loss of each optimized training image is calculated based on the predicted bounding box, the prediction result and the corresponding annotation of each optimized training image.

[0030] A cable insulation layer defect detection device, comprising:

[0031] An acquisition module is used to acquire a cable insulation layer image, and includes a super-resolution module, a multi-scale feature extraction module, an attention mechanism module, a feature fusion module and a defect extraction model of a decision layer, wherein the super-resolution module is trained for the purpose of improving the resolution and clarity of the input cable image;

[0032] The detection module is used to optimize and reconstruct the cable insulation layer image by using the defect extraction model to form a super-resolution cable image, extract the insulation layer features of the super-resolution cable image, analyze the insulation layer features, and detect whether there are insulation layer defects in the cable insulation layer image.

[0033] A cable insulation layer defect detection device, comprising a memory and a processor;

[0034] The memory is used to store programs;

[0035] The processor is used to execute the program to implement the various steps of the above-mentioned cable insulation layer defect detection method.

[0036] A readable storage medium stores a computer program thereon, characterized in that when the computer program is executed by a processor, each step of the above-mentioned cable insulation layer defect detection method is implemented.

[0037] It can be seen from the above technical scheme that the cable insulation layer defect detection method provided by the present application can obtain a cable insulation layer image, and a defect extraction model including a super-resolution module, a multi-scale feature extraction module, an attention mechanism module, a feature fusion module and a decision layer, wherein the super-resolution module is trained for the purpose of improving the resolution and clarity of the input cable image; the defect extraction model is used to optimize and reconstruct the cable insulation layer image to form a super-resolution cable image, and the insulation layer features of the super-resolution cable image are extracted, and the insulation layer features are analyzed to detect whether the cable insulation layer image has insulation layer defects. Based on this, the present application can use the super-resolution module to improve the resolution and clarity of the cable insulation layer image, form a super-resolution cable image, and improve the accuracy of detection and the accuracy of feature extraction; subsequently, the multi-scale feature extraction module can be used to extract feature information of different scales, so that the present application can identify defects of different sizes and types, effectively capture the feature information of large-area defects and local small defects, and improve the comprehensiveness and accuracy of detection; the attention mechanism module is used to focus on the key areas of the image, automatically allocate more attention to the key areas, highlight important features, and suppress the interference of redundant features, thereby further improving the detection accuracy. It can be seen that the present application can improve the precision, accuracy and reliability of cable insulation layer defect detection. BRIEF DESCRIPTION OF THE DRAWINGS

[0038] In order to more clearly illustrate the embodiments of the present application 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 embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying any creative work.

[0039] Figure 1 A flow chart of a cable insulation layer defect detection method disclosed in an embodiment of the present application;

[0040] Figure 2 This is a structural block diagram of a cable insulation layer defect detection device disclosed in an embodiment of the present application;

[0041] Figure 3 This is a hardware structure block diagram of a cable insulation layer defect detection device disclosed in an embodiment of the present application. DETAILED DESCRIPTION

[0042] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0043] The cable insulation layer defect detection method of the present application can be used in many general or special computing device environments or configurations, such as personal computers, server computers, handheld devices or portable devices, tablet devices, multi-processor devices, and distributed computing environments including any of the above devices or equipment.

[0044] Next, combine Figure 1 The cable insulation layer defect detection method of the present application is introduced in detail, comprising the following steps:

[0045] Step S1, obtaining a cable insulation layer image, and a defect extraction model including a super-resolution module, a multi-scale feature extraction module, an attention mechanism module, a feature fusion module and a decision layer.

[0046] Specifically, a cable insulation layer image taken by a binocular camera of a drone may be obtained.

[0047] The super-resolution module is trained to improve the resolution and clarity of the input cable image.

[0048] The multi-scale feature extraction module is constructed for the purpose of extracting different scale feature information of the input cable image.

[0049] The attention mechanism module is constructed with the purpose of highlighting the key defect areas of the input cable image.

[0050] Step S2: Utilize the defect extraction model to optimize and reconstruct the cable insulation layer image to form a super-resolution cable image, extract insulation layer features of the super-resolution cable image, analyze the insulation layer features, and detect whether there are insulation layer defects in the cable insulation layer image.

[0051] Specifically, the cable insulation layer image can be input into the defect extraction model, and the cable insulation layer image can be optimized and reconstructed using the components of the defect extraction model to form a super-resolution cable image, and the insulation layer features of the super-resolution cable image can be extracted and analyzed to detect whether there are insulation layer defects in the cable insulation layer image.

[0052] It can be seen from the above technical scheme that the cable insulation layer defect detection method provided by the present application can obtain a cable insulation layer image, as well as a defect extraction model including a super-resolution module, a multi-scale feature extraction module, an attention mechanism module, a feature fusion module and a decision layer, wherein the super-resolution module is trained for the purpose of improving the resolution and clarity of the input cable image; using the defect extraction model, the cable insulation layer image is optimized and reconstructed to form a super-resolution cable image, and the insulation layer features of the super-resolution cable image are extracted, the insulation layer features are analyzed, and the cable insulation layer image is detected to see whether there are insulation layer defects. Based on this, the present application can use the super-resolution module to improve the resolution and clarity of the cable insulation layer image, form a super-resolution cable image, and improve the accuracy of detection and feature extraction; then, the multi-scale feature extraction module can be used to extract feature information of different scales, so that the present application can identify defects of different sizes and types, whether large-area defects or local small defects, and can effectively capture their feature information, thereby improving the comprehensiveness and accuracy of detection; using the attention mechanism module, focus on the key areas of the image, automatically allocate more attention to the key areas, highlight important features, and suppress the interference of redundant features, thereby further improving the detection accuracy. It can be seen that the present application can improve the precision, accuracy and reliability of cable insulation layer defect detection.

[0053] In some embodiments of the present application, if there are multiple insulation layer defects in the cable insulation layer map, each insulation layer defect is classified and prioritized.

[0054] In some embodiments of the present application, the process of obtaining a defect extraction model including a super-resolution module, a multi-scale feature extraction module, an attention mechanism module, a feature fusion module and a decision layer in step S1 is described in detail, and the steps are as follows:

[0055] S10, constructing an initial defect extraction model having an initial super-resolution module, an initial multi-scale feature extraction module, an initial attention mechanism module, an initial feature fusion module and an initial decision layer.

[0056] Specifically, the initial super-resolution module, the initial multi-scale feature extraction module, the initial attention mechanism module, the initial feature fusion module and the initial decision layer can be built;

[0057] The initial super-resolution module, the initial multi-scale feature extraction module, the initial attention mechanism module, the initial feature fusion module and the initial decision layer are combined to form an initial defect extraction model.

[0058] S11. Obtain a training set consisting of two types of cable insulation layer training images, wherein one type of cable insulation layer training images is images of cable insulation layers in different environments captured by a high-definition camera, and the other type is images of cable insulation layers that have been downsampled, added with Gaussian noise, and homogenized, and each cable insulation layer training image is annotated with a defect result indicating whether the corresponding cable insulation layer training image represents an insulation layer defect, and the cable insulation layer training images corresponding to insulation layer defects are also annotated with the defect type and a bounding box for marking the defect area.

[0059] Specifically, training images of cable insulation layers in different environments captured by high-definition cameras can be used;

[0060] Downsample each training image to generate a low-resolution image corresponding to each training image, add Gaussian noise to each low-resolution image, and homogenize each low-resolution image after adding Gaussian noise to form a new training image;

[0061] The training images can also be randomly cropped, rotated, scaled, etc. to improve the robustness of the model to different defect shapes and sizes.

[0062] The training images captured by the high-definition camera and the new training images that have been homogenized are combined into a training set;

[0063] Determine whether each image in the training set has an insulation layer defect. If so, add a defect result, defect type and a bounding box for marking the defect area to the corresponding cable insulation layer training image to form a cable insulation layer training image; if not, add a defect result indicating that the cable insulation layer training image does not have an insulation layer defect to the corresponding cable insulation layer training image to form a cable insulation layer training image.

[0064] Defect types can include insulation breakage, insulation wear, insulation cuts, insulation breakage, and insulation aging.

[0065] S12. Utilize the initial defect extraction model to optimize the resolution of each cable insulation layer training image to form an optimized training image, construct a prediction bounding box in each optimized training image to indicate the defect-related area of ​​the corresponding optimized training image, extract the insulation layer training features of the corresponding optimized training image based on the area where each prediction bounding box is located, and determine the prediction result of the corresponding optimized training image based on the insulation layer training features.

[0066] Specifically, the resolution and clarity of each cable insulation layer training image can be optimized based on the initial defect extraction model to form an optimized training image;

[0067] Based on the initial defect extraction model, a prediction bounding box is constructed in each optimized training image to indicate the area where the defect of the corresponding optimized training image is located;

[0068] Focusing on the area where each predicted bounding box is located, the insulating layer training features of the corresponding optimized training image are extracted;

[0069] The prediction result of the corresponding optimized training image is determined based on the insulating layer training features.

[0070] S13. Calculate the prediction loss of the initial defect extraction model based on the predicted bounding box, the prediction result and the corresponding annotation of each optimized training image.

[0071] Specifically, the predicted bounding box and the predicted result of each optimized training image may be compared with the corresponding annotation situation for similarity, and the prediction loss of the initial defect extraction model may be calculated.

[0072] The annotation of each optimized training image may include a defect result of a corresponding cable insulation layer training image. When the corresponding defect result indicates that there is an insulation layer defect, the annotation further includes a bounding box of the corresponding cable insulation layer training image.

[0073] S14. Based on each prediction loss, the initial super-resolution module, the initial multi-scale feature extraction module, the initial attention mechanism module, the initial feature fusion module and / or the initial decision layer are optimized using the gradient descent method until the prediction loss is lower than the preset loss threshold, and the final initial defect extraction model is used as the defect extraction model.

[0074] Specifically, with the prediction loss as a reference, the gradient descent method is used to adjust the parameters of the initial super-resolution module, the initial multi-scale feature extraction module, the initial attention mechanism module, the initial feature fusion module and / or the initial decision layer until the prediction loss is lower than the preset loss threshold. The final super-resolution module is used as the super-resolution module, the final initial multi-scale feature extraction module is used as the multi-scale feature extraction module, the final initial attention mechanism module is used as the attention mechanism module, the final initial feature fusion module is used as the feature fusion module, the final initial decision layer is used as the decision layer, and the final initial defect extraction model is used as the defect extraction model.

[0075] It can be seen from the above technical solution that this embodiment provides an optional method for obtaining a defect extraction model. Through the above method, the defect extraction model can be trained, thereby improving the reliability of the defect extraction model of the present application.

[0076] In some embodiments of the present application, the process of calculating the prediction loss of the initial defect extraction model based on the predicted bounding box, the prediction result and the corresponding annotation of each optimized training image in step S13 is described in detail, and the steps are as follows:

[0077] S130 , determining a multi-task loss function group that combines a bounding box position error function, a result error function, and a region offset error function.

[0078] Specifically, a bounding box position error function that introduces a scale factor and a mean square error can be constructed to improve the prediction accuracy of the bounding box;

[0079] The resulting error function that introduces focal loss can be constructed;

[0080] A regional migration error function that introduces geometric factors can be constructed.

[0081] The region offset error function can be used to evaluate the shape and position changes of the predicted bounding box, and penalize the aspect ratio, center point offset, etc. of the predicted bounding box to ensure that the geometric characteristics of the predicted bounding box match the actual defect area.

[0082] The loss function is dynamically adjusted during the training process to adapt to different detection tasks.

[0083] S131. In combination with the multi-task loss function group, based on the predicted bounding box, the prediction result and the corresponding annotation of each optimized training image, the prediction loss of each optimized training image is calculated.

[0084] Specifically, based on the multi-task loss function group, a boundary error between a predicted bounding box and a corresponding bounding box, a result error between a predicted result and a corresponding defect result, and a geometric characteristic error between a predicted bounding box and a corresponding bounding box of each optimized training image can be calculated;

[0085] The boundary error, the result error and the geometric characteristic error of each optimized training image are weightedly fused to form the prediction loss of each optimized training image.

[0086] It can be seen from the above technical solution that this embodiment provides an optional method for calculating the prediction loss of the initial defect extraction model based on the predicted bounding box, prediction results and corresponding annotations of each optimized training image. The above method can improve the detection ability of the defect extraction model for small target defects, measure the gap between the predicted bounding box and the actual bounding box, accurately predict the defect location, and reduce errors; further optimize the accuracy of the bounding box, and its calculation includes the geometric relationship between the overlapping part of the predicted box and the real box and the outside of the overlapping area.

[0087] In some embodiments of the present application, the process of optimizing and reconstructing the cable insulation layer image using the defect extraction model to form a super-resolution cable image, extracting insulation layer features of the super-resolution cable image, analyzing the insulation layer features, and detecting whether there are insulation layer defects in the cable insulation layer image is described in detail, and the steps are as follows:

[0088] S20. Utilizing the super-resolution module, optimizing and reconstructing the cable insulation layer image to form a super-resolution cable image.

[0089] Specifically, the super-resolution module includes a generator network, a discriminator network, a processing network and an equalization network.

[0090] The resolution of the super-resolution cable image is gradually increased during the generation of the super-resolution cable image using a layer-by-layer upsampling method of the generator network. The layer-by-layer upsampling method can be a deconvolution layer or a pixel rearrangement method, and is combined with a residual connection to stabilize the training process and reduce image distortion;

[0091] The discriminator network is based on a convolutional neural network structure to distinguish the difference between the generated super-resolution cable images and the real high-resolution images.

[0092] Using a processing network, the generated super-resolution cable image is post-processed, including denoising and edge enhancement, to further improve the clarity and detail visibility of the super-resolution cable image;

[0093] Techniques such as adaptive histogram equalization (CLAHE) are used to improve the overall contrast of super-resolution cable images, ensuring that detailed features are more obvious for subsequent defect detection.

[0094] S21. Utilize the multi-scale feature extraction module and the attention mechanism module to extract the spatial features and channel features of the super-resolution cable image.

[0095] Specifically, the multi-scale feature extraction module and the attention mechanism module can be comprehensively utilized to obtain the spatial features corresponding to the spatial dimension of the super-resolution cable image and the channel features corresponding to the channel dimension.

[0096] S22. Using the feature fusion module, fuse the spatial features and the channel features to form an insulating layer feature.

[0097] Specifically, the feature fusion module can be used to perform weighted fusion on the spatial features corresponding to the spatial dimension and the channel features corresponding to the channel dimension to form the insulation layer features.

[0098] S23. Utilizing the decision layer, analyzing the similarity between the insulation layer characteristics and various insulation layer defects, and evaluating whether there are insulation layer defects in the cable insulation layer image.

[0099] Specifically, the decision layer can be used to calculate the similarity between the insulation layer characteristics and various insulation layer defects, and based on the similarity, it is evaluated whether the cable insulation layer image has insulation layer defects.

[0100] It can be seen from the above technical solution that this embodiment provides an optional method for utilizing the defect extraction model to optimize and reconstruct the cable insulation layer image to form a super-resolution cable image, extract the insulation layer features of the super-resolution cable image, analyze the insulation layer features, and detect whether there are insulation layer defects in the cable insulation layer image. Through the above method, the various modules of the defect extraction model can be further better utilized for detection and identification, thereby improving the reliability of detection and identification.

[0101] In some embodiments of the present application, step S21, the process of extracting the spatial features and channel features of the super-resolution cable image using the multi-scale feature extraction module and the attention mechanism module is described in detail, and the steps are as follows:

[0102] S210, using the multi-scale feature extraction module to perform step-by-step feature extraction and downsampling on the super-resolution cable image to generate feature maps of different scales.

[0103] Specifically, the multi-scale feature extraction module can be composed of multiple convolutional layers and pooling layers.

[0104] Each convolution layer can be a deep convolutional neural network, which extracts low-level features and high-level features of the super-resolution cable image in different convolution layers and constructs a feature map containing multi-level feature representation;

[0105] The pooling layer gradually reduces the size of the feature map through maximum pooling or average pooling operations, reflecting feature information of different scales, which helps to capture global and local feature details such as shape, texture, and color.

[0106] S211. Utilize the attention mechanism module to generate a detection frame for marking a detection area in the super-resolution cable image. Based on the detection area, calculate the spatial attention weights of the feature maps of each scale in each spatial dimension and the channel attention weights of the feature maps of each scale in each channel dimension. Calculate the spatial features and channel features of the super-resolution cable image based on each feature map, each spatial attention weight and each channel attention weight.

[0107] Specifically, the attention mechanism module may include a spatial attention mechanism and a channel attention mechanism.

[0108] The spatial attention mechanism can be used to calculate the attention weight of the feature map in each spatial dimension to highlight the important spatial area. Common methods include using global average pooling and global maximum pooling to perform weighted calculations at corresponding positions;

[0109] Using the channel attention mechanism, the attention weight of the feature map in each channel dimension of the feature map is calculated to enhance the importance of different channels. Common methods include using global average pooling or global maximum pooling, and then calculating the attention weight of each channel through a fully connected layer and an activation function.

[0110] It can be seen from the above technical solution that this embodiment provides an optional method for extracting the spatial features and channel features of the super-resolution cable image. Through the above method, the characteristics of the detection area can be better reflected through the spatial features and channel features, redundant features can be removed, and accuracy can be improved.

[0111] In some embodiments of the present application, step S211, using the attention mechanism module, based on each feature map, each spatial attention weight and each channel attention weight, the process of calculating the spatial features and channel features of the super-resolution cable image is described in detail, and the steps are as follows:

[0112] S2110. Utilize the attention mechanism module to extract feature information of each feature map in different spatial dimensions and feature information of each feature map in different channel dimensions, calculate the spatial features of each feature map based on the feature information and spatial attention weights corresponding to each feature map in each spatial dimension, and calculate the channel features of each feature map based on the feature information and channel attention weights corresponding to each feature map in each channel dimension.

[0113] Specifically, by utilizing the attention mechanism module, feature information of feature maps of different scales in different spatial dimensions, as well as feature information in different channel dimensions, can be extracted.

[0114] For each feature map, the spatial features of the feature map are calculated based on the product of the feature information corresponding to the feature map in each spatial dimension and its spatial attention weight, and the channel features of each feature map are calculated based on the product of the feature information corresponding to the feature map in each channel dimension and the channel attention weight.

[0115] It can be seen from the above technical solution that this embodiment provides an optional method of using an attention mechanism module to extract spatial features and channel features based on each feature map, each spatial attention weight and each channel attention weight, and calculate the super-resolution cable image. Through the above method, important areas can be highlighted, related feature channels can be strengthened, and the importance of different channels can be enhanced. Higher weights are assigned to small-size defect features and wear-related features, while lower weights are assigned to irrelevant features of the cable surface with weak feature correlation, which effectively suppresses the interference of irrelevant features and better completes feature extraction, thereby improving the reliability of defect identification.

[0116] In some embodiments of the present application, the process of step S22, using the feature fusion module to fuse the spatial features and the channel features to form the insulating layer features, is described in detail, and the steps are as follows:

[0117] S220, using the feature fusion module, weightedly fuse the spatial features of the feature maps of different scales to form a spatial fusion feature, and weightedly fuse the channel features of the feature maps of different scales to form a channel fusion feature, and weightedly integrate the spatial fusion feature and the channel fusion feature to form an insulating layer feature.

[0118] Specifically, the feature fusion module can be used to weight the spatial features from feature maps of different scales to generate spatial fusion features, and to weight the channel features from feature maps of different scales to generate channel fusion features.

[0119] The feature fusion module is used to weight and integrate the spatial fusion features and channel fusion features to generate the insulation layer features.

[0120] It can be seen from the above technical solution that this embodiment provides an optional method of using the feature fusion module to fuse the spatial features and the channel features to form insulation layer features. Through the above method, feature information of different scales and levels can be integrated to enhance the ability of the defect extraction model to identify cable insulation layer defects.

[0121] Next, we will combine Figure 2 The cable insulation layer defect detection device provided in the present application is introduced in detail. The cable insulation layer defect detection device provided below can be compared with the cable insulation layer defect detection method provided above.

[0122] See also Figure 2 It can be found that the cable insulation layer defect detection device may include:

[0123] The acquisition module 10 is used to acquire the cable insulation layer image, and includes a super-resolution module, a multi-scale feature extraction module, an attention mechanism module, a feature fusion module and a defect extraction model of a decision layer, wherein the super-resolution module is trained for the purpose of improving the resolution and clarity of the input cable image;

[0124] The detection module 20 is used to use the defect extraction model to optimize and reconstruct the cable insulation layer image to form a super-resolution cable image, and to extract the insulation layer features of the super-resolution cable image, analyze the insulation layer features, and detect whether there are insulation layer defects in the cable insulation layer image.

[0125] Furthermore, the acquisition module may include:

[0126] An initial defect extraction model construction unit, used to construct an initial defect extraction model provided with an initial super-resolution module, an initial multi-scale feature extraction module, an initial attention mechanism module, an initial feature fusion module and an initial decision layer;

[0127] A cable insulation layer training image acquisition unit is used to acquire a training set consisting of two types of cable insulation layer training images, one type of cable insulation layer training images is images of cable insulation layers in different environments acquired by using a high-definition camera, and the other type is images of cable insulation layers that have been downsampled, to which Gaussian noise has been added, and which have been homogenized, each cable insulation layer training image is annotated with a defect result indicating whether the corresponding cable insulation layer training image represents an insulation layer defect, and the cable insulation layer training image corresponding to the insulation layer defect is also annotated with a defect type and a boundary box for marking a defect area;

[0128] An optimized training image acquisition unit is used to optimize the resolution of each cable insulation layer training image by using the initial defect extraction model to form an optimized training image, construct a prediction bounding box in each optimized training image to indicate a defect-related area of ​​the corresponding optimized training image, extract insulation layer training features of the corresponding optimized training image based on the area where each prediction bounding box is located, and determine a prediction result of the corresponding optimized training image based on the insulation layer training features;

[0129] A prediction loss calculation unit, used to calculate the prediction loss of the initial defect extraction model based on the prediction bounding box, the prediction result and the corresponding annotation of each optimized training image;

[0130] The initial defect extraction model optimization unit is used to optimize the initial super-resolution module, the initial multi-scale feature extraction module, the initial attention mechanism module, the initial feature fusion module and / or the initial decision layer based on each prediction loss using the gradient descent method until the prediction loss is lower than a preset loss threshold, and the final initial defect extraction model is used as the defect extraction model.

[0131] Further, the prediction loss calculation unit may include:

[0132] A multi-task loss function group determination component, used to determine a multi-task loss function group combining a bounding box position error function, a result error function, and a region offset error function;

[0133] The multi-task loss function group utilizes a component, which is used to combine the multi-task loss function group to calculate the prediction loss of each optimized training image based on the predicted bounding box, the prediction result and the corresponding annotation of each optimized training image.

[0134] Furthermore, the detection module may include:

[0135] A super-resolution cable image construction unit, used to optimize and reconstruct the cable insulation layer image using the super-resolution module to form a super-resolution cable image;

[0136] A channel feature extraction unit, used to extract the spatial features and channel features of the super-resolution cable image by using the multi-scale feature extraction module and the attention mechanism module;

[0137] An insulating layer feature construction unit, used to fuse the spatial feature and the channel feature using the feature fusion module to form an insulating layer feature;

[0138] The insulation layer defect evaluation unit is used to use the decision layer to analyze the similarity between the insulation layer characteristics and various insulation layer defects, and evaluate whether there are insulation layer defects in the cable insulation layer image.

[0139] Further, the channel feature extraction unit may include:

[0140] A multi-scale feature map generation component, used to use the multi-scale feature extraction module to perform step-by-step feature extraction and downsampling on the super-resolution cable image to generate feature maps of different scales;

[0141] A spatial attention weight calculation component is used to generate a detection frame for marking a detection area in the super-resolution cable image by using the attention mechanism module, and based on the detection area, calculate the spatial attention weights of the feature maps of each scale in each spatial dimension and the channel attention weights of the feature maps of each scale in each channel dimension, and calculate the spatial features and channel features of the super-resolution cable image based on each feature map, each spatial attention weight and each channel attention weight.

[0142] Further, the spatial attention weight calculation component may include:

[0143] The feature information extraction subcomponent is used to utilize the attention mechanism module to extract the feature information of each feature map in different spatial dimensions and the feature information of each feature map in different channel dimensions, calculate the spatial features of each feature map based on the feature information and spatial attention weights corresponding to each feature map in each spatial dimension, and calculate the channel features of each feature map based on the feature information and channel attention weights corresponding to each feature map in each channel dimension.

[0144] Further, the insulating layer feature construction unit may include:

[0145] The spatial fusion feature generation component is used to use the feature fusion module to perform weighted fusion on the spatial features of feature maps of different scales to form spatial fusion features, and to perform weighted fusion on the channel features of feature maps of different scales to form channel fusion features, and to perform weighted integration on the spatial fusion features and the channel fusion features to form insulation layer features.

[0146] The cable insulation layer defect detection device provided in the embodiment of the present application can be applied to cable insulation layer defect detection equipment, such as PC terminals, cloud platforms, servers and server clusters. Optionally, Figure 3 The hardware structure diagram of the cable insulation layer defect detection device is shown in FIG. Figure 3 ,The hardware structure of the cable insulation layer defect detection device may include: at least one processor 1, at least one communication interface 2, at least one memory 3 and at least one communication bus 4;

[0147] In the embodiment of the present application, the number of the processor 1, the communication interface 2, the memory 3, and the communication bus 4 is at least one, and the processor 1, the communication interface 2, and the memory 3 communicate with each other through the communication bus 4;

[0148] The processor 1 may be a central processing unit CPU, or an application-specific integrated circuit ASIC (Application Specific Integrated Circuit), or one or more integrated circuits configured to implement the embodiments of the present invention, etc.;

[0149] The memory 3 may include a high-speed RAM memory, and may also include a non-volatile memory (non-volatile memory), etc., such as at least one disk memory;

[0150] The memory stores a program, and the processor can call the program stored in the memory, wherein the program is used to:

[0151] Obtaining a cable insulation layer image, and a defect extraction model including a super-resolution module, a multi-scale feature extraction module, an attention mechanism module, a feature fusion module and a decision layer, wherein the super-resolution module is trained for the purpose of improving the resolution and clarity of the input cable image;

[0152] The defect extraction model is used to optimize and reconstruct the cable insulation layer image to form a super-resolution cable image, and the insulation layer features of the super-resolution cable image are extracted and analyzed to detect whether there are insulation layer defects in the cable insulation layer image.

[0153] Optionally, the detailed functions and extended functions of the program may refer to the above description.

[0154] The embodiment of the present application further provides a readable storage medium, which may store a program suitable for execution by a processor, wherein the program is used to:

[0155] Obtaining a cable insulation layer image, and a defect extraction model including a super-resolution module, a multi-scale feature extraction module, an attention mechanism module, a feature fusion module and a decision layer, wherein the super-resolution module is trained for the purpose of improving the resolution and clarity of the input cable image;

[0156] The defect extraction model is used to optimize and reconstruct the cable insulation layer image to form a super-resolution cable image, and the insulation layer features of the super-resolution cable image are extracted and analyzed to detect whether there are insulation layer defects in the cable insulation layer image.

[0157] Optionally, the detailed functions and extended functions of the program may refer to the above description.

[0158] Finally, it should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.

[0159] The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referenced to each other.

[0160] The above description of the disclosed embodiments enables professionals and technicians in the field to implement or use the present application. Various modifications to these embodiments will be apparent to professionals and technicians in the field, and the general principles defined herein can be implemented in other embodiments without departing from the spirit or scope of the present application. The various embodiments of the present application can be combined with each other. Therefore, the present application will not be limited to the embodiments shown herein, but will conform to the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A method for detecting defects in cable insulation layer, characterized in that: include: Obtaining a cable insulation layer image, and a defect extraction model including a super-resolution module, a multi-scale feature extraction module, an attention mechanism module, a feature fusion module and a decision layer, wherein the super-resolution module is trained for the purpose of improving the resolution and clarity of the input cable image; The defect extraction model is used to optimize and reconstruct the cable insulation layer image to form a super-resolution cable image, and the insulation layer features of the super-resolution cable image are extracted and analyzed to detect whether there are insulation layer defects in the cable insulation layer image.

2. The cable insulation layer defect detection method according to claim 1, characterized in that: The method of using the defect extraction model to optimize and reconstruct the cable insulation layer image to form a super-resolution cable image, extracting insulation layer features of the super-resolution cable image, analyzing the insulation layer features, and detecting whether the cable insulation layer image has insulation layer defects includes: Utilizing the super-resolution module, optimizing and reconstructing the cable insulation layer image to form a super-resolution cable image; Utilizing the multi-scale feature extraction module and the attention mechanism module, extracting spatial features and channel features of the super-resolution cable image; Using the feature fusion module, the spatial feature and the channel feature are fused to form an insulating layer feature; The decision layer is used to analyze the similarity between the insulation layer characteristics and various insulation layer defects, and to evaluate whether there are insulation layer defects in the cable insulation layer image.

3. The cable insulation layer defect detection method according to claim 2, characterized in that: The method of extracting the spatial features and channel features of the super-resolution cable image by using the multi-scale feature extraction module and the attention mechanism module includes: Using the multi-scale feature extraction module, performing step-by-step feature extraction and downsampling on the super-resolution cable image to generate feature maps of different scales; By using the attention mechanism module, a detection frame for marking a detection area is generated in the super-resolution cable image. Based on the detection area, the spatial attention weights of the feature maps of each scale in each spatial dimension and the channel attention weights of the feature maps of each scale in each channel dimension are calculated. Based on each feature map, each spatial attention weight and each channel attention weight, the spatial features and channel features of the super-resolution cable image are calculated.

4. The cable insulation layer defect detection method according to claim 3, characterized in that: Using the attention mechanism module, based on each feature map, each spatial attention weight, and each channel attention weight, the spatial features and channel features of the super-resolution cable image are calculated, including: The attention mechanism module is used to extract the feature information of each feature map in different spatial dimensions and the feature information of each feature map in different channel dimensions. The spatial features of each feature map are calculated based on the feature information and spatial attention weights corresponding to each feature map in each spatial dimension, and the channel features of each feature map are calculated based on the feature information and channel attention weights corresponding to each feature map in each channel dimension.

5. The cable insulation layer defect detection method according to claim 4, characterized in that: The utilizing the feature fusion module to fuse the spatial feature and the channel feature to form an insulating layer feature includes: The feature fusion module is used to perform weighted fusion on the spatial features of feature maps of different scales to form spatial fusion features, and to perform weighted fusion on the channel features of feature maps of different scales to form channel fusion features. The spatial fusion features and the channel fusion features are weighted integrated to form insulation layer features.

6. The cable insulation layer defect detection method according to claim 1, characterized in that: Get the defect extraction model, including: Construct an initial defect extraction model having an initial super-resolution module, an initial multi-scale feature extraction module, an initial attention mechanism module, an initial feature fusion module and an initial decision layer; A training set consisting of two types of cable insulation layer training images is obtained, wherein one type of cable insulation layer training images is images of cable insulation layers in different environments collected by a high-definition camera, and the other type is images of cable insulation layers that have been downsampled, added with Gaussian noise, and homogenized, each cable insulation layer training image is annotated with a defect result indicating whether the corresponding cable insulation layer training image represents an insulation layer defect, and the cable insulation layer training images corresponding to insulation layer defects are also annotated with defect types and bounding boxes for marking defect areas; Utilizing the initial defect extraction model, the resolution of each cable insulation layer training image is optimized to form an optimized training image, a prediction bounding box is constructed in each optimized training image to indicate a defect-related area of ​​the corresponding optimized training image, and based on the area where each prediction bounding box is located, the insulation layer training features of the corresponding optimized training image are extracted, and the prediction result of the corresponding optimized training image is determined based on the insulation layer training features; Calculating the prediction loss of the initial defect extraction model based on the predicted bounding box, the predicted result and the corresponding annotation of each optimized training image; Based on each prediction loss, the gradient descent method is used to optimize the initial super-resolution module, the initial multi-scale feature extraction module, the initial attention mechanism module, the initial feature fusion module and / or the initial decision layer until the prediction loss is lower than the preset loss threshold, and the final initial defect extraction model is used as the defect extraction model.

7. The cable insulation layer defect detection method according to claim 6, characterized in that: The step of calculating the prediction loss of the initial defect extraction model based on the prediction bounding box, the prediction result and the corresponding annotation of each optimized training image includes: Determining a multi-task loss function group that combines a bounding box position error function, a result error function, and a region offset error function; In combination with the multi-task loss function group, the prediction loss of each optimized training image is calculated based on the predicted bounding box, the prediction result and the corresponding annotation of each optimized training image.

8. A cable insulation layer defect detection device, characterized in that: include: An acquisition module is used to acquire a cable insulation layer image, and includes a super-resolution module, a multi-scale feature extraction module, an attention mechanism module, a feature fusion module and a defect extraction model of a decision layer, wherein the super-resolution module is trained for the purpose of improving the resolution and clarity of the input cable image; The detection module is used to optimize and reconstruct the cable insulation layer image by using the defect extraction model to form a super-resolution cable image, extract the insulation layer features of the super-resolution cable image, analyze the insulation layer features, and detect whether there are insulation layer defects in the cable insulation layer image.

9. A cable insulation layer defect detection device, characterized in that: including memory and processor; The memory is used to store programs; The processor is used to execute the program to implement each step of the cable insulation layer defect detection method according to any one of claims 1 to 7.

10. A readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, each step of the cable insulation layer defect detection method according to any one of claims 1 to 7 is implemented.

Citation Information

Patent Citations

  • Insulator detection network training and detection method and device, and storage medium

    CN114841993A

  • Method for monitoring a power line

    US20220146555A1

Cited By

  • Cable insulation layer defect detection method, system and equipment and storage medium

    CN121141816A

  • A method, system, device and storage medium for detecting defects in cable insulation layers

    CN121141816B