Lung cancer, the treacherous malignancy affecting the respiratory system of a human body, has a devastating impact on the health and well-being of an individual. Due to the lack of automated and noninvasive diagnostic tools, healthcare professionals look forward toward biopsy as a gold standard for diagnosis. However, biopsy could be traumatizing and expensive process. Additionally, the limited availability of dataset and inaccuracy in diagnosis is a major drawback experienced by researchers. The objective of the proposed research is to develop an automated diagnostic tool for screening of lung cancer using optimized hyperparameters such that convolutional neural network (CNN) model generalizes well for universally obtained computerized tomography (CT) slices of lung pathologies. The aforementioned objective is achieved in the following ways: (i) Initially, a preprocessing methodology specific to lung CT scans is formulated to avoid the loss of information due to random image smoothing, and (ii) a sine cosine algorithm optimization algorithm (SCA) is integrated in the CNN model, to optimally select the tuning parameters of CNN. The error rate is used as an objective function, and the SCA algorithm tries to minimize. The proposed method successfully achieved an average classification accuracy of 99% in classification of lung scans in normal, benign, and malignant classes. Further, the generalization ability of the proposed model is tested on unseen dataset, thereby achieving promising results. The quantitative results prove the efficacy of the system to be used by radiologists in a clinical scenario.

Lung cancer occurs due to uncontrolled growth of abnormal cells in the lungs. It is responsible for the highest number of cancer-related fatalities globally, among both men and women. According to the GLOBOCON 2020 report, an estimated 2.2 × 106 (11.4%) new lung cancer cases and 1.8 × 106 lung cancer-related deaths occurred in 2020.1 In India, of all the cancers, lung cancer occupies 5.5% and 7.8% cancer-related deaths.2 Individuals who are diagnosed with lung cancer in its early stages have a significantly better chance of surviving for at least five years compared to those diagnosed in later stages. The 5-year survival of stage 1 lung cancer is about 65%, while patients with stage 4 is around 5%.3,4 Hence, early detection is crucial for the effective treatment of lung cancer. As of now, medical images are visually scanned by radiologists and doctors to identify any abnormalities in the human body. As a result, the manual process of diagnosing diseases using medical images is intricate, complicated, and time consuming. Figure 1 illustrates the view of the lung cancer as observed through CT images. The regions highlighted in orange indicate areas of cancerous growth; as it can be seen from Fig. 1, visual examination depicts similar characteristics between affected and non-affected areas, thereby hindering the accuracy of diagnosis. Biopsy is the only gold standard to confirm lung cancer. However, biopsy is an invasive, time consuming, and a traumatizing process for the patient. Over, the recent year computer aided diagnostic tools have significantly aided radiologists with a second opinion to analyze complicated CT scans for diagnosis of various pathologies. This research is an attempt to develop a computer aided decision support system for noninvasively detecting lung cancer at an earlier stage, with the aim to improve the prognosis and life expectancy of the patients. As far as diagnosis is concerned, experts believe that pathologically. The diagnosis of lung cancer can be performed accurately using histological image analysis. Histologically, there are four different forms of lung cancer. However, each one of them may be benign, or malignant, depending on the level of severity and onset of the disease. One of the major term, a pathologist describes after the lung biopsy is found to be suspicious, is “carcinoma.” The origin of such cancer occurs in the cells that line the organs of the human body. With respect to the lungs, the major regions affected are alveoli and the bronchi. However, if such cells are found on the morphologically upper layer, they are termed as in situ or benign cases. Most importantly, the domain specific features that are being looked for in determining the lung cancer are cell keratinization, bridging between the cells, and the formation of squamous pearl. The proposed research also provides an analysis of the major regions that have significantly affected the classification accuracy in terms of occlusion maps.

FIG. 1.

Illustration of lung cancer affected CT images.

FIG. 1.

Illustration of lung cancer affected CT images.

Close modal

This study presents a novel optimized SCA based CNN model, which learns the values of the hyperparameters from the lung CT scans to automatically classify lung CT scans into malignant, benign, and normal classes. Initially, a noise removal mechanism is introduced to preprocess the CT images and enhance the features, such that information regarding the intricate features is preserved. Further, an optimization mechanism is employed to determine the values of the hyperparameters to test a five-layer based CNN model developed from the training set. Furthermore, the SCA learns the values of the hyperparameters by minimizing the error rate function between the predicted and the actual values of the dataset from the training samples to achieve the minima. The optimization algorithm has significantly improved the classification performance of the CNN. To exhibit the performance validation of the SCA-CNN technique, the IQ-OTH/NCCD dataset is used in this study.

Over the recent years, few researchers have carried applied image analysis techniques for prediction of lung cancer. In Ref. 5, histogram of oriented gradients (HoG), wavelet transform-based features, local binary pattern (LBP), scale invariant feature transform (SIFT), and Zernike Moments were used for developing a DL based model. In Ref. 24, Raza et al employed data augmentation techniques. In evaluations on variations of EfficientNet B0 to B4, Lung-EffNet achieved high ROC scores between 0.97 and 0.99 and accuracy of 99.10% on the lung cancer dataset.

In Ref. 6, Magdaline et al. proposed using a CNN, attention gate residual U-net model, and KNN classifier for lung cancer detection. They utilized the AGResU-Net architecture to divide and identify 1097 CT images. Their approach involved first classifying the CT images with a CNN, then segmenting tumor regions using AGResU-Net, and finally determining if the tumor is benign or malignant using a KNN classifier. In their experiments, the CNN classifier achieved accuracy of 97%, 85%, and 82% on different categories. They found the segmented tumor outputs and labeled dataset to have equal accuracy. Their results showed the ability to detect benign and malignant tumors with high probability and accuracy. Yan et al.7 come up with a technique for automatic detection of lung cancer from CT scans using convolutional neural networks (CNNs). They first preprocessed the lung CT images and fed them into a CNN architecture. They developed a modified snake optimizer to optimize the CNN structure for best performance. The model was assessed on the IQ-OTH/NCCD Lung Cancer Dataset. In comparison with other methods, their proposed approach showed improved results for lung cancer detection.

