# Recognition Method of Tunnel Lining Defects Based on Deep Learning

Authors: Anfu Zhu; Shuaihao Chen; Fangfang Lu; Congxiao Ma; Fengrui Zhang
Journal: Wireless Communications and Mobile Computing
 (2021)

---

## Abstract

The defect identification of tunnel lining is a task with a lot of tasks and time-consuming work, and currently, it mainly relies on manual operation. This paper takes the ground-penetrating radar image of the internal defects of the lining as the research object, and chooses the popular VGG16, ResNet34 convolutional neural network (CNN) to build the automatic recognition model for comparative study, and proposes an improved ResNet34 defect-recognition model. In this paper, SGD and Adam training algorithms are used to update network parameters, and the PyTorch depth framework is used to train the network. The test results show that the ResNet34 network has faster convergence speed, higher accuracy rate, and shorter training time than the VGG16 network. The ResNet34 network using the Adam algorithm can achieve 99.08% accuracy. The improved ResNet34 network can achieve an accuracy of 99.25%, and at the same, reduce the parameter amount by 4.22% compared with the ResNet34 network, which can better identify defects in the lining. The research in this paper shows that the deep learning method can provide new ideas for the identification of tunnel lining defects.


---

## Body

## 1. Introduction

The number of tunnels in our country is increasing. Due to the influence of construction conditions and environment, the lining structure of tunnels will inevitably have defects during construction and operation. Common defects include imperfect lining, voids, cracks, and water seepage. If these defects cannot be detected in time, they will damage the structure of the tunnel and even cause major safety accidents. In order to discover these defects in time and ensure the safety of the tunnel structure, we need a faster and more accurate method to regularly check the quality of the tunnel. In the early days, tunnel detection was carried out by manual methods such as human eye observation and borehole survey methods. The human eye observation method is a common method for detecting defects on the tunnel surface, but this method has many unsafe factors for the inspectors. And the detection is slow, easy to be affected by environmental influences and personal factors [1]. With the development of detection technology, Ai et al. proposed a fast and effective method for obtaining the profile of subway tunnels based on photogrammetry. From the results of field application, the proposed method shows that the collection speed exceeds 5 km/h. It can scan a cross-sectional profile in one second, but it can only detect tunnel surface defects [2]. The borehole survey method can check the lining thickness, lining strength, lining cavity, and other lining internal conditions, but this method is a kind of damage detection, which will destroy the overall structure and waterproof performance of the tunnel, and the operation is complicated. Ultrasonic method and rebound method [3] are nondestructive testing methods that can detect the strength and thickness of concrete, but this method has certain limitations and is easily affected by concrete materials and the environment. The insufficiency of the acoustic wave method has prompted the development of ground-penetrating radar (GPR) technology. The ground-penetrating radar method [4] is a method of detecting the characteristics of the medium by emitting high-frequency electromagnetic waves. This detection method has no damage to the detected object, and the signal processing and image reconstruction technology is also widely used in the ground-penetrating radar images, so the ground-penetrating radar technology is chosen for many nondestructive testing work. The research of this article also takes the radar image of the lining disease as the research object.With the increase of the number of tunnels, the task of inspectors is getting heavier and heavier [5], and automatic tunnel identification technology is becoming more and more urgent. In terms of automatic identification of tunnel images, Dong et al. proposed an automatic identification method of tunnel lining cracks based on the local characteristics of the image and realized automatic identification of cracks by designing a clever cross-shaped template [6]. MOOn et al. can easily visualize concrete cracks by using image processing techniques such as improved subtraction, filtering, and segmentation and finally use BP network for classification. The recognition methods used in the above research all require manual production or extraction of features and rely on manual parameter adjustment, which is inefficient.In recent years, electronic information technology based on optimization has been greatly developed [7–10]. Among them, deep learning technology is widely used in image recognition and speech recognition. This technology has also performed well in other scientific research fields [11]. These excellent performances are mainly attributed to convolutional neural networks. The network [12] can automatically complete the feature extraction in the process of model training. Compared with machine learning algorithms, it does not need to manually make and extract features. Song et al. [13] proposed an objective and fast tunnel crack recognition algorithm based on computer vision semantic segmentation, which achieved accurate segmentation of the location of tunnel cracks, thereby saving a lot of labor and financial resources in the railway sector and improving work efficiency. Decor et al. [14] use deep convolutional networks to train samples and establish a disease image classification system. The recognition rate of the network model can reach more than 95%. Xue et al. [15] proposed an automatic calculation method for the leakage area based on the tunnel surface image data set. After constructing the leakage segmentation model based on deep learning, three optimization measures were adopted: data enhancement, migration learning, and cascade strategy. It is very helpful to improve the segmentation performance of the original model.Research on the application of deep learning technology to tunnel quality inspection [16] has gradually increased in recent years, but most of the studies are on the surface of tunnels or highways, and there are relatively few quality inspections on the interior of tunnel linings [17]. During the construction and operation of the tunnel, various defects will appear inside the lining. The safety of the tunnel lining is related to the safety of the entire tunnel. In this paper, the radar image of tunnel lining defects is used as the target object, and the deep learning method is used to identify the defects of tunnel lining. Deep learning methods are more intelligent than traditional recognition methods and do not need to manually design image features. This paper uses the excellent VGG16 and ResNet34 recognition networks for comparative research and proposes an improved ResNet network based on the ResNet34 network. The improved network has higher accuracy than the first two networks and uses fewer model parameters than the ResNet34 network. The second section of this article mainly introduces the data set and data preprocessing. The research data mainly uses incompact and hollow images, and the data is enhanced through methods such as cropping, mirror flipping, and adding noise. Section 3 gives an overview of the convolutional neural network and analyzes the structure and function of each network layer of the classic convolutional neural network. At the same time, the main deep learning classification network of VGG16 and ResNet and the improved network proposed in this paper are also studied. Section 4 mainly verifies the recognition effect of different network models through simulation experiments. The experimental results show the effectiveness of the deep learning method in the identification of tunnel lining defects, and it has a high accuracy rate. Moreover, the improved network proposed in this paper has a better effect in the identification of tunnel defects and can be used as a reference method for later tunnel lining inspection and maintenance.


