# Improved DenseNet-Based MRI in Pulmonary Nodules Diagnosis and Benign and Malignant Differentiation

Authors: Zhanneng Yin
Journal: Scientific Programming
 (2021)

---

## Abstract

To explore the performance of the improved DenseNet network in diagnosing pulmonary nodules (PNs) and differentiating benign and malignant PNs, improved DenseNet network was applied to segment MRI images of 60 PN patients, which were defined as the test group, while those segmented by the traditional one were undertaken as the control group. The MRI results were compared with the pathological diagnostic results, and the segmentation effects were evaluated factoring in precision, recall, Dice similarity coefficient, and intersection-over-union (IoU). The results showed that the improved DenseNet network algorithm showed higher accuracy, recall rate, Dice coefficient, and IoU versus the traditional one, and the difference was notable (P<0.05). The improved DenseNet network algorithm had higher diagnostic accuracy in terms of the PN volume, lobes, burrs, edges, and adhesion to surrounding tissue, with notable differences noted (P<0.05). The accuracy in differentiating benign and malignant PNs in the test group was higher (92.38 ± 8.74% vs. 75.56 ± 7.56%) versus the control group, and the difference was notable (P<0.05). In short, the MRI image segmentation algorithm based on the improved DenseNet network shows high accuracy in diagnosing PNs and differentiating benign and malignant PNs, and it is worthy of further promotion in the clinic.


---

## Body

## 1. Introduction

Pulmonary nodule (PN) refers to round- or irregular-shaped lesions with a diameter of less than or equal to 3 cm (i.e., 30 mm) in the lung. The imaging manifestation is a shadow of increased density, with clear or unclear boundaries, which can be single or multiple [1, 2]. It is usually discovered accidentally during physical examination or during diagnosis and treatment of other diseases. Most patients have unobvious symptoms, and common symptoms include dyspnea, chest pain, cough, and hemoptysis [3, 4]. Among the asymptomatic populations of lung cancer in high-risk East Asia, the incidence of PN is 35.5% [5]. Clinically, it is divided into solitary nodules and multiple nodules according to the numbers. The commonly used imaging methods include chest X-ray examination, chest CT scan, positron emission tomography (PET-CT), and MRI [6]. Among them, the MRI examination is superior because of the multisequence scan, no ionizing radiation damage, and better resolution of the soft tissue of the thoracic cavity and the mediastinal vessel structure versus CT examination [7]. Plus, the influence of heartbeat artifacts and respiratory motion on lung MRI imaging has been eliminated [7], and its proton density index can well highlight the diseased lung tissue. Therefore, MRI is increasingly used in the imaging diagnosis of lung diseases [8]. Nevertheless, MRI examinations for lung diseases are still interfered by noise, artifacts, and the subjective judgment of the diagnostician, leading to misdiagnosis and missed diagnosis sometimes [9]. Hence, it is urgent to optimize MRI images.The convolutional neural network is widely used in the analysis of medical images, among which the fully convolutional DenseNet is one of the most popular artificial neural networks [10]. The principle of fully convolutional DenseNet is to reuse image features in the network through densely connected blocks, thereby lifting the utilization rate of image features and optimizing neural network parameters. Studies have shown that the fully convolutional DenseNet performs well in segmenting medical images, such as CT and MRI [11], but there are rare studies on the MRI image for PNs, which was the focus of this study.As mentioned above, using the deep learning-based convolutional neural network to optimize MRI images to assist physicians in diagnosing PNs is a hotspot. In this study, the optimized DenseNet network algorithm was used to process MRI images of 60 PN patients in the test group. The receiver operating characteristic (ROC) curve revealed the performance of MRI image to diagnose PNs and differentiate benign and malignant PNs, so as to comprehensively evaluate the application value of the improved DenseNet network algorithm in processing MRI images of PN patients.


## 2. Materials and Methods

### 2.1. Research Subjects

