# Research on Lung Nodule Detection Based on Improved Target Detection Network

Authors: Ye Li; Qian Wu; Hongwei Sun; Xuewei Wang
Journal: Complexity
 (2020)

---

## Abstract

Lung nodules are an early symptom of lung cancer. The earlier they are found, the more beneficial it is for treatment. However, in practice, Chinese doctors are likely to cause misdiagnosis. Therefore, deep learning is introduced, an improved target detection network is used, and public datasets are used to diagnose and identify lung nodules. This paper selects the Mask-RCNN network and uses the dense block structure of Densenet and the channel shuffle convolution method to improve the Mask-RCNN network. The experimental results prove that proposed algorithm is extremely effective.


---

## Body

## 1. Introduction

Pulmonary nodules [1, 2] are the result of the competition between unknown antigens and the body’s cellular and humoral immune functions. It is very harmful to the human body. It is an early manifestation of lung cancer [3]. It usually appears as a circle in medical imaging. Shape or round shape, the lung tissue is complex, and it is difficult to distinguish lung nodules from blood vessels and bronchus in chest tissue very accurately based on the experience of clinicians and film readers. Vascular adhesion type and subpleural type are even more difficult in the screening of lung cancer.In recent years, with the development of computer vision [4, 5] and artificial intelligence, the application of machine learning in medical image detection [6, 7] has also increased, among which machine learning is used in lung nodule detection the target detection network in deep learning [8, 9] can accurately locate the location of the region of interest and return its category. The common ones are R-CNN [10] series, SSD, and YOLO [11] series, among which R-CNN series mainly include R-CNN, fast R-CNN [12, 13], faster R-CNN, and Mask R-CNN [14, 15]. The advantage of the R-CNN series of target detection networks is that the detection accuracy is high, but the disadvantage is that the detection time is long. The later SSD and YOLO series networks have fast detection speeds, but the accuracy is low; the accuracy of the YOLO-V3 network [16, 17] has been greatly improved. In terms of comprehensive detection speed and detection accuracy, YOLO-V3 network is often used.In this paper, the YOLO-V3 target detection network in deep learning is selected and the network is improved. The reference network in the YOLO-V3 network is replaced with the SEnet network [18, 19], and the LIDC-IDRI public tuberculosis dataset [20] is used as the training dataset of the network. The trained network surpasses other target detection models and the unimproved YOLO-V3 network in many performances.The rest of the paper is organized as follows. In Section2, we introduce R-CNN network. In Section 3, an example is given to demonstrate the effectiveness of our method. In Section 4, the conclusions and future directions are given.


## 2. Network Improvement

This paper selects the mask R-CNN network, which has a higher accuracy rate in the field of medical imaging among many models. The following introduces the Mask R-CNN network and its specific improvement methods.


### 2.1. Introduction to the Dataset

This paper selects the LIDC-IDRI public tuberculosis dataset as the training set of the network. The dataset is composed of chest medical image files (such as CT and X-ray film) and corresponding diagnosis result lesion labels. The data was collected by the National Cancer Institute (National Cancer Institute) in order to study early cancer detection in high-risk populations. This dataset contains a total of 1018 research examples. For the images in each example, four experienced thoracic radiologists performed a two-stage diagnosis and annotation. In the first stage, each physician independently diagnosed and marked the location of the patient. Three categories were marked: (1) ≥3 mm nodules, (2) <3 mm nodules, and (3) ≥3 mm nonnodules. In the subsequent second stage, each physician independently reviewed the labels of the other three physicians and gave their final diagnosis results. Such two-stage labeling can label all results as completely as possible while avoiding forced consensus. The image file is in Dicom format, which is a standard format for medical images. In addition to image pixels, there are some auxiliary metadata such as image type, image time, and other information. A CT image has 512 × 512 pixels. Figure1 is two randomly selected CT images.Figure 1
Picture of LIDC-IDRI data set.
(a)(b)


### 2.2. Mask R-CNN Network