In Ref. 8, Mohamed et al. proposed a CNN and hybrid metaheuristic approach for lung cancer classification. Initially, a CNN architecture was designed, and its solution vector was computed. The Ebola optimization search algorithm (EOSA) was then used to find optimal weights and biases for training the CNN model. Once fully trained, the model achieved 0.9321 accuracy on the IQ-OTH/NCCD dataset. In Ref. 9, Deepa et al. proposed LCC-Deep-ShrimpNet to classify lung cancer in CT images. They used the IQ-OTH/NCCD Lung Cancer Dataset as input. The lung CT images were preprocessed by utilizing a kernel correlation approach. Bayesian fuzzy clustering was applied to extract lung nodule regions from the preprocessed scans. The extracted regions were fed into the Deep-ShrimpNet classifier to represent features and categorize the CT scans as malignant, normal, or benign. Compared to existing methods, their proposed LCC-Deep-ShrimpNet achieved higher accuracy, lower error rates, and faster computation times on the dataset.

Nitha and Vinod Chandra10 developed an automated lung cancer detection framework called ExtRanFS using transfer learning. They used 1 mm thick DICOM formatted CT scans from the IQ-OTH/NCCD dataset, comprising 80–200 slices at different angles. Their approach involved an extremely randomized tree classifier for feature selection, pre-trained VGG16 model for feature extraction, and multi-layer perceptron classifier for final classification as benign, malignant, or normal. Their framework achieved 99.09% accuracy, 98.33% sensitivity, and 98.33% F1-score on the dataset. Additionally, few researchers have employed transfer learning based approaches. Nigudgi and Bhyri11 proposed a transfer learning-based method for lung cancer detection from CT scans. They used a pre-trained hybrid model comprising VGG, GoogleNet, and AlexNet to extract features from the input images. These features were then classified using a multi-class support vector machine (SVM). For training and evaluation, they used real-time CT scans like other deep-learning models. The IQ-OTH/NCCD dataset containing 1190 normal, benign, and malignant images was utilized. By splitting the data into various ratios during training and validation, they evaluated the model's effectiveness. Their approach achieved 97% accuracy on lung cancer detection.

Sabzalian et al.12 developed a lung cancer diagnosis system using an enhanced bidirectional recurrent neural network optimized with an improved Ebola optimization search algorithm. They performed certain preprocessing steps before applying the main diagnostic system. The model was evaluated on the IQ-OTH/NCCD Lung Cancer Dataset. In comparison with previous published methods, their results demonstrated the superiority of their proposed approach for accurate lung cancer diagnosis. In Ref. 13, Prakash et al. proposed an approach called EESNN-FSOA-LCC to classify lung cancer from CT images using a search optimization algorithm. As preprocessing, they applied anisotropic diffusion Kuwahara filtering on the input CT images. Hesitant fuzzy linguistic bi-objective clustering was used to extract ROI regions from the preprocessed scans. Features from the ROI segmentations were extracted using a gray level co-occurrence matrix (GLCM) window adaptive method. These features were classified by an EESNN classifier into normal, benign, or malignant categories. Since EESNN lacked optimization for ideal parameters, they developed a flamingo search optimization algorithm to optimize EESNN for accurate lung cancer classification. Gowda and Jayachandran14 proposed lung tumor detection using a computer vision-based diagnostic approach enhanced by machine learning techniques. The main goal of the proposed method is to create an effective segmentation technique that will improve the accuracy of the classification of lung tumors. To achieve this, random region segmentation (RSS) is used for image segmentation, SIFT and GLCM algorithms are applied for feature extraction, and a triple support vector machine (SVM) is implemented for the classification of data samples into normal, malignant, or benign. With 300 epochs of training on the IQ-OTH or NCCD dataset, the model achieves an accuracy of 96.5% under 200 cluster formations.

A deep learning method for the diagnosis of lung nodules was suggested by Abid et al.15 forty-one features of the lesion nodules were studied using size, cross-slice change, etc. Additionally, recurrent neural networks have been employed for cross slice variance. Shakeel et al.16 employed profuse clustering technique and deep learning methods to predict lung cancer. The dataset used was DICOM images from cancer imaging archive. Clusters were formulated using probability and cumulative distribution measure to create a weighted mean function for the pixels. An average classification accuracy of 98.42% was obtained. Toğaçar17 used histopathological images of lung for detection of lung cancer using features obtained from the dark net model. Further, it was used to classify resulting in an overall accuracy of 99.69%. A weighted discriminative machine learning model was proposed by Zhao et al.18 The method mainly assigns a weight to each sample to minimize the class imbalance problem. Lung nodule identification and cancer risk assessment was performed by Wang and Charkborty.19 3D CNN and regression models were used to improve the detection accuracy obtaining an AUC of 0.86. Chamberlin et al.20 used two parallel networks to identify the lung nodules using on low dose CT images, thereby obtaining a sensitivity of 1 and specificity of 0.708.

Shin et al.21 and Rajasekar et al.22 used radiomic markers and four clinical factors using PET scans for detection of lung pathologies. Rajshekhar et al.23 used a combination of CT scan images using quasi convex gradient descent based CNN optimization. Additionally, transfer learning approaches were also been employed. A transfer learning framework using EfficientNet B1 was proposed by Raza et al.24 Multiple data augmentation was performed to minimize the class imbalance problem. An average accuracy of 99.10% was reported on the test set. In a similar study performed in Ref. 25, a deep transfer learning model is employed on CT images. Transfer learning was performed by changing the last layer of the pre-trained models, thus highlighting the significant capabilities of the DL models in detection tasks. Lanjewar et al.,26 added two new layers to the dense net model. The features were extracted from the dense net classifier and applied to machine learning models, thereby achieving an accuracy of 95%. A snake optimization algorithm was proposed and tested on the IQ-OTH/NCCD dataset in Ref. 27. The snake optimizer architecture was applied to the CNN model in conjunction with CNN; additionally, the CT images were subjected to image preprocessing. Valluru and Jeya28 proposed a SVM based gray wolf optimization technique in conjunction with the genetic algorithm, for feature selection, optimization of parameters, and classification on a dataset of 50 images, achieving an accuracy of 93.5% for three class classification. A similar optimization method was proposed by Sengodan et al.,29 using swarm optimization modified learner, thereby achieving a classification accuracy of 98.53%. An interesting study using patient current and prior obtained CT images was performed in Ref. 30, and it was further compared with the radiologists predictions, achieving an average accuracy of 94%. Nitha and Vinod Chandra31 developed a feature selector termed as extremely randomized tree classifier, by extracting features from VGG and feeding it to a multi-layer perceptron, thereby achieving a classification accuracy of 99% using 20% of the data for testing.

