A method and system for identifying defects in cable insulation

CN122336440BActive Publication Date: 2026-10-20CHENGDU POWER SUPPLY COMPANY OF STATE GRID SICHUAN ELECTRIC POWER
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202610652937.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2026-05-13
Publication Date
2026-10-20
Estimated Expiration
2046-05-13

AI Technical Summary

Technical Problem

相关技术中,对于电缆绝缘层进行缺陷识别的方法通常是采用人工肉眼观察电缆截面图像的方式、通过对电缆截面图像进行滤波、阈值分割等操作来识别缺陷,通过人工检测的方式不仅效率低,而且检测人员长时间的工作容易导致检测人员视觉疲劳,从而出现漏检、误检的情况,使得缺陷识别的准确性难以保证;通过对电缆截面图像进行滤波、阈值分割等操作来识别缺陷的方式,对图像质量要求较高,当电缆截面图像存在噪声、光照不均匀等问题时,缺陷识别的准确性会大大降低

Benefits of technology

[0008]本申请的有益效果:本申请通过获取当前电缆截面图像和历史电缆截面图像,将当前电缆截面图像输入绝缘层分割模型,得到当前绝缘层分割图像,将当前绝缘层分割图像输入绝缘层缺陷识别模型,得到绝缘层区域内的缺陷识别结果,对当前绝缘层分割图像中绝缘层的厚度进行检测,根据厚度检测结果,确定绝缘层边缘的缺陷识别结果,对绝缘层区域内的缺陷识别结果、绝缘层边缘的缺陷识别结果进行组合,得到绝缘层的缺陷识别结果,以上过程,通过绝缘层分割模型对当前电缆截面图像进行分割,提高了对绝缘层的分割效果,并在当前绝缘层分割图像之后,通过绝缘层缺陷识别模型识别绝缘层区域内的缺陷,通过对当前绝缘层分割图像中绝缘层的厚度进行检测,根据厚度检测结果,确定绝缘层边缘的缺陷,并将绝缘层区域内的缺陷和绝缘层边缘的缺陷,作为缺陷识别结果,提高了绝缘层缺陷识别的准确性和多样性。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122336440B_ABST
    Figure CN122336440B_ABST
Patent Text Reader

Abstract

The application provides a cable insulation layer defect identification method and system. The method comprises the following steps: acquiring a current cable cross-section image; inputting the current cable cross-section image into an insulation layer segmentation model to obtain a current insulation layer segmentation image; inputting the current insulation layer segmentation image into an insulation layer defect identification model to obtain a defect identification result in an insulation layer region; detecting the thickness of the insulation layer in the current insulation layer segmentation image; determining the defect identification result of the insulation layer edge according to the thickness detection result; and combining the defect identification result in the insulation layer region and the defect identification result of the insulation layer edge to obtain the defect identification result of the insulation layer. The current cable cross-section image is segmented by the insulation layer segmentation model, the segmentation effect of the insulation layer is improved, and the defects in the insulation layer region and the defects of the insulation layer edge are taken as the defect identification result after the current insulation layer segmentation image, so that the accuracy and diversity of the insulation layer defect identification are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of image processing technology, and in particular to a method and system for identifying defects in cable insulation. Background Technology

[0002] Cable insulation is a critical structural layer that wraps around a conductor (such as copper or aluminum) to isolate the conductor from the external environment and prevent current leakage or short circuits. It ensures the safe and efficient transmission of electrical energy or signals by preventing current from flowing down unintended paths.

[0003] Defects in cable insulation directly affect the cable's electrical performance, mechanical strength, and service life, and in severe cases, can even lead to safety accidents (such as short circuits and fires). For example, before cable use (such as during production and quality inspection), defect detection of the cable cross-section can eliminate unsafe factors caused by insulation defects, reducing the probability of cable failures during use. Similarly, during the fabrication of cable joints, defect detection of the cable insulation cross-section can promptly identify and eliminate insulation defects caused by construction processes (such as stripping and grinding), thereby reducing the probability of partial discharge, breakdown, and other faults during cable joint operation and improving the safety and reliability of the power supply system. In related technologies, the common method for identifying defects in cable insulation layers is to manually observe cable cross-sectional images and then perform operations such as filtering and threshold segmentation on the images to identify defects. Manual inspection is not only inefficient, but prolonged work can also lead to visual fatigue among inspectors, resulting in missed or false detections and compromising the accuracy of defect identification. Furthermore, the method of identifying defects by filtering and thresholding cable cross-sectional images requires high image quality; when the cable cross-sectional image contains noise or uneven lighting, the accuracy of defect identification is significantly reduced.

[0004] Therefore, it is necessary to improve the cable insulation defect identification methods in related technologies. Summary of the Invention

[0005] In view of the shortcomings of the prior art described above, this application provides a method and system for identifying defects in cable insulation layers to solve the above-mentioned technical problems.

[0006] According to one aspect of the embodiments of this application, a method and system for identifying defects in cable insulation layers are provided. The method includes: acquiring a current cable cross-section image and a historical cable cross-section image; inputting the current cable cross-section image into an insulation layer segmentation model to obtain a current insulation layer segmentation image; the insulation layer segmentation model is obtained by training a pre-established segmentation model using a first sample image; the first sample image is the historical cable cross-section image after preprocessing; inputting the current insulation layer segmentation image into an insulation layer defect identification model to obtain defect identification results within the insulation layer region; the insulation layer defect identification model is obtained by training a pre-established defect identification model using a second sample image; the second sample image is a historical insulation layer segmentation image obtained by segmenting the historical cable cross-section image; detecting the thickness of the insulation layer in the current insulation layer segmentation image, and determining the defect identification results at the insulation layer edge based on the thickness detection results; combining the defect identification results within the insulation layer region and the defect identification results at the insulation layer edge to obtain the defect identification results of the insulation layer.

[0007] According to another aspect of the embodiments of this application, a cable insulation layer defect identification system is also provided, comprising: an image acquisition module for acquiring a current cable cross-section image and a historical cable cross-section image; an image segmentation module for inputting the current cable cross-section image into an insulation layer segmentation model to obtain a current insulation layer segmentation image; the insulation layer segmentation model is obtained by training a pre-established segmentation model using a first sample image; the first sample image is the historical cable cross-section image after preprocessing; a defect identification module for inputting the current insulation layer segmentation image into an insulation layer defect identification model to obtain a defect identification result within the insulation layer region; the insulation layer defect identification model is obtained by training a pre-established defect identification model using a second sample image; the second sample image is a historical insulation layer segmentation image obtained by segmenting the historical cable cross-section image; a thickness detection module for detecting the thickness of the insulation layer in the current insulation layer segmentation image, and determining the defect identification result of the insulation layer edge based on the thickness detection result; and a defect combination module for combining the defect identification results within the insulation layer region and the defect identification results of the insulation layer edge to obtain the defect identification result of the insulation layer.

[0008] The beneficial effects of this application are as follows: This application acquires current cable cross-section images and historical cable cross-section images, inputs the current cable cross-section image into an insulation layer segmentation model to obtain a current insulation layer segmentation image, inputs the current insulation layer segmentation image into an insulation layer defect identification model to obtain defect identification results within the insulation layer area, detects the thickness of the insulation layer in the current insulation layer segmentation image, determines the defect identification results at the insulation layer edge based on the thickness detection results, and combines the defect identification results within the insulation layer area and the defect identification results at the insulation layer edge to obtain the insulation layer defect identification results. The above process, by segmenting the current cable cross-section image using an insulation layer segmentation model, improves the segmentation effect of the insulation layer. Furthermore, after the current insulation layer segmentation image, the insulation layer defect identification model identifies defects within the insulation layer area. By detecting the thickness of the insulation layer in the current insulation layer segmentation image, and determining the defects at the insulation layer edge based on the thickness detection results, the application uses both the defects within the insulation layer area and the defects at the insulation layer edge as defect identification results, thereby improving the accuracy and diversity of insulation layer defect identification.

[0009] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and do not limit this application. Attached Figure Description