The detection of medical images pays more attention to the model performance. When the speed can meet the requirements, a network with higher detection accuracy should be selected as far as possible. The Mask R-CNN network is a highly accurate network, and its specific structure is shown in Figure2.Figure 2
Mask R-CNN network structure.Among them, CNN represents the benchmark network of the Mask R-CNN network, RPN represents the generation of the suggestion window network, ROIAlign represents the use of bilinear interpolation to obtain the region in the feature map corresponding to the ROI in the original image, the correspondence between the coordinates is preserved, and the mask branch represents FCN Internet.It can be seen from the network structure that the mask R-CNN network finally outputs the results through two branches, the first branch outputs the background and object segmentation results, and the second branch outputs the classification and coordinate results. However, the benchmark network of the mask R-CNN network is the residual network, and it is not the best.


### 2.3. Improve Mask R-CNN Network

Densenet network is an improvement of residual network, which is a convolutional neural network with dense connections. In this network, there is a direct connection between any two layers, that is, the input of each layer of the network is the union of the outputs of all previous layers, and the feature map learned by this layer will also be directly passed to all subsequent layers are used as input. Figure3 is a schematic diagram of Densenet’s dense block. The structure of a block is as follows, which is the same as bottleneck in the residual.Figure 3
Schematic diagram of dense block in Densenet.The Densenet network is made up of dense blocks, and its specific structure is shown in Figure4.Figure 4
Schematic diagram of Densenet structure.This paper selects the Densenet network as the reference network of the Mask R-CNN network, but the convolution method of the Densenet network will cause a lot of waste, and the experiment in this article is run on 3 GPUs, using the packet convolution method, in the packet volume. It is difficult to realize the information exchange between groups in the product. At the same time, the convolution method of the Densenet network will also cause a large amount of parameters. Therefore, this article uses the channel shuffle convolution method to reduce the amount of Densenet network parameters while also solving the grouping volume. There are many ways of product defects.The convolution method in channel shuffle convolution is not the same as the convolution of the Densenet network. In the convolution of the Densenet network, a set of convolution kernels is responsible for a set of feature maps, while in the channel shuffle convolution, a convolution kernel is responsible for a feature map, which can greatly reduce the amount of parameters, but this will cause the loss of information between the same group of data. The shuffle operation can solve the problem of noncommunication of information in the group, and the shuffle operation can solve the problem of group and group convolution., the defect of not communicating information between groups. Figure5 is a schematic diagram of channel shuffle, where input represents the input, GConv represents a grouped convolutional layer, Feature represents the feature map, and Output represents output.Figure 5
Schematic diagram of channel shuffle. (a) Grouped convolution. (b) Apply shuffle. (c) shuffle effect.
(a)(b)(c)Figure5(a) represents a grouped convolution, and three colors represent three groups. It can be seen that there is no information exchange between each group of grouped convolution, and Figure 5(b) is the application of shuffle process, and it can be seen that there is an order to exchange information. Figure 5(c) is after shuffle is applied, and it can be seen that there are other groups of information between each group.Change the convolution mode in the Densenet network to the channel shuffle convolution mode to get an improved network D-ShuffleNet network. In this paper, the D-ShuffleNet network is used as the reference network of the Mask R-CNN network to obtain the Per-T Mask R-CNN-II network.To verify that the improvements made in this article are correct, four groups of networks are used to verify on the same small dataset. The four networks are Pre-T + Mask R-CNN-II improved by adding D-ShuffleNet network. The Pre + Mask R-CNN-II improved by the Densenet network, Mask R-CNN-II, and Mask R-CNN networks that only use the channel shuffle convolution method; the results are shown in Figure6.Figure 6
Schematic diagram of the four network results.


### 2.4. Network Training Strategy

#### 2.4.1. Activation Function

