A tunnel disease identification method, device and medium based on deep learning

By adopting a lightweight visual transformation network and phantom fusion structure in tunnel disease recognition, combined with the channel space hybrid attention module, the problem of inability to fully utilize context information in the prior art is solved, and the accuracy and speed of disease recognition are improved, so as to achieve More efficient detection results.

CN118799705BActive Publication Date: 2024-11-19CENT SOUTH UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411287621.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-09-14
Publication Date
2024-11-19
Estimated Expiration
2044-09-14

AI Technical Summary

Technical Problem

The existing tunnel disease recognition method based on deep learning cannot fully utilize context information, resulting in difficult to improve the accuracy of disease image recognition, and the algorithm inference time is long and the detection speed is slow.

Method used

A lightweight visual transformation network is used to replace the backbone network in YOLOX, and a phantom fusion structure and channel space hybrid attention module are combined to build an object detection network to improve the understanding ability and detection efficiency of complex scenarios.

Benefits of technology

The recognition accuracy and detection speed of tunnel disease images are improved, and the task effect is achieved is achieved, meeting the needs of rapid tunnel disease detection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118799705B_ABST
    Figure CN118799705B_ABST
Patent Text Reader

Abstract

The present invention relates to the field of image processing technology, and in particular to a method, device and medium for identifying tunnel defects based on deep learning, wherein the method comprises the following steps: constructing a data set; constructing a target detection network; training the target detection network using the data set to obtain a target recognition model; acquiring a defect image to be detected from the surface of the tunnel, and inputting the image into the target recognition model for target recognition. The method of the present invention replaces the backbone network in YOLOX with a lightweight visual transformation network to construct a target detection network; the lightweight visualization structure and inverted residual bottleneck structure in the lightweight visual transformation network combine the advantages of global perception and local feature extraction, which is conducive to capturing detailed features and global context in the image, and improves the ability to understand complex scenes, thereby improving detection accuracy.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of image processing technology, and in particular to a tunnel disease identification method, device and medium based on deep learning. Background Art

[0002] As an important underground geotechnical engineering project, tunnels are always under the influence of various complex environmental factors during their long operation period. Relevant environmental factors include surrounding rock pressure, interference from adjacent construction, temperature influence and groundwater intrusion. The combined effect of these factors can cause various diseases in the tunnel lining. Common surface diseases include cracks, water leakage and shedding of fireproof coating. Tunnel diseases will not only reduce the service life of the tunnel, but also have a serious impact on the structural stability and safe operation of the tunnel, which may endanger the lives and property of the public.

[0003] At present, the advanced technical means used to detect tunnel appearance defects mainly include:

[0004] A Chinese invention with application number 202410332734.3, entitled A method for detecting apparent cracks in highway tunnels based on deep learning, belongs to the field of image data processing technology, and includes constructing a data set; constructing an S-LKA network including an LKA layer and an SCA layer; selecting a target detection network, replacing the C3 module in the backbone network with the S-LKA network, obtaining a target detection network based on S-LKA attention, and training a target recognition model with the data set; obtaining crack images to be identified from the surface of the highway and tunnel, and inputting them into the target recognition model for target recognition.

[0005] However, the technical solution of the invention cannot fully utilize contextual information to capture the global characteristics of tunnel diseases, resulting in difficulty in further improving the recognition accuracy of disease images, and the algorithm has a long reasoning time and a slow detection speed.

[0006] In summary, there is an urgent need for a tunnel disease identification method, equipment and medium based on deep learning to solve the problems in the existing technology. Summary of the invention

[0007] The present invention aims to provide a tunnel disease identification method, device and medium based on deep learning. The specific technical scheme is as follows:

[0008] A tunnel disease identification method based on deep learning includes the following steps:

[0009] S1: Construct a data set, obtain images containing defects on the tunnel surface, and mark the defects therein. All images with marked defects constitute a data set.