[0010] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application. It is obvious that the drawings described below are merely some embodiments of this application, and those skilled in the art can obtain other drawings based on these drawings without any inventive effort. In the drawings: Figure 1 This is a schematic diagram illustrating an exemplary system architecture as shown in an exemplary embodiment of this application; Figure 2 This is a flowchart illustrating a cable insulation layer defect identification method according to an exemplary embodiment of this application; Figure 3 This is a flowchart illustrating a cable insulation layer defect identification method in another exemplary embodiment of this application; Figure 4 This is a structural diagram of a pre-established segmentation model shown in an exemplary embodiment of this application; Figure 5 This is a schematic diagram illustrating an exemplary embodiment of the present application, showing the current insulation layer segmentation image obtained by segmenting the current cable cross-section image into insulation layers; Figure 6 This is a block diagram illustrating a cable insulation defect identification system according to an exemplary embodiment of this application. Detailed Implementation

[0011] The following specific examples illustrate the implementation of this application. Those skilled in the art can easily understand other advantages and effects of this application from the content disclosed in this specification. This application can also be implemented or applied through other different specific embodiments. Various details in this specification can also be modified or changed based on different viewpoints and applications without departing from the spirit of this application. In the absence of conflict, the following embodiments and features in the embodiments can be combined with each other.

[0012] It should be noted that the illustrations provided in the following embodiments are only schematic representations of the basic concept of this application. The drawings only show the components related to this application and are not drawn according to the actual number, shape and size of the components in the actual implementation. In the actual implementation, the form, quantity and proportion of each component can be arbitrarily changed, and the layout of the components may also be more complex.

[0013] In the following description, numerous details are explored to provide a more thorough explanation of embodiments of the present application. However, it will be apparent to those skilled in the art that embodiments of the present application may be practiced without these specific details. In other embodiments, well-known structures and devices are shown in block diagram form rather than in detail to avoid obscuring embodiments of the present application.

[0014] Figure 1 This is a schematic diagram illustrating an exemplary system architecture as shown in an exemplary embodiment of this application.

[0015] Reference Figure 1 As shown, the system architecture may include an acquisition device 101 and an electronic device 102. The electronic device 102 may be at least one of a desktop graphics processing unit (GPU) computer, a GPU computing cluster, or a neural network computer. Technical personnel can use the electronic device 102 to acquire current cable cross-section images and historical cable cross-section images. The current cable cross-section image is input into an insulation layer segmentation model to obtain a current insulation layer segmentation image. This image is then input into an insulation layer defect identification model to obtain defect identification results within the insulation layer region. The thickness of the insulation layer in the current insulation layer segmentation image is detected. Based on the thickness detection results, defect identification results at the insulation layer edges are determined. The defect identification results within the insulation layer region and at the insulation layer edges are combined to obtain the insulation layer defect identification result. The acquisition device 101 receives the pre-processed current cable cross-section image. The acquisition device 101 uses a camera or similar device to acquire the current cable cross-section image and provides it to the electronic device 102 for processing.

[0016] The implementation details of the technical solutions in the embodiments of this application are described in detail below: Figure 2 This is a flowchart illustrating a cable insulation layer defect identification method according to an exemplary embodiment of this application. (Refer to...) Figure 2 As shown, the cable insulation defect identification method includes at least steps S210 to S250, which are described in detail below: In step S210, the current cable cross-section image and historical cable cross-section images are acquired. In one embodiment of this application, the current cable cross-section image can be a cable cross-section image obtained after acquisition, or it can be a preprocessed cable cross-section image. Preprocessing includes: image background removal, image scaling, etc. The process of preprocessing the current cable cross-section image to obtain the preprocessed current cable cross-section image includes: removing the image background from the current cable cross-section image to obtain a mask image; scaling the mask image to obtain an image of a preset size. Removing the image background from the current cable cross-section image helps reduce the impact of background noise on insulation layer segmentation, and scaling the mask image facilitates adaptation to the size requirements of the insulation layer segmentation model for the input image. The preset size image can be 512×512 pixels, or other sizes. The current cable cross-section image can be a 220kV cable cross-section image, or other cable insulation images.

[0017] In one embodiment of this application, the process of removing the background from a current cable cross-section image to obtain a mask image includes: removing the background from the current cable cross-section image using a background removal tool to obtain a foreground image with a transparent background; cropping the foreground image with a transparent background using the alpha channel to obtain a cropped foreground image; setting a brightness threshold (e.g., 50), using pixels in the cropped foreground image below the brightness threshold as first target pixels, and combining all first target pixels to obtain a first background region in the cropped foreground image; setting an alpha channel threshold (e.g., 30), using pixels in the cropped foreground image above the alpha channel threshold as second target pixels, using pixels in the cropped foreground image less than or equal to the alpha channel threshold as background pixels, combining all second target pixels to obtain a foreground region in the cropped foreground image, and combining all background pixels to obtain a second background region in the cropped foreground image; and superimposing the foreground region, the first background region, and the second background region in the cropped foreground image to obtain a mask image.

[0018] In one embodiment of this application, the background removal tool can be a deep learning-based background removal tool, whose core function is to automatically identify and remove the background in the image through intelligent algorithms, generating an image with a transparent or solid color background. Other background removal tools can also be selected, and no specific limitation is made here. The alpha channel controls the transparency information of the image by setting the channel value.

[0019] In step S220, the current cable cross-section image is input into the insulation layer segmentation model to obtain the current insulation layer segmentation image. In one embodiment of this application, the insulation layer segmentation model is obtained by training a pre-established segmentation model using a first sample image. The first sample image is a historical cable cross-section image after preprocessing. The pre-established segmentation model includes: a convolutional neural network encoder, a linear projection layer, a Transformer encoder, a skip connection layer, and an output layer. The convolutional neural network encoder includes: multiple first convolutional layers, a first hidden feature layer, and a linear projection layer. The Transformer encoder includes: multiple Transformer layers, a second hidden feature layer, and a feature reshaping layer. Each Transformer layer includes: a first normalization layer, a matrix multiplication operation layer, a second normalization layer, a multilayer perceptron module, and a context bridging module. The skip connection layer includes: multiple concatenation branches, a first convolutional activation module, a first upsampling layer, and a first efficient multi-scale attention module. Each concatenation branch includes: a second efficient multi-scale attention module, a feature concatenation layer, a second convolutional activation module, a second upsampling layer, and a third efficient multi-scale attention module. The output layer includes: a third convolutional activation module and a segmentation head. The pre-established segmentation model's structural settings are beneficial for improving the segmentation accuracy and effect of the insulating layer.

[0020] In step S230, the current insulation layer segmentation image is input into the insulation layer defect identification model to obtain the defect identification result within the insulation layer region. In one embodiment of this application, the insulation layer defect identification model is obtained by training a pre-established defect identification model using a second sample image. The second sample image is a historical insulation layer segmentation image obtained by segmenting a historical cable cross-section image. The pre-established defect identification model is a convolutional neural network model, which has multiple convolutional layers, pooling layers, and fully connected layers. The convolutional layers are used to extract features from the current insulation layer segmentation image to obtain multi-scale feature maps. The pooling layers perform downsampling operations on the multi-scale feature maps to obtain sampled feature information. The fully connected layers integrate the sampled feature information and output the defect identification result within the insulation layer region. By identifying defects in the current insulation layer segmentation image using the insulation layer defect identification model, various defects within the insulation layer region, such as holes and inclusions, can be accurately located.

[0021] In step S240, the thickness of the insulating layer in the current insulating layer segmentation image is detected, and the defect identification result of the insulating layer edge is determined based on the thickness detection result. In one embodiment of this application, the defect identification result of the insulating layer edge includes protrusions, depressions, etc. of the insulating layer edge.

[0022] In step S250, the defect identification results within the insulation layer region and the defect identification results at the insulation layer edge are combined to obtain the defect identification result of the insulation layer. In one embodiment of this application, if there are no identical defect identification results between the defect identification results within the insulation layer region and the defect identification results at the insulation layer edge, the combination of the defect identification results within the insulation layer region and the defect identification results at the insulation layer edge is taken as the defect identification result of the insulation layer; if there are identical defect identification results between the defect identification results within the insulation layer region and the defect identification results at the insulation layer edge, the duplicate defect identification results are deleted from the defect identification results within the insulation layer region, and the combination of the deleted defect identification results within the insulation layer region and the defect identification results at the insulation layer edge is taken as the defect identification result of the insulation layer.