Common activation functions include sigmoid, TANH, and Relu. The sigmoid function formula is as follows:(1)fx=11−e−x,in which x represents the input and represents output. The output range from formula (1) is 0,1, which is not a 0-centralized distraibution. During backpropagation, it is completely positive, so it will cause the weight parameter to update. The updated value is completely positive or completely negative. When the gradient is in the second or fourth quadrant, it will be difficult to find the optimal gradient. At the same time, since the gradient is close to 0, when the absolute value of the output value is large, the problem of gradient disappearance will be caused, and the sigmoid function will not be considered in general.Equation (2) is the TANH function, which is better than the SIGMOID function:(2)fx=1−e−2x1+e−2x.It can be concluded from the formula that the output range of the tanh function is−1,1, which solves the problem that the sigmoid function cannot be distributed with 0 centralization, but it still does not solve the problem of vanishing gradient.Equation (3) is the Relu function, which solves the problem(3)fx=x,x>0,0,x≤0.It can be concluded that when the input is greater than 0, the gradient is always 1, which solves the problem of gradient disappearance. However, some parameters with input less than 0 are all dead, and the output is 0.To solve the shortcomings of the Relu function, improvements were subsequently made. LReLU, PReLU, RReLU, and ELU appeared successively. The core idea of these four functions is to make the output not 0 when the output is less than 0 and then solve the parameter less than 0. For the death problem, this article uses the ELU transfer function:(4)fx=αex−1,x<0,x,x>0.


#### 2.4.2. Learning Rate

The initial value of the learning rate is usually set to 0.01, and it should be determined according to the actual situation. The usual practice is to set it to 0.01, and then initially iterate for about 10 epochs, generally checking the loss function and the transformation trend of accuracy if the loss can be reduced as well as increasing the accuracy rate; it means that the initial learning rate is generally appropriate. We can try several times to choose a good initial learning rate.The most common learning method is the step learning method. The learning rate is attenuated to one-tenth of the original every certain step size, which generally meets the requirements of a large learning rate in the early stage of training and a small learning rate in the later stage of training. As the gradient reaches a plateau, the training loss will be more difficult to improve. A saddle point is a point where the derivative of the function is zero but is not a local extremum on the axis. The difficulty of reducing loss comes from the saddle point, not the local minimum. If the training does not improve the loss, we can change the learning rate of each iteration according to some periodic function.This article chooses the Warm Restart (Warm Restart) proposed by Loshchilov and Hutter and improves it accordingly. This method uses a cosine function as a periodic function and restarts the learning rate at the maximum value of each period. The improvement of this paper is to change the learning rate every certain step size so that the learning rate changes in a decreasing cosine manner. This improvement has a better application in the later stage of training.


#### 2.4.3. Loss Function and Regularization

Loss functions generally include mean square error, maximum likelihood error, maximum posterior probability, cross-entropy loss function, cross-entropy function, and mean square error is an earlier loss function definition method, which measures the corresponding dimensions of the two distributions the sum of differences, the maximum likelihood error is from the perspective of probability, the model parameter theta that can perfectly fit the training example is solved, so that the probabilityp (y|x, theta) is maximized and the posterior probability is maximized, that is, The maximum probability p (theta|x, y) is actually equivalent to the maximum likelihood probability with a regularization term. It considers prior information and prevents “overfitting” by constraining the size of parameter values and the cross-entropy loss function measuring the similarity of two distributions p and q.This paper chooses a relatively good cross-entropy loss function; formula (5) is the cross-entropy loss function formula:(5)C=−1n∑xylna+1−yln1−a,in which, y is the expected output and a is the actual output of the neuron.Regularization is added in this article to prevent overfitting. Common regularizations include L1 regularization terms and L2 regularization term. In this paper, L2 regularization term is selected. Equation (6) is the objective function formed by adding L2 regularization term, which is the weight attenuation, and set to 0.9:(6)L=C+λ2n∑ww2.


#### 2.4.4. Optimizer

