Lung cancer medical images classification using hybrid CNN-SVM

in diameter

Pulmonary nodules can be detected on CT scan images or X-ray films. By identifying and classifying malignant from benign nodules, the malignant nodules can be removed at an early stage to prevent further spreading of tumor cells which leads to fatality. Lung cancer classification is significant because most people diagnosed with this disease are within the age range of 55-65. Early diagnosis and treatment are crucial for their survival. An early diagnosis for lung cancer detection is by lung radiology test (lung image), called Chest X-Ray test. Lung image will show different results between normal lung and abnormal lung. The existence of nodules in the lung image indicates that the lung is not normal [8]. Fig.1 displays a standard lung image and a denoised lung image from level 1 to 10 using Haar Wavelet. Detection of lung cancer in its early stages could reduce the fatality rate [9] [10]. Early detection of cancerous cells is crucial to prevent them from growing and remove them early before they start to grow rapidly. Also, accurate location and size detection of benign cells is another crucial point to be taken as in CT scans. It is difficult to differentiate cancerous nodules from other pulmonary nodules that are not cancerous by only depending on visual estimation, which is a traditional way for healthcare workers to examine CT scans. Computer-Aided Detection (CAD) systems have been utilized to process medical images such as CT scan images to assist the medical personnel in the early detection of lung cancer [11]- [14]. It has been reported that CAD systems have an enormous positive impact on the job of radiologists in detecting cancer, and the systems could be used as a second reader [15]. CAD systems are based on computer algorithms that process images such as CT scan images of the lung to determine whether a given image has any sign of cancer; this process is called image classification. Several machine learning algorithms have been proposed to classify medical images and determine the existence of lung cancer, such as those of [16]- [18]. Singh & Gupta [19] have researched various machine learning approaches for the classification and detection of lung cancers using CT scan images. Different classifiers are put to the test to determine the best machine learning algorithm from the classification process. The results 153 Vol. 7, No. 2, July 2021, pp. 151-162 Saleh et al. (Lung cancer medical images classification using hybrid CNN-SVM) show that multilayer perceptron or neural networks can be applied to classify lung cancer CT scan images because it obtained a high percentage of accuracy precision value. Over the years, deep learning has been used increasingly in various fields, and research on deep learning are growing rapidly. Various techniques are proven to give accurate and precise results, which help humans detect errors and mistakes at early stages and help to predict the outcomes.
Machine and deep learning methods are used widely in the medical and healthcare field for monitoring, detecting, classifying, and predicting diseases [20]- [24]. For instance, an established Artificial Intelligent system for detecting and classifying hemoglobin to monitor blood loss, the Triton™ system by Gauss Surgical™, a medical technology company, has been used in a few hospitals such as at Mount Sinai Hospital to monitor blood loss and prevent hemorrhage by early detection [25]. Various studies proved that computational methods applied in Triton™ have high prediction accuracy towards early detection of hemorrhage [26]. The results produced by deep learning are convincing and deep learning should have focused more on helping in the medical sector. Convolutional Neural Networks (CNNs) have recently become a popular diagnostic tool due to the high performance in segmentation, pattern detection, recognition, and classification [27]. Moreover, CNN is known to have the best performance when using large amounts of data lacking in medical imaging due to several factors such as ethics and lack of well-labeled data. Many researchers have tried to overcome this problem by proposing advanced off-the-shelf CNNs, advanced implementation techniques, and many more to propose an algorithm that leverage performance even with small dataset [7].
Deep learning is utilized in this study for lung cancer classification due to its merit as a popular and powerful method of pattern recognition and classification [28] [29]. Deep learning, specifically CNN, is known to have a high success rate if only a huge amount of data is implied. A large number of welllabeled training data such as ImageNet is required for CNN to have a good performance which medical images lack. Large datasets are not always available due to several factors such as the costly expert explanatory notes, ethical issues, and shortage of disease images [30]. The model with a large number of parameters will fail to learn the patterns if supplied with small datasets and can easily cause overfitting [31]. Most traditional CNN architectures' performance depends heavily on the size of data. They initially have numerous parameters and state of art CNN models trained with large datasets such as ImageNet is unsuitable for datasets with hundreds or thousands of instances [32]. This poses a problem that researchers must address in order to improve model output despite having a large amount of labelled data. As a result, conventional CNN is unsuitable for medical imaging processes involving small datasets (hundreds to thousands number of data). It is important to investigate a new algorithm in order to obtain a more accurate result [17][33] [34].
Although many deep learning-based algorithms for lung cancer have been proposed [35]- [40], there is much room for their accuracy to be improved. Therefore, a CNN-SVM architecture has been proposed in this paper, which removes and eliminates useless information that negatively impacts accuracy. This is accomplished in the CNN architecture's pooling step, which is used to classify lung cancer in the fully connected layer using a modified SVM architecture.