[0023] In one embodiment of this application, the current cable cross-section image is segmented using an insulation layer segmentation model, which improves the segmentation effect of the insulation layer. After the current insulation layer segmentation image, defects in the insulation layer area are identified using an insulation layer defect identification model. By detecting the thickness of the insulation layer in the current insulation layer segmentation image, defects at the edge of the insulation layer are determined based on the thickness detection results. The defects in the insulation layer area and the defects at the edge of the insulation layer are used as the defect identification results, which improves the accuracy and diversity of insulation layer defect identification.

[0024] In one embodiment of this application, the process of training a pre-established segmentation model using a first sample image to obtain an insulation layer segmentation model includes: The insulation layer region in the first sample image is labeled to obtain a first sample image with labeled information. In one embodiment of this application, the preprocessing operation includes: image background removal, image scaling, and image enhancement. The process of preprocessing the historical cable cross-section image includes: removing the image background from the historical cable cross-section image to obtain a historical mask; scaling the historical mask and the historical cable cross-section image to obtain a historical mask and a historical cable cross-section image of a preset size; enhancing the historical mask and the historical cable cross-section image of the preset size to obtain the first sample image. The process of removing the image background from the historical cable cross-section image is the same as the process of removing the image background from the current cable cross-section image. The process of scaling the historical mask and the historical cable cross-section image is the same as the process of scaling the mask. The process of enhancing the historical mask and the historical cable cross-section image of the preset size to obtain the first sample image includes: performing a horizontal rotation, vertical rotation, or random rotation operation on the historical mask of the preset size according to a preset rotation probability (e.g., 0.5). The process involves several steps: First, a historical cable cross-section image of a preset size is rotated horizontally, vertically, or randomly (the rotation angle is set according to the actual situation, for example, between -10° and 10°) to obtain a rotated historical cable cross-section image. Second, the historical cable cross-section image of the preset size is adjusted for brightness and contrast, blurred using Gaussian, or Gaussian noise is added, according to a preset adjustment probability (for example, 0.3) to obtain an adjusted historical mask. Third, the historical cable cross-section image of the preset size is adjusted for brightness and contrast, blurred using Gaussian, or Gaussian noise is added, according to a preset adjustment probability (for example, 0.3) to obtain an adjusted historical cable cross-section image. The adjusted historical mask and the adjusted historical cable cross-section image are then combined to form the first sample image set. These operations increase the diversity and quantity of the first sample images, better simulating various situations that may occur in actual application scenarios, and improving the generalization ability of the pre-established segmentation model. The pre-built segmentation model can be either the AO-TransUNET (A multi-attention optimization network for COVID-19 and medical image segmentation) model or other models.

[0025] In one embodiment of this application, an annotation tool is used to annotate the insulating layer region in the first sample image, and the annotation tool is selected according to the actual situation.

[0026] The process of inputting a first sample image with labeled information into a pre-established segmentation model to obtain an insulating layer segmentation mask includes the following steps: inputting the first sample image with labeled information into the convolutional neural network encoder to obtain a multi-scale feature map; segmenting the first preset depth feature map in the multi-scale feature map into image blocks and inputting the image blocks into the linear projection layer to obtain linear projection vectors; inputting the linear projection vectors into the Transformer encoder to obtain a global feature map; inputting the global feature map and the second preset depth feature map in the multi-scale feature map into the skip connection layer to obtain a fused feature map; and inputting the fused feature map into the output layer to obtain the insulating layer segmentation mask. Through the collaborative work of the convolutional neural network encoder, linear projection layer, Transformer encoder, skip connection layer, and output layer, the above process can fully utilize the feature information of different layers to improve the segmentation accuracy of the insulating layer region.

[0027] With the goal of minimizing the difference between the predicted results of each pixel in the insulating layer segmentation mask and the labeled information of each pixel in the first sample image, the parameters of a pre-established segmentation model are adjusted until the difference between the predicted results of each pixel in the insulating layer segmentation mask output by the segmentation model after parameter adjustment and the labeled information of each pixel in the first sample image is less than a first preset difference threshold, or until the number of times the parameters of the pre-established segmentation model are adjusted reaches a first preset number threshold, then the parameter adjustment of the pre-established segmentation model is stopped, and the current insulating layer segmentation image is obtained. In one embodiment of this application, both the first preset difference threshold and the first preset number threshold can be set according to actual conditions. If the difference between the predicted results of each pixel in the insulating layer segmentation mask and the labeled information of each pixel in the first sample image is represented by a first loss function, then the expression of the first loss function includes: Equation (1) Among them, L Dice Denotes the first loss function. Indicates the first layer in the insulating layer segmentation mask The predicted probability (i.e., the prediction result) of each pixel. Indicates the first sample image The label (i.e. annotation information) corresponding to each pixel. This represents a constant value used to avoid division by zero.

[0028] In one embodiment of this application, the process of training the pre-established segmentation model with the first sample image not only considers the preprocessing of historical cable cross-section images and the annotation of the insulation layer region in the first sample image, but also adjusts the parameters through the pre-established segmentation model structure and the first loss function, which can more accurately segment the insulation layer region and provide a reliable foundation for subsequent defect identification steps.

[0029] In one embodiment of this application, if the pre-established segmentation model includes: a convolutional neural network encoder, a linear projection layer, a Transformer encoder, a skip connection layer, and an output layer, then the process of inputting a first sample image with labeled information into the pre-established segmentation model to obtain an insulating layer segmentation mask includes: The first sample image with labeled information is input into the convolutional neural network encoder to obtain a multi-scale feature map. In one embodiment of this application, the convolutional neural network encoder includes: multiple first convolutional layers and a first hidden feature layer (attached). Figure 4 The first hidden future (from top to bottom) is a multi-layered convolutional layer, including at least three first convolutional layers. The first sample image with labeled information is input into the first first convolutional layer to obtain the first local feature map; the first local feature map is input into the second first convolutional layer to obtain the second local feature map; the second local feature map is input into the third first convolutional layer to obtain the third local feature map; and the third local feature map is input into the first hidden layer to obtain the multi-scale feature map.

[0030] The first preset depth feature map in the multi-scale feature map is segmented into image patches, and the image patches are input into a linear projection layer to obtain linear projection vectors. In one embodiment of this application, the first preset depth feature map is a feature map in the multi-scale feature map other than the first local feature map, the second local feature map, and the third local feature map. The linear projection layer is a linear transformation operation in a neural network, used to adjust the feature dimension, fuse multimodal information, and transform the feature space of the image patches.

[0031] The linear projection vector is input into the Transformer encoder to obtain the global feature map. In one embodiment of this application, the Transformer encoder includes: multiple Transformer layers, a second hidden feature layer, and a feature reshaping layer. Each Transformer layer includes: a first normalization layer, a matrix multiplication operation layer, a second normalization layer, a multilayer perception module, and a context bridging module. The number of Transformer layers is set to 14. The linear projection vector is input into the first normalization layer (see attached diagram). Figure 4The first normalized vector is obtained by first normalizing the first layer from top to bottom; the first normalized vector is then input into the matrix multiplication layer (i.e., the appendix). Figure 4 The UFO (Unit Force Operated) module in the middle obtains the first multiplication operation vector; the first multiplication operation vector and the linear projection vector are residually concatenated to obtain the first residual vector; the first residual vector is input into the second normalization layer (attached). Figure 4 The second normalized vector is obtained from the second layer normalized vector from top to bottom. This second normalized vector is then input into the Multi-Layer Perceptron (MLP) module to obtain a mapped feature vector. This mapped feature vector is then input into the Contextual Broadcasting (CB) module to obtain a bridging feature vector. The bridging feature vector is then concatenated with the first residual vector to obtain a second residual vector. After the first Transformer layer outputs the second residual vector, the second Transformer layer uses this second residual vector as input for attention mechanism operations, resulting in the second Transformer layer's output feature vector. This process is repeated, inputting the second Transformer layer's output feature vector into the third Transformer layer, and so on, until the twelfth Transformer layer's output feature vector is obtained. The feature vector output from each Transformer layer is then input into the second hidden feature layer (see appendix). Figure 4 The second hidden future from top to bottom is used to obtain a multi-scale feature vector; the multi-scale feature vector is then input into the feature reshape layer to obtain the global feature map.