## 2. Establishment of Image Data Set

Deep learning and big data play a more and more important role in the field of artificial intelligence and have been widely used [18–20]. Data samples are the most important and indispensable part of deep learning. Network models need to learn the characteristic information in data samples to continuously evolve their models. At the same time, sufficient high-quality data can improve the robustness of the network model to the data and can also avoid network overfitting [21].


### 2.1. Data Source

The experimental data comes from a railway bureau in Xi’an. The experimental data are images obtained by scanning the interior of the tunnel lining with ground-penetrating radar equipment. In this experiment, two common disease images of voids and inconsistencies in the lining are selected as the research objects. Figure1 shows two images randomly selected from the data. Figure 1(a) is a radar image with void defects, and Figure 1(b) is a radar image with imperfect defects. Images without defects are usually dense images with weak signal amplitude or even no interface signal. For imperfect defect images, the in-phase axis of the strong reflection signal at the lining interface is a diffracted arc, which is discontinuous and relatively scattered. For void defects, the lining interface has a strong reflection signal, the three-oscillation phase is obvious, and there is still a strong reflection interface signal in the lower part, and the two sets of signals have a large time path difference.Figure 1
Scanned image of ground-penetrating radar: (a) a radar image with void defects; (b) a radar image with imperfect defects.
(a)(b)


### 2.2. Data Preprocessing

(1)
Data enhancement. Training deep networks in deep learning requires a lot of data. This experiment uses data enhancement methods such as cropping, mirror flipping, and noise addition to amplify data samples, as shown in Figure2. Geometric transformation methods such as cropping and mirror flipping can increase the space complexity of the disease. Adding salt and pepper noise to the sample can improve the robustness of the model. Using data augmentation methods to process sample data can allow the model to learn more and higher-level features of the data and improve the generalization ability of the model.Figure 2
Data enhancement methods: (a) original image; (b) mirror flip; (c) crop; (d) salt and pepper noise.
(a)(b)(c)(d)The disease image after data expansion has 1186 data samples, and the data samples are divided according to a certain proportion. Finally, the number of data of training samples and test samples is randomly selected to be 950 and 236, respectively. The classification of the data set is shown in Table1.
(2)
Batch normalization. In order to improve the training speed, the training method of deep neural networks is usually carried out in batch training. This method will cause different batches of data in the output layer of each layer of the network to have a different data distribution, which will cause the following training of a layer of network to become difficult, which makes the convergence speed of the model slow. In order to solve the problem of inconsistent input data distribution, Ding et al. [22] proposed a method of batch normalization. If a certain layer of network batch input data is B=x1⋯m, x1,x2⋯xm is the m data in a batch, γ,β are the parameter to be learned, and the output is yi=BNγβxi; then, the batch normalization can be performed by(1)μB⟵1m∑i=1mxi,σB2⟵1m∑i=1mxi−μB2,x^i⟵xi−μBσB2+ε,yi⟵γx^i+β≡BNγβxi.Table 1
Classification and size of the data set.
CategoryLabelTraining samplesTest samplesTotalNot dense0470117587Escape1480119599In formula (1), μB and σB2 are the values obtained by the network during the forward propagation process, representing the mean and variance of each dimension, respectively. The value of ε in the formula is relatively small to prevent zero in the denominator. The two parameters γ and β are the parameters learned in the backpropagation process to adjust the variance and mean. After batch normalization, the convergence speed and accuracy of the model can be further improved.


## 2.1. Data Source

The experimental data comes from a railway bureau in Xi’an. The experimental data are images obtained by scanning the interior of the tunnel lining with ground-penetrating radar equipment. In this experiment, two common disease images of voids and inconsistencies in the lining are selected as the research objects. Figure1 shows two images randomly selected from the data. Figure 1(a) is a radar image with void defects, and Figure 1(b) is a radar image with imperfect defects. Images without defects are usually dense images with weak signal amplitude or even no interface signal. For imperfect defect images, the in-phase axis of the strong reflection signal at the lining interface is a diffracted arc, which is discontinuous and relatively scattered. For void defects, the lining interface has a strong reflection signal, the three-oscillation phase is obvious, and there is still a strong reflection interface signal in the lower part, and the two sets of signals have a large time path difference.Figure 1
Scanned image of ground-penetrating radar: (a) a radar image with void defects; (b) a radar image with imperfect defects.
(a)(b)


## 2.2. Data Preprocessing