Common optimizers include SGD, Momentum, Nesterov, RMSprop, and Adam. Among them, SGD is the earliest optimization method, but SGD is easy to converge to the local optimum, and in some cases may be trapped at the saddle point. Momentum can determine the relevant direction, accelerates SGD, suppresses oscillation, and speeds up the convergence, but it cannot improve the sensitivity adaptively. Nesterov and RMSprop also have certain shortcomings. The best optimization method now is the Adam optimization method. This article selects the Adam optimization method.Adam is essentially RMSprop with a momentum term, which uses the first-order moment estimation and second-order moment estimation of the gradient to dynamically adjust the learning rate of each parameter. The main advantage of Adam is that, after bias correction, each iteration of the learning rate has a certain range, making the parameters more stable.This article chooses the Adam optimizer, which uses the first-order moment estimation and the second-order moment estimation of the gradient to dynamically adjust the learning rate of each parameter. The main advantage of Adam is that, after bias correction, each iteration of the learning rate has a certain range, which makes the parameters relatively stable. The update formula is as follows:(7)mt=β1∗mt−1+1−β1∗gt,vt=β2∗vt−1+1−β2∗gt2,m^t=mt1−β1t,v^t=vt1−β2t,θt+1=θt−ηv^t+ε∗m^t.


## 2.1. Introduction to the Dataset

This paper selects the LIDC-IDRI public tuberculosis dataset as the training set of the network. The dataset is composed of chest medical image files (such as CT and X-ray film) and corresponding diagnosis result lesion labels. The data was collected by the National Cancer Institute (National Cancer Institute) in order to study early cancer detection in high-risk populations. This dataset contains a total of 1018 research examples. For the images in each example, four experienced thoracic radiologists performed a two-stage diagnosis and annotation. In the first stage, each physician independently diagnosed and marked the location of the patient. Three categories were marked: (1) ≥3 mm nodules, (2) <3 mm nodules, and (3) ≥3 mm nonnodules. In the subsequent second stage, each physician independently reviewed the labels of the other three physicians and gave their final diagnosis results. Such two-stage labeling can label all results as completely as possible while avoiding forced consensus. The image file is in Dicom format, which is a standard format for medical images. In addition to image pixels, there are some auxiliary metadata such as image type, image time, and other information. A CT image has 512 × 512 pixels. Figure1 is two randomly selected CT images.Figure 1
Picture of LIDC-IDRI data set.
(a)(b)


## 2.2. Mask R-CNN Network

The detection of medical images pays more attention to the model performance. When the speed can meet the requirements, a network with higher detection accuracy should be selected as far as possible. The Mask R-CNN network is a highly accurate network, and its specific structure is shown in Figure2.Figure 2
Mask R-CNN network structure.Among them, CNN represents the benchmark network of the Mask R-CNN network, RPN represents the generation of the suggestion window network, ROIAlign represents the use of bilinear interpolation to obtain the region in the feature map corresponding to the ROI in the original image, the correspondence between the coordinates is preserved, and the mask branch represents FCN Internet.It can be seen from the network structure that the mask R-CNN network finally outputs the results through two branches, the first branch outputs the background and object segmentation results, and the second branch outputs the classification and coordinate results. However, the benchmark network of the mask R-CNN network is the residual network, and it is not the best.


## 2.3. Improve Mask R-CNN Network

