key: cord-0045445-k9kkjiwq authors: Loeza Mejía, Cecilia Irene; Biswal, R. R.; Rodriguez-Tello, Eduardo; Ochoa-Ruiz, Gilberto title: Accurate Identification of Tomograms of Lung Nodules Using CNN: Influence of the Optimizer, Preprocessing and Segmentation date: 2020-04-29 journal: Pattern Recognition DOI: 10.1007/978-3-030-49076-8_23 sha: 1b3ff0144b824c6a050b5524d6def8933d778868 doc_id: 45445 cord_uid: k9kkjiwq The diagnosis of pulmonary nodules plays an important role in the treatment of lung cancer, thus improving the diagnosis is the primary concern. This article shows a comparison of the results in the identification of computed tomography scans with pulmonary nodules, through the use of different optimizers (Adam and Nadam); the effect of the use of pre-processing and segmentation techniques using CNNs is also thoroughly explored. The dataset employed was Lung TIME which is publicly available. When no preprocessing or segmentation was applied, training accuracy above 90.24% and test accuracy above 86.8% were obtained. In contrast, when segmentation was applied without preprocessing, a training accuracy above 97.19% and test accuracy above 95.07% were reached. On the other hand, when preprocessing and segmentation was applied, a training accuracy above 96.41% and test accuracy above 94.71% were achieved. On average, the Adam optimizer scored a training accuracy of 96.17% and a test accuracy of 95.23%. Whereas, the Nadam optimizer obtained 96.25% and 95.2%, respectively. It is concluded that CNN has a good performance even when working with images with noise. The performance of the network was similar when working with preprocessing and segmentation than when using only segmentation. Also, it can be inferred that, the application of preprocessing and segmentation is an excellent option when it is required to improve accuracy in CNNs. At present, there has been an incredible growth in the use of machine learning techniques in medical research, mainly applied to genetics [1] , disease detection, biomedical image segmentation [2, 3] and classification, thus showing the efficacy of machine learning in clinical decisions and monitoring systems [4] . The use of convolutional neural networks (CNN) in deep learning has helped in the automatic detection of various diseases particularly through the processing of biomedical images and clinical data. Recently, CNN research related to lung cancer, has focused on the automatic diagnosis of cancer [5, 6] , lung segmentation [7] [8] [9] , segmentation of pulmonary nodules [10] [11] [12] [13] , lung nodules detection [14, 15] , cancer classification [16] , nodule categorization [17] and nodule malignancy assessment [18] [19] [20] [21] [22] [23] [24] [25] [26] . Various investigations, related to lung nodules, report the influence of the data augmentation [14, 24, 26] , number of input channels [20] and the use of dropout [8, 14, 18, 20, 21, 24, 26] , in order to improve the accuracy of the network and to avoid overfitting. Likewise, some other researchers report the influence of the number of parameters [20, 23] and training time [20] . Nonetheless, the use of preprocessing and segmentation has been little explored; the same applies to the effect of various available optimizers. The main goal of this investigation is to evaluate the influence of the optimizer (Adam [27] and Nadam [28] ), preprocessing and segmentation in CNN for the precise identification of tomograms with pulmonary nodules. The evaluation was carried out considering both in precision and training time. The experiments were carried out on the Lung TIME [29] dataset, which is publicly available. In continuation, the paper is organized as follows: Sect. 2 deals with the materials and methods used while in Sect. 3 the results obtained are discussed and finally in the Sect. 4, the conclusions and future work are presented. Three scenarios (see Fig. 1 , the yellow color indicates the first case analyzed, while the blue color illustrates the second and the green color denotes the third) were considered to carry out the identification of tomograms with lung nodules applying a convolutional neural network: (i) to rescale the tomograms to 96 × 96 pixels and pass them as an input to CNN. (ii) to segment the tomograms to obtain the pulmonary regions and rescale them, then pass them as input to CNN. (iii) to preprocess the tomograms by applying filters (median and Gaussian), then the preprocessed image was binarized, subsequently the tomograms were scaled, which were taken as input to CNN. The motivation to perform the downsampling of the tomograms was to decrease the training time. In this study, CT thorax scans in DICOM format with annotations of the pulmonary nodules in XML format of Lung TIME [29] was used. 62 CT thorax scans were chosen, which had 2003 tomograms with nodules and 12934 without nodules. To validate the results, 70% of the tomograms was randomly selected and utilized for training and the rest for testing. To improve the quality of the tomograms, the median filter and afterwards the Gaussian filter were applied, as discussed in [31] to eliminate salt-and-pepper noise, and the mottled noise from the image. The applied median filter mask was 5 × 5 pixels. On the other hand, standard deviation for Gaussian kernel was equal to 2. To perform the segmentation, the thresholding technique was chosen. Thresholding is a simple and efficient technique for partitioning an image into a foreground and background [30] . According to Alakwaa et al. [16] it produces the best lung segmentation compared to clustering techniques (K-means and Mean Shift) and Watershed. Binarization was performed with a threshold of −350 HU as suggested by Pulagam et al. [32] to separate the pulmonary region tomography. Finally, the components connected to the edge of the binarized image were removed. The description of the layers of the CNN architecture is indicated in Table 1 , which consists of multiple convolutional layers with ReLU activation, maxpooling, flatten, dense and a final fully connected softmax layer to carry out the classification between tomograms with nodules and tomograms without nodules. Table 2 shows the CNN architecture using the Dropout layer, which helps [33] . Both architectures were tested with Adam [27] and Nadam [28] optimizers. A batch size of 32, 5 epochs and a sparse categorical crossentropy loss function [34] was applied. To implement CNN, Tensor Flow 2.0 was utilized in Python 3.7. The imageio [35] library was employed to read the DICOM images. For the preprocessing SciPy [36] library was used, while for segmentation of tomograms the scikit-image [37] library was used. The equipment on which the tests were performed has the following characteristics: Figure 2 shows an example of the application of filters (first the median filter and then the Gaussian) to the tomograms. The use of preprocessing significantly Fig. 2. (a, b) original images of slices, and (c, d) images obtained after application of filters increases image quality, thus helping to reduce both salt and pepper and the mottled noises from the images. Figure 3 shows examples of binarization in the tomograms. By means of the segmentation, the pulmonary region could be obtained, which allowed to improve the performance of the CNN. Table 3 gives a summary of the experiments performed without using Dropout while Table 4 reports the experiments carried out with a 0.0002 Dropout rate. Also tests were performed with/without preprocessing, with/without segmentation and with different number of tomograms. Performance was compared between Adam and Nadam optimizers. When carrying out the segmentation, better results were obtained, however, the execution time increased. In most tests (both using the Dropout layer and without using it), in which preprocessing was not carried out, better results were observed using the Nadam optimizer and a shorter runtime. When Dropout was not applied, preprocessing was performed and the Nadam optimizer was used, in some cases the runtime increased, compared to the Adam optimizer. So when the Dropout layer is not used, it is recommended to use the Nadam optimizer on images that have not been preprocessed, instead the Adam optimizer is suggested for images that were preprocessed. Figure 4 shows the average accuracy of training and testing in the experiments performed. On average, the Adam optimizer obtained a training accuracy In contrast, the Nadam optimizer obtained 96.25%, 95.2% and 33.23 min respectively. It was observed that when using the Nadam optimizer slightly better results are obtained than when those furnished by Adam. In addition, accuracy using only segmentation is better than when it is combined with preprocessing. An experimental analysis was performed through the preprocessing, segmentation and optimizer on images of Lung TIME dataset resized to 96 × 96 pixels. It is concluded that convolutional neural networks have excellent performance in the identification of tomograms with nodules, obtaining training accuracy above 90.24% and test accuracy above 86.8%, even when working with images with noise. It is suggested that when working with CT thorax scans, no preprocessing be applied and only segmentation can be performed, since better results were observed in this case (a training accuracy above 97.19% and test accuracy above 95.07% were obtained), compared to applying preprocessing and segmentation (a training accuracy above 96.41% and test accuracy above 94.71% were obtained). In addition, the use of preprocessing significantly increases runtime. On average, the Adam optimizer obtained a training accuracy of 96.17%, test accuracy of 95.23% and training time of 31.95 min. In contrast, the Nadam optimizer obtained 96.25%, 95.2% and 33.23 min, respectively. When Dropout is not applied and preprocessing is performed, it is recommended to use the Adam optimizer. On the contrary, the Nadam optimizer is recommended when no preprocessing on the tomogram is performed. Applying segmentation is an excellent option when accurate results are required. We would like to remark that the model obtained can be used as part of a computer-assisted diagnostic system on lung cancer research. As future work, the location of the nodules in the tomograms identified is proposed. In addition, it would be interesting to compare the performance of different preprocessing techniques. Machine learning for epigenetics and future medical applications Automated segmentation of tissues using CT and MRI: a systematic review Deep learning approaches to biomedical image segmentation Radiological images and machine learning: trends, perspectives, and prospects Classification of pulmonary CT images by using hybrid 3D-Deep convolutional neural network architecture Lung cancer detection using convolutional neural network (CNN) Comparison of the automatic segmentation of multiple organs at risk in CT images of lung cancer between deep convolutional neural network based and atlas-based techniques Fast and automatic segmentation of pulmonary lobes from chest CT using a progressive dense V-network Lung segmentation method with dilated convolution based on VGG-16 network 3D convolutional neural network for automatic detection of lung nodules in chest CT Diagnostic classification of lung nodules using 3D neural networks Improved U-NET network for pulmonary nodules segmentation Fast and fully-automated detection and segmentation of pulmonary nodules in thoracic CT scans using deep convolutional neural networks Pulmonary nodule detection in CT images: false positive reduction using multi-view convolutional networks Automated pulmonary nodule detection in CT images using deep convolutional neural networks Lung cancer detection and classification with 3D convolutional neural network (3D-CNN) Automatic categorization and scoring of solid, part-solid and nonsolid pulmonary nodules in CT images with convolutional neural network Comparing two classes of end-to-end machine-learning models in lung nodule detection and classification: MTANNs vs CNNs Classification of lung nodule malignancy risk on computed tomography images using convolutional neural network: a comparison between 2D and 3D strategies 3D multi-view convolutional neural networks for lung nodule classification Agile convolutional neural network for pulmonary nodule classification using CT images Highly accurate model for prediction of lung nodule malignancy with CT scans Dense convolutional binary-tree networks for lung nodule classification 3D deep learning for detecting pulmonary nodules in CT scans The utilization of consignable multi-model in detection and classification of pulmonary nodules Automated pulmonary nodule classification in computed tomography images using a deep convolutional neural network trained by generative adversarial networks Adam: A method for stochastic optimization Incorporating nesterov momentum into Adam The Lung TIME: annotated lung nodule dataset and nodule detection framework Efective and reliable framework for lung nodules detection from CT scan images Lung cancer detection using CT scan images Automated pulmonary lung nodule detection using an optimal manifold statistical based feature descriptor and SVM classifier Dropout: a simple way to prevent neural networks from overfitting SciPy 1.0: fundamental algorithms for scientific computing in Python scikit-image: image processing in Python