In this study, 120 PN patients admitted to hospital were selected as the research subjects, including 72 males and 48 females, aged from 45 to 76 years old. They were randomly divided into the test group and the control group, with 60 people in each. MRI scans were performed on both groups of patients. The MRI images of the test group were analyzed by the improved Net network algorithm, while those in the control group were analyzed by a professional physician. The study has been approved by the ethics committee of the hospital, and the patients and their families included in the study were informed and had signed an informed consent form.The subjects were selected as per the following inclusion criteria: (1) PN patients diagnosed by chest MRI scan at xxx hospital; (2) patients with complete basic clinical data; (3) MRI images including at least three sequences of DWI, T1WI, and T2WI; (4) lesion size between 9 and 31 mm. Exclusion criteria: (1) patients with atelectasis or pneumonia around the PN lesion; (2) patients with other malignant tumors; (3) MRI images having many artifacts and poor quality.


### 2.2. MRI Image Scan

The Siemens Avanto 1.5T (MAGNETOM Aera, Erlangen, Germany) is used to collect MRI plain scan image information, involving at least three sequences: axial DWI (diffusion weighted imaging), T1WI (T1 weighted imaging), and T2WI (T2 weighted imaging). The EPI sequence is used for DWI axis scan, and the spatial presaturation technology is used to suppress the fat signal in the scanning process, thereby eliminating chemical shift artifacts. The corresponding parameters include TR (1500 ms), TE (82 ms), the number of excitations (2 times), andb value (b = 50, 800 s/mm2). The breath-holding two-dimensional spoiled GRE double-echo sequence is used for T1WI axis scan, and corresponding parameters include TE (4.9 ms), flip angle (70°), TR (160 ms), matrix (256 × 256), number of excitations (1), FOV (380 mm × 360 mm), number of layers (30), layer spacing (1 mm), and layer thickness (5.5 mm). T2WI axial scan adopts free breathing diaphragm gated navigation FSE sequence, and corresponding parameters include TE (90 ms), flip angle (140°), TR (2200 ms), matrix (320 × 320), number of excitations (1 time), FOV (380 mm × 360 mm), number of layers (30), layer spacing (1 mm), and layer thickness (5.5 mm). SPAIR is used for grease pressure. The EPI sequence is used for DWI axis scan, and the spatial presaturation technology is used to suppress the fat signal during the scanning process, thereby eliminating chemical shift artifacts. The corresponding parameters include TE (82 ms), TR (1500 ms), the number of excitations (2 times), and b value (b = 50, 800 s/mm2).


### 2.3. The Improved DenseNet Network