[0032] The global feature map and the second preset depth feature map from the multi-scale feature map are input into the skip connection layer to obtain a fused feature map. In one embodiment of this application, the first preset depth is greater than the second preset depth; the skip connection layer includes multiple concatenation branches, a first convolutional-activation module, a first upsampling layer, and a first efficient multi-scale attention module. Each concatenation branch includes: a second efficient multi-scale attention module, a feature concatenation layer, a second convolutional-activation module, a second upsampling layer, and a third efficient multi-scale attention module. The second preset depth feature map includes: a first local feature map, a second local feature map, and a third local feature map. The first concatenation branch is used to concatenate the third local feature map and the global feature map to obtain a first concatenated feature map; the second concatenation branch is used to concatenate the second local feature map and the first concatenated feature map to obtain a second concatenated feature map; and the third concatenation branch is used to concatenate the first local feature map and the second concatenated feature map to obtain a third concatenated feature map. The third concatenated feature map is input into the first convolutional-activation module to obtain the first transformed feature map; the first transformed feature map is input into the first upsampling layer to obtain the second transformed feature map; the second transformed feature map is input into the first efficient multi-scale attention module to obtain the fused feature map. Taking the first concatenation branch as an example, the third local feature map is input into the second efficient multi-scale attention module to obtain the first fused feature map; the global feature map is input into the second convolutional-activation module to obtain the third transformed feature map; the third transformed feature map is input into the second upsampling layer to obtain the fourth transformed feature map; the fourth transformed feature map is input into the third efficient multi-scale attention module to obtain the second fused feature map; the second fused feature map and the first fused feature map are input into the feature concatenation layer to obtain the first concatenated feature map.

[0033] The fused feature map is input into the output layer to obtain the insulating layer segmentation mask. In one embodiment of this application, the output layer includes a third convolutional-activation module and a segmentation head. The fused feature map is input into the third convolutional-activation module to obtain a fifth feature transformation map; the fifth feature transformation map is input into the segmentation head to obtain the insulating layer segmentation mask.

[0034] In one embodiment of this application, the skip connection layer and the output layer constitute a decoder. An efficient multi-scale attention (EMA) module is added before the feature concatenation layer of the skip connection layer and after the upsampling layer. Adding an efficient multi-scale attention module after the upsampling layer effectively captures multi-scale contextual information, enhancing the feature representation capability of the upsampling layer. Adding an efficient multi-scale attention module after the upsampling layer and before the feature concatenation layer of the skip connection layer applies channel attention and spatial attention processing to the global feature map obtained through the self-attention mechanism (Transformer encoder). The feature vectors obtained from these two attention processes are then multiplied by channels to generate a new feature fusion map (taking the first concatenation branch as an example, the new feature fusion map is the second feature fusion map). Combining the new feature fusion map with the first feature fusion map (when the concatenation branch is the first concatenation branch) yields a more accurate feature representation.

[0035] In one embodiment of this application, a UFO module is added to the Transformer layer, which facilitates the removal of the dependency on the softmax function and effectively overcomes the limitations of the traditional SA (Self-Attention) mechanism. In particular, when modeling long-range dependencies, it avoids excessive reliance on local information, significantly reduces floating-point operations, and improves overall performance.

[0036] In one embodiment of this application, a CB (Contextual Broadcasting) module is added to the Transformer layer. The combination of MLP and CB module helps to fuse global features, enabling the Transformer layer to learn more expressive feature representations and better understand complex relationships, thereby significantly improving the model's performance in the task.

[0037] In one embodiment of this application, the process of training a pre-established defect identification model using a second sample image to obtain an insulation layer defect identification model includes: Preset noise types, preset defect generation conditions, and second sample images are input into a pre-trained generative adversarial network (GAN) model to obtain a third sample image with defect annotation information. In one embodiment of this application, the preset defect generation conditions include: defect type, defect location, defect size, defect shape, and defect severity. Preset noise types include: Gaussian noise, salt-and-pepper noise, etc. The pre-trained GAN model is a Conditional Generative Adversarial Network (CGAN), etc. Defect types include: inclusions, bubbles, etc. Defect shapes include: circles, squares, triangles, etc., and defect severity includes: mild defects, moderate defects, severe defects, etc. The number of third sample images is greater than the number of second sample images. Generating third sample images with defect annotation information through a pre-trained GAN model helps expand the diversity of training data, enabling the pre-established defect recognition model to learn more defect features of different types, degrees, and locations. This helps improve the pre-established defect recognition model's ability to identify various actual cable insulation defects and avoids overfitting problems caused by limited training data.

[0038] A third sample image with defect annotation information is input into a pre-established defect recognition model to obtain the defect prediction result of the insulation layer. In one embodiment of this application, the pre-established defect recognition model can be a convolutional neural network model, etc.

[0039] The goal is to minimize the difference between the predicted results of each pixel in the defect prediction result and the labeled information of each pixel in the third sample image. The parameters of the pre-established defect recognition model are adjusted until the difference between the predicted results of each pixel in the defect prediction result output by the defect recognition model and the labeled information of each pixel in the third sample image is less than a second preset difference threshold, or until the number of times the parameters of the pre-established defect recognition model are adjusted reaches a second preset number of times threshold. Then, parameter adjustment of the pre-established defect recognition model is stopped, resulting in an insulation layer defect recognition model. The pre-established defect recognition model is a convolutional neural network model. In one embodiment of this application, the second preset difference threshold and the second preset number of times threshold are set according to actual conditions. The difference between the predicted results of each pixel in the defect prediction result and the labeled information of each pixel in the third sample image is characterized by a second loss function, which includes: Equation (2) in, This represents the second loss function. Indicates the total number of pixels. Indicates the total number of defect categories. Indicates the first The weights of each defect category are given, and the sum of the weights of each defect category is 1. Indicates the first The defect category label corresponding to the pixel (i.e., the first pixel) (annotation information for each pixel). Indicates the first The pixel belongs to the first The predicted probability of the nth defect category (i.e., the nth defect category) The pixel belongs to the first Prediction results for each defect category.

[0040] In one embodiment of this application, training a pre-established defect recognition model with a second sample image enables the pre-established defect recognition model to continuously learn and optimize, thereby improving the accuracy and precision of the pre-established defect recognition model in identifying insulation layer defects.

[0041] In one embodiment of this application, the process of detecting the thickness of the insulating layer in the current insulating layer segmentation image includes: Edge detection is performed on the current segmented image of the insulating layer to obtain the edge position information of the insulating layer. In one embodiment of this application, the edge position information of the insulating layer includes: the edge position coordinates of the insulating layer. The method for edge detection of the current segmented image of the insulating layer can be the Canny edge detection method, or it can be implemented using the HED (Holistically-NestedEdge Detection) network model.

[0042] The mean value of the edge position information of the insulating layer is calculated as the center position of the insulating layer. In one embodiment of this application, if the coordinate system in the current insulating layer segmentation image is a rectangular coordinate system, the edge position information includes: the X-axis coordinate and Y-axis coordinate of the edge points. The process of calculating the mean value of the edge position information of the insulating layer includes: taking the mean value of the X-axis coordinates of all edge points as the X-axis coordinate of the center point, and taking the mean value of the Y-axis coordinates of all edge points as the Y-axis coordinate of the center point to obtain the center position.

[0043] The thickness detection result of the insulation layer is determined based on the center position and edge position information of the insulation layer. In one embodiment of this application, if the edge position information includes inner edge position information and outer edge position information, the process of determining the thickness detection result of the insulation layer based on the center position and edge position information of the insulation layer includes: forming an inner edge line based on the inner edge position information; forming an outer edge line based on the outer edge position information; extending from the center position along multiple directions to obtain multiple dividing lines of the insulation layer; taking the intersection point information of each dividing line with the inner edge line as the inner intersection point information, and taking the intersection point information of each dividing line with the outer edge line as the outer intersection point information; determining the thickness value of the insulation layer at different positions based on the inner intersection point information and the outer intersection point information, as the thickness detection result of the insulation layer.

[0044] In one embodiment of this application, the process of determining the defect identification result at the edge of the insulation layer based on the thickness detection result includes: If the thickness detection result shows that the thickness of a preset number of consecutive edge sampling points is greater than a preset thickness threshold, then the defect identification result of the insulation layer edge is determined to be either a protruding defect or an excessively thick defect. In one embodiment of this application, the preset number is set according to the actual situation, and the preset thickness threshold is the set thickness of the cable insulation layer. After determining the existence of a protruding defect or an excessively thick defect, if the number of consecutive edge sampling points greater than the preset thickness threshold is greater than or equal to the preset number, and the number of consecutive edge sampling points greater than the preset thickness threshold is less than a first quantity threshold, then the defect type is determined to be a protruding defect; if the number of consecutive edge sampling points greater than the preset thickness threshold is greater than or equal to the first quantity threshold, then the defect type is determined to be an excessively thick defect.