(1)
Data enhancement. Training deep networks in deep learning requires a lot of data. This experiment uses data enhancement methods such as cropping, mirror flipping, and noise addition to amplify data samples, as shown in Figure2. Geometric transformation methods such as cropping and mirror flipping can increase the space complexity of the disease. Adding salt and pepper noise to the sample can improve the robustness of the model. Using data augmentation methods to process sample data can allow the model to learn more and higher-level features of the data and improve the generalization ability of the model.Figure 2
Data enhancement methods: (a) original image; (b) mirror flip; (c) crop; (d) salt and pepper noise.
(a)(b)(c)(d)The disease image after data expansion has 1186 data samples, and the data samples are divided according to a certain proportion. Finally, the number of data of training samples and test samples is randomly selected to be 950 and 236, respectively. The classification of the data set is shown in Table1.
(2)
Batch normalization. In order to improve the training speed, the training method of deep neural networks is usually carried out in batch training. This method will cause different batches of data in the output layer of each layer of the network to have a different data distribution, which will cause the following training of a layer of network to become difficult, which makes the convergence speed of the model slow. In order to solve the problem of inconsistent input data distribution, Ding et al. [22] proposed a method of batch normalization. If a certain layer of network batch input data is B=x1⋯m, x1,x2⋯xm is the m data in a batch, γ,β are the parameter to be learned, and the output is yi=BNγβxi; then, the batch normalization can be performed by(1)μB⟵1m∑i=1mxi,σB2⟵1m∑i=1mxi−μB2,x^i⟵xi−μBσB2+ε,yi⟵γx^i+β≡BNγβxi.Table 1
Classification and size of the data set.
CategoryLabelTraining samplesTest samplesTotalNot dense0470117587Escape1480119599In formula (1), μB and σB2 are the values obtained by the network during the forward propagation process, representing the mean and variance of each dimension, respectively. The value of ε in the formula is relatively small to prevent zero in the denominator. The two parameters γ and β are the parameters learned in the backpropagation process to adjust the variance and mean. After batch normalization, the convergence speed and accuracy of the model can be further improved.


## 3. Classification Method of Tunnel Lining Defects

### 3.1. Convolutional Neural Network

In the image recognition and target detection competitions, many network models are built on the basis of CNN [23] and have shown good performance. The CNN network contains multiple links. The main operations are carried out by convolution and pooling. The pooling layer is generally located behind the convolutional layer. The depth of the network can be achieved by superimposing the number of convolutional and pooling layers, as shown in Figure 3. Shown is a model diagram of a convolutional neural network.Figure 3
Convolutional neural network (CNN). The convolutional neural network is mainly composed of an input layer, two convolutional layers, two pooling layers, two fully connected layers, and an output layer.Input layer: the input layer is the data entry. Generally, a series of simple preprocessing will be performed on the data before it is “feed” to the network through the input layer. The image is cropped to a suitable size, or the image is changed from multichannel to single-channel.Convolutional layer: the constituent unit of the convolutional layer is the feature surface. The feature surface is obtained by a convolution operation at the convolution input level from a weight matrix, which is also called a convolution kernel. The role of the convolutional layer is also different, the low level is used to learn low-level features, and the high level is used to learn high-level features [24]. Wani et al. [25] also mentioned in their report (1) increasing the depth of the CNN network helps to improve the accuracy of the model and (2) increasing the number of convolutional layers is better than fully connected layers. Figure 4 shows an example of the convolution operation performed by the convolution layer. In the convolution operation, the depth and width of the input feature map can be adjusted by changing the size and number of the convolution kernel. In the example in Figure 4, the stride is 1, the padding is 0, the size of the input data is 4×4, the size of the filter is 3×3, and the size of the output data is 2×2. Both the input data and the output data have shapes. For the shape of the output data, it can be calculated according to formula (2): assuming that the padding is P, the stride is S, the size of the input data is HxW, the size of the filter is FHxFW, and the size of the output data is denoted as H1xW1:
(2)H1=H+2P−FHS+1,W1=H+2P−FWS+1.Figure 4
Example of convolution operation: in this example, “⊗” is used to indicate convolution operation. The input data size is 4×4, the size of the convolution kernel is 3×3, and the output result is obtained by convolution by the input data kernel convolution kernel.Pooling layer: the pooling layer plays the role of secondary extraction of features. The pooling layer is also called the downsampling layer. After the pooling operation, the resolution of the feature surface will be reduced. In other words, the operation will reduce the number of neurons on the characteristic surface but does not change its depth. There are many methods of pooling. Maximum pooling and average pooling are two of the commonly used methods. Other methods include hybrid pooling and spatial pyramid methods. Boureau et al. compared and analyzed the two commonly used methods of maximum pooling and average pooling. They believe that when the classification layer selects a linear classifier, the performance of the maximum pooling method is better than the average pooling method. Figure5 shows an example of the maximum pooling operation. There are no parameters to be learned in the pooling layer, and the number of channels does not change after the pooling operation. The data shape after pooling can be calculated by referring to formula (2).Figure 5
Pooling operation example. In this convolution example, the size of the input data is4×4, the size of the pooling kernel is 3×3, and the size of the output data is 2×2.Fully connected layer: the fully connected layer is a tiled structure and is located at the end of the network model diagram. It can integrate the local feature information learned by the previous network layer to facilitate subsequent classification tasks. Because softmax has the advantages of high accuracy and small amount of calculation, it is often used as the preferred function of classification networks. The loss function usually adopts the cross-entropy loss function.Other layers: (1) incentive layer. Whether it is used in the convolutional layer or the fully connected layer, the excitation layer can map the output of the previous network to the nonlinear region, thereby enhancing the expressive power of the neural network. Early activation functions mostly used sigmoid. Due to the high computational cost of sigmoid, the gradient disappeared easily. Nowadays, ReLU is used more frequently. ReLU function as a nonlinear excitation function can control the gradient explosion and gradient disappearance phenomenon in the training process. Table2 shows the commonly used activation functions.Table 2
Four commonly used activation functions and their mathematical expressions in CNN.
FunctionMathematical formulaSigmoidhx=11+e−xTanhhx=ex−e−xex+e−xReLUhx=max0,xLeaky ReLUhx=αx,x≤0x,x>0(2) Random inactivation layer (dropout): random inactivation is a regularization method often used in fully connected layers. This technique is to randomly inactivate neurons at a certain rate. Reducing the interaction between neurons in the hidden layer can make the model more generalized and make the neurons learn more robust characteristics, and it is also an effective measure to avoid network overfitting.