[0010] S2: Construct a target detection network and select YOLOX as the basic recognition network. YOLOX includes a backbone network, a feature fusion network, and a detection head. A lightweight visual transformation network is used to replace the backbone network in YOLOX. A phantom fusion structure is used to replace the cross-stage local network structure in the YOLOX network. In the feature fusion network, a channel space hybrid attention module is added after upsampling and downsampling to obtain a target detection network.

[0011] The lightweight visual transformation network includes a lightweight visualization structure and an inverted residual bottleneck structure;

[0012] The lightweight visualization structure includes a first convolutional layer, a second convolutional layer, an unfolding structure layer, a Transformer layer, and a stacking structure layer which are arranged in sequence;

[0013] The inverted residual bottleneck structure includes two third convolutional layers and one fourth convolutional layer, which are sequentially arranged as the third convolutional layer, the fourth convolutional layer and the third convolutional layer;

[0014] The phantom fusion structure includes two parts, one part directly outputs the feature layer after the phantom convolution, and the other part is subjected to multiple superposition processes after the phantom convolution, and the feature layer is output after each superposition process; after the convolution of the two parts is completed, the phantom fusion structure performs feature fusion on the feature layers obtained above through one phantom convolution to obtain the final effective feature layer;

[0015] The hybrid attention module includes a channel attention module and a spatial attention module;

[0016] S3: Using the data set to train the target detection network to obtain a target recognition model;

[0017] S4: Obtain the defect image to be detected from the tunnel surface and input it into the target recognition model for target recognition.

[0018] Preferably, in the lightweight visualization structure, the first convolution layer is a 3×3 convolution layer or a 3×3 layer-by-layer convolution, and the second convolution layer is a 1×1 convolution layer;

[0019] The first convolution layer and the second convolution layer are used to extract local features of the input image. The unfolded structure layer is used to divide the feature layer into multiple 2×2 pixel blocks and associate the pixels at corresponding positions in each pixel block. The Transformer layer is used to perform self-attention operation to realize feature extraction. The stacked structure layer is used to restore the size of the feature layer.

[0020] Preferably, in the inverted residual bottleneck structure, the third convolutional layer is a 1×1 convolutional layer, and the fourth convolutional layer is a 3×3 depthwise separable convolution;

[0021] The number of channels is expanded through a third convolution layer, and then the fourth convolution layer is used for feature extraction. Finally, another third convolution layer is used to restore the number of channels to achieve depth-wise separable convolution.

[0022] Preferably, the process of phantom convolution is as follows:

[0023] First, a 1×1 convolution is used for feature integration to generate feature concentration of the feature layer. The number of channels of the integrated feature layer is half of the final output channel number. Then, layer-by-layer convolution is used to obtain similar feature maps of feature concentration. These similar feature maps and feature concentration are superimposed to finally obtain the output feature layer of phantom convolution.

[0024] Preferably, in the hybrid attention module, the process of the channel attention module is as follows:

[0025] After the original feature layer is input, it is firstly extracted through a 5×5 convolution kernel to obtain the first feature layer, and then feature extraction is performed through convolution kernels of different sizes to obtain feature information at different scales, and then the second feature layer, the third feature layer and the fourth feature layer are obtained. The first feature layer, the second feature layer, the third feature layer and the fourth feature layer are added together, and a 1×1 convolution is used to integrate the features to obtain the fifth feature layer. The fifth feature layer is multiplied with the original feature layer to obtain the output feature layer based on channel attention.

[0026] Preferably, in the hybrid attention module, the process of the spatial attention module is as follows:

[0027] The original feature map is input, and the feature integration of the original feature map is carried out along the spatial attention channel direction through global maximum pooling and average pooling in turn. The generated spatial attention feature layer will be stacked in the channel dimension. All spatial attention feature layers are passed through a convolutional layer to generate the final spatial attention map. By multiplying the spatial attention map with the original feature map, the output feature layer based on spatial attention is obtained.

[0028] Preferably, the backbone network is a five-layer structure, including a first layer, a second layer, a third layer, a fourth layer and a fifth layer;