[0045] If the thickness detection result shows that the thickness of a preset number of consecutive edge sampling points is less than a preset thickness threshold, then the defect identification result of the insulation layer edge is determined to be either a dent defect or a thinning defect. In one embodiment of this application, a thinning defect is caused by deformation due to extrusion or impact damage, etc. After determining the existence of a dent defect or a thinning defect, if the number of consecutive edge sampling points less than the preset thickness threshold is greater than or equal to a preset number, and the number of consecutive edge sampling points less than the preset thickness threshold is less than a second number threshold, then the defect type is determined to be a dent defect; if the number of consecutive edge sampling points less than the preset thickness threshold is greater than or equal to the second number threshold, then the defect type is determined to be a thinning defect. The first number threshold may be equal to or different from the second number threshold.

[0046] In one embodiment of this application, defect identification based on thickness detection results can more directly reflect the physical state of the insulation layer and improve the accuracy of defect detection at the edges of the insulation layer.

[0047] In one embodiment of this application, if the edge position information includes inner edge position information and outer edge position information, then the process of determining the thickness detection result of the insulating layer based on the center position and edge position information of the insulating layer includes: An inner edge line is formed based on the inner edge position information; and an outer edge line is formed based on the outer edge position information. In one embodiment of this application, the method for forming the inner edge line based on the inner edge position information includes: nearest neighbor connection method, 8-neighbor / 4-neighbor search method, etc.; and the method for forming the outer edge line based on the outer edge position information includes: nearest neighbor connection method, 8-neighbor / 4-neighbor search method, etc.

[0048] Starting from the center position, multiple dividing lines are obtained by extending in multiple directions. In one embodiment of this application, the included angles between adjacent dividing lines are uniformly set, and the included angles between adjacent dividing lines are set according to the actual situation. After obtaining multiple dividing lines, a straight line is drawn from the center position along a direction parallel to the X-axis of the rectangular coordinate system as a position reference line. The slope of the dividing line is determined according to the included angle between the position reference line and the dividing line. Since the dividing line is a straight line passing through the center position, the linear equation of the dividing line can be obtained.

[0049] The intersection point information of each dividing line with the inner edge line is used as the inner intersection point information, and the intersection point information of each dividing line with the outer edge line is used as the outer intersection point information. In one embodiment of this application, the inner intersection point information is the coordinate of the intersection point of the linear equation of each dividing line with the inner edge line, and the outer intersection point information is the coordinate of the intersection point of the linear equation of each dividing line with the outer edge line.

[0050] Based on the location information of the inner intersection point and the outer intersection point, the thickness value of the insulating layer at different locations is determined as the thickness detection result of the insulating layer. In one embodiment of this application, taking the thickness value of the insulating layer at a certain location as an example, the formula for calculating the thickness value is as follows: Equation (3) in, Indicates the thickness value. Indicates the X-axis coordinate of the diplomatic point location. Indicates the Y-axis coordinate of the diplomatic point location. Indicates the X-axis coordinate of the inner intersection point. Indicates the Y-axis coordinate of the inner intersection point. This indicates the scaling ratio between the cable dimensions and the current insulation layer segmentation image.

[0051] Figure 3 This is a flowchart illustrating a cable insulation defect identification method in another exemplary embodiment of this application, as shown below. Figure 3As shown, the cable insulation defect identification method includes: (1) inputting a historical cable cross-section image; (2) background removal: using a background removal tool to remove the background in the historical cable cross-section image to obtain a foreground image with a transparent background, the background removal tool being selected according to the actual situation; (3) cropping the image: cropping the foreground image with a transparent background through the alpha channel to obtain the cropped foreground image; (4) optimizing the cropped image: setting a brightness threshold (e.g., 50), taking pixels in the cropped foreground image below the brightness threshold as first target pixels, combining all first target pixels to obtain the first background region in the cropped foreground image; setting an alpha channel threshold (e.g., 30), taking pixels in the cropped foreground image above the alpha channel threshold as second target pixels, taking pixels in the cropped foreground image less than or equal to the alpha channel threshold as background pixels, combining all second target pixels to obtain the foreground region in the cropped foreground image, combining all background pixels to obtain the second background region in the cropped foreground image, and the foreground region in the cropped foreground image. (5) Overlay pixels of the region, the first background region, and the second background region to obtain a historical mask image; (6) Adjust the size and position of the historical mask image; (7) Adjust the size and position of the historical cable cross-section image; (8) Rotate the historical cable cross-section image after size and position adjustment to obtain a rotated historical cable cross-section image; (9) Adjust the brightness and contrast of the rotated historical mask image, Gaussian blur, or add Gaussian noise to obtain an adjusted historical cable cross-section image; (10) Combine the adjusted historical mask image and the adjusted historical cable cross-section image as the first sample image set, and train the AO-TransUNET model using the first sample image set to obtain the trained AO-TransUNET model; (11) Input the current cable cross-section image into the insulation layer segmentation model to obtain the current insulation layer segmentation image.

[0052] Figure 4 This is a structural diagram of a pre-established segmentation model illustrated in an exemplary embodiment of this application. Figure 4 The pre-established segmentation model includes: a convolutional neural network encoder, a linear projection layer, a Transformer encoder, a skip connection layer, and an output layer. The convolutional neural network encoder includes: multiple first convolutional layers and a first hidden feature layer (attached). Figure 4The first hidden future (from top to bottom) is a multi-layered convolutional layer, including at least three first convolutional layers. The first sample image with labeled information is input into the first first convolutional layer to obtain a first local feature map. The first local feature map is input into the second first convolutional layer to obtain a second local feature map. The second local feature map is input into the third first convolutional layer to obtain a third local feature map. The third local feature map is input into the first hidden layer to obtain a multi-scale feature map. The first preset depth feature map in the multi-scale feature map is segmented into image blocks, and the image blocks are input into a linear projection layer to obtain a linear projection vector.

[0053] In one embodiment of this application, the Transformer encoder includes: multiple Transformer layers, a second hidden feature layer, and a feature reshaping layer. Each Transformer layer includes: a first normalization layer, a matrix multiplication layer, a second normalization layer, a multilayer perceptron module, and a context bridging module. The number of Transformer layers is set to 14. The linear projection vector is input to the first normalization layer (see attached diagram). Figure 4 The first normalized vector is obtained by first normalizing the first layer from top to bottom; the first normalized vector is then input into the matrix multiplication layer (i.e., the appendix). Figure 4 The UFO (Unit Force Operated) module in the middle obtains the first multiplication operation vector; the first multiplication operation vector and the linear projection vector are residually concatenated to obtain the first residual vector; the first residual vector is input into the second normalization layer (attached). Figure 4 The second normalized vector is obtained by inputting the second layer normalized vector from top to bottom. This second normalized vector is then input into the Multi-Layer Perceptron (MLP) module to obtain the mapped feature vector. This mapped feature vector is then input into the Contextual Broadcasting (CB) module to obtain the bridging feature vector. The bridging feature vector is then concatenated with the first residual vector to obtain the second residual vector. After the first Transformer layer outputs the second residual vector, the second Transformer layer uses this second residual vector as input for attention mechanism operations, resulting in the second Transformer layer's output feature vector. This process is repeated, inputting the second Transformer layer's output feature vector into the third Transformer layer, and so on, until the twelfth Transformer layer's output feature vector is obtained. The feature vector output from each Transformer layer is then input into the second hidden feature layer (see appendix). Figure 4The second hidden future from top to bottom is used to obtain a multi-scale feature vector; the multi-scale feature vector is then input into the feature reshape layer to obtain the global feature map.