Method
Deep learning is no longer a stranger to the medical imaging analysis field. It is a growing trend, and the demand for deep learning in achieving accurate and precise results is growing [41]. Deep learning involves imitating how the human brain works in dealing with data and recognizing patterns for decisionmaking [42]- [45]. With the emerging of technology and better algorithms, more machinery gives high accuracy and reliability for medical analysis. Detection of cancerous or malignant cells is crucial for the treatment of lung cancer. Application of image analysis deep learning on computed tomography (CT) scan images helps to detect malignant cells early before they develop and become lethal [5]. Deep learning has been proven to have significant performance in image processing, especially in object detection and localization [19]. Deep learning uses multiple layers to represent the abstractions of data to build computational models [46]. A deep learning algorithm with Convolutional Neural Networks (CNNs) is applied to a dataset to perform a classification task. Fig. 2 shows an illustration of a Convolutional Neural Network in conjunction with a support vector machine. In Fig. 2, Yu et al. [47] proposed a system for predicting epidermal growth factor receptor (EGFR) mutations that have been known to be associated with lung cancer. In the system, six layers of CNN are constructed to learn deep image features, and then the Support Vector Machine (SVM) classifier is used for prediction. This system was tested on two datasets, and it achieved accuracy levels of 76.16 % and 67.55% on Dataset1 and Dataset2, respectively. By learning from the deep-layered and hierarchical data models, the deep learning algorithms can outperform the traditional machine learning models [33]. With deep learning, the data are processed easily. According to [48], deep learning has been found to identify the underlying structure of data using auto-encoders and other techniques. A CNN is the most popular choice when it comes to image classification. This is because CNN architecture implicitly combines the benefits of the standard neural network training with the convolution operation to classify images efficiently. da Silva et al. [33] tested the functionality of the deep learning algorithms for lung cancer diagnosis with cases from Lung Image Database Consortium (LIDC) database. The results showed the promising performance of deep learning algorithms, and the accuracy achieved was an impressive rate of 79.40%. The researchers intended to test the deeper structured schemes for lung cancer diagnosis and seek more efficient ways to minimize the downsample effect. They compared their method with Deep Belief Networks (DBNs) and Stacked Denoising Autoencoder (SDAE) using the same dataset. They achieved accuracies of 81.19% and 79.29% on DBN and SDAE, respectively. The comparison results demonstrated the great potential of deep structured algorithms and computer learned features in the domain of medical imaging. In the article by Ali et al. [49], the authors reported developing a reinforcement learning model based on deep artificial neural networks for the early detection of lung cancer. The authors used the LUNA dataset, a subset of the LIDC/IDRI and achieved an accuracy of 99.1% on the training set and 64.4% on the testing set. Another system was proposed by [50], where the authors developed a CAD system for lung nodule classification based on multi-view multi-scale CNN. The system was tested on both the LIDC/IDRI and ELCAP datasets and achieved 92.3% and 90.3% accuracy on both datasets, respectively. The aforementioned studies show that CNN performance in many instances could be improved to achieve higher accuracy and assist in the early detection of lung cancer with minimum errors.

Dataset
This study utilized the CT images from the Chest CT-Scan Images Dataset [16]. This dataset consists of CT images of normal lung images and lung cancer images. Since the data was cleaned and of high resolution, the database was perfect for deep learning. We created a subset of the dataset with 1000 images comprising cancer images (adenocarcinoma, large cell carcinoma, squamous cell carcinoma) and normal images. Examples of the images are shown in Fig. 3 and Fig. 4. Each training, testing, and validation set has four classes of images (adenocarcinoma, large cell carcinoma, normal and squamous cell carcinoma). The data was separated into training, testing, and validation sets to evaluate the classification model.

Data Augmentation
Data augmentation methods were added to the workflow of these experiments to enlarge the data set and avoid overfitting issues [51]- [53]. This technique aims to increase the number of deep neural model training datasets, balance the size of the datasets, and boost their efficiency, but it is still the subject of research [54]. The dataset used in this paper has been increased from 1000 images to 5103 images via the color transformation technique by intensity adjustment. There was no specific requirement for deep learning, but the training data set needs to be high-quality in medical imaging [55]. Based on [56], at least 500 to more than 1000 images per class is good enough for classification task in Deep Neural Network (DNN). In this experiment, 20% of the total dataset was utilized as a testing set, and the remaining data was divided into the train-validation split of 80-20.