[0029] The first layer includes an inverted residual bottleneck structure;

[0030] The second layer includes three inverted residual bottleneck structures;

[0031] The third layer includes an inverted residual bottleneck structure and two lightweight visualization structures;

[0032] The fourth layer includes an inverted residual bottleneck structure and four lightweight visualization structures;

[0033] The fifth layer consists of an inverted residual bottleneck structure and three lightweight visualization structures.

[0034] Preferably, the annotation includes position annotation and category annotation.

[0035] In addition, the present invention also includes a computer device, including a memory and a processor;

[0036] The memory is used to store a computer program executable on the processor;

[0037] The processor is used to implement the steps of the tunnel disease identification method as described above when executing the computer program.

[0038] 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 identification method as described above are implemented.

[0039] The application of the technical solution of the present invention has the following beneficial effects:

[0040] 1) The present invention constructs a lightweight visual transformation network and uses it to replace the backbone network in YOLOX. The lightweight visualization structure and inverted residual bottleneck structure can effectively integrate the global perception ability of ViT (Vision Transformer) and the local feature extraction advantages of CNN (Convolutional Neural Network), and can simultaneously capture the detailed features and global context in the image, improve the ability to understand complex scenes, thereby improving the detection accuracy and achieving better task results. The present invention solves the problem that the existing algorithm cannot fully utilize the context information to capture the global characteristics of the disease, resulting in the difficulty in further improving the recognition accuracy of the disease image.

[0041] 2) The present invention constructs a phantom fusion structure and replaces the CSPLayer (Cross-Stage PartialNetwork) structure in YOLOX, effectively reducing the parameters of the convolution block; in addition, the use of multiple stacking processes also improves the information exchange between feature layers. The present invention solves the problems of long network inference time and slow detection speed in existing algorithms.

[0042] 3) The present invention combines channel attention and spatial attention to construct a hybrid attention module, making full use of the advantages of the two attention mechanisms to enhance the model's understanding of image content, thereby improving the model's overall performance. The present invention solves the problem that the channel attention mechanism of the existing algorithm may ignore important information in the spatial dimension, and the spatial attention may ignore global information, affecting the understanding of the overall features.

[0043] In addition to the above-described objects, features and advantages, the present invention has other objects, features and advantages. The present invention will be further described in detail with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0044] 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.

[0045] Figure 1 is a flow chart of the steps of the tunnel disease identification method in a preferred embodiment of the present invention;

[0046] Figure 2 is a schematic diagram of a lightweight visual transformation network in a preferred embodiment of the present invention;

[0047] Figure 3 is a structural schematic diagram of a lightweight visualization structure in a preferred embodiment of the present invention;

[0048] Figure 4 is a structural schematic diagram of an inverted residual bottleneck structure in a preferred embodiment of the present invention;

[0049] Figure 5 is a schematic structural diagram of a phantom fusion structure in a preferred embodiment of the present invention;

[0050] Figure 6 is a schematic diagram of phantom convolution in a preferred embodiment of the present invention;

[0051] Figure 7 is a flow chart of a hybrid attention module in a preferred embodiment of the present invention;

[0052] Figure 8 It is a flow chart of the target detection network in the preferred embodiment of the present invention. DETAILED DESCRIPTION

[0053] 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.

[0054] like Figure 1-Figure 8 As shown, this embodiment discloses a tunnel disease identification method based on deep learning, comprising the following steps:

[0055] S1: Construct a data set, obtain images containing defects on the tunnel surface, and mark the defects therein. All images with marked defects constitute a data set.

[0056] In this embodiment, the annotation includes a position annotation and a category annotation.