The deep learning is used to automatically segment MRI images which can greatly reduce the dependence on the subjective judgment of physicians. The traditional convolutional neural network (CNN) includes a convolutional layer, a pooling layer, and a full-connected layer. The neural unit layers of various functions are stacked to form deep convolutional neural network. The equation of any one of the convolutional layer feature maps can be expressed as follows:(1)Hx=gMx∗y,where x represents the x neuron of a certain convolutional layer, Hx represents the x feature map obtained by convolution, and y represents the input image. The weight of the x neuron can be expressed as Mx, ∗ is the 2D convolution operator, which can calculate the inner product of pixels and weights in the filter window, and g represents a nonlinear activation function.The maximum pooling equation can be expressed as follows:(2)Hxab=maxm,n∈Dabyxmn,where Hxab represents the pooling operation related to the feature map and yxmn represents the elements in the pooling area Dab. The last layer of the convolutional layer or the pooling layer that is alternately connected is connected to the fully connected layer by establishing a connection between features and labels. The activation function of the fully connected layer is usually expressed by the Softmax function, defined as follows:(3)Qsz=expszR∑b=1ZexpsbR,where Z represents the number of target categories and szR represents the predicted value of the z category, and sz represents the z category. The Softmax function outputs the probability that the sample belongs to each category, and the sum of the probabilities is 1.The algorithm is optimized to analyze MRI images of PN patients. Then, 3D convolutional neural networks are introduced to make up for the 2D convolutional neural network’s inability to obtain temporal information in video images. The mathematical equation for 3D convolution is as follows:(4)uabij=gfab+∑t∑m=0Ea−1∑n=0Fa−1vabtmnua−1ti+mj+n,where uabij represents the eigenvalue of the i,j position on the b feature map on the a layer, g represents the activation function, and fab represents the bias term. t represents the feature map index of the layer connected to the current feature map, vabtmn represents the weight value, and Ea,Fa represent the height and width of the convolution kernel. Bias and weights need to be determined through training, and other values can be preset.The maximum pooling operation of 3D convolution can be expressed as follows:(5)P=s1a,s2a,s3a…,sxa∈LQ×W×E×R,where R represents the number of feature spaces, Q,W,E represents the size of the feature map, and sxa represents the x feature output map of the a convolutional layer. The 3D convolution maximum pooling operation is to calculate the maximum value in the feature cube.The dropout is introduced to reduce the overfitting degree and improve its generalization ability in the calculation process of the convolutional neural network. Dropout is to randomly discard the output value of neurons in a certain layer. The entire dropout process is to take the average of many different neural networks, and different networks produce different overfittings, some of which are “reverse” to each other, thereby offsetting some overfittings. During the dropout process, the output value of neurons in a certain layer can propagate downward in two circumstances where one is to retain the original value, and the other is to be converted to 0. Provided the probability of being retained isx, and the probability of being converted to 0 is 1−x, usually, x=0.5. When dropout is used as a fully connected layer, the output of this layer is expressed as (6), and the output value after dropout can be expressed as (7).(6)B=B1,B2,…,BnY,(7)B=a∗gvu,where ∗ represents the element-wise product of the output gvu of the fully connected layer and the binary mask vector a, g⋅ represents the activation function of the fully connected layer, u is the input value vector of the fully connected layer, v is the weight matrix of z×c, the length of the binary mask vector a is z, and the value of each element in a conforms to the Bernoulli distribution with statistical magnitude of c.On this basis, to maximize the efficiency to use MRI image features, the DenseNet network algorithm connects the output feature map of the dense block (DB) composed of several convolutional layers to the next layer, to reuse it as an input item. Through several pooling operation layers, an equal number of deconvolution layers follow to restore the resolution of the corresponding feature image. At the same time, the feature maps of the same resolution are connected and serve as an input of a processing layer of higher resolution. The transition layer connects and reintegrates two feature maps with different resolutions, which is divided into a transition up layer (TU) and a transition down layer (TD). Figure1 is a schematic diagram depicting the operation process of the fully convolutional DenseNet network algorithm.Figure 1
A schematic diagram depicting the operation process of the fully convolutional DenseNet network algorithm.In the study, the MRI image of the PN patient is segmented pixel by pixel to obtain the characteristic information of nodule size, edges, burrs, and lobes and is classified using the gray value data of the receptive field corresponding to each pixel. In this process, the cross entropy (CE) loss function is used, expressed as follows:(8)CEA,B=−∑j=1iAilogBi,where A represents the true value, B represents the network predicted value, and i represents the number of pixels in each image block. If there are n image blocks in the input network in a batch of data, the number of pixels in the network can be expressed as ni, and the loss value can be expressed as follows:(9)CEA,B=−∑jn∑j=1iAsjlogBsj,CEA,B=−∑tniAtlogBt.On this basis, to reduce the redundancy of parameters and the difficulty in learning multiregion features with a single convolution kernel, the structure of the last few layers of the network is optimized, and the multi-Dice loss function is introduced to guide parameter optimization. This function consists of a main loss function and multiple auxiliary loss functions with relatively small weights, and the precise optimization of the parameters is achieved by reconstructing the error loss. The segmentation process of the MRI image of the PN patient based on the improved DenseNet network algorithm is shown in Figure2.Figure 2
The segmentation process of the MRI image of the PN patient based on the improved DenseNet network algorithm.


### 2.4. Evaluation Indicators of Segmentation Effects of the Improved DenseNet

To understand the pros and cons of the algorithm, several evaluation indicators were selected, such as precision (PREC) and recall for pixels, Dice similarity coefficient for areas, and intersection-over-union (IoU). Among them, precision refers to the precision rate, reflecting the accuracy of segmentation, expressed as (10); recall rate is also known as sensitivity, which represents the proportion of positive samples in the prediction result, expressed as (11); Dice similarity coefficient reflects the overlap between the segmentation result and the gold standard area, expressed as equation (13); IoU reflects the degree of coincidence between the real result and the predicted result, expressed as (13).(10)Precision=A∩BA×100%,(11)recall=A∩BB×100%,(12)DiceA,B=2×A∩BA+B,(13)IoU=A∩BA∪B,where A represents the standard value segmented by the doctor and B represents the predicted value segmented by the convolutional neural network model. A smaller Dice coefficient indicates a larger gap between the predicted result and the real result.