[0054] In one embodiment of this application, the skip connection layer includes multiple concatenation branches, a first convolutional-activation module, a first upsampling layer, and a first efficient multi-scale attention module. Each concatenation branch includes a second efficient multi-scale attention module, a feature concatenation layer, a second convolutional-activation module, a second upsampling layer, and a third efficient multi-scale attention module. The second preset depth feature map includes a first local feature map, a second local feature map, and a third local feature map. The first concatenation branch is used to concatenate the third local feature map and the global feature map to obtain a first concatenated feature map. The second concatenation branch is used to concatenate the second local feature map and the first concatenated feature map to obtain a second concatenated feature map. The third concatenation branch is used to concatenate the first local feature map and the second concatenated feature map to obtain a third concatenated feature map. The third concatenated feature map is input into the first convolutional-activation module to obtain a first transformed feature map. The first transformed feature map is input into the first upsampling layer to obtain a second transformed feature map. The second transformed feature map is input into the first efficient multi-scale attention module to obtain a fused feature map. Taking the first concatenation branch as an example, the third local feature map is input into the second efficient multi-scale attention module to obtain the first fused feature map; the global feature map is input into the second convolution-activation module to obtain the third transformed feature map; the third transformed feature map is input into the second upsampling layer to obtain the fourth transformed feature map; the fourth transformed feature map is input into the third efficient multi-scale attention module to obtain the second feature fusion map; the second feature fusion map and the first feature fusion map are input into the feature concatenation layer to obtain the first concatenation feature map.

[0055] In one embodiment of this application, the output layer includes a third convolutional-activation module and a segmentation head. The fused feature map is input into the third convolutional-activation module to obtain a fifth feature transformation map; the fifth feature transformation map is input into the segmentation head to obtain an insulating layer segmentation mask.

[0056] In one embodiment of this application, the pre-established segmentation model, after being trained, has stronger feature extraction capabilities and segmentation accuracy when processing cable insulation layer images, enabling more accurate segmentation of the cable insulation layer and providing a more reliable foundation for subsequent tasks such as defect identification and thickness detection.

[0057] In one embodiment of this application, the EMA module further enhances the feature fusion effect by introducing explicit correlation modeling between channel dimension and spatial location, and employing a cross-spatial information aggregation strategy at different spatial scales. Specifically, the EMA module encodes global spatial information for the outputs of the 1×1 and 3×3 branches using two-dimensional global average pooling to obtain spatial attention weights for each path. The two attention weights are then fused, and the final grouping weights are generated using sigmoid activation to obtain the output feature map. The structural design of the EMA module enhances the interaction and fusion between multi-scale features, making the segmentation results more detailed, stable, and robust.

[0058] In one embodiment of this application, the CB module constructs a uniformly distributed attention method by performing average pooling on all tokens, which can be regarded as the most "dense" attention pattern. In each intermediate layer, the CB module first obtains the global token representation after average pooling, and then injects it into each individual token. Introducing the CB module into VisionTransformer (ViT) can significantly reduce the density of attention maps in each layer, making the optimization process of the CB module simpler. The CB module prompts ViT to shift its computational and learning focus from "fitting high-density attention maps" to "extracting other more effective feature information," thereby achieving more efficient information transfer and more complete global context modeling, and enhancing the generalization performance of the AO-TransUNET model.

[0059] In one embodiment of this application, the UFO module introduces a cross-normalization (XNorm) strategy, which performs conventional L2 norm normalization on two dimensions respectively. With the help of the associative law, the key and value are first XNorm-normalized and then multiplied. The result of the multiplication is then multiplied with the query, which has also been XNorm-normalized. This significantly reduces the attention computation overhead, reduces the complexity from quadratic to linear, thereby improving the inference speed and reducing the memory usage. By adding the UFO module, the AO-TransUNET model achieves higher computational efficiency without sacrificing feature representation capabilities.

[0060] This application collected 300 cross-sectional images of 220kV single-core high-voltage cables, covering undamaged cable cross-sections, cables with level 1 damage (image missing rate less than 3%), cables with level 2 damage (image missing rate greater than or equal to 3%, and less than 5%), and cables with level 3 damage (image missing rate greater than or equal to 5%, and less than 10%). The cable cross-section images were acquired under different lighting intensities and angles, with a resolution of 512×512 pixels. Annotation tools were used to label the target regions in the cable cross-section images, generating corresponding JSON files. A script was then used to batch convert the JSON files into PNG format labeled images, which were used as supervision labels for training.

[0061] In this application, the performance of the trained AO-TransUNET model is measured by the mean Dice coefficient (mDice), mean intersection over union (mIoU), mean precision (MP), and mean recall (mRecall). The formula for calculating mDice is shown below: Equation (4) in, This represents the average Dice coefficient, used to measure the degree of overlap between the cable core region predicted by the trained AO-TransUNET model and the labeled area of ​​the cable core. This indicates the number of samples, and TP stands for TruePositive. Both the predicted and labeled values ​​for the cable core pixels are positive samples, meaning the cable core pixels were correctly identified. This indicates a false positive, meaning that a background pixel was incorrectly predicted as the cable core. This indicates a false negative, meaning that a pixel in the cable core was incorrectly predicted as a background pixel.

[0062] The formula for calculating the average crossover ratio is as follows: (5) in, The average intersection-to-union ratio (OCR) reflects the proportion of the intersection and union of the predicted area and the marked area of ​​the cable core. Indicates the number of samples. A true positive is defined as a situation where both the predicted and labeled values ​​of the cable core pixels are positive, indicating that the cable core pixels were correctly identified. This indicates a false positive, meaning that a background pixel was incorrectly predicted as the cable core. This indicates a false negative, meaning that a pixel in the cable core was incorrectly predicted as a background pixel.

[0063] The formula for calculating average precision is as follows: (6) in, This represents the average accuracy, used to measure the proportion of pixels whose predicted value is the cable core, but whose actual value is the cable core. Indicates the number of samples. A true positive is defined as a situation where both the predicted and labeled values ​​of the cable core pixels are positive, indicating that the cable core pixels were correctly identified. This indicates a false positive, meaning that a background pixel was incorrectly predicted as the cable core.

[0064] The formula for calculating average recall is as follows: (7) in, This represents the average recall rate, which measures the proportion of all cable core pixels that are correctly predicted as cores. Indicates the number of samples. A true positive is defined as a situation where both the predicted and labeled values ​​of the cable core pixels are positive, indicating that the cable core pixels were correctly identified. This indicates a false negative, meaning that a pixel in the cable core was incorrectly predicted as a background pixel.

[0065] In one embodiment of this application, the performance of the AO-TransUNET model trained in this application is compared with the performance of semantic segmentation models UNet, Swin-UNet, Attention-UNet, and TransUNet. The segmentation performance of each model on the test set is shown in the table below: Table 1 As shown in Table 1, the AO-TransUNET model trained in this application achieves the best performance across all evaluation metrics, demonstrating excellent segmentation accuracy and stability. Specifically, mDice reaches 0.9959, mIoU reaches 0.9919, MP reaches 0.9943, and mRecall reaches 0.9975. Compared to the semantic segmentation models UNet, Swin-UNet, Attention-UNet, and TransUNet, the trained AO-TransUNET model exhibits a significant performance improvement.

[0066] Figure 5 This is a schematic diagram illustrating an exemplary embodiment of this application, showing the current insulation layer segmentation image obtained by segmenting the current cable cross-section image, as shown below. Figure 5 As shown, the current cable cross-section images include undamaged cable cross-section images, cable cross-section images with first-level damage, cable cross-section images with second-level damage, and cable cross-section images with third-level damage. Insulation layer segmentation is performed on the undamaged cable cross-section image, resulting in the current insulation layer segmentation image shown below. Insulation layer segmentation is performed on the first-level damaged cable cross-section image, resulting in the same image. Insulation layer segmentation is performed on the second-level damaged cable cross-section image, resulting in the same image. Insulation layer segmentation is performed on the third-level damaged cable cross-section image, resulting in the same image. The use of these undamaged, first-level damaged, second-level damaged, and third-level damaged insulation layer segmentation images further confirms that the AO-TransUNET model trained in this application has superior segmentation performance.

[0067] The following describes an embodiment of the apparatus described in this application, which can be used to execute the cable insulation defect identification system described in the above embodiments of this application. For details not disclosed in the apparatus embodiments of this application, please refer to the embodiments of the cable insulation defect identification method described above in this application.

[0068] Figure 6 This is a block diagram illustrating a cable insulation defect identification system, as shown in an exemplary embodiment of this application.

[0069] like Figure 6 As shown, this exemplary cable insulation defect identification system 600 includes: The image acquisition module 601 is used to acquire current cable cross-section images and historical cable cross-section images.