However, the aforementioned techniques reported in the literature are based on deep learning and ensemble techniques. The intensity of the pixels between the diseased and non-diseased cases is difficult to interpret; thus, when the images are subjected to resizing, rotation, and orientation, it results in misclassification in identifying malignant and nonmalignant cases. This objective of the proposed study is to develop a computer assisted decision support system for classification of lung CT images. The proposed work aims to address the aforementioned limitations by developing an automated diagnostic tool for classification of CT images of lung scans into normal, benign, and malignant cases. Additionally, imbalance in dataset is a major observed fact pertaining to medical data, and the proposed optimization algorithm aims to overcome this drawback, thereby leading to good classification accuracy.

The implementation of the proposed setup was done in MATLAB 2020a, on 64-bit operating system. The dataset consisted of 120 benign images, 561 malignant, and 416 normal images folds. The train and test images were randomly partitioned with 80:20 ratio. Five different iterations were performed by randomly selecting the image samples from the three classes. The performance metrics to assess the classification are given in Table I.

TABLE I.

Performance evaluation parameters.

Parameter Formulae
Accuracy  ( TP + TN ) / ( TP + TN + FP + FN ) 
Sensitivity  TP / ( TP + FN ) 
Specificity  TN / ( TN + FP ) 
Parameter Formulae
Accuracy  ( TP + TN ) / ( TP + TN + FP + FN ) 
Sensitivity  TP / ( TP + FN ) 
Specificity  TN / ( TN + FP ) 

Accuracy refers to the rate of accurate cumulative classification score for all the three classes. Sensitivity refers to the rate of accurately malignant as malignant, benign as benign, and normal as normal cases. Similarly, specificity deals with the rate of classifying nonmalignant as nonmalignant, non-benign as non-benign, and non-normal as non-normal cases. For each class, the true positives (TP), false positives (FP), false negatives (FN), and true negatives (TN) are computed, and summed up to determine the total TP, TN, FP, and FN obtained for all the three classes.21 The confusion matrices for the five folds are illustrated in Fig. 2. The number of benign images was 120, malignant images were 561, and normal cases were 416.

FIG. 2.

Confusion matrices for five folds. First row of each matrix belongs to benign class (c1), second row belongs to malignant class (c2), and third row belongs to normal class (c3).

FIG. 2.

Confusion matrices for five folds. First row of each matrix belongs to benign class (c1), second row belongs to malignant class (c2), and third row belongs to normal class (c3).

Close modal

To illustrate the effectiveness of preprocessing, the optimized convolutional network was applied to images after preprocessing and prior to preprocessing. The proposed image preprocessing method effectively aids in improving the performance of the optimized CNN. It can be observed from Table II that a significant change in accuracy, sensitivity, specificity, F1-score, and precision is obtained.

TABLE II.

Effect of preprocessing on classification accuracy.

Method Accuracy Sensitivity Specificity F1-score Precision
Without preprocessing  95  88  94.7  90.3  91 
With preprocessing  99  92  99.1  92.4  93 
Method Accuracy Sensitivity Specificity F1-score Precision
Without preprocessing  95  88  94.7  90.3  91 
With preprocessing  99  92  99.1  92.4  93 

Furthermore, the training progress of the proposed CNN model considering 80:20 split ratio for the obtained hyperparameters is illustrated in Fig. 3. It was observed that from epoch 4 to epoch 5, consistent value of maximum accuracy was achieved for the test set. Hence, epoch 5 was found to be the optimum choice in deciding the numbers of epochs for the proposed design. Similar results are obtained for the remaining four folds.

FIG. 3.

Illustration of training progress in one of the folds.

FIG. 3.

Illustration of training progress in one of the folds.

Close modal

The performance of the CNN model for each of the folds in terms of accuracy, sensitivity, and specificity is given in Fig. 4 and Table III. Since it is a multiclass classification, the performance for each class in terms of sensitivity, specificity, and accuracy is calculated, and the average value for each of the performance parameters considering the three classes is reported in Table III. It can be observed that although a stratified sampling was performed to split the samples in each of the five sets, a balanced value in determining the true positive and true negative samples was observed. This validates the choice of the hyperparameters obtained by training the CNN using SCA based approach. The average value for each of the metrics is included in row stacked graphs. However, the dataset seemed to be imbalanced with fewer number of benign images in contrast to malignant and normal cases, a good balance in sensitivity and specificity is obtained for detection of each of the class. An average value for each of the performance parameter is reported in Table III.

FIG. 4.

Illustration of performance for five splits.

FIG. 4.

Illustration of performance for five splits.

Close modal
TABLE III.

Performance of the proposed system for five splits.

Metric Iteration 1 Iteration 2 Iteration 3 Iteration 4 Iteration 5 Average
Sensitivity  91.3  95  94.3  93  91  92.9 
Specificity  100  100  98.55  98  99  99.11 
Accuracy  100  99  100  98  98.3  99 
Metric Iteration 1 Iteration 2 Iteration 3 Iteration 4 Iteration 5 Average
Sensitivity  91.3  95  94.3  93  91  92.9 
Specificity  100  100  98.55  98  99  99.11 
Accuracy  100  99  100  98  98.3  99 

Various parts of the CT image have impact on the classification performance and building the CNN model. The color scale provides information regarding the parts of the image that have a strong influence on the classification. As observed from Fig. 5, the darker color (red) indicates regions having strong influence in classification as benign, malignant, and normal. The occlusion sensitivity maps for the three classes of lung CT images are illustrated in Fig. 5.

FIG. 5.

Illustration of occlusion maps (a) benign, (b) normal, and (c) malignant.

FIG. 5.

Illustration of occlusion maps (a) benign, (b) normal, and (c) malignant.

Close modal

The discussion section is comprehensively divided into three folds: (1) the effect of preprocessing is quantitively studied on the dataset, (2) generalization ability, and (3) comparative analysis of the proposed method with state of art studies reported on the same dataset. The benign vs malignant vs normal scans are imbalanced in nature, which is a major problem observed in medical datasets. The generalization ability of the proposed method was evaluated on the Chest CT scan dataset available in Kaggle.32 The dataset consists of 1008 CT scan images for three different categories of lung cancer, namely, adenocarcinoma consisting of 338 CT scans, large cell carcinoma consisting of 187 scans, and squamous cell carcinoma consisting of 206 scans and 223 normal lung scans. Figure 6 provides an overview of the images obtained from the dataset.