### 2.5. Evaluation Indicators of PN

To distinguish benign and malignant nodules, the diagnosis of PN involves the nodule volume, substantial proportion, surface area, surface roughness, and burr degree, while the MRI analysis factors include size, edge, burr, leaf, and the connection with surrounding tissue. In this study, the MRI image analysis results were compared with the pathological diagnosis results to comprehensively evaluate the performance of the improved DenseNet algorithm in diagnosing and differentiating benign and malignant PNs.


### 2.6. Statistics

The data was processed by SPSS 19.0. The measurement data were expressed as mean ± standard deviation (x¯ ± s). The comparison of the means between each group adopted the t-test. The count data were expressed as a percentage (%), and the χ2 test was used. P<0.05 was the threshold for significance.


## 2.1. Research Subjects

In this study, 120 PN patients admitted to hospital were selected as the research subjects, including 72 males and 48 females, aged from 45 to 76 years old. They were randomly divided into the test group and the control group, with 60 people in each. MRI scans were performed on both groups of patients. The MRI images of the test group were analyzed by the improved Net network algorithm, while those in the control group were analyzed by a professional physician. The study has been approved by the ethics committee of the hospital, and the patients and their families included in the study were informed and had signed an informed consent form.The subjects were selected as per the following inclusion criteria: (1) PN patients diagnosed by chest MRI scan at xxx hospital; (2) patients with complete basic clinical data; (3) MRI images including at least three sequences of DWI, T1WI, and T2WI; (4) lesion size between 9 and 31 mm. Exclusion criteria: (1) patients with atelectasis or pneumonia around the PN lesion; (2) patients with other malignant tumors; (3) MRI images having many artifacts and poor quality.


## 2.2. MRI Image Scan

The Siemens Avanto 1.5T (MAGNETOM Aera, Erlangen, Germany) is used to collect MRI plain scan image information, involving at least three sequences: axial DWI (diffusion weighted imaging), T1WI (T1 weighted imaging), and T2WI (T2 weighted imaging). The EPI sequence is used for DWI axis scan, and the spatial presaturation technology is used to suppress the fat signal in the scanning process, thereby eliminating chemical shift artifacts. The corresponding parameters include TR (1500 ms), TE (82 ms), the number of excitations (2 times), andb value (b = 50, 800 s/mm2). The breath-holding two-dimensional spoiled GRE double-echo sequence is used for T1WI axis scan, and corresponding parameters include TE (4.9 ms), flip angle (70°), TR (160 ms), matrix (256 × 256), number of excitations (1), FOV (380 mm × 360 mm), number of layers (30), layer spacing (1 mm), and layer thickness (5.5 mm). T2WI axial scan adopts free breathing diaphragm gated navigation FSE sequence, and corresponding parameters include TE (90 ms), flip angle (140°), TR (2200 ms), matrix (320 × 320), number of excitations (1 time), FOV (380 mm × 360 mm), number of layers (30), layer spacing (1 mm), and layer thickness (5.5 mm). SPAIR is used for grease pressure. The EPI sequence is used for DWI axis scan, and the spatial presaturation technology is used to suppress the fat signal during the scanning process, thereby eliminating chemical shift artifacts. The corresponding parameters include TE (82 ms), TR (1500 ms), the number of excitations (2 times), and b value (b = 50, 800 s/mm2).


## 2.3. The Improved DenseNet Network