[0057] S2: Construct target detection network (such as Figure 8 As shown in the figure, YOLOX is selected as the basic recognition network. YOLOX includes a backbone network, a feature fusion network and a detection head. A lightweight visual transformation network is used to replace the backbone network in YOLOX, and a phantom fusion structure is used to replace the cross-stage local network structure in the YOLOX network. In the feature fusion network, a channel space mixed attention module is added after upsampling and downsampling to obtain a target detection network.

[0058] This embodiment uses a lightweight visual transformation network (a combination of ViT and CNN) to replace the backbone network in YOLOX, adopts a lightweight visualization structure and an inverted residual bottleneck structure, effectively integrates the advantages of global perception and local feature extraction, constructs a phantom fusion structure and replaces the CSPLayer structure in YOLOX. The method of this embodiment improves the ability to understand complex scenes and enhances the ability to capture detailed features and global context. The phantom fusion structure effectively reduces the parameters of the convolution block and improves the information exchange between feature layers through multiple stacking processes. It solves the problem of long inference time and slow detection speed of the existing algorithm network. The hybrid attention module enhances the model's understanding of image content and improves the overall performance of the model.

[0059] like Figure 2 As shown, the lightweight visual transformation network includes a lightweight visualization structure (such as Figure 3 ) and the inverted residual bottleneck structure (as shown in Figure 4 shown), in Figure 3 In the figure, N represents the depth of decomposition (number of transformer layers). In the lightweight visualization structure, the output of the convolutional layer is processed by several Transformer layers, and N is the number of Transformer layers. P represents the patch size. In the lightweight visualization structure, the input feature map is divided into multiple small patches (patches), and then each small patch is flattened and embedded into a higher-dimensional vector space. For example, if P is 2, the feature map will be divided into 2x2 small patches. d represents the dimension (embedding dimension). When flattening and embedding the small patches into the vector space, each small patch will be mapped to a d-dimensional vector space to form a d-dimensional vector, which will serve as the input of the Transformer layer.

[0060] In this embodiment, the lightweight visualization structure includes a first convolutional layer, a second convolutional layer, an unfolding structure layer, a Transformer layer, and a stacked structure layer which are arranged in sequence.

[0061] In a specific embodiment, the first convolution layer is a 3×3 convolution layer or a 3×3 layer-by-layer convolution, and the second convolution layer is a 1×1 convolution layer; the first convolution layer and the second convolution layer are used to extract local features of the input image, and the unfolded structure layer is used to divide the feature layer into multiple 2×2 pixel blocks and associate pixels at corresponding positions in each pixel block; the Transformer layer is used to perform self-attention operations to achieve feature extraction; and the stacked structure layer is used to restore the size of the feature layer.

[0062] The inverted residual bottleneck structure includes two third convolutional layers and one fourth convolutional layer, which are sequentially arranged as the third convolutional layer, the fourth convolutional layer and the third convolutional layer.

[0063] In a specific embodiment, the third convolution layer is a 1×1 convolution layer, and the fourth convolution layer is a 3×3 depth-separable convolution; the number of channels is expanded by a third convolution layer, and then the fourth convolution layer is used for feature extraction, and finally another third convolution layer is used to restore the number of channels to achieve depth-separable convolution.

[0064] like Figure 5 As shown, the phantom fusion structure includes two parts, one of which is through phantom convolution (such as Figure 6 As shown in the figure, one part directly outputs the feature layer after passing through the phantom convolution, and the other part is processed by three stacking processes, and the feature layer will be output after each stacking process; after the convolution of the two parts is completed, the phantom fusion structure fuses the feature layers obtained above through one phantom convolution to obtain the final effective feature layer.

[0065] The process of phantom convolution is as follows: first, a 1×1 convolution is used for feature integration to generate feature concentration of the feature layer, the number of channels of the integrated feature layer is half of the number of final output channels, and then layer-by-layer convolution is used to obtain similar feature maps of feature concentration, and then these similar feature maps and feature concentration are superimposed to finally obtain the output feature layer of phantom convolution.

[0066] In this embodiment, if Figure 7 As shown, the hybrid attention module includes a channel attention module and a spatial attention module.

[0067] In a specific embodiment, the process of the channel attention module is as follows:

[0068] After the original feature layer is input, it is first extracted through a 5×5 convolution kernel to obtain the first feature layer, and then features are extracted through convolution kernels of different sizes to obtain feature information at different scales, and then the second feature layer, the third feature layer and the fourth feature layer are obtained. The first feature layer, the second feature layer, the third feature layer and the fourth feature layer are added together, and a 1×1 convolution is used to integrate the features to obtain the fifth feature layer. The fifth feature layer is multiplied with the original feature layer to obtain the output feature layer based on channel attention. The channel attention module can capture image features at different scales, enhance the model's understanding of image content, and thus improve the overall performance of the model.

[0069] In a specific embodiment, the process of the spatial attention module is as follows:

[0070] The original feature map is input, and the feature integration of the original feature map is carried out along the spatial attention channel direction through global maximum pooling and average pooling in turn. The generated spatial attention feature layer will be stacked in the channel dimension. All spatial attention feature layers are passed through a convolutional layer to generate the final spatial attention map. By multiplying the spatial attention map with the original feature map, the output feature layer based on spatial attention is obtained.

[0071] S3: Use the data set to train the target detection network to obtain a target recognition model.

[0072] It should be noted that the target recognition model in this embodiment includes a lightweight visual transformation network, a phantom fusion structure, a hybrid attention module, a feature fusion module and a detection head. The lightweight visual transformation network is used to extract information at all positions in the input sequence to obtain three extracted feature layers; the phantom fusion structure is used to reduce the parameters of the convolution block and improve the information exchange between the feature layers; the hybrid attention module is used for feature extraction, and the feature layer output by the attention module will be multiplied by the original feature layer to amplify the effective weight and finally obtain the output feature layer; the feature fusion module is used to fuse local features and their corresponding global features to obtain fused features; the detection head is used to predict the location and category of defects and diseases in the tunnel based on the fused features.

[0073] S4: Obtain the defect image to be detected from the tunnel surface and input it into the target recognition model for target recognition.

[0074] In a specific embodiment, the backbone network is a five-layer structure, including a first layer, a second layer, a third layer, a fourth layer and a fifth layer;

[0075] The first layer includes an inverted residual bottleneck structure;

[0076] The second layer includes three inverted residual bottleneck structures;

[0077] The third layer includes an inverted residual bottleneck structure and two lightweight visualization structures;

[0078] The fourth layer includes an inverted residual bottleneck structure and four lightweight visualization structures;

[0079] The fifth layer consists of an inverted residual bottleneck structure and three lightweight visualization structures.

[0080] In a more specific embodiment, taking the crack image size of 416×416×3 (H, W, C; H, W, C are the height, width and number of channels of the input image, respectively) as an example, after the third, fourth and fifth layers, feature layers of 52×52×256, 26×26×512 and 13×13×1024 are obtained respectively and sent to the feature fusion network.

[0081] This embodiment discloses a tunnel disease recognition method based on deep learning. This embodiment method constructs a lightweight visual transformation network and uses it to replace the backbone network in YOLOX. The lightweight visualization structure and inverted residual bottleneck structure can effectively integrate the global perception ability of ViT (Vision Transformer) and the local feature extraction advantage of CNN (Convolutional Neural Network), and can simultaneously capture the detailed features and global context in the image, improve the ability to understand complex scenes, thereby improving the detection accuracy and achieving better task results. The application of this embodiment method solves the problem that the existing algorithm cannot fully utilize the context information to capture the global characteristics of the disease, resulting in the difficulty in further improving the recognition accuracy of the disease image.

[0082] In order to verify the effectiveness of the method of the present invention, based on the above-mentioned embodiment, a comparative test is conducted between the method of the present invention and several commonly used target detection algorithms:

[0083] A disease survey was conducted on more than 30 tunnels, and more than 1,200 images of various types of tunnel diseases were collected through multi-scale photography. The types of diseases included cracks, water leakage, and shedding of fire-retardant coatings. The resolution of the images ranged from 300 pixels to 3,000 pixels. In order to further expand the number and diversity of training sets, spatial-level transformations (rotation, flipping, cropping, scaling, etc.) and pixel-level transformations (blurring, noise, brightness, contrast, color change, etc.) were used to perform data enhancement processing on the images, and the data set was expanded to 2,000 images.

[0084] The dataset is divided into training set, validation set and test set in a ratio of 6:2:2 for experiments, and compared with five commonly used object detection algorithms. The experimental results are shown in Table 1.

[0085] Table 1 Comparison of different target detection algorithms

[0086]

[0087] mAP: The full name is Mean Average Precision, which refers to the average accuracy of all categories. It is a commonly used evaluation indicator in the field of target detection and is used to measure the performance of target detection algorithms.

[0088] FPS: The full name is Frames Per Second, which refers to the number of images that the target detector can process per second. It is an important indicator for measuring the speed of target detection.

[0089] Note: The YOLOv5 and YOLOv7 used in Table 1 are different versions of the same algorithm.

[0090] From Table 1, we can know that the method of the present invention can achieve a high recognition accuracy, and the mAP can reach 84.69%, which is 3.23%, 7.04%, 5.88%, 19.46%, and 17.21% higher than the YOLOX, YOLOv7, YOLOv5, Faster RCNN, and SSD comparison models, respectively. It can be seen that compared with other algorithms, the method of the present invention has the best tunnel disease image detection accuracy. At the same time, the FPS of the present invention is 97.99 f / s, which is 26.33 f / s, 24.40 f / s, 25.85 f / s, 67.40 f / s, and 21.77 f / s higher than the YOLOX, YOLOv7, YOLOv5, Faster RCNN, and SSD comparison models, respectively. The detection speed of tunnel disease images is the fastest, which meets the requirements of rapid disease detection and is more suitable for tunnel disease detection tasks.

[0091] In addition, this embodiment also discloses a computer device, including a memory and a processor;

[0092] The memory is used to store a computer program executable on the processor;

[0093] The processor is used to implement the steps of the above-mentioned tunnel disease identification method when executing the computer program.

[0094] 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.

[0095] 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.

[0096] 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.

[0097] 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.

[0098] 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.

[0099] 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 identification method are implemented.

[0100] The embodiment of the present invention discloses a tunnel disease recognition method based on deep learning, by constructing a lightweight visual transformation network and using it to replace the backbone network in YOLOX, wherein the lightweight visualization structure and inverted residual bottleneck structure in the lightweight visual transformation network can effectively integrate the global perception ability of ViT (Vision Transformer) and the local feature extraction advantage of CNN (Convolutional Neural Network), and can simultaneously capture the detailed features and global context in the image, improve the ability to understand complex scenes, thereby improving the detection accuracy and achieving better task results. The application of the method of this embodiment solves the problem that the existing algorithm cannot fully utilize the context information to capture the global characteristics of the disease, resulting in the difficulty in further improving the recognition accuracy of the disease image.

[0101] 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.

[0102] 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 identification method based on deep learning, It is characterized in that The steps include: S1: Construct a data set, obtain images containing defects on the tunnel surface, and mark the defects therein. All images with marked defects constitute a data set. S2: Construct a target detection network and select YOLOX as the basic recognition network. YOLOX includes a backbone network, a feature fusion network, and a detection head. A lightweight visual transformation network is used to replace the backbone network in YOLOX. A phantom fusion structure is used to replace the cross-stage local network structure in the YOLOX network. In the feature fusion network, a channel space hybrid attention module is added after upsampling and downsampling to obtain a target detection network. The lightweight visual transformation network includes a lightweight visualization structure and an inverted residual bottleneck structure; The lightweight visualization structure includes a first convolutional layer, a second convolutional layer, an unfolding structure layer, a Transformer layer, and a stacking structure layer which are arranged in sequence; The inverted residual bottleneck structure includes two third convolutional layers and one fourth convolutional layer, which are sequentially arranged as the third convolutional layer, the fourth convolutional layer and the third convolutional layer; The phantom fusion structure includes two parts, one part directly outputs the feature layer after the phantom convolution, and the other part is subjected to multiple superposition processes after the phantom convolution, and the feature layer is output after each superposition process; after the convolution of the two parts is completed, the phantom fusion structure performs feature fusion on the feature layers obtained above through one phantom convolution to obtain the final effective feature layer; The hybrid attention module includes a channel attention module and a spatial attention module; S3: Using the data set to train the target detection network to obtain a target recognition model; S4: Obtain the defect image to be detected from the tunnel surface and input it into the target recognition model for target recognition.

2. The tunnel disease identification method according to claim 1, It is characterized in that In the lightweight visualization structure, the first convolution layer is a 3×3 convolution layer or a 3×3 layer-by-layer convolution, and the second convolution layer is a 1×1 convolution layer; The first convolution layer and the second convolution layer are used to extract local features of the input image. The unfolded structure layer is used to divide the feature layer into multiple 2×2 pixel blocks and associate the pixels at corresponding positions in each pixel block. The Transformer layer is used to perform self-attention operation to realize feature extraction. The stacked structure layer is used to restore the size of the feature layer.

3. The tunnel disease identification method according to claim 2, It is characterized in that In the inverted residual bottleneck structure, the third convolution layer is a 1×1 convolution layer, and the fourth convolution layer is a 3×3 depth-separable convolution; The number of channels is expanded through a third convolution layer, and then the fourth convolution layer is used for feature extraction. Finally, another third convolution layer is used to restore the number of channels to achieve depth-wise separable convolution.

4. The tunnel disease identification method according to claim 3, It is characterized in that The process of the phantom convolution is as follows: First, a 1×1 convolution is used for feature integration to generate feature concentration of the feature layer. The number of channels of the integrated feature layer is half of the final output channel number. Then, layer-by-layer convolution is used to obtain similar feature maps of feature concentration. These similar feature maps and feature concentration are superimposed to finally obtain the output feature layer of phantom convolution.

5. The tunnel disease identification method according to claim 4, It is characterized in that In the hybrid attention module, the process of the channel attention module is as follows: After the original feature layer is input, it is firstly extracted through a 5×5 convolution kernel to obtain the first feature layer, and then feature extraction is performed through convolution kernels of different sizes to obtain feature information at different scales, and then the second feature layer, the third feature layer and the fourth feature layer are obtained. The first feature layer, the second feature layer, the third feature layer and the fourth feature layer are added together, and a 1×1 convolution is used to integrate the features to obtain the fifth feature layer. The fifth feature layer is multiplied with the original feature layer to obtain the output feature layer based on channel attention.

6. The tunnel disease identification method according to claim 5, It is characterized in that In the hybrid attention module, the process of the spatial attention module is as follows: The original feature map is input, and the feature integration of the original feature map is carried out along the spatial attention channel direction through global maximum pooling and average pooling in turn. The generated spatial attention feature layer will be stacked in the channel dimension. All spatial attention feature layers are passed through a convolutional layer to generate the final spatial attention map. By multiplying the spatial attention map with the original feature map, the output feature layer based on spatial attention is obtained.

7. The tunnel disease identification method according to claim 6, It is characterized in that The backbone network has a five-layer structure, including the first layer, the second layer, the third layer, the fourth layer and the fifth layer; The first layer includes an inverted residual bottleneck structure; The second layer includes three inverted residual bottleneck structures; The third layer includes an inverted residual bottleneck structure and two lightweight visualization structures; The fourth layer includes an inverted residual bottleneck structure and four lightweight visualization structures; The fifth layer consists of an inverted residual bottleneck structure and three lightweight visualization structures.

8. The tunnel disease identification method according to claim 7, It is characterized in that The annotations include position annotations and category annotations.

9. A computer device, It is 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 identification method according to any one of claims 1 to 8 when executing the computer program.

10. A computer-readable storage medium, It is 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 disease identification method according to any one of claims 1 to 8 are implemented.