A tunnel disease image deblurring method, device and medium
By using the fast channel shuffling network and multi-branch feature fusion module defuzzy algorithm in tunnel disease detection, the problem of motion blur in tunnel disease image acquisition is solved, and image clarity and detection accuracy are improved.
Patent Information
- Application Number
- CN202510072061.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-17
- Publication Date
- 2025-04-22
- Estimated Expiration
- 2045-01-17
AI Technical Summary
In the existing tunnel disease detection technology, image acquisition equipment has affected the image clarity and detection accuracy of deep learning models due to the fast movement speed and motion blur caused by environmental disturbances.
DeblurGAN-V2 is used as the basic network framework, and a fast-track shuffling network with fusion Fourier convolution is used to replace the bottom-up feature fusion part of the feature pyramid, a rapid defuzzing algorithm for tunnel disease images is constructed.
Effectively remove motion blur in tunnel disease images, improve image clarity and detection accuracy of deep learning models, reduce computational complexity, and maintain high accuracy and efficiency.
Smart Images

Figure CN119494945B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of image processing, and in particular to a tunnel disease image deblurring method, equipment and medium. Background Art
[0002] As an important underground transportation project, tunnels are under the influence of complex environmental factors for a long time. Under the combined effects of factors such as the surrounding rock pressure, groundwater intrusion, and operating loads, tunnels are bound to suffer from various diseases. Common diseases include appearance diseases such as cracks, lining shedding, and water leakage. For example, water leakage will not only cause serious erosion to the overall structure of the tunnel, but may also cause water accumulation inside the tunnel, thus affecting the normal operation of the tunnel. Therefore, timely detection and treatment of tunnel diseases is crucial to ensuring tunnel safety and operational efficiency.
[0003] Existing tunnel defect detection mainly includes manual inspection and algorithm detection. Manual inspection is too inefficient. As the cost of hardware equipment such as high-performance cameras and computing processing units continues to decrease, people are embedding deep learning algorithms into mobile devices, such as inspection drones or inspection vehicles, for defect detection. These devices collect defect data through the high-definition cameras they carry, and then use the internal computing units and deep learning algorithms for analysis and detection.
[0004] Existing algorithm detection mainly uses drones or inspection vehicles to collect tunnel disease images. Due to the high speed of the equipment or the vibration or shaking caused by uneven ground or air disturbance during movement, the collected tunnel disease images are motion blurred. In addition, the light inside the tunnel is dim, and the camera carried by the drone or inspection vehicle needs to extend the exposure time, which also increases the possibility of motion blur. The generation of motion blur not only blurs the details and edges in the collected image, but also increases the proportion of irrelevant information in the image, causing the deep learning model to misjudge the blurred part as a disease or background, greatly reducing the accuracy of the algorithm in tunnel disease detection.
[0005] In summary, there is an urgent need for a tunnel disease image deblurring method, device and medium to solve the problems in the prior art. Summary of the invention
[0006] The present invention aims to provide a tunnel disease image deblurring method, device and medium. The specific technical solution is as follows:
[0007] A tunnel disease image deblurring method comprises the following steps:
[0008] S1: Construct a data set, obtain images of tunnel surface with defects, and artificially blur the clear images to obtain blurred images, and construct a data set with one-to-one correspondence between clear images and blurred images;
[0009] S2: Construct a fast deblurring algorithm for tunnel disease images. Select DeblurGAN-V2 as the basic network framework. The basic network framework includes a discriminator and a generator. Use a fast channel shuffle network fused with Fourier convolution to replace the backbone network in the basic network framework, and use a multi-branch feature fusion module to replace the bottom-up feature fusion part of the feature pyramid in the basic network framework. The fast deblurring algorithm for tunnel disease images is obtained.
[0010] S3: using the data set to train the fast deblurring algorithm for the tunnel disease image to obtain an image deblurring model;
[0011] S4: The blurred image collected inside the tunnel is input into the image deblurring model to remove the motion blur of the diseased image inside the tunnel.
[0012] Optionally, the Fourier convolution includes a local branch structure and a global branch structure;
[0013] The local branch structure includes a 3×3 convolution layer, an information fusion layer and a normalization-activation layer;
[0014] In the local branch structure, the 3×3 convolution layer is used to extract local features of the input image, the information fusion layer is used to complete local-global information fusion, and the standardization-activation layer is used to perform information normalization and activation;
[0015] The global branch structure includes a 3×3 convolution layer, a spectral transformation layer, an information fusion layer and a normalization-activation layer;
[0016] In the global branch structure, the 3×3 convolution layer is used to extract preliminary global features, the spectrum transformation layer is used to perform feature transformation in the frequency domain to capture the global information of the preliminary global features, and the standardization-activation layer is used to perform information normalization and activation;
[0017] The feature outputs of the local branch structure and the global branch structure are fused to form the final feature expression.
[0018] Optionally, the fast channel shuffle network includes at least three groups of continuously arranged basic units and downsampling units, which are used to extract and fuse input features and output at least five feature layers of different sizes.
[0019] Optionally, the basic unit divides the input feature map into a first left branch and a first right branch in the channel dimension on average. The first left branch is not processed and performs equal mapping. The first right branch includes a 1×1 Fourier convolution, a 3×3 depth-separable convolution, and a 1×1 Fourier convolution connected in sequence. The output feature maps of the first left branch and the first right branch are connected by a connection operation to obtain a connection result, and the connection result is channel shuffled to complete the information exchange between the two branches.
[0020] Optionally, the downsampling unit divides the input feature map into a second left branch and a second right branch in the channel dimension, the second left branch includes a depth-wise separable convolution with a convolution kernel size of 3×3 and a 1×1 Fourier convolution, the second right branch includes a 1×1 Fourier convolution, a 3×3 depth-wise separable convolution and a 1×1 Fourier convolution connected in sequence, and the output feature maps obtained by the second left branch and the second right branch are connected together, so that the feature map space is halved and the number of channels is doubled;
[0021] Among them, the stride of the 3×3 depth-wise separable convolution is 2.
[0022] Optionally, the multi-branch feature fusion module includes a left branch, a middle branch and a right branch:
[0023] The left branch includes 3×3 normal convolution, 4×4 transposed convolution and 1×1 normal convolution connected in sequence;
[0024] The middle branch includes 3×3 normal convolutions and 1×1 normal convolutions connected sequentially;
[0025] The right branch includes 3×3 normal convolution, 3×3 normal convolution and 1×1 normal convolution connected in sequence;
[0026] Among them, the stride of the 4×4 transposed convolution in the left branch is 2, and the stride of the 3×3 ordinary convolution in the middle position in the right branch is 2;
[0027] The 3×3 ordinary convolutions at the starting position of the three branches are all used for feature extraction, the 4×4 transposed convolution with a step size of 2 and the 3×3 ordinary convolution are used to modify the size of the feature layer, and the 1×1 ordinary convolution is used to modify the number of channels.
[0028] Optionally, the backbone network has a six-layer structure, including a first layer, a second layer, a third layer, a fourth layer, a fifth layer and a sixth layer;
[0029] The first layer consists of a downsampling unit;
[0030] The second layer consists of a basic unit, and the output feature layer size is h×w×16;
[0031] The third layer consists of a downsampling unit, and the output feature layer size is h / 2×w / 2×24;
[0032] The fourth layer consists of a basic unit, and the output feature layer size is h / 4×w / 4×40;
[0033] The fifth layer consists of a downsampling unit, and the output feature layer size is h / 8×w / 8×80;
[0034] The sixth layer consists of a basic unit, and the output feature layer size is h / 16×w / 16×160.
[0035] Optionally, a data set is used to train the fast deblurring algorithm for tunnel disease images, and the training loss includes generator loss, discriminator global loss and discriminator local loss. The discriminator global loss and discriminator local loss are calculated in the same way. The expression of the training loss is as follows:
[0036] ;
[0037] ;
[0038] in, is the generator loss, is the discriminator loss, is the perceived loss, is the pixel-level loss, To combat losses, represents the probability of the discriminator distinguishing the real image, represents the probability of the discriminator to generate the image, represents the expected value, Represents a real image; represents random noise; Represents an image generated by the generator based on random noise.
[0039] In addition, the present invention also includes a computer device, including a memory and a processor;
[0040] The memory is used to store a computer program executable on the processor;
[0041] The processor is used to implement the steps of the above-mentioned tunnel disease image deblurring method when executing the computer program.
[0042] In addition, the present invention also includes 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 tunnel disease image deblurring method as described above are implemented.
[0043] The application of the technical solution of the present invention has the following beneficial effects:
[0044] 1) In view of the problem that the existing deblurring algorithm cannot effectively remove the motion blur in the collected images of tunnel diseases, thus affecting the detection accuracy of the deep learning algorithm, the method of the present invention constructs a fast channel shuffle network and replaces the backbone network in the DeblurGAN-V2 network with it. Compared with the original backbone network, the fast channel shuffle network further reduces the computational complexity while maintaining high accuracy and efficiency. In addition, the fast channel shuffle network introduces a channel shuffle operation, which can achieve better information flow between multiple group convolutions and improve the representation ability of the network. Since the deblurring task relies on effective information flow to reconstruct a clear image, using the fast channel shuffle network as the backbone network can achieve a good deblurring effect.
[0045] 2) The present invention uses Fourier convolution to replace the original ordinary convolution operation of the fast channel shuffle network. Among them, Fourier convolution can perform global operations in the frequency domain. By performing partial convolution operations in the frequency domain, each layer of convolution has a larger receptive field and better restores the detail information in the image.
[0046] 3) Since the DeblurGAN-V2 feature pyramid may ignore important information in different spatial dimensions when it is fused, the present invention uses a multi-branch feature fusion module to replace the bottom-up feature fusion part of the feature pyramid in DeblurGAN-V2, which not only simplifies the network structure and improves the feature fusion efficiency, but also can better fuse feature information of different scales, further improving the overall deblurring performance of the network.
[0047] In addition to the above-described purposes, features and advantages, the present invention has other purposes, features and advantages. The present invention will be further described in detail with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0048] In order to more clearly illustrate the embodiments of the present invention or the technical solutions of the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0049] Figure 1 is a flowchart of the steps of the tunnel disease image deblurring method in a preferred embodiment of the present invention;
[0050] Figure 2 is a schematic diagram of Fourier convolution in a preferred embodiment of the present invention;
[0051] Figure 3 is a schematic diagram of a basic unit in a fast channel shuffle network in a preferred embodiment of the present invention;
[0052] Figure 4 is a schematic diagram of a downsampling unit in a fast channel shuffle network in a preferred embodiment of the present invention;
[0053] Figure 5 is a schematic diagram of a fast channel shuffle network in a preferred embodiment of the present invention;
[0054] Figure 6 is a schematic diagram of a multi-branch feature fusion module in a preferred embodiment of the present invention;
[0055] Figure 7 It is a schematic diagram of a fast deblurring algorithm for tunnel damage images in a preferred embodiment of the present invention. DETAILED DESCRIPTION
[0056] In order to enable those skilled in the art to better understand the scheme of the present invention, the present invention is further described in detail below in conjunction with the accompanying drawings and specific implementation methods. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.
[0057] See also Figure 1-Figure 7 , Figure 1 is a flowchart of the steps of the tunnel disease image deblurring method in a preferred embodiment of the present invention; Figure 2 is a schematic diagram of Fourier convolution in a preferred embodiment of the present invention; Figure 3 is a schematic diagram of a basic unit in a fast channel shuffle network in a preferred embodiment of the present invention; Figure 4 is a schematic diagram of a downsampling unit in a fast channel shuffle network in a preferred embodiment of the present invention; Figure 5 is a schematic diagram of a fast channel shuffle network in a preferred embodiment of the present invention; Figure 6 is a schematic diagram of a multi-branch feature fusion module in a preferred embodiment of the present invention; Figure 7 It is a schematic diagram of a fast deblurring algorithm for tunnel damage images in a preferred embodiment of the present invention.
[0058] like Figure 1 As shown, this embodiment discloses a tunnel disease image deblurring method, comprising the following steps:
[0059] S1: Construct a data set, obtain images of tunnel surfaces containing defects, and artificially blur the clear images therein to obtain blurred images, and construct a data set with one-to-one correspondence between clear images and blurred images.
[0060] In this embodiment, in order to ensure that the model is fully trained, a large number of data sets with one-to-one correspondence between clear images and blurred images are required. However, it is rare for clear images and blurred images in the actual collected tunnel images to correspond one-to-one. Therefore, it is necessary to artificially add motion blur to the clear diseased images to ensure sufficient training samples. Artificially adding motion blur mainly relies on convolution operations. By applying a blur kernel to the image, each pixel value in the image is combined with the values of adjacent pixels in a certain way to simulate the displacement trajectory of a moving object during camera exposure to achieve a motion blur effect;
[0061] In order to make the artificially added motion blur closer to the actual situation, the size and direction of the blur kernel should be adjusted according to the actual acquisition situation inside the tunnel. In this embodiment, a dynamic blur kernel is used to avoid using a single fixed value. Instead, the blur kernel size is set to a range. The size of the blur kernel will be randomly selected within this range to simulate different degrees of motion blur, which is closer to the actual situation. In addition, the direction of the blur kernel also includes horizontal blur, vertical blur and arbitrary angle blur to simulate different motion situations.
[0062] S2: Construct a fast deblurring algorithm for tunnel disease images. Select DeblurGAN-V2 as the basic network framework. The basic network framework includes a discriminator and a generator. The fast channel shuffle network fused with Fourier convolution is used to replace the backbone network in the basic network framework, and the multi-branch feature fusion module is used to replace the bottom-up feature fusion part of the feature pyramid in the basic network framework to obtain a fast deblurring algorithm for tunnel disease images.
[0063] In this embodiment, the Fourier convolution is as follows: Figure 2 As shown, it includes a local branch structure and a global branch structure;
[0064] The local branch structure includes a 3×3 convolution layer, an information fusion layer and a normalization-activation layer;
[0065] In the local branch structure, the 3×3 convolution layer is used to extract local features of the input image, the information fusion layer is used to complete local-global information fusion, and the standardization-activation layer is used to perform information normalization and activation;
[0066] The global branch structure includes a 3×3 convolution layer, a spectral transformation layer, an information fusion layer and a normalization-activation layer;
[0067] In the global branch structure, the 3×3 convolution layer is used to extract preliminary global features, the spectrum transformation layer is used to perform feature transformation in the frequency domain to capture the global information of the preliminary global features, and the standardization-activation layer is used to perform information normalization and activation;
[0068] The feature outputs of the local branch structure and the global branch structure are fused to form the final feature expression.
[0069] Furthermore, the fast channel shuffle network includes at least three groups of continuously arranged basic units and downsampling units, which are used to extract and fuse input features and output at least five feature layers of different sizes.
[0070] Specifically, the fast channel shuffle network (backbone network) in this embodiment is a six-layer structure, such as Figure 5 As shown, the fast channel shuffle network in this embodiment includes a first layer, a second layer, a third layer, a fourth layer, a fifth layer and a sixth layer;
[0071] The first layer consists of a downsampling unit;
[0072] The second layer consists of a basic unit, and the output feature layer size is h×w×16;
[0073] The third layer consists of a downsampling unit, and the output feature layer size is h / 2×w / 2×24;
[0074] The fourth layer consists of a basic unit, and the output feature layer size is h / 4×w / 4×40;
[0075] The fifth layer consists of a downsampling unit, and the output feature layer size is h / 8×w / 8×80;
[0076] The sixth layer consists of a basic unit, and the output feature layer size is h / 16×w / 16×160.
[0077] In a specific implementation case, such as Figure 3 As shown, the basic unit divides the input feature map into a first left branch and a first right branch in the channel dimension. The first left branch is not processed and performs equal mapping. The first right branch includes a 1×1 Fourier convolution, a 3×3 depth-separable convolution, and a 1×1 Fourier convolution connected in sequence. The output feature maps of the first left branch and the first right branch are connected by a connection operation to obtain a connection result, and the connection result is channel-shuffled to complete the information exchange between the two branches.
[0078] In a specific implementation case, such as Figure 4As shown, the downsampling unit divides the input feature map into a second left branch and a second right branch in the channel dimension. The second left branch includes a depth-wise separable convolution with a convolution kernel size of 3×3 and a 1×1 Fourier convolution. The second right branch includes a 1×1 Fourier convolution, a 3×3 depth-wise separable convolution and a 1×1 Fourier convolution connected in sequence. The output feature maps obtained by the second left branch and the second right branch are connected together, so that the feature map space is halved and the number of channels is doubled. It should be noted that in the downsampling unit, the step size of the 3×3 depth-wise separable convolution is 2.
[0079] In this embodiment, the multi-branch feature fusion module is as follows: Figure 6 As shown, it includes the left branch, the middle branch and the right branch:
[0080] The left branch includes 3×3 normal convolution, 4×4 transposed convolution and 1×1 normal convolution connected in sequence;
[0081] The middle branch includes 3×3 normal convolutions and 1×1 normal convolutions connected sequentially;
[0082] The right branch includes 3×3 normal convolution, 3×3 normal convolution and 1×1 normal convolution connected in sequence;
[0083] Among them, the stride of the 4×4 transposed convolution in the left branch is 2, and the stride of the 3×3 ordinary convolution in the middle position in the right branch is 2;
[0084] The 3×3 ordinary convolutions at the starting position of the three branches are all used for feature extraction, the 4×4 transposed convolution with a step size of 2 and the 3×3 ordinary convolution are used to modify the size of the feature layer, and the 1×1 ordinary convolution is used to modify the number of channels.
[0085] It should be noted that this embodiment uses a multi-branch feature fusion module to replace the bottom-up feature fusion part of the DeblurGAN-V2 feature pyramid, specifically:
[0086] The multi-branch feature fusion module mainly consists of convolutions and transposed convolutions with different convolution kernel sizes and strides. It can align the feature information of different scales of the input, and then cascade fuse the processed feature layers in the channel dimension, and reduce the dimension of the spliced features through a 1×1 convolution layer to ensure that the number of channels of the final feature map is consistent with the original input.
[0087] S3: Using the data set to train the fast deblurring algorithm for the tunnel disease image to obtain an image deblurring model.
[0088] It should be noted that the fast deblurring algorithm for tunnel damage images in this embodiment is as follows: Figure 7As shown in the figure, it includes a discriminator and a generator. When the blurred diseased image is input to the generator, it is first input into the fast channel shuffle network. The fast channel shuffle network decomposes the blurred diseased image into multiple layers of feature maps. After a series of convolution and feature extraction operations, five feature layers with different resolutions are generated, with sizes of h×w×16, h / 2×w / 2×24, h / 4×w / 4×40, h / 8×w / 8×80, and h / 16×w / 16×160. Among them, the feature layer with a size of h / 16×w / 16×160 is used as a residual branch and will be fused with subsequent feature layers. The remaining four feature layers are passed to the multi-branch feature fusion module for feature alignment, processing and fusion. After that, these feature layers are upsampled to gradually restore the low-resolution feature maps to the original resolution. After the processed and fused feature maps, a clear image with the same size as the input is output after the final layer of operation. The output clear image has clear details after deblurring through accumulated detail restoration, blur removal and global structure restoration.
[0089] Then the clear image output by the generator is passed to the discriminator together with the real clear image to determine whether the generated image is a real image. The discriminator includes two parts: a global discriminator and a local discriminator. Among them, the global discriminator extracts the overall features of the input image and calculates the discriminator global loss. The local discriminator randomly crops the input image, extracts local information such as texture and details of the cropped image, and outputs the discriminator local loss. After that, the discriminator global loss and the discriminator local loss are fed back to the generator. The discriminator global loss drives the generator to generate a global image with a reasonable structure and realistic, while the discriminator local loss improves the authenticity of the generator at the level of details such as texture and edges. In the continuous generation-discrimination process, the generator gradually generates clearer disease images until the needs of disease detection are met.
[0090] Specifically, the fast deblurring algorithm for tunnel disease images is trained using a data set. The training loss includes generator loss, discriminator global loss and discriminator local loss. The discriminator global loss and discriminator local loss are calculated in the same way. The expression of the training loss is as follows:
[0091] ;
[0092] ;
[0093] in, is the generator loss, is the discriminator loss, is the perceived loss, is the pixel-level loss, To combat losses, represents the probability of the discriminator distinguishing the real image, represents the probability of the discriminator to generate the image, represents the expected value, Represents a real image; represents random noise; Represents an image generated by the generator based on random noise.
[0094] S4: The blurred image collected inside the tunnel is input into the image deblurring model to remove the motion blur of the diseased image inside the tunnel.
[0095] In order to verify the effectiveness of the present invention, on the basis of the above embodiments, a comparative test was conducted between the method of the present invention and several commonly used deblurring algorithms.
[0096] A total of 1,200 images of various types of tunnel defects were collected by taking photos from multiple angles. The defect types included cracks, water leakage, lining shedding, and segment damage. The image resolution ranged from 300 pixels to 3,000 pixels. The defect images were artificially blurred by convolution operations to form a one-to-one correspondence between clear and blurred images. A defect dataset for deblurring algorithm training was constructed. The defect dataset was divided into a training set and a validation set at a ratio of 8:2. Blurred defect images collected from actual tunnels were selected for testing and compared with three commonly used target detection algorithms. The experimental results are shown in Table 1.
[0097] Table 1 Comparison of different target detection algorithms
[0098]
[0099] Among them, the peak signal-to-noise ratio is a commonly used evaluation index in the field of image deblurring, which is used to measure the image restoration effect after the deblurring algorithm is processed. The structural similarity index is an important indicator for measuring the visual quality of an image.
[0100] It can be seen from Table 1 that the method of the embodiment of the present invention can achieve a good image deblurring effect, and the peak signal-to-noise ratio can reach 28.66, which is 3.46, 5.25 and 4.98 higher than the DeblurGAN-V2, DeblurGAN, and Scale-Recurrent Network comparison algorithms, respectively. It can be seen that compared with other comparison networks, the image processed by the method of the embodiment of the present invention has a better restoration effect. At the same time, the structural similarity index of the present invention is 0.91, which is 0.08, 0.11 and 0.14 higher than the DeblurGAN-V2, DeblurGAN, and Scale-Recurrent Network comparison models, respectively, indicating that the improved model has better performance in terms of image visual quality and structural similarity. In terms of image processing speed, the processing speed of the present invention is close to that of DeblurGAN-V2, and higher than the other two comparison algorithms.
[0101] In addition, this embodiment also discloses a computer device, including a memory and a processor;
[0102] The memory is used to store a computer program executable on the processor;
[0103] The processor is used to implement the steps of the above-mentioned tunnel disease image deblurring method when executing the computer program.
[0104] Exemplarily, the computer program may be divided into one or more modules / units, which are stored in the memory and executed by the processor to implement the present invention. The one or more modules / units may be a series of computer program instruction segments capable of implementing specific functions, which are used to describe the execution process of the computer program in the computer device.
[0105] The computer device may be a computing device such as a mobile phone, a desktop computer, a notebook, a PDA, a cloud server, etc. The computer device may include, but is not limited to, a processor and a memory. For example, the computer device may also include an input / output device, a network access device, a bus, etc.
[0106] The processor may be a central processing unit (CPU), other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc. The processor is the control center of the computer device, and uses various interfaces and lines to connect various parts of the entire computer device.
[0107] The memory can be used to store the computer program and / or module, and the processor implements the computer program by running or executing the computer program and / or module stored in the memory, and calling the data stored in the memory. The memory can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc.; the data storage area can store data created according to the use of the mobile phone (such as audio data, a phone book, etc.), etc. In addition, the memory can include a high-speed random access memory, and can also include a non-volatile memory, such as a hard disk, a memory, a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (SecureDigital, SD) card, a flash card (Flash Card), at least one disk storage device, a flash memory device, or other volatile solid-state storage devices.
[0108] Wherein, if the module / unit integrated in the computer device is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on such an understanding, the present invention implements all or part of the processes in the above-mentioned embodiment method, and can also be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of the above-mentioned various method embodiments when executed by the processor. Wherein, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form, etc. The computer-readable medium can include: any entity or device capable of carrying the computer program code, recording medium, U disk, mobile hard disk, disk, optical disk, computer memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), electric carrier signal, telecommunication signal and software distribution medium, etc.
[0109] In addition, an embodiment of the present invention further 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-mentioned tunnel disease image deblurring method are implemented.
[0110] This embodiment discloses a method for deblurring a tunnel disease image, including a fast channel shuffle network and a multi-branch feature fusion module. This embodiment uses a fast channel shuffle network to replace the backbone network in the DeblurGAN-V2 network. Compared with the original backbone network, the fast channel shuffle network further reduces the computational complexity while maintaining high accuracy and efficiency. The fast channel shuffle network includes Fourier convolution, which can perform global operations in the frequency domain. By performing partial convolution operations in the frequency domain, each layer of convolution has a larger receptive field and better restores the detail information in the image. Furthermore, this embodiment uses a multi-branch feature fusion module to replace the bottom-up feature fusion part of the feature pyramid in DeblurGAN-V2, which not only simplifies the network structure and improves the feature fusion efficiency, but also can better fuse feature information of different scales, further improving the overall deblurring performance of the network.
[0111] It should be noted that the device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0112] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. A tunnel disease image deblurring method, characterized in that: The steps include: S1: Construct a data set, obtain images of tunnel surface with defects, and artificially blur the clear images to obtain blurred images, and construct a data set with one-to-one correspondence between clear images and blurred images; S2: Construct a fast deblurring algorithm for tunnel disease images. Select DeblurGAN-V2 as the basic network framework. The basic network framework includes a discriminator and a generator. Use a fast channel shuffle network fused with Fourier convolution to replace the backbone network in the basic network framework, and use a multi-branch feature fusion module to replace the bottom-up feature fusion part of the feature pyramid in the basic network framework. The fast deblurring algorithm for tunnel disease images is obtained. S3: using the data set to train the fast deblurring algorithm for the tunnel disease image to obtain an image deblurring model; S4: inputting the blurred image collected inside the tunnel into the image deblurring model to remove the motion blur of the diseased image inside the tunnel; The fast channel shuffle network includes at least three groups of consecutively arranged basic units and downsampling units, which are used to extract and fuse input features and output at least five feature layers of different sizes; The basic unit divides the input feature map into a first left branch and a first right branch in the channel dimension. The first left branch is not processed and performs equal mapping. The first right branch includes a 1×1 Fourier convolution, a 3×3 depth-separable convolution and a 1×1 Fourier convolution connected in sequence. The output feature maps of the first left branch and the first right branch are connected by a connection operation to obtain a connection result, and the connection result is channel-shuffled to complete the information exchange between the two branches.
2. The tunnel damage image deblurring method according to claim 1, characterized in that: The Fourier convolution includes a local branch structure and a global branch structure; The local branch structure includes a 3×3 convolution layer, an information fusion layer and a normalization-activation layer; In the local branch structure, the 3×3 convolution layer is used to extract local features of the input image, the information fusion layer is used to complete local-global information fusion, and the standardization-activation layer is used to perform information normalization and activation; The global branch structure includes a 3×3 convolution layer, a spectral transformation layer, an information fusion layer and a normalization-activation layer; In the global branch structure, the 3×3 convolution layer is used to extract preliminary global features, the spectrum transformation layer is used to perform feature transformation in the frequency domain to capture the global information of the preliminary global features, and the standardization-activation layer is used to perform information normalization and activation; The feature outputs of the local branch structure and the global branch structure are fused to form the final feature expression.
3. The tunnel damage image deblurring method according to claim 2, characterized in that: The downsampling unit divides the input feature map into a second left branch and a second right branch in the channel dimension, the second left branch includes a 3×3 depth-separable convolution and a 1×1 Fourier convolution with a convolution kernel size, and the second right branch includes a 1×1 Fourier convolution, a 3×3 depth-separable convolution and a 1×1 Fourier convolution connected in sequence, and the output feature maps obtained by the second left branch and the second right branch are connected together, so that the feature map space is halved and the number of channels is doubled; Among them, the stride of the 3×3 depth-wise separable convolution is 2.
4. The tunnel damage image deblurring method according to claim 3, characterized in that: The multi-branch feature fusion module includes a left branch, a middle branch and a right branch: The left branch includes a 3×3 normal convolution, a 4×4 transposed convolution, and a 1×1 normal convolution connected in sequence; The middle branch includes 3×3 normal convolutions and 1×1 normal convolutions connected sequentially; The right branch includes 3×3 normal convolution, 3×3 normal convolution and 1×1 normal convolution connected in sequence; Among them, the stride of the 4×4 transposed convolution in the left branch is 2, and the stride of the 3×3 ordinary convolution in the middle position in the right branch is 2; The 3×3 ordinary convolutions at the starting position of the three branches are all used for feature extraction, the 4×4 transposed convolution with a step size of 2 and the 3×3 ordinary convolution are used to modify the size of the feature layer, and the 1×1 ordinary convolution is used to modify the number of channels.
5. The tunnel damage image deblurring method according to claim 4, characterized in that: The backbone network has a six-layer structure, including the first layer, the second layer, the third layer, the fourth layer, the fifth layer and the sixth layer; The first layer consists of a downsampling unit; The second layer consists of a basic unit, and the output feature layer size is h×w×16; The third layer consists of a downsampling unit, and the output feature layer size is h / 2×w / 2×24; The fourth layer consists of a basic unit, and the output feature layer size is h / 4×w / 4×40; The fifth layer consists of a downsampling unit, and the output feature layer size is h / 8×w / 8×80; The sixth layer consists of a basic unit, and the output feature layer size is h / 16×w / 16×160.
6. The tunnel damage image deblurring method according to claim 5, characterized in that: The fast deblurring algorithm for tunnel disease images is trained using a data set. The training loss includes generator loss, discriminator global loss and discriminator local loss. The discriminator global loss and discriminator local loss are calculated in the same way. The expression of the training loss is as follows: L G 0.5 L P +0.006·L X +0.01 L adv ; L D =-E[log(D(x))]-E[log(1-D(G(z)))]; Among them, L G is the generator loss, L D is the discriminator loss, L P is the perceptual loss, L X is the pixel-level loss, L adv To combat the loss, D(x) represents the probability of the discriminator distinguishing the real image, D(G(z) represents the probability of the discriminator distinguishing the generated image, E represents the expected value, x represents the real image, z represents random noise, and G(z) represents the image generated by the generator based on the random noise.
7. A computer device, characterized in that: including memory and processor; The memory is used to store a computer program executable on the processor; The processor is used to implement the steps of the tunnel disease image deblurring method according to any one of claims 1 to 6 when executing the computer program.
8. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the tunnel damage image deblurring method according to any one of claims 1 to 6 are implemented.
Citation Information
Patent Citations
Metal part surface highlight removal method, model construction method and computer readable medium
CN115456902A
Pipeline leakage detection method based on improved YOLOv7 model
CN119229254A