### 3.2. VGG16, ResNet34 Network Model

(1)
VGG16 network model. The VGG model achieved good results in the ILSVRC competition that year. VGG16 is one of the VGG models. Because of its excellent performance, it is used by many people who study image classification. Figure6 shows the network architecture diagram of VGG16.Figure 6
VGG16 network model. There are 16 layers in the network, and the squares in different colors in the figure represent the network layers with different functions.The VGG16 network deepens the depth of the network by superimposing the convolutional layer and the pooling layer and uses a3×3 filter in all its layers, which can extract smaller features in the picture. The receptive field obtained by two 3×3 filters can replace the receptive field of a 5×5 filter and can reduce the number of parameters. The network model increases the receptive field by stacking multiple convolutional layers. The number of layers stacked in the VGG16 network has two and three layers. The model contains 5 pooling layers, using a 2×2 filter to perform maximum pooling, and the step size is 2. Since the categories in this study are two types, in order to reduce the number of parameters and accelerate training, the first two layers in the fully connected layer of the network are changed to 2048 channels, and the third layer is changed to 2 channels.
(2)
The ResNet network refreshes the history of convolutional neural network depth, with a depth of up to 152 layers, which solves the problems of difficulty in training deep CNN models and network model degradation. ResNet34 is one type of ResNet network, and the structure is shown in Figure7(a). This network is different from the previous deep network, not simply by superimposing the convolutional layer and the pooling layer, but introduces a residual block, the module structure diagram is shown in Figure 8(a).Figure 7
Network model. (a) ResNet34 network, except for the head and tail, the size of the convolution kernel of the network model is all3×3. The 34-layer network is obtained by superimposing similar modules. (b) Improved ResNet34 network, which uses 5×5 convolution kernel in addition to 3×3 convolution kernel.
(a)(b)Figure 8
Residual module. (a) The original residual module, which consists of two layers of networks, the output of the first layer of network isFx, and the output of the second layer of network is Fx+x. (b) The improved residual module, the network output of this module is F1x+F2x+x.
(a)(b)The neural network extracts more features by continuously deepening the degree of the network, which is considered to be a way to improve the accuracy. However, as the network deepens, the gradient disappears or the gradient explodes during the backpropagation of the network and the network is a degradation phenomenon; these factors cause the network to deepen and the accuracy cannot be improved or may even decrease.Gradient disappearance or gradient explosion can be processed by data preprocessing and weight initialization, and network degradation can be solved by residual module. Formally useHx to represent the desired mapping and use stacked nonlinear layers to fit the mapping Fx=Hx−x; then, the desired mappingHx is converted to Hx=Fx+x. Assuming that optimizing the residual mapping is easier than optimizing the original mapping, then in extreme cases, pushing the residual to zero is simpler than approximating one mapping to another. Because the network has excellent performance in classification tasks, this paper chooses ResNet34 as one of the test networks to build a classification model of tunnel lining defect.


### 3.3. Improved Convolutional Neural Network Model

In the ResNet34 network, in addition to the7×7 convolution kernel used in the initial convolution part, the other convolution kernels use 3×3 convolution kernels, and the network also continuously extracts image features by stacking similar residual modules. Based on a large number of experiments, this article improves the ResNet34 network for the image of tunnel lining defects. There are two main areas of improvement as follows:
(1)
The residual module has been optimized and improved. In the improved residual module, a5×5 size convolution kernel has been added. The 5×5 convolution operation is paralleled with the 3×3 size convolution operation, which not only increases the width of the network but also improves the adaptability to different scale defect images. The improved residual module is shown in Figure 8(b)(2)
The number of layers of the network layer has been improved. On the basis of improving residual module, the convolution operation of different network layers has been modified to reduce the parameter complexity of the model. The improved model framework is shown in Figure7(b)


## 3.1. Convolutional Neural Network