The deep learning is used to automatically segment MRI images which can greatly reduce the dependence on the subjective judgment of physicians. The traditional convolutional neural network (CNN) includes a convolutional layer, a pooling layer, and a full-connected layer. The neural unit layers of various functions are stacked to form deep convolutional neural network. The equation of any one of the convolutional layer feature maps can be expressed as follows:(1)Hx=gMx∗y,where x represents the x neuron of a certain convolutional layer, Hx represents the x feature map obtained by convolution, and y represents the input image. The weight of the x neuron can be expressed as Mx, ∗ is the 2D convolution operator, which can calculate the inner product of pixels and weights in the filter window, and g represents a nonlinear activation function.The maximum pooling equation can be expressed as follows:(2)Hxab=maxm,n∈Dabyxmn,where Hxab represents the pooling operation related to the feature map and yxmn represents the elements in the pooling area Dab. The last layer of the convolutional layer or the pooling layer that is alternately connected is connected to the fully connected layer by establishing a connection between features and labels. The activation function of the fully connected layer is usually expressed by the Softmax function, defined as follows:(3)Qsz=expszR∑b=1ZexpsbR,where Z represents the number of target categories and szR represents the predicted value of the z category, and sz represents the z category. The Softmax function outputs the probability that the sample belongs to each category, and the sum of the probabilities is 1.The algorithm is optimized to analyze MRI images of PN patients. Then, 3D convolutional neural networks are introduced to make up for the 2D convolutional neural network’s inability to obtain temporal information in video images. The mathematical equation for 3D convolution is as follows:(4)uabij=gfab+∑t∑m=0Ea−1∑n=0Fa−1vabtmnua−1ti+mj+n,where uabij represents the eigenvalue of the i,j position on the b feature map on the a layer, g represents the activation function, and fab represents the bias term. t represents the feature map index of the layer connected to the current feature map, vabtmn represents the weight value, and Ea,Fa represent the height and width of the convolution kernel. Bias and weights need to be determined through training, and other values can be preset.The maximum pooling operation of 3D convolution can be expressed as follows:(5)P=s1a,s2a,s3a…,sxa∈LQ×W×E×R,where R represents the number of feature spaces, Q,W,E represents the size of the feature map, and sxa represents the x feature output map of the a convolutional layer. The 3D convolution maximum pooling operation is to calculate the maximum value in the feature cube.The dropout is introduced to reduce the overfitting degree and improve its generalization ability in the calculation process of the convolutional neural network. Dropout is to randomly discard the output value of neurons in a certain layer. The entire dropout process is to take the average of many different neural networks, and different networks produce different overfittings, some of which are “reverse” to each other, thereby offsetting some overfittings. During the dropout process, the output value of neurons in a certain layer can propagate downward in two circumstances where one is to retain the original value, and the other is to be converted to 0. Provided the probability of being retained isx, and the probability of being converted to 0 is 1−x, usually, x=0.5. When dropout is used as a fully connected layer, the output of this layer is expressed as (6), and the output value after dropout can be expressed as (7).(6)B=B1,B2,…,BnY,(7)B=a∗gvu,where ∗ represents the element-wise product of the output gvu of the fully connected layer and the binary mask vector a, g⋅ represents the activation function of the fully connected layer, u is the input value vector of the fully connected layer, v is the weight matrix of z×c, the length of the binary mask vector a is z, and the value of each element in a conforms to the Bernoulli distribution with statistical magnitude of c.On this basis, to maximize the efficiency to use MRI image features, the DenseNet network algorithm connects the output feature map of the dense block (DB) composed of several convolutional layers to the next layer, to reuse it as an input item. Through several pooling operation layers, an equal number of deconvolution layers follow to restore the resolution of the corresponding feature image. At the same time, the feature maps of the same resolution are connected and serve as an input of a processing layer of higher resolution. The transition layer connects and reintegrates two feature maps with different resolutions, which is divided into a transition up layer (TU) and a transition down layer (TD). Figure1 is a schematic diagram depicting the operation process of the fully convolutional DenseNet network algorithm.Figure 1
A schematic diagram depicting the operation process of the fully convolutional DenseNet network algorithm.In the study, the MRI image of the PN patient is segmented pixel by pixel to obtain the characteristic information of nodule size, edges, burrs, and lobes and is classified using the gray value data of the receptive field corresponding to each pixel. In this process, the cross entropy (CE) loss function is used, expressed as follows:(8)CEA,B=−∑j=1iAilogBi,where A represents the true value, B represents the network predicted value, and i represents the number of pixels in each image block. If there are n image blocks in the input network in a batch of data, the number of pixels in the network can be expressed as ni, and the loss value can be expressed as follows:(9)CEA,B=−∑jn∑j=1iAsjlogBsj,CEA,B=−∑tniAtlogBt.On this basis, to reduce the redundancy of parameters and the difficulty in learning multiregion features with a single convolution kernel, the structure of the last few layers of the network is optimized, and the multi-Dice loss function is introduced to guide parameter optimization. This function consists of a main loss function and multiple auxiliary loss functions with relatively small weights, and the precise optimization of the parameters is achieved by reconstructing the error loss. The segmentation process of the MRI image of the PN patient based on the improved DenseNet network algorithm is shown in Figure2.Figure 2
The segmentation process of the MRI image of the PN patient based on the improved DenseNet network algorithm.