Densenet network is an improvement of residual network, which is a convolutional neural network with dense connections. In this network, there is a direct connection between any two layers, that is, the input of each layer of the network is the union of the outputs of all previous layers, and the feature map learned by this layer will also be directly passed to all subsequent layers are used as input. Figure3 is a schematic diagram of Densenet’s dense block. The structure of a block is as follows, which is the same as bottleneck in the residual.Figure 3
Schematic diagram of dense block in Densenet.The Densenet network is made up of dense blocks, and its specific structure is shown in Figure4.Figure 4
Schematic diagram of Densenet structure.This paper selects the Densenet network as the reference network of the Mask R-CNN network, but the convolution method of the Densenet network will cause a lot of waste, and the experiment in this article is run on 3 GPUs, using the packet convolution method, in the packet volume. It is difficult to realize the information exchange between groups in the product. At the same time, the convolution method of the Densenet network will also cause a large amount of parameters. Therefore, this article uses the channel shuffle convolution method to reduce the amount of Densenet network parameters while also solving the grouping volume. There are many ways of product defects.The convolution method in channel shuffle convolution is not the same as the convolution of the Densenet network. In the convolution of the Densenet network, a set of convolution kernels is responsible for a set of feature maps, while in the channel shuffle convolution, a convolution kernel is responsible for a feature map, which can greatly reduce the amount of parameters, but this will cause the loss of information between the same group of data. The shuffle operation can solve the problem of noncommunication of information in the group, and the shuffle operation can solve the problem of group and group convolution., the defect of not communicating information between groups. Figure5 is a schematic diagram of channel shuffle, where input represents the input, GConv represents a grouped convolutional layer, Feature represents the feature map, and Output represents output.Figure 5
Schematic diagram of channel shuffle. (a) Grouped convolution. (b) Apply shuffle. (c) shuffle effect.
(a)(b)(c)Figure5(a) represents a grouped convolution, and three colors represent three groups. It can be seen that there is no information exchange between each group of grouped convolution, and Figure 5(b) is the application of shuffle process, and it can be seen that there is an order to exchange information. Figure 5(c) is after shuffle is applied, and it can be seen that there are other groups of information between each group.Change the convolution mode in the Densenet network to the channel shuffle convolution mode to get an improved network D-ShuffleNet network. In this paper, the D-ShuffleNet network is used as the reference network of the Mask R-CNN network to obtain the Per-T Mask R-CNN-II network.To verify that the improvements made in this article are correct, four groups of networks are used to verify on the same small dataset. The four networks are Pre-T + Mask R-CNN-II improved by adding D-ShuffleNet network. The Pre + Mask R-CNN-II improved by the Densenet network, Mask R-CNN-II, and Mask R-CNN networks that only use the channel shuffle convolution method; the results are shown in Figure6.Figure 6
Schematic diagram of the four network results.


## 2.4. Network Training Strategy

### 2.4.1. Activation Function

Common activation functions include sigmoid, TANH, and Relu. The sigmoid function formula is as follows:(1)fx=11−e−x,in which x represents the input and represents output. The output range from formula (1) is 0,1, which is not a 0-centralized distraibution. During backpropagation, it is completely positive, so it will cause the weight parameter to update. The updated value is completely positive or completely negative. When the gradient is in the second or fourth quadrant, it will be difficult to find the optimal gradient. At the same time, since the gradient is close to 0, when the absolute value of the output value is large, the problem of gradient disappearance will be caused, and the sigmoid function will not be considered in general.Equation (2) is the TANH function, which is better than the SIGMOID function:(2)fx=1−e−2x1+e−2x.It can be concluded from the formula that the output range of the tanh function is−1,1, which solves the problem that the sigmoid function cannot be distributed with 0 centralization, but it still does not solve the problem of vanishing gradient.Equation (3) is the Relu function, which solves the problem(3)fx=x,x>0,0,x≤0.It can be concluded that when the input is greater than 0, the gradient is always 1, which solves the problem of gradient disappearance. However, some parameters with input less than 0 are all dead, and the output is 0.To solve the shortcomings of the Relu function, improvements were subsequently made. LReLU, PReLU, RReLU, and ELU appeared successively. The core idea of these four functions is to make the output not 0 when the output is less than 0 and then solve the parameter less than 0. For the death problem, this article uses the ELU transfer function:(4)fx=αex−1,x<0,x,x>0.


### 2.4.2. Learning Rate

The initial value of the learning rate is usually set to 0.01, and it should be determined according to the actual situation. The usual practice is to set it to 0.01, and then initially iterate for about 10 epochs, generally checking the loss function and the transformation trend of accuracy if the loss can be reduced as well as increasing the accuracy rate; it means that the initial learning rate is generally appropriate. We can try several times to choose a good initial learning rate.The most common learning method is the step learning method. The learning rate is attenuated to one-tenth of the original every certain step size, which generally meets the requirements of a large learning rate in the early stage of training and a small learning rate in the later stage of training. As the gradient reaches a plateau, the training loss will be more difficult to improve. A saddle point is a point where the derivative of the function is zero but is not a local extremum on the axis. The difficulty of reducing loss comes from the saddle point, not the local minimum. If the training does not improve the loss, we can change the learning rate of each iteration according to some periodic function.This article chooses the Warm Restart (Warm Restart) proposed by Loshchilov and Hutter and improves it accordingly. This method uses a cosine function as a periodic function and restarts the learning rate at the maximum value of each period. The improvement of this paper is to change the learning rate every certain step size so that the learning rate changes in a decreasing cosine manner. This improvement has a better application in the later stage of training.