In the image recognition and target detection competitions, many network models are built on the basis of CNN [23] and have shown good performance. The CNN network contains multiple links. The main operations are carried out by convolution and pooling. The pooling layer is generally located behind the convolutional layer. The depth of the network can be achieved by superimposing the number of convolutional and pooling layers, as shown in Figure 3. Shown is a model diagram of a convolutional neural network.Figure 3
Convolutional neural network (CNN). The convolutional neural network is mainly composed of an input layer, two convolutional layers, two pooling layers, two fully connected layers, and an output layer.Input layer: the input layer is the data entry. Generally, a series of simple preprocessing will be performed on the data before it is “feed” to the network through the input layer. The image is cropped to a suitable size, or the image is changed from multichannel to single-channel.Convolutional layer: the constituent unit of the convolutional layer is the feature surface. The feature surface is obtained by a convolution operation at the convolution input level from a weight matrix, which is also called a convolution kernel. The role of the convolutional layer is also different, the low level is used to learn low-level features, and the high level is used to learn high-level features [24]. Wani et al. [25] also mentioned in their report (1) increasing the depth of the CNN network helps to improve the accuracy of the model and (2) increasing the number of convolutional layers is better than fully connected layers. Figure 4 shows an example of the convolution operation performed by the convolution layer. In the convolution operation, the depth and width of the input feature map can be adjusted by changing the size and number of the convolution kernel. In the example in Figure 4, the stride is 1, the padding is 0, the size of the input data is 4×4, the size of the filter is 3×3, and the size of the output data is 2×2. Both the input data and the output data have shapes. For the shape of the output data, it can be calculated according to formula (2): assuming that the padding is P, the stride is S, the size of the input data is HxW, the size of the filter is FHxFW, and the size of the output data is denoted as H1xW1:
(2)H1=H+2P−FHS+1,W1=H+2P−FWS+1.Figure 4
Example of convolution operation: in this example, “⊗” is used to indicate convolution operation. The input data size is 4×4, the size of the convolution kernel is 3×3, and the output result is obtained by convolution by the input data kernel convolution kernel.Pooling layer: the pooling layer plays the role of secondary extraction of features. The pooling layer is also called the downsampling layer. After the pooling operation, the resolution of the feature surface will be reduced. In other words, the operation will reduce the number of neurons on the characteristic surface but does not change its depth. There are many methods of pooling. Maximum pooling and average pooling are two of the commonly used methods. Other methods include hybrid pooling and spatial pyramid methods. Boureau et al. compared and analyzed the two commonly used methods of maximum pooling and average pooling. They believe that when the classification layer selects a linear classifier, the performance of the maximum pooling method is better than the average pooling method. Figure5 shows an example of the maximum pooling operation. There are no parameters to be learned in the pooling layer, and the number of channels does not change after the pooling operation. The data shape after pooling can be calculated by referring to formula (2).Figure 5
Pooling operation example. In this convolution example, the size of the input data is4×4, the size of the pooling kernel is 3×3, and the size of the output data is 2×2.Fully connected layer: the fully connected layer is a tiled structure and is located at the end of the network model diagram. It can integrate the local feature information learned by the previous network layer to facilitate subsequent classification tasks. Because softmax has the advantages of high accuracy and small amount of calculation, it is often used as the preferred function of classification networks. The loss function usually adopts the cross-entropy loss function.Other layers: (1) incentive layer. Whether it is used in the convolutional layer or the fully connected layer, the excitation layer can map the output of the previous network to the nonlinear region, thereby enhancing the expressive power of the neural network. Early activation functions mostly used sigmoid. Due to the high computational cost of sigmoid, the gradient disappeared easily. Nowadays, ReLU is used more frequently. ReLU function as a nonlinear excitation function can control the gradient explosion and gradient disappearance phenomenon in the training process. Table2 shows the commonly used activation functions.Table 2
Four commonly used activation functions and their mathematical expressions in CNN.
FunctionMathematical formulaSigmoidhx=11+e−xTanhhx=ex−e−xex+e−xReLUhx=max0,xLeaky ReLUhx=αx,x≤0x,x>0(2) Random inactivation layer (dropout): random inactivation is a regularization method often used in fully connected layers. This technique is to randomly inactivate neurons at a certain rate. Reducing the interaction between neurons in the hidden layer can make the model more generalized and make the neurons learn more robust characteristics, and it is also an effective measure to avoid network overfitting.


## 3.2. VGG16, ResNet34 Network Model

(1)
VGG16 network model. The VGG model achieved good results in the ILSVRC competition that year. VGG16 is one of the VGG models. Because of its excellent performance, it is used by many people who study image classification. Figure6 shows the network architecture diagram of VGG16.Figure 6
VGG16 network model. There are 16 layers in the network, and the squares in different colors in the figure represent the network layers with different functions.The VGG16 network deepens the depth of the network by superimposing the convolutional layer and the pooling layer and uses a3×3 filter in all its layers, which can extract smaller features in the picture. The receptive field obtained by two 3×3 filters can replace the receptive field of a 5×5 filter and can reduce the number of parameters. The network model increases the receptive field by stacking multiple convolutional layers. The number of layers stacked in the VGG16 network has two and three layers. The model contains 5 pooling layers, using a 2×2 filter to perform maximum pooling, and the step size is 2. Since the categories in this study are two types, in order to reduce the number of parameters and accelerate training, the first two layers in the fully connected layer of the network are changed to 2048 channels, and the third layer is changed to 2 channels.
(2)
The ResNet network refreshes the history of convolutional neural network depth, with a depth of up to 152 layers, which solves the problems of difficulty in training deep CNN models and network model degradation. ResNet34 is one type of ResNet network, and the structure is shown in Figure7(a). This network is different from the previous deep network, not simply by superimposing the convolutional layer and the pooling layer, but introduces a residual block, the module structure diagram is shown in Figure 8(a).Figure 7
Network model. (a) ResNet34 network, except for the head and tail, the size of the convolution kernel of the network model is all3×3. The 34-layer network is obtained by superimposing similar modules. (b) Improved ResNet34 network, which uses 5×5 convolution kernel in addition to 3×3 convolution kernel.
(a)(b)Figure 8
Residual module. (a) The original residual module, which consists of two layers of networks, the output of the first layer of network isFx, and the output of the second layer of network is Fx+x. (b) The improved residual module, the network output of this module is F1x+F2x+x.
(a)(b)The neural network extracts more features by continuously deepening the degree of the network, which is considered to be a way to improve the accuracy. However, as the network deepens, the gradient disappears or the gradient explodes during the backpropagation of the network and the network is a degradation phenomenon; these factors cause the network to deepen and the accuracy cannot be improved or may even decrease.Gradient disappearance or gradient explosion can be processed by data preprocessing and weight initialization, and network degradation can be solved by residual module. Formally useHx to represent the desired mapping and use stacked nonlinear layers to fit the mapping Fx=Hx−x; then, the desired mappingHx is converted to Hx=Fx+x. Assuming that optimizing the residual mapping is easier than optimizing the original mapping, then in extreme cases, pushing the residual to zero is simpler than approximating one mapping to another. Because the network has excellent performance in classification tasks, this paper chooses ResNet34 as one of the test networks to build a classification model of tunnel lining defect.