[0070] The image segmentation module 602 is used to input the current cable cross-section image into the insulation layer segmentation model to obtain the current insulation layer segmentation image; the insulation layer segmentation model is obtained by training the pre-established segmentation model with the first sample image.

[0071] The defect identification module 603 is used to input the current insulation layer segmentation image into the insulation layer defect identification model to obtain the defect identification result in the insulation layer area; the insulation layer defect identification model is obtained by training the pre-established defect identification model with the second sample image.

[0072] The thickness detection module 604 is used to detect the thickness of the insulation layer in the current insulation layer segmentation image, and to determine the defect identification result of the insulation layer edge based on the thickness detection result.

[0073] The defect combination module 605 is used to combine the defect identification results within the insulation layer area and the defect identification results at the edge of the insulation layer to obtain the defect identification results of the insulation layer.

[0074] In one embodiment of this application, the current cable cross-section image can be either a cable cross-section image obtained after acquisition or a preprocessed cable cross-section image. Preprocessing includes background removal and image scaling. The process of preprocessing the current cable cross-section image to obtain a preprocessed current cable cross-section image includes: removing the background from the current cable cross-section image to obtain a mask image; and scaling the mask image to obtain an image of a preset size. Removing the background from the current cable cross-section image helps reduce the impact of background noise on insulation layer segmentation, and scaling the mask image facilitates adaptation to the size requirements of the insulation layer segmentation model for the input image. The preset size image can be 512×512 pixels or other sizes. The current cable cross-section image can be a 220kV cable cross-section image or other cable insulation images.

[0075] In one embodiment of this application, the process of removing the background from a current cable cross-section image to obtain a mask image includes: removing the background from the current cable cross-section image using a background removal tool to obtain a foreground image with a transparent background; cropping the foreground image with a transparent background using the alpha channel to obtain a cropped foreground image; setting a brightness threshold (e.g., 50), using pixels in the cropped foreground image below the brightness threshold as first target pixels, and combining all first target pixels to obtain a first background region in the cropped foreground image; setting an alpha channel threshold (e.g., 30), using pixels in the cropped foreground image above the alpha channel threshold as second target pixels, using pixels in the cropped foreground image less than or equal to the alpha channel threshold as background pixels, combining all second target pixels to obtain a foreground region in the cropped foreground image, and combining all background pixels to obtain a second background region in the cropped foreground image; and superimposing the foreground region, the first background region, and the second background region in the cropped foreground image to obtain a mask image.

[0076] In one embodiment of this application, the background removal tool can be a deep learning-based background removal tool, whose core function is to automatically identify and remove the background in the image through intelligent algorithms, generating an image with a transparent or solid color background. Other background removal tools can also be selected, and no specific limitation is made here. The alpha channel controls the transparency information of the image by setting the channel value.

[0077] In one embodiment of this application, the insulation layer segmentation model is obtained by training a pre-established segmentation model using a first sample image. The first sample image is a historical cable cross-section image after preprocessing. The pre-established segmentation model includes: a convolutional neural network encoder, a linear projection layer, a Transformer encoder, a skip connection layer, and an output layer. The convolutional neural network encoder includes: multiple first convolutional layers, a first hidden feature layer, and a linear projection layer. The Transformer encoder includes: multiple Transformer layers, a second hidden feature layer, and a feature reshaping layer. Each Transformer layer includes: a first normalization layer, a matrix multiplication operation layer, a second normalization layer, a multilayer perceptron module, and a context bridging module. The skip connection layer includes: multiple splicing branches, a first convolutional-activation module, a first upsampling layer, and a first efficient multi-scale attention module. Each splicing branch includes: a second efficient multi-scale attention module, a feature splicing layer, a second convolutional-activation module, a second upsampling layer, and a third efficient multi-scale attention module. The output layer includes: a third convolutional-activation module and a segmentation head. The structural settings of the pre-established segmentation model are beneficial to improving the segmentation accuracy and effect of the insulation layer.

[0078] In one embodiment of this application, the insulation layer defect identification model is trained using a second sample image. The second sample image is a historical insulation layer segmentation image obtained by segmenting a historical cable cross-section image. The pre-established defect identification model is a convolutional neural network model with multiple convolutional layers, pooling layers, and fully connected layers. The convolutional layers are used to extract features from the current insulation layer segmentation image to obtain multi-scale feature maps. The pooling layers perform downsampling operations on the multi-scale feature maps to obtain sampled feature information. The fully connected layers integrate the sampled feature information and output the defect identification result within the insulation layer region. By identifying defects in the current insulation layer segmentation image using the insulation layer defect identification model, various defects within the insulation layer region, such as holes and inclusions, can be accurately located.

[0079] In one embodiment of this application, the defect identification results of the insulation layer edge include protrusions, depressions, etc. at the insulation layer edge.

[0080] In one embodiment of this application, if there are no identical defect identification results between the defect identification results within the insulation layer region and the defect identification results at the insulation layer edge, then the combination of the defect identification results within the insulation layer region and the defect identification results at the insulation layer edge is taken as the defect identification result of the insulation layer; if there are identical defect identification results between the defect identification results within the insulation layer region and the defect identification results at the insulation layer edge, then the duplicate defect identification results are deleted from the defect identification results within the insulation layer region, and the combination of the deleted defect identification results within the insulation layer region and the defect identification results at the insulation layer edge is taken as the defect identification result of the insulation layer.

[0081] In one embodiment of this application, the current cable cross-section image is segmented using an insulation layer segmentation model, which improves the segmentation effect of the insulation layer. After the current insulation layer segmentation image, defects in the insulation layer area are identified using an insulation layer defect identification model. By detecting the thickness of the insulation layer in the current insulation layer segmentation image, defects at the edge of the insulation layer are determined based on the thickness detection results. The defects in the insulation layer area and the defects at the edge of the insulation layer are used as the defect identification results, which improves the accuracy and diversity of insulation layer defect identification.

[0082] It should be noted that the cable insulation layer defect identification system and the cable insulation layer defect identification method provided in the above embodiments belong to the same concept. The specific operation methods of each module and unit have been described in detail in the method embodiments and will not be repeated here. In practical applications, the cable insulation layer defect identification system provided in the above embodiments can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above. This is not a limitation here.

[0083] The above embodiments are merely illustrative of the principles and effects of this application and are not intended to limit this application. Any person skilled in the art can modify or alter the above embodiments without departing from the spirit and scope of this application. Therefore, all equivalent modifications or alterations made by those skilled in the art without departing from the spirit and technical concept disclosed in this application should still be covered by the claims of this application.

Claims

1. A method for identifying defects in cable insulation, characterized in that, The method includes: Obtain current cable cross-section images and historical cable cross-section images; The current cable cross-section image is input into the insulation layer segmentation model to obtain the current insulation layer segmentation image; the insulation layer segmentation model is obtained by training a pre-established segmentation model using a first sample image; the first sample image is the historical cable cross-section image after preprocessing. The current insulation layer segmentation image is input into the insulation layer defect recognition model to obtain the defect recognition result within the insulation layer region; the insulation layer defect recognition model is obtained by training a pre-established defect recognition model using a second sample image; the second sample image is a historical insulation layer segmentation image obtained by segmenting the historical cable cross-section image; The thickness of the insulation layer in the current insulation layer segmentation image is detected, and the defect identification result of the insulation layer edge is determined based on the thickness detection result; The defect identification results within the insulation layer region and the defect identification results at the edge of the insulation layer are combined to obtain the defect identification results of the insulation layer. If the pre-established segmentation model includes a convolutional neural network encoder, a linear projection layer, a Transformer encoder, a skip connection layer, and an output layer, then the process of inputting the first sample image with labeled information into the pre-established segmentation model to obtain the insulating layer segmentation mask includes: The first sample image with labeled information is input into the convolutional neural network encoder to obtain a multi-scale feature map; the convolutional neural network encoder includes: multiple first convolutional layers and a first hidden feature layer; The first preset depth feature map in the multi-scale feature map is segmented into image blocks, and the image blocks are input into the linear projection layer to obtain linear projection vectors; The linear projection vector is input into the Transformer encoder to obtain a global feature map; the Transformer encoder includes: multiple Transformer layers, a second hidden feature layer and a feature reshaping layer, each Transformer layer includes: a first normalization layer, a matrix multiplication operation layer, a second normalization layer, a multilayer perception module and a context bridging module; The global feature map and the second preset depth feature map in the multi-scale feature map are input into the skip connection layer to obtain a fused feature map; the first preset depth is greater than the second preset depth; the skip connection layer includes multiple splicing branches, a first convolutional-activation module, a first upsampling layer, and a first efficient multi-scale attention module, and each splicing branch includes: a second efficient multi-scale attention module, a feature splicing layer, a second convolutional-activation module, a second upsampling layer, and a third efficient multi-scale attention module; The fused feature map is input into the output layer to obtain the insulating layer segmentation mask; the output layer includes a third convolutional-activation module and a segmentation head.