### 2.4.3. Loss Function and Regularization

Loss functions generally include mean square error, maximum likelihood error, maximum posterior probability, cross-entropy loss function, cross-entropy function, and mean square error is an earlier loss function definition method, which measures the corresponding dimensions of the two distributions the sum of differences, the maximum likelihood error is from the perspective of probability, the model parameter theta that can perfectly fit the training example is solved, so that the probabilityp (y|x, theta) is maximized and the posterior probability is maximized, that is, The maximum probability p (theta|x, y) is actually equivalent to the maximum likelihood probability with a regularization term. It considers prior information and prevents “overfitting” by constraining the size of parameter values and the cross-entropy loss function measuring the similarity of two distributions p and q.This paper chooses a relatively good cross-entropy loss function; formula (5) is the cross-entropy loss function formula:(5)C=−1n∑xylna+1−yln1−a,in which, y is the expected output and a is the actual output of the neuron.Regularization is added in this article to prevent overfitting. Common regularizations include L1 regularization terms and L2 regularization term. In this paper, L2 regularization term is selected. Equation (6) is the objective function formed by adding L2 regularization term, which is the weight attenuation, and set to 0.9:(6)L=C+λ2n∑ww2.


### 2.4.4. Optimizer

Common optimizers include SGD, Momentum, Nesterov, RMSprop, and Adam. Among them, SGD is the earliest optimization method, but SGD is easy to converge to the local optimum, and in some cases may be trapped at the saddle point. Momentum can determine the relevant direction, accelerates SGD, suppresses oscillation, and speeds up the convergence, but it cannot improve the sensitivity adaptively. Nesterov and RMSprop also have certain shortcomings. The best optimization method now is the Adam optimization method. This article selects the Adam optimization method.Adam is essentially RMSprop with a momentum term, which uses the first-order moment estimation and second-order moment estimation of the gradient to dynamically adjust the learning rate of each parameter. The main advantage of Adam is that, after bias correction, each iteration of the learning rate has a certain range, making the parameters more stable.This article chooses the Adam optimizer, which uses the first-order moment estimation and the second-order moment estimation of the gradient to dynamically adjust the learning rate of each parameter. The main advantage of Adam is that, after bias correction, each iteration of the learning rate has a certain range, which makes the parameters relatively stable. The update formula is as follows:(7)mt=β1∗mt−1+1−β1∗gt,vt=β2∗vt−1+1−β2∗gt2,m^t=mt1−β1t,v^t=vt1−β2t,θt+1=θt−ηv^t+ε∗m^t.


## 2.4.1. Activation Function

Common activation functions include sigmoid, TANH, and Relu. The sigmoid function formula is as follows:(1)fx=11−e−x,in which x represents the input and represents output. The output range from formula (1) is 0,1, which is not a 0-centralized distraibution. During backpropagation, it is completely positive, so it will cause the weight parameter to update. The updated value is completely positive or completely negative. When the gradient is in the second or fourth quadrant, it will be difficult to find the optimal gradient. At the same time, since the gradient is close to 0, when the absolute value of the output value is large, the problem of gradient disappearance will be caused, and the sigmoid function will not be considered in general.Equation (2) is the TANH function, which is better than the SIGMOID function:(2)fx=1−e−2x1+e−2x.It can be concluded from the formula that the output range of the tanh function is−1,1, which solves the problem that the sigmoid function cannot be distributed with 0 centralization, but it still does not solve the problem of vanishing gradient.Equation (3) is the Relu function, which solves the problem(3)fx=x,x>0,0,x≤0.It can be concluded that when the input is greater than 0, the gradient is always 1, which solves the problem of gradient disappearance. However, some parameters with input less than 0 are all dead, and the output is 0.To solve the shortcomings of the Relu function, improvements were subsequently made. LReLU, PReLU, RReLU, and ELU appeared successively. The core idea of these four functions is to make the output not 0 when the output is less than 0 and then solve the parameter less than 0. For the death problem, this article uses the ELU transfer function:(4)fx=αex−1,x<0,x,x>0.