## 3.3. Improved Convolutional Neural Network Model

In the ResNet34 network, in addition to the7×7 convolution kernel used in the initial convolution part, the other convolution kernels use 3×3 convolution kernels, and the network also continuously extracts image features by stacking similar residual modules. Based on a large number of experiments, this article improves the ResNet34 network for the image of tunnel lining defects. There are two main areas of improvement as follows:
(1)
The residual module has been optimized and improved. In the improved residual module, a5×5 size convolution kernel has been added. The 5×5 convolution operation is paralleled with the 3×3 size convolution operation, which not only increases the width of the network but also improves the adaptability to different scale defect images. The improved residual module is shown in Figure 8(b)(2)
The number of layers of the network layer has been improved. On the basis of improving residual module, the convolution operation of different network layers has been modified to reduce the parameter complexity of the model. The improved model framework is shown in Figure7(b)


## 4. Experiments

### 4.1. Training Algorithm and Hyperparameter Settings

The training algorithm of the network model uses two algorithms, SGD and Adam, and verifies the performance of the two algorithms on ResNet34, VGG16, and the improved ResNet34 convolutional neural network.(1)
SGD and Adam algorithm. The SGD algorithm is what we often call the stochastic gradient descent method. We can understand the idea of the algorithm like this: if we want to solve the minimum value of a loss functionJw, we need to givew a random initial value and then follow a certain strategy that keeps changing the value of w so that the function Jw keeps approaching the minimum value. Later, many update algorithms are improved by this algorithm. In the process of parameter update, the minibatch method is usually used to update the parameters. The loss of multiple samples is used as the total loss. The gradient descent method makes the network parameters along the direction of the fastest descending speed updated, so as to achieve the goal of continuously reducing the loss function Jw. The update strategy of the parameter w is as in(3)W⟵W−η∂L∂W.In the update strategy (formula (3)), W is the weight parameter of the network, L is the loss function of the network, and η is the learning rate (usually 0.001). Through this formula, the parameters can be updated in the direction of the fastest decline.The Adam algorithm has many similarities with the SGD algorithm, and its main purpose is to find a suitable parameterw according to a certain algorithm strategy, so that Jw can be minimized. Different from the stochastic gradient descent method, the Adam algorithm automatically adjusts the learning rate in the process of updating the network parameters. The SGD learning rate is manually set. In the process of network learning, the learning rate will not change automatically. The size of the Adam learning rate is closely related to the first-order moment estimation and the second-order estimation of the gradient. This algorithm has high computational efficiency and combines the advantages of AdaGrad and RMSProp algorithms. The update strategy of the Adam algorithm is as shown in
(4)m⟵β1∗m+1−β1∗∂L∂W,v⟵β2∗v+1−β2∗∂L∂W2,w⟵w−ηmv.In formula (4) m andv are the first and second moments of the gradient. L, w, andη are the loss function, network parameters, and learning rate, respectively. β1 and β2 are the attenuation coefficients of the first and second moments, respectively. The two-parameter values are usually 0.9 and 0.999 by default.
(2)
Hyperparameter setting. SGD: the number of training rounds (epoch) is 500, the batch size is 32, and the initial learning rate is set to 0.001. The Adam algorithm parameters are set to the following: the number of training rounds (epoch) is 80, the batch size is 32, and the initial learning rate is set to 0.001. Based on a large number of experiments, the dropout value of the VGG16 fully connected layer is set to 0.5. The activation function uses the ReLU function, and the loss function uses the cross-entropy function.


### 4.2. Experiment Configuration

The experiment was carried out on a computer with the ubuntu18.04 operating system. The computer used was Intel Xeon E5-2678 v3, 32 G random access memory, and equipped with an NVIDIA GeForce RTX 2080 (8 G graphics memory). This experiment is to train the network on the GPU [26], using the PyTorch deep learning framework. PyTorch is a deep learning framework developed by the Facebook artificial intelligence laboratory. Its interface is very easy to use, and the speed of the model is also excellent. In the process of reading the data, the transform module in PyTorch is used to cut the data, and at the same time, the data is standardized. Use dataset to load image data. After reading the image data, use the parallel computing capability of GPU to train the network by batch training. The last classification layer of the network structure uses the softmax classifier and uses the cross-entropy function as the loss function to evaluate the gap between the predicted value and the true value.