FIG. 6.

Lung CT scans: (a) adenocarcinoma, (b) large cell carcinoma, (c) squamous cell carcinoma, and (d) normal CT images (https://www.kaggle.com/datasets/mohamedhanyyy/chest-ctscan-images, accessed January 5, 2024).32 

FIG. 6.

Lung CT scans: (a) adenocarcinoma, (b) large cell carcinoma, (c) squamous cell carcinoma, and (d) normal CT images (https://www.kaggle.com/datasets/mohamedhanyyy/chest-ctscan-images, accessed January 5, 2024).32 

Close modal

The images were initially subjected to preprocessing, and it can be observed from the quantitative results that the accuracy of the proposed model increased by 4% with preprocessing. Further, the proposed CNN model is applied to the image to perform four class classification. The training progress is plotted in Fig. 7(a). An average accuracy of 94%, sensitivity of 92%, specificity of 95%, F1-score of 92%, and precision of 93% were obtained. The quantitative results for each of the four class classification tasks are depicted in Fig. 7. Additionally, a fivefold cross validation was performed by randomly dividing the image data into five sets. Stratified sampling was performed to ensure each set had samples from each of the classes. The proposed methodology turned out to be effective in classifying the images into four different classes. The results obtained are depicted in Fig. 6, in the form of bar graphs.

FIG. 7.

Lung CT scans: (a) training progress and (b) performance for each of the splits.

FIG. 7.

Lung CT scans: (a) training progress and (b) performance for each of the splits.

Close modal

The number of samples of each of the classes and the correctly classified cases for each of the four kinds of lung cancers are given in Fig. 8. It can be observed that the number of correct samples classified in contrast to the number of incorrect samples is much greater, thus proving the generalization ability of the algorithm to be applied in a multi-class classification scenario. An interesting point about the generalization study was that the same values of hyperparameters obtained from dataset 1, which were used to test the trained CNN architecture on the second dataset. Additionally, from the model explainability analysis, the regions in the center of the image have contributed to prediction accuracy in contrast to the areas at the border of the image, thus preserving the information within the region of interest is a major factor that aids in efficient classification.

FIG. 8.

Number of correctly and incorrectly classified instances for five folds.

FIG. 8.

Number of correctly and incorrectly classified instances for five folds.

Close modal

Class 1–class 4 represented in the x-axis indicates the four different types of lung pathologies. The red color for each of the class indicates the number of correctly classified instances for each of the five folds. The bar colors corresponding to blue, green, and yellow indicate the number of incorrectly classified samples with respect to each class. The proposed method is compared with the state of art techniques reported in the literature as given in Table IV.

TABLE IV.

Comparative analysis of the proposed method with state of art methods.

Reference Accuracy Sensitivity Specificity Precision F1-score
27   96.58  95.38  94.08  84.16  91.53 
33   85.25  85.32  83.32  71.09  82.56 
34   87.24  87.24  86.65  75.94  84.19 
35   89.26  89.16  88.46  78.26  86.37 
36   92.46  91.08  90.39  81.39  88.34 
37   94.52  93.65  92.46  83.50  89.90 
38   97.72  94  …  98  96.33 
Proposed  99  92  99.1  93  92.4 
Reference Accuracy Sensitivity Specificity Precision F1-score
27   96.58  95.38  94.08  84.16  91.53 
33   85.25  85.32  83.32  71.09  82.56 
34   87.24  87.24  86.65  75.94  84.19 
35   89.26  89.16  88.46  78.26  86.37 
36   92.46  91.08  90.39  81.39  88.34 
37   94.52  93.65  92.46  83.50  89.90 
38   97.72  94  …  98  96.33 
Proposed  99  92  99.1  93  92.4 

In this study, an optimized CNN is developed to determine the severity of lung cancer to malignant, benign, and normal classes using CT images. In developing deep learning models, it is a common practice to select the value of the hyperparameters using experimental trials. It has been observed that the hyperparameters play an important role in determining the classification accuracy. Additionally, medical data are usually prone to imbalance and limited availability of diseased and non-diseased classes. Thus, developing a decision support system that is not subjected to changes due to such an imbalance is a challenge. Therefore, we have developed an SCA optimized CNN model by automatically tuning the hyperparameters using the information obtained during the training stage of the neural net, where hyperparameters of CNN play a major role in influencing the accuracy of classification; we have used SCA techniques to optimize the parameters of CNN. The goal of the proposed system is to mitigate issues that occur in technical analysis of medical images, issues such as inaccuracy in classification, under fitting, poor classifier learning capability arising due to limited data, imbalance dataset, etc. A good classification accuracy of 99% was obtained for classification of the lung CT scans in three classes (benign, malignant, and normal). The generalization ability and the robustness of the proposed method are evaluated on unseen test data, as can be observed through the occlusion maps. The major advantages of the proposed methodology are as follows: (i) the proposed method generalizes well on unseen data, (ii) the method is suitable in practical medical diagnostic scenarios that are inaccurate in diagnosis due to poor availability of data, and (iii) irrespective of the imbalance nature of data, a good balance in sensitivity and specificity can be achieved. However, a shortcoming of the proposed method, which we aim to incorporate as a future work, would be to determine the severity of malignancy to develop a robust lung cancer screen system to aid radiologists in the diagnosis of lung pathologies.

This section briefs out the methodology adopted to develop the proposed system. Figure 9 illustrates the block diagram of the proposed approach. Initially, the images are preprocessed to removal noise from the CT images for achieving better classification accuracy. The proposed noise removal algorithm takes into account the properties of Gaussian filtering and bilateral filtering. Further, an optimized CNN model is developed by selecting the values of the hyperparameters using the sine cosine optimization methodology. The convergence to optima is based on the loss function calculated between the predicated and the obtained values. Subsections V A–V E provide the description about the proposed methodology.

FIG. 9.

Overview of the proposed methodology.

FIG. 9.

Overview of the proposed methodology.

Close modal

The lung cancer dataset is an openly available dataset collected from Iraq Oncology Teaching Hospital termed as IQ-OTH/NCCD dataset, and the images were collected for a period of three months in the year 2019.39 The dataset consists of images, obtained from patients suffering from various stages of lung cancer and also few healthy subjects, such that the dataset is diverse in nature. Radiologists/oncologists have annotated the dataset. The dataset contains a total of 1190 images representing CT scan slices of 110 cases. There are a total of 120 benign CT scans, 561 malignant scans, and 416 healthy scans. The dimension of the images is of varying nature in the dataset ranging from 512 × 512 to 488 × 488; hence, image resizing is performed to 488 × 488, to provide consistent input image to the CNN model.

The CNN model enhances the capabilities of neural network by incorporating additional convolutional layers, max pooling layers, and activation functions.40,41 The convolutional layers apply a set of filters at various orientations to the image, in order to identify patterns that are not discernible by the human eye. The convolution and the fully connected layers are composed of biases and weights that are trained using optimization algorithms such as Adam's, gradient descent and stochastic gradient descent. The performance of the CNN is mainly controlled by the hyperparameters such as initial learning rate, momentum, L2 regularization, and number of epochs. The choice of hyperparameters mainly relies on the application. However, each time tuning the hyperparameters is essential to achieve a balance in sensitivity and specificity especially in dealing with unbalanced medical data. Thereby, the proposed CNN model uses sine cosine algorithm that automatically selects the values of the hyperparameters using the error rate obtained between the predicated and actual values. The iterations are repeated unless a minimum value for error rate is obtained. The threshold set for error rate lies between 0.1 and 0.9. Table V provides the details of the CNN layers and the filter employed in the proposed research.

TABLE V.

Description of CNN model.

Layer Type Filter size No. of filters Stride
Image  448 × 448 × 1       
L 1  CoN+Batch Norm+RLU  7 × 7  1 × 1 
  Max pooling layer (MPL)  2 × 2    2 × 2 
L 2  CoN+Batch Norm+RLU  3 × 3  16  1 × 1 
  Max pooling  2 × 2    2 × 2 
L 3  CoN+Batch Norm+RLU  3 × 3  32  1 × 1 
  Max pooling  2 × 2    2 × 2 
L 4  CoN+Batch Norm+RLU  3 × 3  64  1 × 1 
  Max pooling  2 × 2    2 × 2 
L 5  CoN+Batch Norm+RLU  3 × 3  128  1 × 1 
  Max pooling  2 × 2    2 × 2 
Output  Fully connected  Size: 3     
  Softmax for probabilities       
  Classification layer       
Layer Type Filter size No. of filters Stride
Image  448 × 448 × 1       
L 1  CoN+Batch Norm+RLU  7 × 7  1 × 1 
  Max pooling layer (MPL)  2 × 2    2 × 2 
L 2  CoN+Batch Norm+RLU  3 × 3  16  1 × 1 
  Max pooling  2 × 2    2 × 2 
L 3  CoN+Batch Norm+RLU  3 × 3  32  1 × 1 
  Max pooling  2 × 2    2 × 2 
L 4  CoN+Batch Norm+RLU  3 × 3  64  1 × 1 
  Max pooling  2 × 2    2 × 2 
L 5  CoN+Batch Norm+RLU  3 × 3  128  1 × 1 
  Max pooling  2 × 2    2 × 2 
Output  Fully connected  Size: 3     
  Softmax for probabilities       
  Classification layer       
The spatial resolution of the image was improved by introducing bilateral image filtering42 in conjunction with Gaussian smoothing43 to consequently prevent the loss of information and remove the noise from the CT image. The proposed noise removal method exploits the properties of Gaussian filtering and bilateral filtering to obtain efficient noise removal. A smaller value for sigma in Eq. (1) preserves the edge information. Hence, the value of sigma is iteratively chosen as 0.01, to preserve the edge information. Additionally, the CT image is initially converted from the RGB color space into its corresponding laboratory color space. The CIElab is a perceptually uniform color space, which takes into account the perceptual color differences between the pixel intensities in contrast to the RGB color space. Thereby, this color space conversion aids in preserving the color information in addition to the removal of noise from the CT image. The bilateral sliding window I x , y is given by the following equation:
I x , y = ( i , j ) I ( x , y ) e 1 2 σ 2 .
(1)
i and j lie in the range of ( n 1 2 m 1 2 , n + 1 2 m + 1 2), where σ is the deviation of choosen as 0.01. The image after applying the proposed noise removal technique is illustrated in Fig. 10.
FIG. 10.

Illustration of preprocessing for benign and malignant CT images: (a) and (c) original image and (b) and (d) smoothed image after noise removal.

FIG. 10.

Illustration of preprocessing for benign and malignant CT images: (a) and (c) original image and (b) and (d) smoothed image after noise removal.

Close modal
One of the most popular metaheuristic population-based optimization algorithms proposed by Miraiali44 is the SCA. The initialization of the optimization starts with a population group with random solutions. The value of N = 30 is chosen as random population size, chosen iteratively. Since a larger value increases the computational complexity, a smaller size of N = 30 was found to be optimal size. Further, d = 4 based on number of hyperparameters. The random population set is continuously evaluated based on the objective function. The SCA consists of two phases, namely, the exploration and exploitation phase, as described in the following equation:
X i ( t + 1 ) = X i t + r 1 S in r 2 r 3 P i t X i t .
(2)
The exploration phase aids in location of the area. Further, the exploitation phase reduces the miss interruptions that occur by the hazy solutions as given in the following equation:
X i ( t + 1 ) = X i t + r 1 Cos r 3 P i t X i t .
(3)
Here, t indicates the current iteration number, and I indicates the ith solution at the corresponding X position. Pi indicates the point of destination. The direction of movement between the solution and the destination is guided by the parameter r1 as given in the following equation:
r 1 = 2 t 2 T .
(4)
The movement of the particles toward or away from the destination, defining the distance movement using random weights, is given by r2 and r3 in the following equations:
r 2 = 2 π r and value ,
(5)
r 3 = 2 r and value .
(6)
Once an optimal solution is reached as defined by the upper and lower bounds, the exploration and exploitation converge toward the minima. The convergence and the test function graphical illustration is provided in Fig. 11.
FIG. 11.

Test function and the convergence curve for the SCA algorithm.

FIG. 11.

Test function and the convergence curve for the SCA algorithm.

Close modal

Table VI provides an overview of the optimized hyperparameters obtained using the sine cosine optimization algorithm as described in Algorithm 1.

TABLE VI.

Optimized hyperparameter values and the bounds.

Hyperparameters Bounds (lower, upper) Value
Initial learning rate  0.001–0.0001  0.0001 
Momentum  0.5–1.0  0.9 
Max epochs  1–10 
Validation Frequency  10–35  35 
Hyperparameters Bounds (lower, upper) Value
Initial learning rate  0.001–0.0001  0.0001 
Momentum  0.5–1.0  0.9 
Max epochs  1–10 
Validation Frequency  10–35  35 
Algorithm 1.
For ( I ( x , y ) = 0 , I ( x , y ) < N , I ( x , y ) + +
I ( x , y ) = Input Image, Bilateral filt { I ( x , y )}= I x , y = ( i , j ) I ( x , y ) e 1 2 σ 2 
I ( x , y ) is subjected to I ( x , y ) model 5({CL+BNL+Max Pooling Layer+ReLu}) 
Initialization: Choose N = 30 { Random population } , d = 4 { based o n number o f hyper parameters } , search space =  30 × 4 , min X , Max X , ; t = 1 , 2 , . N L b = 0.0001 , 0.1 , 5 , 0.001 U b = { 0.1 , 0.9 , 15 , 0.1 } 
While t < T → 
     i f r 2 0.5 
    X i j t + 1 = X i t + r 1 sin r 2 r 3 P i t X i t 
     else 
     X i j t + 1 = X i t + r 1 cos r 3 P i t X i t 
     i f r 3 0.5 
     X i j t + 1 = X i t + r 1 cos r 3 P i t X i t 
     else 
X i j t + 1 = X j + 0.5 μ sin ( U b L b ) Cos ( L b ) 
end 
Create CNN layers 5 ( C L + ReLu + MPL ) 
Formulate the objective function : classification error = (FP+FN/Total samples
Hyperparameters = optimal { Adam { M , ILR , E p , L 2 Regularization } 
Best Parameters : 0.3 ( Image data ) // Computed using 30% of the image data// 
Stopping Criteria : 
While t < T max 
     Check x = best ( min ( Classification error ( 0.2 train ) else 
t = t + 1 
end 
For ( I ( x , y ) = 0 , I ( x , y ) < N , I ( x , y ) + +
I ( x , y ) = Input Image, Bilateral filt { I ( x , y )}= I x , y = ( i , j ) I ( x , y ) e 1 2 σ 2 
I ( x , y ) is subjected to I ( x , y ) model 5({CL+BNL+Max Pooling Layer+ReLu}) 
Initialization: Choose N = 30 { Random population } , d = 4 { based o n number o f hyper parameters } , search space =  30 × 4 , min X , Max X , ; t = 1 , 2 , . N L b = 0.0001 , 0.1 , 5 , 0.001 U b = { 0.1 , 0.9 , 15 , 0.1 } 
While t < T → 
     i f r 2 0.5 
    X i j t + 1 = X i t + r 1 sin r 2 r 3 P i t X i t 
     else 
     X i j t + 1 = X i t + r 1 cos r 3 P i t X i t 
     i f r 3 0.5 
     X i j t + 1 = X i t + r 1 cos r 3 P i t X i t 
     else 
X i j t + 1 = X j + 0.5 μ sin ( U b L b ) Cos ( L b ) 
end 
Create CNN layers 5 ( C L + ReLu + MPL ) 
Formulate the objective function : classification error = (FP+FN/Total samples
Hyperparameters = optimal { Adam { M , ILR , E p , L 2 Regularization } 
Best Parameters : 0.3 ( Image data ) // Computed using 30% of the image data// 
Stopping Criteria : 
While t < T max 
     Check x = best ( min ( Classification error ( 0.2 train ) else 
t = t + 1 
end 

The CNN model has about five convolutional layers, the algorithm that is designed to train and teach the CNN model for predicting the unknown data, and has the effect of decomposing the training dataset into a hierarchy of new representations. The initial layers form a simple representation, whereas the final layers form representations that built on top of the initial representation. One of the major loopholes with these CNN models is difficulty in understanding the meaning of such representations. Thereby, the term blackbox is used to define such systems, since all that the researcher is aware of, is the input and the output, but not the details happening within the model. Thus, we have presented the occlusion maps, wherein the input image is systematically and consistently represented by occluding or blocking out using a rectangle of same size and color. For each iteration, the trained model is analyzed with an occluded section, and the confidence in predicting the output is noted and represented in the form of heat map. The heat map represents the major parts of the image that the model considers as a major parameter for decision making. As per the expert opinion of the radiologists, the T descriptors describe the extent of spread of the primary tumor; it basically involves tumor size, invasion of adjacent structures, endobronchial location, presence of satellite nodules, and distance from the carina.

As it can be seen from Fig. 12, morphologically the left lung shows significant pathological changes with respect to certain nodules as indicated by the arrow in Fig. 12(b). Such changes predominantly aid in the detection of malignancy. The malignancy diagnosis predicted by the proposed model is verified by radiologists as well. In addition to this, since the CNN model applies various filters with different strides at each convolutional layers, the texture of the lung CT scans is also studied, which aids in distinguishing the benign and malignant CT scans.

FIG. 12.

Heat maps for the CT scans with highlighted anatomies: (a) benign and (b) malignant.

FIG. 12.

Heat maps for the CT scans with highlighted anatomies: (a) benign and (b) malignant.

Close modal

The authors have no conflicts to disclose.

Ethics approval is not required.

Sameena Pathan: Conceptualization (equal); Data curation (equal); Formal analysis (equal); Investigation (equal); Methodology (equal); Software (equal); Validation (equal); Visualization (equal); Writing – original draft (equal); Writing – review & editing (equal). Tanweer Ali: Conceptualization (equal); Data curation (equal); Formal analysis (equal); Investigation (equal); Methodology (equal); Project administration (equal); Writing – review & editing (equal). Sudheesh P G: Conceptualization (equal); Data curation (equal); Formal analysis (equal); Visualization (equal); Writing – review & editing (equal). P. Vasanth Kumar: Conceptualization (equal); Data curation (equal); Formal analysis (equal); Software (equal); Writing – review & editing (equal). Divya Rao: Conceptualization (equal); Data curation (equal); Investigation (equal); Methodology (equal); Software (equal); Writing – review & editing (equal).

The data that support the findings of this study are available within the article.

1.
J. D.
Minna
,
A. R.
Jack
, and
F. G.
Adi
, “
Focus on lung cancer
,”
Cancer Cell
1
,
49
52
(
2002
).
2.
L. A.
Torre
,
R. L.
Siegel
, and
A.
Jemal
, “
Lung cancer statistics
,”
Adv. Exp. Med. Biol.
893
,
1
19
(
2016
).
3.
T.
Wang
,
R. A.
Nelson
,
A.
Bogardus
, and
F. W.
Grannis Jr
, “
Five‐year lung cancer survival: Which advanced stage nonsmall cell lung cancer patients attain long‐term survival?
,”
Cancer
116(
6
),
1518
1525
(
2010
).
4.
N.
Hollings
and
P.
Shaw
, “
Diagnostic imaging of lung cancer
,”
Eur. Respir. J.
19
(
4
),
722
742
(
2002
).
5.
A.
Asuntha
and
A.
Srinivasan
, “
Deep learning for lung Cancer detection and classification
,”
Multimed. Tools Appl.
79
(
11
),
7731
7762
(
2020
).
6.
P.
Princy Magdaline
and
T. R.
Ganesh Babu
, “
Detection of lung cancer using novel attention gate residual U-Net model and KNN classifier from computer tomography images
,”
J. Intell. Fuzzy Syst.
45
,
6289
6302
(
2023
).
7.
C.
Yan
and
N.
Razmjooy
, “
Optimal lung cancer detection based on CNN optimized and improved Snake optimization algorithm
,”
Biomed. Signal Process. Control
86
,
105319
(
2023
).
8.
T. I.
Mohamed
,
O. N.
Oyelade
, and
A. E.
Ezugwu
, “
Automatic detection and classification of lung cancer CT scans based on deep learning and ebola optimization search algorithm
,”
PLoS One
18
(
8
),
e0285796
(
2023
).
9.
V.
Deepa
and
P. M.
Fathimal
, “
Deep-Shrimp Net fostered lung cancer classification from CT images
,”
Int. J. Image Graph. Signal Process.
15
(
4
),
59
68
(
2023
).
10.
V. R.
Nitha
and
S. S.
Vinod Chandra
, “
ExtRanFS: An automated lung cancer malignancy detection system using extremely randomized feature selector
,”
Diagnostics
13
(
13
),
2206
(
2023
).
11.
S.
Nigudgi
and
C.
Bhyri
, “
Lung cancer CT image classification using hybrid-SVM transfer learning approach
,”
Soft Comput.
27
,
9845
9859
(
2023
).
12.
M. H.
Sabzalian
,
F.
Kharajinezhadian
,
A.
Tajally
,
R.
Reihanisaransari
,
H. A.
Alkhazaleh
, and
D.
Bokov
, “
New bidirectional recurrent neural network optimized by improved Ebola search optimization algorithm for lung cancer diagnosis
,”
Biomed. Signal Process. Control
84
,
104965
(
2023
).
13.
T. S.
Prakash
,
A. S.
Kumar
,
C. R. B.
Durai
, and
S.
Ashok
, “
Enhanced Elman spike Neural network optimized with flamingo search optimization algorithm espoused lung cancer classification from CT images
,”
Biomed. Signal Process. Control
84
,
104948
(
2023
).
14.
S.
Gowda
and
A.
Jayachandran
, “
Triple SVM integrated with enhanced random region segmentation for classification of lung tumors
,”
Int. J. Adv. Comput. Sci. Appl.
13
(
10
),
870
877
(
2022
).
15.
M. M. N.
Abid
,
T.
Zia
,
M.
Ghafoor
, and
D.
Windridge
, “
Multi-view convolutional recurrent neural networks for lung cancer nodule identification
,”
Neurocomputing
453
,
299
311
(
2021
).
16.
P. M.
Shakeel
,
M. A.
Burhanuddin
, and
M. I.
Desa
, “
Lung cancer detection from CT image using improved profuse clustering and deep learning instantaneously trained neural networks
,”
Measurement
145
,
702
712
(
2019
).
17.
M.
Toğaçar
, “
Disease type detection in lung and colon cancer images using the complement approach of inefficient sets
,”
Comput. Biol. Med.
137
,
104827
(
2021
).
18.
L.
Zhao
,
J.
Qian
,
F.
Tian
,
R.
Liu
,
B.
Liu
,
S.
Zhang
, and
M.
Lu
, “
A weighted discriminative extreme learning machine design for lung cancer detection by an electronic nose system
,”
IEEE Trans. Instrum. Meas.
70
,
1
9
(
2021
).
19.
W.
Wang
and
G.
Charkborty
, “
Automatic prognosis of lung cancer using heterogeneous deep learning models for nodule detection and eliciting its morphological features
,”
Appl. Intell.
51
(
4
),
2471
2484
(
2021
).
20.
J.
Chamberlin
,
M. R.
Kocher
,
J.
Waltz
,
M.
Snoddy
,
N. F.
Stringer
,
J.
Stephenson
et al, “
Automated detection of lung nodules and coronary artery calcium using artificial intelligence on low-dose CT scans for lung cancer screening: Accuracy and prognostic value
,”
BMC Med.
19
,
55
(
2021
).
21.
H.
Shin
,
S.
Oh
,
S.
Hong
,
M.
Kang
,
D.
Kang
,
Y. G.
Ji
et al, “
Early-stage lung cancer diagnosis by deep learning-based spectroscopic analysis of circulating exosomes
,”
ACS Nano
14
(
5
),
5435
5444
(
2020
).
22.
V.
Rajasekar
,
B.
Predić
,
M.
Saracevic
,
M.
Elhoseny
,
D.
Karabasevic
,
D.
Stanujkic
, and
P.
Jayapaul
, “
Enhanced multimodal biometric recognition approach for smart cities based on an optimized fuzzy genetic algorithm
,”
Sci. Rep.
12
(
1
),
622
(
2022
).
23.
V.
Rajasekar
,
M. P.
Vaishnnave
,
S.
Premkumar
,
V.
Sarveshwaran
, and
V.
Rangaraaj
, “
Lung cancer disease prediction with CT scan and histopathological images feature analysis using deep learning techniques
,”
Results Eng.
18
,
101111
(
2023
).
24.
R.
Raza
,
F.
Zulfiqar
,
M. O.
Khan
,
M.
Arif
,
A.
Alvi
,
M. A.
Iftikhar
, and
T.
Alam
, “
Lung-EffNet: Lung cancer classification using EfficientNet from CT-scan images
,”
Eng. Appl. Artif. Intell.
126
,
106902
(
2023
).
25.
T. K.
Sajja
,
R. M.
Devarapalli
, and
H. K.
Kalluri
, “
Lung cancer detection based on CT scan images by using deep transfer learning
,”
Trait. Signal
36
(
4
),
339
344
(
2019
).
26.
M. G.
Lanjewar
,
K. G.
Panchbhai
, and
P.
Charanarur
, “
Lung cancer detection from CT scans using modified DenseNet with feature selection methods and ML classifiers
,”
Expert Syst. Appl.
224
,
119961
(
2023
).
27.
W.
Sun
,
B.
Zheng
, and
W.
Qian
, “
Computer aided lung cancer diagnosis with deep learning algorithms
,”
Proc. SPIE
9785
,
97850Z
(
2016
).
28.
D.
Valluru
and
I. J. S.
Jeya
, “
IoT with cloud based lung cancer diagnosis model using optimal support vector machine
,”
Health Care Manage Sci.
23
(
4
),
670
679
(
2020
).
29.
P.
Sengodan
,
K.
Srinivasan
,
R.
Pichamuthu
, and
S.
Matheswaran
, “
Early detection and classification of malignant lung nodules from CT images: An optimal ensemble learning
,”
Expert Syst. Appl.
229
,
120361
(
2023
).
30.
D.
Ardila
,
A. P.
Kiraly
,
S.
Bharadwaj
,
B.
Choi
,
J. J.
Reicher
,
L.
Peng
et al, “
End-to-end lung cancer screening with three-dimensional deep learning on low-dose chest computed tomography
,”
Nat. Med.
25
(
6
),
954
961
(
2019
).
31.
V. R.
Nitha
and
S. S.
Vinod Chandra
, “
Lung cancer malignancy detection using voting ensemble classifier
,” in
2023 2nd International Conference on Computational Systems and Communication (ICCSC)
(
IEEE
,
2023
), pp.
1
5
.
32.
H. F.
Al-Yasriy
, see https://data.mendeley.com/datasets/bhmdr45bh2/1 for “
The IQ-OTHNCCD Lung Cancer Dataset Mendeley Data
” (
2020
).
33.
L.
Alzubaidi
,
J.
Zhang
,
A. J.
Humaidi
,
A.
Al-Dujaili
,
Y.
Duan
,
O.
Al-Shamma
et al, “
Review of deep learning: Concepts, CNN architectures, challenges, applications, future directions
,”
J. Big Data
8
,
53
(
2021
).
34.
Chest CT-Scan images Dataset
, see https://www.kaggle.com/datasets/mohamedhanyyy/chest-ctscan-images for “
Kaggle
” (
2020
) (accessed January 5, 2024).
35.
M. F.
Abdullah
,
S. N.
Sulaiman
,
M. K.
Osman
,
N. K. A.
Karim
,
I. L.
Shuaib
, and
M. D. I.
Alhamdu
, “
Classification of lung cancer stages from CT scan images using image processing and k-Nearest neighbours
,” in
11th IEEE Control and System Graduate Research Colloquium (ICSGRC)
(
IEEE
,
2020
), pp.
68
72
.
36.
M. A.
Khan
,
S.
Rubab
,
A.
Kashif
,
M. I.
Sharif
,
N.
Muhammad
,
J. H.
Shah
et al, “
Lungs cancer classification from CT images: An integrated design of contrast based classical features fusion and selection
,”
Pattern Recognit. Lett.
129
,
77
85
(
2020
).
37.
X.
Wang
,
H.
Chen
,
C.
Gan
,
H.
Lin
,
Q.
Dou
,
E.
Tsougenis
et al, “
Weakly supervised deep learning for whole slide lung cancer image analysis
,”
IEEE Trans. Cybern.
50
(
9
),
3950
3962
(
2020
).
38.
A.
Kumar
,
M.
Fulham
,
D.
Feng
, and
J.
Kim
, “
Co-learning feature fusion maps from PET-CT images of lung cancer
,”
IEEE Trans. Med. Imaging
39
(
1
),
204
217
(
2020
).
39.
W. J.
Sori
,
J.
Feng
,
A. W.
Godana
,
S.
Liu
, and
D. J.
Gelmecha
, “
DFD-Net: Lung cancer detection from denoised CT scan image using deep learning
,”
Front. Comput. Sci.
15
,
152701
(
2021
).
40.
V. R.
Nithya
and
S. S.
Vinod Chandra
, “
Lung cancer malignancy detection using voting ensemble classifier
,” i
n 2nd International Conference on Computational Systems and Communication (ICCSC)
, Thiruvananthapuram, India,
2023
.
41.
D.
Bhatt
,
C.
Patel
,
H.
Talsania
,
J.
Patel
,
R.
Vaghela
,
S.
Pandya
et al, “
CNN variants for computer vision: History, architecture, application, challenges and future scope
,”
Electronics
10
(
20
),
2470
(
2021
).
42.
C.
Anam
,
A.
Naufal
,
H.
Sutanto
,
K.
Adi
, and
G.
Dougherty
, “
Impact of iterative bilateral filtering on the noise power spectrum of computed tomography images
,”
Algorithms
15
(
10
),
374
(
2022
).
43.
J. P.
D'Haeyer
, “
Gaussian filtering of images: A regularization approach
,”
Signal Process.
18
(
2
),
169
181
(
1989
).
44.
S.
Mirjalili
, “
SCA: A sine cosine algorithm for solving optimization problems
”,
Knowl.-Based Syst.
96
,
120
133
(
2016
);
M.
Heydarian
,
T. E.
Doyle
, and
R.
Samavi
, “
MLCM: Multi-label confusion matrix
,”
IEEE Access.
10
,
19083
19095
(
2022
).