## 2.4.2. Learning Rate

The initial value of the learning rate is usually set to 0.01, and it should be determined according to the actual situation. The usual practice is to set it to 0.01, and then initially iterate for about 10 epochs, generally checking the loss function and the transformation trend of accuracy if the loss can be reduced as well as increasing the accuracy rate; it means that the initial learning rate is generally appropriate. We can try several times to choose a good initial learning rate.The most common learning method is the step learning method. The learning rate is attenuated to one-tenth of the original every certain step size, which generally meets the requirements of a large learning rate in the early stage of training and a small learning rate in the later stage of training. As the gradient reaches a plateau, the training loss will be more difficult to improve. A saddle point is a point where the derivative of the function is zero but is not a local extremum on the axis. The difficulty of reducing loss comes from the saddle point, not the local minimum. If the training does not improve the loss, we can change the learning rate of each iteration according to some periodic function.This article chooses the Warm Restart (Warm Restart) proposed by Loshchilov and Hutter and improves it accordingly. This method uses a cosine function as a periodic function and restarts the learning rate at the maximum value of each period. The improvement of this paper is to change the learning rate every certain step size so that the learning rate changes in a decreasing cosine manner. This improvement has a better application in the later stage of training.


## 2.4.3. Loss Function and Regularization

Loss functions generally include mean square error, maximum likelihood error, maximum posterior probability, cross-entropy loss function, cross-entropy function, and mean square error is an earlier loss function definition method, which measures the corresponding dimensions of the two distributions the sum of differences, the maximum likelihood error is from the perspective of probability, the model parameter theta that can perfectly fit the training example is solved, so that the probabilityp (y|x, theta) is maximized and the posterior probability is maximized, that is, The maximum probability p (theta|x, y) is actually equivalent to the maximum likelihood probability with a regularization term. It considers prior information and prevents “overfitting” by constraining the size of parameter values and the cross-entropy loss function measuring the similarity of two distributions p and q.This paper chooses a relatively good cross-entropy loss function; formula (5) is the cross-entropy loss function formula:(5)C=−1n∑xylna+1−yln1−a,in which, y is the expected output and a is the actual output of the neuron.Regularization is added in this article to prevent overfitting. Common regularizations include L1 regularization terms and L2 regularization term. In this paper, L2 regularization term is selected. Equation (6) is the objective function formed by adding L2 regularization term, which is the weight attenuation, and set to 0.9:(6)L=C+λ2n∑ww2.


## 2.4.4. Optimizer

Common optimizers include SGD, Momentum, Nesterov, RMSprop, and Adam. Among them, SGD is the earliest optimization method, but SGD is easy to converge to the local optimum, and in some cases may be trapped at the saddle point. Momentum can determine the relevant direction, accelerates SGD, suppresses oscillation, and speeds up the convergence, but it cannot improve the sensitivity adaptively. Nesterov and RMSprop also have certain shortcomings. The best optimization method now is the Adam optimization method. This article selects the Adam optimization method.Adam is essentially RMSprop with a momentum term, which uses the first-order moment estimation and second-order moment estimation of the gradient to dynamically adjust the learning rate of each parameter. The main advantage of Adam is that, after bias correction, each iteration of the learning rate has a certain range, making the parameters more stable.This article chooses the Adam optimizer, which uses the first-order moment estimation and the second-order moment estimation of the gradient to dynamically adjust the learning rate of each parameter. The main advantage of Adam is that, after bias correction, each iteration of the learning rate has a certain range, which makes the parameters relatively stable. The update formula is as follows:(7)mt=β1∗mt−1+1−β1∗gt,vt=β2∗vt−1+1−β2∗gt2,m^t=mt1−β1t,v^t=vt1−β2t,θt+1=θt−ηv^t+ε∗m^t.