### 4.3. Result Analysis

(1)
Comparative analysis of the experimental results of VGG16 and ResNet34. The training results are shown in Figure9 and Table 3. Whether from Figure 9(a) or Figure 9(b), it can be seen that during the training process, the network loss and the test accuracy rate as a whole show a downward and upward trend, respectively. It shows that the network is always learning. Comparing Figure 9(a) and Figure 9(b), we can see that the Adam algorithm performs better than the SGD algorithm, has a higher accuracy rate, and can avoid the problem of large fluctuations in the loss function during the parameter update process. The Adam algorithm can automatically adjust the learning rate of the algorithm. Based on the relevant information in the figure and table, we can conclude that the ResNet34 network converges faster than the VGG16 network, has higher accuracy, and trains the network faster. The ResNet34 network with the Adam training algorithm can achieve 99.08% recognition. Therefore, in this experiment, the ResNet34 network can be considered as an alternative to constructing the tunnel lining defect network.(2)
Comparative analysis of ResNet34 and improved ResNet34 network. The experimental results of the two networks are shown in Figure10 and Table 3. As can be seen from Figure 10(a), the recognition effect of the two networks is very good when the Adam algorithm is used. It can be seen from Table 3 that the improved network has a 0.17% improvement in recognition rate, and it is the network with the highest recognition rate among all the networks listed in Table 3, which can reach a recognition rate of 99.25%. The convergence speed of the two networks on the SGD algorithm is not as fast as the Adam algorithm, but the improved Resnet34 has a greater improvement in the recognition rate compared to the ResNet34, and the recognition accuracy is increased by 1.84%. In general, the improved network is better in the accuracy of lining defect recognition. In addition to some improvements in recognition accuracy, the improved network has fewer model parameters and lower computational complexity and occupies less computer resources. The model parameters of the two models are shown in Table 4. Compared with the original network, the improved network reduces the parameter amount by 4.22%, which can reduce the training cost of the network to a certain extent.Figure 9
The loss and accuracy graphs of VGG16 and ResNet34: (a) network loss and accuracy curve diagram under the Adam algorithm; (b) graph of network loss and accuracy under the SGD algorithm.
(a)(b)Table 3
Training results.
NetworkAlgorithmParameter settingsTime (min)Accuracy (%)VGG16SGDMomentum=0120.3394.82VGG16Adamβ1=0.9, β2=0.99927.0994.93ResNet34SGDMomentum=083.1593.58ResNet34Adamβ1=0.9, β2=0.99912.3599.08Improved ResNetSGDMomentum=087.0295.42Improved ResNetAdamβ1=0.9, β2=0.99913.0799.25Figure 10
The loss and accuracy graphs of ResNet34 and improved ResNet34 (New ResNet): (a) network loss and accuracy curve diagram under the Adam algorithm; (b) graph of network loss and accuracy under the SGD algorithm.
(a)(b)Table 4
Parameters of different models.
NetworkNumber of parametersResNet3421,285,698Improved ResNet3420,386,626


## 4.1. Training Algorithm and Hyperparameter Settings

The training algorithm of the network model uses two algorithms, SGD and Adam, and verifies the performance of the two algorithms on ResNet34, VGG16, and the improved ResNet34 convolutional neural network.(1)
SGD and Adam algorithm. The SGD algorithm is what we often call the stochastic gradient descent method. We can understand the idea of the algorithm like this: if we want to solve the minimum value of a loss functionJw, we need to givew a random initial value and then follow a certain strategy that keeps changing the value of w so that the function Jw keeps approaching the minimum value. Later, many update algorithms are improved by this algorithm. In the process of parameter update, the minibatch method is usually used to update the parameters. The loss of multiple samples is used as the total loss. The gradient descent method makes the network parameters along the direction of the fastest descending speed updated, so as to achieve the goal of continuously reducing the loss function Jw. The update strategy of the parameter w is as in(3)W⟵W−η∂L∂W.In the update strategy (formula (3)), W is the weight parameter of the network, L is the loss function of the network, and η is the learning rate (usually 0.001). Through this formula, the parameters can be updated in the direction of the fastest decline.The Adam algorithm has many similarities with the SGD algorithm, and its main purpose is to find a suitable parameterw according to a certain algorithm strategy, so that Jw can be minimized. Different from the stochastic gradient descent method, the Adam algorithm automatically adjusts the learning rate in the process of updating the network parameters. The SGD learning rate is manually set. In the process of network learning, the learning rate will not change automatically. The size of the Adam learning rate is closely related to the first-order moment estimation and the second-order estimation of the gradient. This algorithm has high computational efficiency and combines the advantages of AdaGrad and RMSProp algorithms. The update strategy of the Adam algorithm is as shown in
(4)m⟵β1∗m+1−β1∗∂L∂W,v⟵β2∗v+1−β2∗∂L∂W2,w⟵w−ηmv.In formula (4) m andv are the first and second moments of the gradient. L, w, andη are the loss function, network parameters, and learning rate, respectively. β1 and β2 are the attenuation coefficients of the first and second moments, respectively. The two-parameter values are usually 0.9 and 0.999 by default.
(2)
Hyperparameter setting. SGD: the number of training rounds (epoch) is 500, the batch size is 32, and the initial learning rate is set to 0.001. The Adam algorithm parameters are set to the following: the number of training rounds (epoch) is 80, the batch size is 32, and the initial learning rate is set to 0.001. Based on a large number of experiments, the dropout value of the VGG16 fully connected layer is set to 0.5. The activation function uses the ReLU function, and the loss function uses the cross-entropy function.