Convolution Neural Network (CNN)
The deep learning algorithm used in this study is Convolutional Neural Network. A convolutional neural network (CNN) is a type of multilayer feedforward biologically influenced neural network [57]- [60]. A CNN has several layers, which can be classified into three types: convolutional (compute the output of the connected local input region neurons), max-pooling (sub-sampling the inputs), and fully connected layers (used in computing each class' activation). The input to a CNN is an n x n x m image, where n is the height and width and m is the number of channels, and there will be k convolutional filters of size a x a in the convolutional layer, where a < n. The CNN is built and then fitted into the dataset. In CT scan images, a slice has a width and height of 512x512 which are multiplied by the number of images, in our case 5103 images. In this study, the CNN model consists of 4 steps: 1) the convolution layer; 2) the pooling layer; 3) the flattening layer; and 4) the full connection layer. Fig. 5 shows the architecture of the model.
In the Convolution Layer, feature maps are created by multiplying the input images with feature detectors. Many feature maps are created, and the size of the image becomes smaller for easier processing. Due to the use of several feature detectors, different feature maps are created. Within this step, the ReLU activation function is used to increase the non-linearity in the CNN (since images are generally non-linear). In the Pooling layer, the feature maps' resolution is reduced; in this step, the max-pooling is applied where a window function is applied to the input feature map and computes the maximum in the neighborhood. In this step, a large amount of useless information is eliminated, and this has a great impact on producing better results since unrelated/useless information will not be fed into the fully connected layer. In the flattening step, the pooled feature map is flattened into a column. This is done to further process it in the Support Vector Machine (SVM). Lastly, all features are processed in a fully connected layer that consists of SVM, which produces one of four options: adenocarcinoma, large cell carcinoma, normal or squamous cell carcinoma. In this study, the above architecture was implemented with Python 3.7 using Jupyter Notebook, which was installed in Intel Core i5 10 th Gen processor with 16 GB of memory and NVIDIA GeForce RTX 2060 GPU support with 6 GB of memory.

Model Training
In the model training, Adam was used as a neural work optimizer and categorical cross entropy was used as a loss function.

Result and Discussion
The last part is evaluating whether the proposed method has succeeded in enhancing the accuracy of prediction. Accuracy refers to the closeness of a measured value to a standard or known value. The accuracy of the result is very important in determining the best algorithm to use in the future. The higher the accuracy, the more excellent the results of the research are. The accuracy can be calculated based on (1). Accuracy = TP+TN TP+TN+FP+FN (1) where TP refers to True Positives, TN refers to True Negative, FP refers to the False Positive, and FN refers to False Negative. The experiment runs 60 times using the datasets for training and validation. At the beginning of the training, the accuracy was low because the training was executed only a few times. After the number of epochs increased, the accuracy improved. Table 1 shows the final accuracy obtained in the Chest CT-Scan images dataset. As shown in Table 1, the performance of the CNN-SVM method reached a high rate of 96.71% on the training set and 97.91% on the validation set. In the reported result, there are 4 components: accuracy, validation accuracy, loss, and validation loss. Fig. 6 and Fig. 7 show training loss versus validation loss and training accuracy versus validation accuracy, respectively. As shown in Fig. 7, the Convolutional Neural Network Support Vector Machine training accuracy increases as the number of epochs increases. This means that the higher the number of epochs, the more the CNN-SVM algorithm adapts to the dataset in classifying the images.  Consequently, using the confusion matrix (shown in Fig. 8), the sensitivity, specificity and precision were computed. These performance measures are determined using (2) to (4).  Fig. 8 and Fig. 9 show the confusion matrix and Receiver Operating Characteristics (ROC) curve performance, respectively. Table 2 illustrates the performance measure in this experiment.    Table 3 compares the implementation of the CNN and other recent works that are also based on deep learning. As shown in Table 3, our work achieves better accuracy if compared with most of the other recent works (which have been reported in this paper) except that of [49], which achieved 99.1% using the training set. However, the accuracy of the testing set is 64.4%, which is low compared to the test accuracy of 97.91% obtained from our work. In addition, the proposed work also shows promising performance in terms of sensitivity, specificity, precision, and AUC when compared with existing works. On top of that, the number of epochs used in [49] was 120 compared with 60 epochs in our training.

Conclusion
This study introduces a hybrid CNN-SVM method to classify lung CT images into adenocarcinoma, large cell carcinoma, normal or squamous cell carcinoma. The aim was to achieve a higher level of accuracy, which is the goal of any computer-aided detection system. The method was applied to the Chest CT-Scan images dataset, a standard and publicly available cluster of CT images. A total of 5103 images were used to test the method, and a classification accuracy rate of 97.91% was achieved. It shows the superiority of the proposed hybrid CNN-SVM and its capabilities in the applications. Furthermore, the proposed CNN-SVM method also provides the sensitivity, specificity, precision, and AUC of 97.90%, 99.32%, 97.96%, and 1.000, respectively. For future work, the researchers aim to test the method with different datasets. The level of accuracy can be further improved by increasing the number of images utilized for the procedure. Additionally, X-ray, X-beam, and PET images can be interpreted by utilizing this method. An examination should be possible for all these images. By studying and analyzing the prediction results of different types of images, the medical personnel will be able to use the most suitable images to discover lung malignancy.