## 2.4. Evaluation Indicators of Segmentation Effects of the Improved DenseNet

To understand the pros and cons of the algorithm, several evaluation indicators were selected, such as precision (PREC) and recall for pixels, Dice similarity coefficient for areas, and intersection-over-union (IoU). Among them, precision refers to the precision rate, reflecting the accuracy of segmentation, expressed as (10); recall rate is also known as sensitivity, which represents the proportion of positive samples in the prediction result, expressed as (11); Dice similarity coefficient reflects the overlap between the segmentation result and the gold standard area, expressed as equation (13); IoU reflects the degree of coincidence between the real result and the predicted result, expressed as (13).(10)Precision=A∩BA×100%,(11)recall=A∩BB×100%,(12)DiceA,B=2×A∩BA+B,(13)IoU=A∩BA∪B,where A represents the standard value segmented by the doctor and B represents the predicted value segmented by the convolutional neural network model. A smaller Dice coefficient indicates a larger gap between the predicted result and the real result.


## 2.5. Evaluation Indicators of PN

To distinguish benign and malignant nodules, the diagnosis of PN involves the nodule volume, substantial proportion, surface area, surface roughness, and burr degree, while the MRI analysis factors include size, edge, burr, leaf, and the connection with surrounding tissue. In this study, the MRI image analysis results were compared with the pathological diagnosis results to comprehensively evaluate the performance of the improved DenseNet algorithm in diagnosing and differentiating benign and malignant PNs.


## 2.6. Statistics

The data was processed by SPSS 19.0. The measurement data were expressed as mean ± standard deviation (x¯ ± s). The comparison of the means between each group adopted the t-test. The count data were expressed as a percentage (%), and the χ2 test was used. P<0.05 was the threshold for significance.


## 3. Results

### 3.1. The Changes in Loss Values and Dice Coefficients

Figure3 shows the loss and the Dice coefficients of the two DenseNet network algorithms during the segmentation training process. Figure 3(a) is for the loss. The black curve described the loss of the traditional DenseNet network algorithm during the training process, and the red color was the improved DenseNet network. It was noted that the loss values were high in the first 14 epochs in both the two curves, and then, the loss value gradually decreased with the increase of the segmentation ability, and the loss value of the black curve was higher than the red curve all the time. Figure 3(b) shows the variation of the Dice coefficient of the two DenseNet network algorithms on the validation set during the segmentation training process. The blue curve described the Dice coefficient of the improved DenseNet network during the training process, and the pink was the traditional DenseNet network. It was noted that the accuracy of the DenseNet network algorithm was higher at the beginning, but as the Epoch value increased, the improved DenseNet network algorithm had a higher Dice value.Figure 3
The loss and the Dice coefficients of the two DenseNet network algorithms during the segmentation training process. (a) The loss; (b) Dice coefficient.
(a)(b)


### 3.2. MRI Images

Figure4 shows the MRI images of PN patients processed by two DenseNet network algorithms. Compared to the original ones, the MRI images processed by traditional DenseNet network algorithm were clearer and it was easier to distinguish PN characteristics. The improved DenseNet network algorithm reused the features through multiple iterations of feature information based on the traditional algorithm. It used multiple Dice loss functions to guide parameter optimization so that the features were more refined, facilitating diagnosing PNs and distinguishing benign and malignant PNs.Figure 4
MRI image of a 63-year-old male patient with PNs. (a) The original MRI image; (b) the MRI image processed by the traditional DenseNet network algorithm; (c) the MRI image processed by the improved DenseNet network algorithm.
(a)(b)(c)


### 3.3. MRI Quality Evaluation