## 4.2. Experiment Configuration

The experiment was carried out on a computer with the ubuntu18.04 operating system. The computer used was Intel Xeon E5-2678 v3, 32 G random access memory, and equipped with an NVIDIA GeForce RTX 2080 (8 G graphics memory). This experiment is to train the network on the GPU [26], using the PyTorch deep learning framework. PyTorch is a deep learning framework developed by the Facebook artificial intelligence laboratory. Its interface is very easy to use, and the speed of the model is also excellent. In the process of reading the data, the transform module in PyTorch is used to cut the data, and at the same time, the data is standardized. Use dataset to load image data. After reading the image data, use the parallel computing capability of GPU to train the network by batch training. The last classification layer of the network structure uses the softmax classifier and uses the cross-entropy function as the loss function to evaluate the gap between the predicted value and the true value.


## 4.3. Result Analysis

(1)
Comparative analysis of the experimental results of VGG16 and ResNet34. The training results are shown in Figure9 and Table 3. Whether from Figure 9(a) or Figure 9(b), it can be seen that during the training process, the network loss and the test accuracy rate as a whole show a downward and upward trend, respectively. It shows that the network is always learning. Comparing Figure 9(a) and Figure 9(b), we can see that the Adam algorithm performs better than the SGD algorithm, has a higher accuracy rate, and can avoid the problem of large fluctuations in the loss function during the parameter update process. The Adam algorithm can automatically adjust the learning rate of the algorithm. Based on the relevant information in the figure and table, we can conclude that the ResNet34 network converges faster than the VGG16 network, has higher accuracy, and trains the network faster. The ResNet34 network with the Adam training algorithm can achieve 99.08% recognition. Therefore, in this experiment, the ResNet34 network can be considered as an alternative to constructing the tunnel lining defect network.(2)
Comparative analysis of ResNet34 and improved ResNet34 network. The experimental results of the two networks are shown in Figure10 and Table 3. As can be seen from Figure 10(a), the recognition effect of the two networks is very good when the Adam algorithm is used. It can be seen from Table 3 that the improved network has a 0.17% improvement in recognition rate, and it is the network with the highest recognition rate among all the networks listed in Table 3, which can reach a recognition rate of 99.25%. The convergence speed of the two networks on the SGD algorithm is not as fast as the Adam algorithm, but the improved Resnet34 has a greater improvement in the recognition rate compared to the ResNet34, and the recognition accuracy is increased by 1.84%. In general, the improved network is better in the accuracy of lining defect recognition. In addition to some improvements in recognition accuracy, the improved network has fewer model parameters and lower computational complexity and occupies less computer resources. The model parameters of the two models are shown in Table 4. Compared with the original network, the improved network reduces the parameter amount by 4.22%, which can reduce the training cost of the network to a certain extent.Figure 9
The loss and accuracy graphs of VGG16 and ResNet34: (a) network loss and accuracy curve diagram under the Adam algorithm; (b) graph of network loss and accuracy under the SGD algorithm.
(a)(b)Table 3
Training results.
NetworkAlgorithmParameter settingsTime (min)Accuracy (%)VGG16SGDMomentum=0120.3394.82VGG16Adamβ1=0.9, β2=0.99927.0994.93ResNet34SGDMomentum=083.1593.58ResNet34Adamβ1=0.9, β2=0.99912.3599.08Improved ResNetSGDMomentum=087.0295.42Improved ResNetAdamβ1=0.9, β2=0.99913.0799.25Figure 10
The loss and accuracy graphs of ResNet34 and improved ResNet34 (New ResNet): (a) network loss and accuracy curve diagram under the Adam algorithm; (b) graph of network loss and accuracy under the SGD algorithm.
(a)(b)Table 4
Parameters of different models.
NetworkNumber of parametersResNet3421,285,698Improved ResNet3420,386,626


## 5. Conclusions

In this paper, in order to automatically identify the defects in tunnel lining, a method based on deep learning is proposed. For this purpose, we established a defect image dataset and conducted theoretical research and experimental analysis on the existing VGG16 and ResNet34 network models. At the same time, this paper proposes an improved network based on the ResNet34 network, which further improves the accuracy of the recognition of lining defect images. The contribution of this article mainly includes the following aspects:(1)
This paper uses data enhancement and data preprocessing to process the lining defect image, effectively avoiding the network overfitting problem. The former is mainly used to increase the number of training samples, and the latter is used to adjust the data distribution in the network learning process. They greatly improve the learning effect of the network model(2)
This paper uses the deep learning method to identify the defects of the tunnel lining and verifies it by building an existing network model. The experimental results show the effectiveness and feasibility of the deep learning method in the identification of tunnel lining. It provides a new idea and new method for the detection of the interior of the tunnel lining(3)
Based on the existing network model, an improved network model is proposed. Compared with the original model, this model not only improves the recognition rate of lining defects but also reduces the number of model parametersThis article uses deep learning methods and improved network models to achieve very good results in the identification of tunnel lining defects. Since this research uses deep learning technology, the more data, the better the recognition effect. The more target types, the better the advantages of deep learning technology can be used. As there are relatively few data related to this research direction, collecting more data is one of the next steps in research work.



---

*Source: 9070182-2021-09-30.xml*