## 3. Experimental Results

Practice is carried out using the Pytorch framework; training is carried out using the Adam optimizer and selecting the ELU function for the activation function. The convolution method in the Densenet network is changed to the channel shuffle convolution method, and the network D-ShuffleNet is improved.This article conducted 7 sets of comparative experiments, namely, Pre-T + Mask R-CNN-II improved by adding D-ShuffleNet network and Pre + Mask R-CNN-II improved only by Densenet network, using only channel shuffle convolution Mask R-CNN-II, Mask R-CNN network, YOLO-V3 network, Fast R-CNN network, and SSD network, it uses the same dataset for training. After training, the experimental results of 7 sets of experiments are obtained. In this paper, mAP and ROC curves are used as evaluation criteria to analyze and evaluate the network results. AP in mAP refers to the area of the P-R curve of each class, mAP is the average of all APs, P in the P-R curve refers to precision, which is accuracy, andR refers to recall, which is the recall rate. The above concepts can be derived from the concept of confusion matrix. The confusion matrix table of classification results is shown in Table 1.Table 1
Confusion matrix of classification results.
The true situationForecast resultPositive example (P)Counterexample (N)Positive example (P)TP (real case)FN (false counterexample)Counterexample (N)FP (false positive)TN (true negative example)The formulas of recall rate and accuracy rate are shown in equations (8) and (9):(8)R=TPTP+FN,(9)P=TPTP+FP.Table2 shows the specific values of the seven groups of models after training, including the AP value and mAP value of each category.Table 2
Results of each model.
mAPPre-T + Mask R-CNN-II0.927Pre + Mask R-CNN-II0.921Mask R-CNN-II0.907Mask R-CNN0.893YOLO-V30.881Faster R-CNN0.871SSD0.865The order of mAP size in Table2 is Pre-T + Mask R-CNN-II, Pre + Mask R-CNN-II, Mask R-CNN-II, Mask R-CNN, YOLO-V3, Faster R-CNN, and SSD.It can be seen from Table2 that the training effect of the Pre-T + Mask R-CNN-II model is the best, indicating that the network proposed in this paper is suitable for lung nodule target detection.Regarding model evaluation criteria, in addition to the most commonly used ones, it is often necessary to evaluate the model through the ROC curve. ROC space defines the false positive rate (False Positive Rate, FPR) as theX-axis, and the true positive rate (True Positive Rate) Rate, TPR for short) is defined as the Y-axis. These two values are calculated from the four values in Table 1.For TPR, in all samples that are actually positive, the ratio of correctly judged positive is(10)TPR=TPTP+FN.For FPR, among all samples that are actually negative examples, the ratio of falsely judged positive examples is(11)FPR=FPFP+TN.The ROC curve can reflect the performance of the model well, and its area is AUC. The larger the AUC value, the better the performance of the model. Figure7 is the ROC curve .Figure 7
ROC curve.After calculation, the area of Pre-T + Mask R-CNN-II, Pre + Mask R-CNN-II, Mask R-CNN-II, Mask R-CNN, YOLO-V3, Faster R-CNN, and SSD is 0.942, 0.935, 0.916, 0.902, 0.893, 0.882, and 0.877, which are consistent with the results obtained by the mAP evaluation system.


## 4. Conclusions

This paper proposes a new network D-ShuffleNet network, by combining the Densenet network and channel shuffle convolution method, and then proposes a new target detection network. Through the last seven sets of comparative experiments, it is proved that the network proposed in this paper has better performance than other networks. All are good, but the network still has room for improvement. The next step is to improve the network performance and improve the recognition accuracy.



---

*Source: 6633242-2020-12-17.xml*