2. The cable insulation layer defect identification method according to claim 1, characterized in that, The process of training the pre-established segmentation model using the first sample image to obtain the insulation layer segmentation model includes: The insulating layer region in the first sample image is labeled to obtain a first sample image with labeled information; the preprocessing operations include: image background removal, image scaling, and image enhancement. The first sample image with labeled information is input into the pre-established segmentation model to obtain the insulating layer segmentation mask; With the goal of minimizing the difference between the predicted results of each pixel in the insulating layer segmentation mask and the labeled information of each pixel in the first sample image, the parameters of the pre-established segmentation model are adjusted until the difference between the predicted results of each pixel in the insulating layer segmentation mask output by the segmentation model after parameter adjustment and the labeled information of each pixel in the first sample image is less than a first preset difference threshold, or the number of times the parameters of the pre-established segmentation model are adjusted reaches a first preset number threshold, then the parameter adjustment of the pre-established segmentation model is stopped, and the insulating layer segmentation model is obtained.

3. The cable insulation layer defect identification method according to claim 2, characterized in that, If the difference between the prediction result of each pixel in the insulating layer segmentation mask and the annotation information of each pixel in the first sample image is represented by a first loss function, then the expression of the first loss function includes: , Among them, L Dice Denotes the first loss function. Indicates the first layer in the insulating layer segmentation mask The predicted probability of each pixel. Indicates the first sample image The label corresponding to each pixel This represents a constant value used to avoid division by zero.

4. The cable insulation defect identification method according to any one of claims 1-3, characterized in that, The process of training the pre-established defect recognition model using the second sample image to obtain the insulation layer defect recognition model includes: A preset type of noise, preset defect generation conditions, and the second sample image are input into a pre-trained generative adversarial network model to obtain a third sample image with defect annotation information; the preset defect generation conditions include: defect type, defect location, defect size, defect shape, and defect severity; the number of the third sample images is greater than the number of the second sample images; The third sample image with defect annotation information is input into the pre-established defect recognition model to obtain the defect prediction result of the insulation layer; With the goal of minimizing the difference between the predicted result of each pixel in the defect prediction result and the labeled information of each pixel in the third sample image, the parameters in the pre-established defect recognition model are adjusted until the difference between the predicted result of each pixel in the defect prediction result output by the defect recognition model and the labeled information of each pixel in the third sample image is less than a second preset difference threshold, or until the number of times the parameters of the pre-established defect recognition model are adjusted reaches a second preset number threshold, then the parameter adjustment of the pre-established defect recognition model is stopped, thus obtaining the insulation layer defect recognition model; the pre-established defect recognition model is a convolutional neural network model.

5. The cable insulation layer defect identification method according to claim 4, characterized in that, The difference between the predicted result of each pixel in the defect prediction result and the annotation information of each pixel in the third sample image is characterized by a second loss function, which includes: , in, This represents the second loss function. Indicates the total number of pixels. Indicates the total number of defect categories. Indicates the first The weights of each defect category are assigned, and the sum of the weights of all defect categories is 1. Indicates the first Defect category label corresponding to each pixel Indicates the first The pixel belongs to the first The predicted probability of each defect category.

6. The cable insulation defect identification method according to any one of claims 1-3, characterized in that, The process of detecting the thickness of the insulating layer in the current insulating layer segmentation image includes: Edge detection is performed on the current segmented image of the insulating layer to obtain the edge position information of the insulating layer; Calculate the mean value of the edge position information of the insulating layer, and use it as the center position of the insulating layer; The thickness detection result of the insulating layer is determined based on the center position and edge position information of the insulating layer.

7. The cable insulation layer defect identification method according to claim 6, characterized in that, The process of determining the defect identification results at the edge of the insulation layer based on the thickness measurement results includes: If the thickness detection result shows that the thickness of a preset number of consecutive edge sampling points is greater than a preset thickness threshold, then the defect identification result of the edge of the insulation layer is determined to include: protrusion defect or excessive thickness defect. If the thickness detection result shows that the thickness of a preset number of consecutive edge sampling points is less than the preset thickness threshold, then the defect identification result of the edge of the insulation layer is determined to include: a depression defect or a thinning defect.

8. The cable insulation layer defect identification method according to claim 6, characterized in that, If the edge position information includes inner edge position information and outer edge position information, then the process of determining the thickness detection result of the insulating layer based on the center position of the insulating layer and the edge position information of the insulating layer includes: An inner edge line is formed based on the inner edge position information; and an outer edge line is formed based on the outer edge position information. Starting from the central position, multiple dividing lines are obtained by extending along multiple directions to form the insulating layer. The intersection point information of each dividing line with the inner edge line is used as the inner intersection point information, and the intersection point information of each dividing line with the outer edge line is used as the outer intersection point information. Based on the inner intersection point location information and the outer intersection point location information, the thickness value of the insulating layer at different locations is determined as the thickness detection result of the insulating layer.

9. A cable insulation layer defect identification system, characterized in that, include: The image acquisition module is used to acquire current cable cross-section images and historical cable cross-section images; The image segmentation module is used to input the current cable cross-section image into the insulation layer segmentation model to obtain the current insulation layer segmentation image; The insulating layer segmentation model is obtained by training a pre-established segmentation model using the first sample image; The first sample image is the historical cable cross-section image after preprocessing. If the pre-established segmentation model includes a convolutional neural network encoder, a linear projection layer, a Transformer encoder, a skip connection layer, and an output layer, then the process of inputting the first sample image with labeled information into the pre-established segmentation model to obtain the insulating layer segmentation mask includes: The first sample image with labeled information is input into the convolutional neural network encoder to obtain a multi-scale feature map; the convolutional neural network encoder includes: multiple first convolutional layers and a first hidden feature layer; The first preset depth feature map in the multi-scale feature map is segmented into image blocks, and the image blocks are input into the linear projection layer to obtain linear projection vectors; The linear projection vector is input into the Transformer encoder to obtain a global feature map; the Transformer encoder includes: multiple Transformer layers, a second hidden feature layer and a feature reshaping layer, each Transformer layer includes: a first normalization layer, a matrix multiplication operation layer, a second normalization layer, a multilayer perception module and a context bridging module; The global feature map and the second preset depth feature map in the multi-scale feature map are input into the skip connection layer to obtain a fused feature map; the first preset depth is greater than the second preset depth; the skip connection layer includes multiple splicing branches, a first convolutional-activation module, a first upsampling layer, and a first efficient multi-scale attention module, and each splicing branch includes: a second efficient multi-scale attention module, a feature splicing layer, a second convolutional-activation module, a second upsampling layer, and a third efficient multi-scale attention module; The fused feature map is input into the output layer to obtain the insulating layer segmentation mask; the output layer includes: a third convolutional-activation module and a segmentation head; The defect identification module is used to input the current insulation layer segmentation image into the insulation layer defect identification model to obtain the defect identification result within the insulation layer area; the insulation layer defect identification model is obtained by training a pre-established defect identification model with a second sample image; the second sample image is a historical insulation layer segmentation image obtained by segmenting the historical cable cross-section image; The thickness detection module is used to detect the thickness of the insulation layer in the current insulation layer segmentation image, and determine the defect identification result of the insulation layer edge based on the thickness detection result; The defect combination module is used to combine the defect identification results within the insulation layer area and the defect identification results at the edge of the insulation layer to obtain the defect identification results of the insulation layer.

Citation Information

Patent Citations

  • CT image segmentation method based on Transform and convolution attention mechanism

    CN115908811A

  • Communication equipment fault intelligent diagnosis method and device, equipment and medium

    CN120658571A