Improved DenseNet-BasedMRI in Pulmonary Nodules Diagnosis and Benign and Malignant Differentiation

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.*eMRI 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). *e 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). *e 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). *e 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.


Introduction
Pulmonary nodule (PN) refers to round-or irregularshaped lesions with a diameter of less than or equal to 3 cm (i.e., 30 mm) in the lung. e 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. e 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. erefore, 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. e 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]. e 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 Den-seNet 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. e 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.

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. ey 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. e 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. e 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. e 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.

e Improved DenseNet Network.
e deep learning is used to automatically segment MRI images which can greatly reduce the dependence on the subjective judgment of physicians.
e traditional convolutional neural network (CNN) includes a convolutional layer, a pooling layer, and a full-connected layer.
e neural unit layers of various functions are stacked to form deep convolutional neural network. e equation of any one of the convolutional layer feature maps can be expressed as follows: where x represents the x neuron of a certain convolutional layer, H x represents the x feature map obtained by convolution, and y represents the input image. e weight of the x neuron can be expressed as M x , * 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. e maximum pooling equation can be expressed as follows: where H xab represents the pooling operation related to the feature map and y xmn represents the elements in the pooling area D ab . e 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. e activation function of the fully connected layer is usually expressed by the Softmax function, defined as follows: where Z represents the number of target categories and s R z represents the predicted value of the z category, and s z represents the z category. e Softmax function outputs the probability that the sample belongs to each category, and the sum of the probabilities is 1. e algorithm is optimized to analyze MRI images of PN patients. en, 3D convolutional neural networks are introduced to make up for the 2D convolutional neural network's inability to obtain temporal information in video images. e mathematical equation for 3D convolution is as follows: where u ij ab represents the eigenvalue of the (i, j) position on the b feature map on the a layer, g( ) represents the activation function, and f ab represents the bias term. t represents the feature map index of the layer connected to the current feature map, v mn abt represents the weight value, and E a , F a represent the height and width of the convolution kernel. Bias and weights need to be determined through training, and other values can be preset. e maximum pooling operation of 3D convolution can be expressed as follows: where R represents the number of feature spaces, (Q, W, E) represents the size of the feature map, and s a x represents the x feature output map of the a convolutional layer. e 3D convolution maximum pooling operation is to calculate the maximum value in the feature cube. e 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. e 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 is x, 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).
where * represents the element-wise product of the output g(vu) 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.
rough 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. e 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). Figure 1 is 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: 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: 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. is 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. e segmentation process of the MRI image of the PN patient based on the improved DenseNet network algorithm is shown in Figure 2.

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).
Scientific Programming 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.

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. e data was processed by SPSS 19.0. e measurement data were expressed as mean ± standard deviation (x ± s). e comparison of the means between each group adopted the t-test. e count data were expressed as a percentage (%), and the χ 2 test was used. P < 0.05 was the threshold for significance. Figure 3 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. e 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. e 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 4 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. e 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 5 shows a quantification comparison between the traditional DenseNet network algorithm and the improved one, involving accuracy, recall   Scientific Programming 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).

Diagnosis and Differentiation of Benign and Malignant
PNs. e 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 ( Figure 6). 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 8 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).

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. erefore, 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. e results showed that, compared with the traditional one, the improved DenseNet network algorithm   Control group Test group * * * * * Figure 6: e diagnostic accuracy. Note. * means a notable difference versus the control group (P < 0.05).
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.

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. e 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.

Data Availability
e data used to support the findings of this study are available from the author upon request.