Figure5 shows a quantification comparison between the traditional DenseNet network algorithm and the improved one, involving accuracy, recall rate, Dice coefficient, and IoU. Obviously, the accuracy, recall rate, Dice coefficient, and IoU of the improved DenseNet network algorithm were higher than those of the traditional one (P<0.05).Figure 5
Image quality comparison. (a) The Dice coefficient; (b) the IoU; (c) the precision; (d) the recall rate.
(a)(b)(c)(d)


### 3.4. Diagnosis and Differentiation of Benign and Malignant PNs

The MRI results were compared with the pathological diagnostic results in terms of the PN volume, lobes, burrs, edges, and connection with surrounding tissue, and the accuracy rates were calculated (Figure6). It was found that the improved DenseNet network algorithm exhibited higher diagnostic accuracy for PNs, with notable differences noted (P<0.05). Figure 7 shows the MRI features of different types of lung nodules. Figures 7(a)–7(j) show the pulmonary nodule lobular signs, burr sign, spinous protrusion, vascular concentration sign, pleural depression sign, cancerous lymphangitis, bronchial air sign, vacuole sign, cancerous cavity, and nodular calcification, respectively.Figure 6
The diagnostic accuracy.Note.∗ means a notable difference versus the control group (P<0.05).Figure 7
MRI features of different types of lung nodules. (a) Pulmonary nodule lobular signs; (b) burr sign; (c) spinous protrusion; (d) vascular concentration sign; (e) pleural depression sign; (f) cancerous lymphangitis; (g) bronchial air sign; (h) vacuole sign; (i) cancerous cavity; and (j) nodule calcification.
(a)(b)(c)(d)(e)(f)(g)(h)(i)(j)Figure8 shows the accuracy in differentiating benign and malignant PNs. Obviously, the accuracy rate in the test group was higher (92.38 ± 8.74% vs. 75.56 ± 7.56%) (P<0.05).Figure 8
The accuracy in differentiating benign and malignant PNs.Note.∗ means a notable difference versus the control group (P<0.05).


## 3.1. The Changes in Loss Values and Dice Coefficients

Figure3 shows the loss and the Dice coefficients of the two DenseNet network algorithms during the segmentation training process. Figure 3(a) is for the loss. The black curve described the loss of the traditional DenseNet network algorithm during the training process, and the red color was the improved DenseNet network. It was noted that the loss values were high in the first 14 epochs in both the two curves, and then, the loss value gradually decreased with the increase of the segmentation ability, and the loss value of the black curve was higher than the red curve all the time. Figure 3(b) shows the variation of the Dice coefficient of the two DenseNet network algorithms on the validation set during the segmentation training process. The blue curve described the Dice coefficient of the improved DenseNet network during the training process, and the pink was the traditional DenseNet network. It was noted that the accuracy of the DenseNet network algorithm was higher at the beginning, but as the Epoch value increased, the improved DenseNet network algorithm had a higher Dice value.Figure 3
The loss and the Dice coefficients of the two DenseNet network algorithms during the segmentation training process. (a) The loss; (b) Dice coefficient.
(a)(b)


## 3.2. MRI Images

Figure4 shows the MRI images of PN patients processed by two DenseNet network algorithms. Compared to the original ones, the MRI images processed by traditional DenseNet network algorithm were clearer and it was easier to distinguish PN characteristics. The improved DenseNet network algorithm reused the features through multiple iterations of feature information based on the traditional algorithm. It used multiple Dice loss functions to guide parameter optimization so that the features were more refined, facilitating diagnosing PNs and distinguishing benign and malignant PNs.Figure 4
MRI image of a 63-year-old male patient with PNs. (a) The original MRI image; (b) the MRI image processed by the traditional DenseNet network algorithm; (c) the MRI image processed by the improved DenseNet network algorithm.
(a)(b)(c)


## 3.3. MRI Quality Evaluation

Figure5 shows a quantification comparison between the traditional DenseNet network algorithm and the improved one, involving accuracy, recall rate, Dice coefficient, and IoU. Obviously, the accuracy, recall rate, Dice coefficient, and IoU of the improved DenseNet network algorithm were higher than those of the traditional one (P<0.05).Figure 5
Image quality comparison. (a) The Dice coefficient; (b) the IoU; (c) the precision; (d) the recall rate.
(a)(b)(c)(d)


