Underground cable X-ray image enhancement method and system
Through deep learning network technology, the target network model is constructed and the X-ray images of underground cables are processed, which solves the problems of inefficient and poor accuracy of traditional detection methods, and achieves image quality improvement and detection efficiency improvement.
Patent Information
- Application Number
- CN202510040668.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-10
- Publication Date
- 2025-06-10
AI Technical Summary
Traditional underground cable detection methods are inefficient and difficult to accurately identify defects inside the cable, which may lead to power supply interruptions and safety accidents.
Deep learning network technology is used to build a target network model, including edge extraction submodule, dynamic selection submodule, feature extraction submodule and image enhancement submodule. Through these modules, X-ray images of degraded underground cables are processed to generate enhanced images.
It realizes effective extraction of X-ray image features of underground cables, improves image quality, provides guidance on detection of underground cable defects and faults, and improves detection efficiency and accuracy.
Smart Images

Figure CN120125447A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of image enhancement, and particularly to an X-ray image enhancement method and system for underground cables. Background Art
[0002] Underground cables are a key component of urban infrastructure. They provide continuous power supply to the city, ensuring the daily operation of the city and the stability of social and economic activities. However, underground cables face challenges from the complex underground environment, which may lead to defects and faults such as cracks and corrosion in the cables during use. If these defects are not detected and repaired in time, they may cause power supply interruptions and even safety accidents. Traditional methods for detecting underground cables are often inefficient and difficult to accurately identify internal defects in the cables. Summary of the Invention
[0003] The purpose of this part is to outline some aspects of the embodiments of the present invention and briefly introduce some preferred embodiments. Simplifications or omissions may be made in this part, as well as in the abstract and title of the present application, to avoid obscuring the purpose of this part, the abstract, and the title. However, such simplifications or omissions shall not be used to limit the scope of the present invention.
[0004] In view of the above existing problems, the present invention is proposed.
[0005] Therefore, the present invention provides an X-ray image enhancement method for underground cables, which can solve the problems mentioned in the background art.
[0006] To solve the above technical problems, the present invention provides the following technical solutions:
[0007] In a first aspect, the present invention provides an X-ray image enhancement method for underground cables, including constructing and training a target network model, where the target network model includes an edge extraction sub-module, a dynamic selection sub-module, a feature extraction sub-module, and an image enhancement sub-module;
[0008] Processing a degraded X-ray image of an underground cable through the target network model to generate a fused feature map;
[0009] Inputting the fused feature map into the image enhancement sub-module to generate an enhanced X-ray image of the underground cable.
[0010] As a preferred solution of the X-ray image enhancement method for underground cables of the present invention, where: training the target network model includes,
[0011] Obtaining a training data set, where the training data set includes degraded X-ray images of underground cables and high-quality high-definition X-ray images of underground cables;
[0012] Input the X-ray image of the degraded underground cable into the network model to generate the target high-quality X-ray image of the underground cable;
[0013] By comparing the target high-quality X-ray image of the underground cable with its corresponding high-quality high-definition X-ray image of the underground cable, optimize the loss function of the network model to obtain the target network model.
[0014] As a preferred solution of the X-ray image enhancement method for underground cables of the present invention, wherein: processing the degraded X-ray image of the underground cable through the target network model includes
[0015] Performing edge extraction on the degraded X-ray image of the underground cable through the edge extraction sub-module to obtain a group of edge images.
[0016] As a preferred solution of the X-ray image enhancement method for underground cables of the present invention, wherein: processing the degraded X-ray image of the underground cable through the target network model includes,
[0017] Performing dynamic weight selection and edge selection on the degraded X-ray image of the underground cable through the dynamic selection sub-module to obtain a dynamic edge combination feature.
[0018] As a preferred solution of the X-ray image enhancement method for underground cables of the present invention, wherein: the method includes performing image fusion on the dynamic edge combination feature and the degraded X-ray image of the underground cable through the feature extraction sub-module, and performing feature extraction on the fusion result to obtain a fusion feature map.
[0019] As a preferred solution of the X-ray image enhancement method for underground cables of the present invention, wherein: the edge extraction sub-module includes five different edge extraction operators.
[0020] As a preferred solution of the X-ray image enhancement method for underground cables of the present invention, wherein: the five different edge extraction operators are the Sobel 0° operator, the Sobel 45° operator, the Sobel 90° operator, the Sobel 135° operator, and the Laplace operator.
[0021] In a second aspect, the present invention provides an X-ray image enhancement method for underground cables, including: a construction module for constructing and training a target network model, wherein the target network model includes an edge extraction sub-unit, a dynamic selection sub-unit, a feature extraction sub-unit, and an image enhancement sub-unit;
[0022] A processing module for processing the degraded X-ray image of the underground cable through the target network model and generating a fusion feature map;
[0023] A generation module for inputting the fusion feature map into the image enhancement sub-unit to generate an enhanced X-ray image of the underground cable.
[0024] In a third aspect, the present invention provides a computer device, including a memory and a processor. The memory stores a computer program, and when the processor executes the computer program, the steps of the above method are implemented.
[0025] In a fourth aspect, the present invention provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the above method are implemented.
[0026] Compared with the prior art, the beneficial effects of the present invention are as follows: applying deep learning network technology to the problem of underground cable X-ray image enhancement, and realizing the effective extraction of underground cable X-ray image features by extracting edge images under different edge operators to assist in image depth feature extraction and selection, thereby realizing the improvement of the quality of degraded underground cable X-ray images, and providing guiding opinions for subsequent underground cable defect, fault detection, and automatic inspection. BRIEF DESCRIPTION OF THE DRAWINGS
[0027] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following will briefly introduce the drawings required for the description of the embodiments. Obviously, the following drawings are only some embodiments of the present invention. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts. Among them:
[0028] Figure 1 It is a flowchart of the method for underground cable X-ray image enhancement.
[0029] Figure 2 It is a schematic structural diagram of the target network model.
[0030] Figure 3 It is a schematic structural diagram of the edge extraction sub-module.
[0031] Figure 4 It is a schematic structural diagram of the dynamic selection sub-module.
[0032] Figure 5 It is a schematic structural diagram of the feature extraction sub-module.
[0033] Figure 6
[0034] Figure 7 It is a schematic internal structure diagram of the computer device. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0035] To make the above objects, features, and advantages of the present invention more obvious and understandable, the following will describe the specific embodiments of the present invention in detail with reference to the accompanying drawings of the specification.
[0036] In the following description, many specific details are set forth in order to provide a thorough understanding of the present invention. However, the present invention may be practiced in other ways than those specifically described herein, and those skilled in the art may make similar extensions without departing from the spirit of the present invention. Therefore, the present invention is not limited by the specific embodiments disclosed below.
[0037] Secondly, as used herein, "one embodiment" or "an embodiment" refers to a specific feature, structure, or characteristic that may be included in at least one implementation of the present invention. The appearances of "in one embodiment" in different places in this specification do not all refer to the same embodiment, nor are they separate or alternative embodiments that exclude each other.
[0038] Embodiment 1
[0039] Referring to Figures 1 to 6 , which is the first embodiment of the present invention. This embodiment provides a method for enhancing X-ray images of underground cables, which includes
[0040] S1. Construct and train a target network model, where the target network model includes an edge extraction sub-module, a dynamic selection sub-module, a feature extraction sub-module, and an image enhancement sub-module.
[0041] Furthermore, training the target network model includes
[0042] Obtain a training data set, where the training data set includes degraded X-ray images of underground cables and high-quality high-definition X-ray images of underground cables;
[0043] It should be noted that by taking degraded X-ray images of underground cables and high-quality high-definition X-ray images of underground cables at the same position and angle as a data pair for subsequent training and optimization of the network model.
[0044] Input the degraded X-ray image of the underground cable into the network model to generate a target high-quality X-ray image of the underground cable;
[0045] By comparing the target high-quality X-ray image of the underground cable with its corresponding high-quality high-definition X-ray image of the underground cable, optimize the loss function of the network model to obtain the target network model.
[0046] It should be noted that the loss function is constrained by the L1 norm. By continuously optimizing the following loss function, the final X-ray image of the underground cable that meets the requirements is obtained:
[0047]
[0048] In the formula, J represents the result of the X-ray image of the underground cable enhanced by the network model, J *Represents the corresponding high-quality X-ray image of underground cables in the dataset; Represents the L1 norm.
[0049] By optimizing the above loss function, the convergence of the network model is achieved. Specifically:
[0050] By calculating the result of the above loss function, the backpropagation calculation is performed using the stochastic gradient descent method to optimize the network parameters of the network model; when the training epoch of the network model has reached the preset training epoch, the network model has achieved convergence, and thus the trained target network model is obtained.
[0051] S2. Process the degraded X-ray image of the underground cable through the target network model and generate a fused feature map.
[0052] Furthermore, processing the degraded X-ray image of the underground cable through the target network model includes
[0053] Performing edge extraction on the degraded X-ray image of the underground cable through the edge extraction sub-module to obtain a group of edge images.
[0054] Furthermore, the edge extraction sub-module includes five different edge extraction operators.
[0055] Furthermore, the five different edge extraction operators are the Sobel 0° operator, the Sobel 45° operator, the Sobel 90° operator, the Sobel 135° operator, and the Laplace operator.
[0056] It should be noted that each operator is represented as follows:
[0057]
[0058] Furthermore, it should be noted that the degraded X-ray image I of the underground cable is respectively subjected to edge extraction through the above five operators to obtain the corresponding group of edge images {e 1 , e 2 , e 3 , e 4 , e 5}:
[0059]
[0060] Furthermore, processing the degraded X-ray image of the underground cable through the target network model includes,
[0061] Performing dynamic weight selection and edge selection on the degraded X-ray image of the underground cable through the dynamic selection sub-module to obtain a dynamic edge combination feature.
[0062] It should be noted that the dynamic selection sub-module includes 5 convolutional layers (convolutional layer 1, convolutional layer 2, convolutional layer 3, convolutional layer 4, and convolutional layer 5 respectively, where the kernel size of each convolutional layer is 3 and the stride is defaulted to 2), 1 global pooling layer, 1 sigmod layer, and 1 concatenation layer. Further, the global pooling layer pools the output weights of convolutional layer 5 into a weight feature of size 1*6. The sigmod layer normalizes the weight feature and multiplies the normalization result with the edge image group one by one. Finally, the dynamic edge combination feature is obtained using the concatenation layer. The specific synthesis mechanism is as follows:
[0063]
[0064] Where represents the operation of the i-th convolutional layer, P e represents the global pooling layer operation, F e represents the weight feature, S represents the sigmod layer operation, and Cat() represents the concatenation layer operation.
[0065] It should be further noted that through the dynamic selection sub-module, dynamic weight selection and edge selection are performed on the degraded underground cable X-ray image to obtain the dynamic edge combination feature, including:
[0066] Input the degraded underground cable X-ray image into 5 convolutional layers to obtain the high-dimensional image feature;
[0067] Input the obtained high-dimensional image feature into the global pooling layer and the sigmod layer to obtain the edge weights {α 1 , α 2 , α 3 , α 4 , α 5};
[0068] Multiply the obtained edge weights {α 1 , α 2 , α 3 , α 4 , α 5} with the edge image group {e 1 , e 2 , e 3 , e 4 , e 5} one by one, and use the concatenation layer to obtain the dynamic edge combination feature F eI .
[0069] Further, the method includes performing image fusion on the dynamic edge combined features and the degraded underground cable X-ray image through a feature extraction sub-module, and extracting features from the fusion result to obtain a fusion feature map. The feature extraction sub-module includes 8 convolutional layers and 8 activation layers, with a convolutional kernel size of 7, a stride of 1, and a padding of 3; the activation layers are all ReLU activation functions.
[0070] It should be noted that the fusion features are sequentially passed through a combination of 8 convolutional layers and activation layers for feature extraction to obtain a fusion feature map F * . The specific fusion mechanism is as follows:
[0071]
[0072] In the formula, represents the i-th convolutional layer of the feature extraction sub-module, represents the i-th activation layer of the feature extraction sub-module.
[0073] S3. Input the fusion feature map into an image enhancement sub-module to generate an enhanced underground cable X-ray image. The image enhancement sub-module adopted in this technology includes 4 convolutional layers and 4 activation layers (it should be noted that the convolutional kernel size is 3, the stride is 1, and the padding parameter is 1; further, it should be noted that the number of convolutional layers and activation layers can be increased or decreased according to different design requirements), and a Tank non-linear layer (the Tank non-linear layer generates a 3-channel enhanced image J).
[0074] It should be noted that the fusion feature map F * is input into the combined convolutional layer and activation layer. Multiple convolutional layers and activation layers can effectively extract the depth information in the fusion feature map for feature enhancement; finally, the above features are processed by the Tank non-linear layer to obtain an enhanced underground cable X-ray image.
[0075] In summary, the beneficial effect of an underground cable X-ray image enhancement method is to apply deep learning network technology to the problem of underground cable X-ray image enhancement, and to realize the effective extraction of underground cable X-ray image features and thus improve the quality of degraded underground cable X-ray images by extracting edge images under different edge operators to assist in image depth feature extraction and selection, providing guiding opinions for subsequent underground cable defect, fault detection, and automated inspection.
[0076] Embodiment 2
[0077] This embodiment provides an underground cable X-ray image enhancement system, which includes a construction module for constructing and training a target network model, where the target network model includes an edge extraction subunit, a dynamic selection subunit, a feature extraction subunit, and an image enhancement subunit;
[0078] A processing module for processing a degraded underground cable X-ray image through the target network model and generating a fused feature map;
[0079] A generation module for inputting the fused feature map into the image enhancement subunit to generate an enhanced underground cable X-ray image.
[0080] The above-mentioned unit modules can be embedded in the processor of a computer device in hardware form or be independent of it, or can be stored in the memory of the computer device in software form, so as to facilitate the processor to call and execute the operations corresponding to each of the above modules.
[0081] Embodiment 3
[0082] This embodiment provides a computer device, which can be a terminal, and its internal structure diagram can be as Figure 7 shown. The computer device includes a processor, a memory, a communication interface, a display screen, and an input device connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be implemented through WIFI, a carrier network, NFC (Near Field Communication), or other technologies. When the computer program is executed by the processor, it realizes an underground cable X-ray image enhancement method. The display screen of the computer device can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device can be a touch layer covered on the display screen, or can be a button, a trackball, or a touchpad set on the shell of the computer device, or can also be an external keyboard, a touchpad, or a mouse, etc.
[0083] This embodiment also provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by the processor, it realizes: constructing and training a target network model, where the target network model includes an edge extraction sub-module, a dynamic selection sub-module, a feature extraction sub-module, and an image enhancement sub-module; processing a degraded underground cable X-ray image through the target network model and generating a fused feature map; inputting the fused feature map into the image enhancement sub-module to generate an enhanced underground cable X-ray image.
[0084] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention rather than to limit them. Although the present invention has been described in detail with reference to the preferred embodiments, those of ordinary skill in the art should understand that the technical solutions of the present invention can be modified or equivalently replaced without departing from the spirit and scope of the technical solutions of the present invention, and they should all be covered within the scope of the claims of the present invention.
Claims
1. A method for enhancing underground cable X-ray images, characterized in that: include, Constructing and training a target network model, wherein the target network model includes an edge extraction submodule, a dynamic selection submodule, a feature extraction submodule, and an image enhancement submodule; Processing the degraded underground cable X-ray image through the target network model and generating a fusion feature map; The fused feature map is input into the image enhancement submodule to generate an enhanced underground cable X-ray image.
2. The underground cable X-ray image enhancement method according to claim 1, characterized in that: The training target network model includes: Acquire a training data set, wherein the training data set includes a degraded underground cable X-ray image and a high-quality and high-definition underground cable X-ray image; Inputting the degraded underground cable X-ray image into a network model to generate a target high-quality underground cable X-ray image; By comparing the target high-quality underground cable X-ray image with the corresponding high-quality high-definition underground cable X-ray image, the loss function of the network model is optimized to obtain the target network model.
3. The underground cable X-ray image enhancement method according to claim 2, characterized in that: The processing of the degraded underground cable X-ray image by the target network model includes: The edge extraction submodule is used to extract the edge of the degraded underground cable X-ray image to obtain an edge image group.
4. The underground cable X-ray image enhancement method according to claim 3, characterized in that: The processing of the degraded underground cable X-ray image by the target network model includes: The dynamic selection submodule performs dynamic weight selection and edge selection on the degraded underground cable X-ray image to obtain dynamic edge combination features.
5. The underground cable X-ray image enhancement method according to claim 4, characterized in that: The method comprises fusing the dynamic edge combination feature and the degraded underground cable X-ray image through the feature extraction submodule, and extracting features from the fusion result to obtain a fusion feature map.
6. The underground cable X-ray image enhancement method according to any one of claims 1 to 5, characterized in that: The edge extraction submodule includes five different edge extraction operators.
7. The underground cable X-ray image enhancement method according to claim 6, characterized in that: The five different edge extraction operators are Sobel 0° operator, Sobel 45° operator, Sobel 90° operator, Sobel 135° operator and Laplace operator.
8. An underground cable X-ray image enhancement system, characterized in that: include: A construction module, used to construct and train a target network model, wherein the target network model includes an edge extraction subunit, a dynamic selection subunit, a feature extraction subunit, and an image enhancement subunit; A processing module, used to process the degraded underground cable X-ray image through the target network model and generate a fusion feature map; A generation module is used to input the fused feature map into the image enhancement subunit to generate an enhanced underground cable X-ray image.
9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.