## 3.4. Diagnosis and Differentiation of Benign and Malignant PNs

The MRI results were compared with the pathological diagnostic results in terms of the PN volume, lobes, burrs, edges, and connection with surrounding tissue, and the accuracy rates were calculated (Figure6). It was found that the improved DenseNet network algorithm exhibited higher diagnostic accuracy for PNs, with notable differences noted (P<0.05). Figure 7 shows the MRI features of different types of lung nodules. Figures 7(a)–7(j) show the pulmonary nodule lobular signs, burr sign, spinous protrusion, vascular concentration sign, pleural depression sign, cancerous lymphangitis, bronchial air sign, vacuole sign, cancerous cavity, and nodular calcification, respectively.Figure 6
The diagnostic accuracy.Note.∗ means a notable difference versus the control group (P<0.05).Figure 7
MRI features of different types of lung nodules. (a) Pulmonary nodule lobular signs; (b) burr sign; (c) spinous protrusion; (d) vascular concentration sign; (e) pleural depression sign; (f) cancerous lymphangitis; (g) bronchial air sign; (h) vacuole sign; (i) cancerous cavity; and (j) nodule calcification.
(a)(b)(c)(d)(e)(f)(g)(h)(i)(j)Figure8 shows the accuracy in differentiating benign and malignant PNs. Obviously, the accuracy rate in the test group was higher (92.38 ± 8.74% vs. 75.56 ± 7.56%) (P<0.05).Figure 8
The accuracy in differentiating benign and malignant PNs.Note.∗ means a notable difference versus the control group (P<0.05).


## 4. Discussion

As a common lung disease, PN tends to develop into a more serious disease because its early symptoms are not obvious and it is easy to be ignored [12, 13]. Malignant PN metastasis may involve the central nervous system, leading to limb weakness, hemiplegia, and even being life-threatening. For PNs caused by infection, pathogenic bacteria can travel throughout the body with the blood, leading to local or systemic abscesses. Therefore, early diagnosis of PNs and benign and malignant identification are of great significance for the prevention and treatment of lung diseases [14, 15]. MRI is currently one of the common imaging methods for clinical diagnosis of PNs. It can identify PNs based on the characteristics of PN volume, lobes, burrs, edges, and adhesion to surrounding tissue. However, the presence of artifacts and noise results in missed diagnosis and misdiagnosis of benign and malignant PNs to a certain extent [16]. Although the convolutional neural network algorithm for MRI images has been widely used in the preoperative diagnosis of many diseases, how to accurately locate the focus and differentiating benign and malignant foci still needs further research.Studies have shown that the convolutional neural network demonstrates good image segmentation results, indicating that it should be suggested in clinical MRI image analysis [17, 18]. In this study, the traditional and improved DenseNet networks were applied to segment MRI images of PN patients. The results showed that, compared with the traditional one, the improved DenseNet network algorithm had higher diagnostic accuracy in terms of PN volume, lobes, burrs, edges, and adhesion to surrounding tissue. Compared with the control group, the difference was notable (P<0.05); the accuracy rates in differentiating benign and malignant PNs in the test group were higher (92.38 ± 8.74% vs. 75.56 ± 7.56%), and the difference was notable (P<0.05). In short, the improved DenseNet network shows high accuracy in diagnosing PNs and differentiating benign and malignant PNs, and it is worthy of further promotion in the clinic.


## 5. Conclusion

In this study, the traditional and improved DenseNet networks were applied to segment MRI images of PN patients. It was found that the MRI image based on the improved DenseNet network algorithm showed higher accuracy in diagnosing PNs and differentiating benign and malignant PNs. However, some limitations should be noted in the study. The sample size is small and the selection of subjects is not representative enough, because they are from the same hospital. Additionally, the distinct manifestations of different types of PNs are not discussed in detail, and it is impossible to verify the impact of these characteristics on the accuracy of diagnosis. In the follow-up, an expanded sample size is needed, and the multicenter collaborative analysis method is recommended. All in all, the results of this study provide a good theoretical basis for using the improved DenseNet network algorithm to diagnose PNs and differentiate benign and malignant PNs.



---

*Source: 8689068-2021-07-23.xml*