A Hybrid Model for Covid-19 Detection using CT-Scans

—Although some believe it has been wiped out, the coronavirus is striking again. Controlling this epidemic necessitates early detection of coronavirus disease. Computed tomography (CT) scan images allow fast and accurate screening for COVID-19. This study seeks to develop the most precise model for identifying and classifying COVID-19 by developing an automated approach using transfer-learning CNN models as a base. Transfer learning models like VGG16, Resnet50, and Xception are employed in this study. The VGG16 has a 98.39% accuracy, the Resnet50 has a 97.27% accuracy, and the Xception has a 96.6% accuracy; after that, a hybrid model made using the stacking ensemble method has an accuracy of 98.71%. According to the findings, hybrid architecture offers greater accuracy than a single architecture.


INTRODUCTION
COVID-19 is caused by the virus SARS-CoV-2. Lung infections can cause anything from a simple cold to potentially fatal illnesses. Symptoms of the respiratory system are usually seen with coronavirus infections. In addition, people can occasionally get minor, self-limiting ailments like the flu that have detrimental effects. Fever, a cough, and trouble breathing might be caused by respiratory issues, exhaustion, and a sore throat [1]- [3].
Huge losses have been caused by the global spread of the COVID-19 pandemic. The urgent issue that health care and medical organizations are addressing is the quick detection of COVID-19 [1]. COVID-19 presents a serious threat to public health and the country's social and economic life because of the quick rise in the number of newly verified and reported cases.
An automated system that can measure the patient's infected zone and assess the progress of infected people by CT scan image analysis and clinical diagnosis is required. Even for skilled medical professionals, diagnosing COVID-19 is challenging [4], [5].
The two most common methods for diagnosing  are computed tomography and X-rays. Medical health guidelines advocate chest imaging as a quick and efficient treatment, and it has been acknowledged as the first instrument in viral screening in a series of papers. Chest Xrays and CT scans have promising results despite frequently being examined by qualified radiologists. Computer-aided diagnosis (CAD) is required to reduce error rates while saving time and money [6] since radiologists see many patients daily and the diagnostic procedure takes a long time.
CT scans provide a series of slices of a specific location without including the numerous physiological features, in contrast to traditional X-rays. Compared to traditional X-rays, CT scans offer a considerably more thorough picture of the diagnosis [7].
Deep learning has been used in several studies to analyze radiological images. They were created to address the drawbacks of COVID-19 medical procedures that depend on radiological imaging. CNN is the method that is most effective for identifying the most significant deep learning algorithms. Consequently, the data processing field has shown a lot of interest in deep learning algorithms, especially at CNN [8].
This paper proposes a highly accurate automated computer-aided diagnostic approach for COVID-19 classification. In order to create a hybrid model using stacking ensemble with improved performance on the SARS-COV-2 dataset, a study was done to examine the implementation of three pre-trained convolutional neural network (CNN) models based on transfer learning. This work's main novelty and contributions are as follows:  Reducing the number of false negative and positive values in the modelling process.
 The base and hybrid models were trained for 100 epochs.
 Comparing the recommended model to that of current DL frameworks in order to determine its effectiveness.
 Comparing the hybrid model's performance to the baseline models.
 Applying the stacking ensemble method in a new way instead of the familiar ways of stacking, which saves more time.
The following parts are organized as follows: The state-ofthe-art studies are summarized in Section II, and resources and methods are covered in Section III. Results and analysis are presented in Section IV. The summary and recommendations for future work are presented in Section V.

II. RELATED WORK
Many studies were conducted to diagnose COVID-19 either using CT scan images or using x-rays. This section www.ijacsa.thesai.org summarizes the most recent studies, focusing on CT scan images.
Kogilavani, S. V., et al. [8] [11] to screen COVID-19 CT scans. For feature extraction from CT scan pictures, the VGG16 architecture has been fine-tuned; principal component analysis (PCA) is also used to choose features. For the final classification, four distinct classifiers are compared. On 208 tested images, the best classifier was a bagging ensemble with SVM, which obtained an F1 score of 95.3%, an accuracy of 95.7%, a precision of 95.8%, and an area under the curve (AUC) of 0.958.
Nirmala Devi Kathamuthu, et al. [13] suggested applying a variety of foundation models, including VGG16, VGG19, Inception V3, Densenet 121, Xception, and Resnet50; the best model of these models attained an accuracy of 98% using ctscan images. The difference between this model and ours is the data augmentation technique used, the training parameters, and the fact that we finally built a hybrid model using the stacking ensemble method.
Horry, Michael J., et al. [15] developed a conceptual transfer learning framework to support COVID-19 detection with image categorization utilising deep learning models for X-ray, ultrasound, and CT scans, including Resnet50, Inception V3, Xception, VGG16/VGG19, InceptionResNet, DenseNet, and NASNetLarge. They settled on the VGG19 model, which was then adjusted with the proper parameters to reach extremely high levels of COVID-19 detection versus pneumonia and normal in all three types of lung images, with a precision of up to 86% for X-rays, 100% for ultrasounds, and 84% for CT scans.
The authors of [16] propose an augmented CNN to identify COVID-19 on CT scan and X-ray chest images and to differentiate COVID-19 patients from non-COVID-19 cases. While using these augmented images to train CNN, a classification accuracy of 98.97 percent for X-ray images and 95.38 percent for CT scan images was achieved.
Tanvir Mahmud et al. [17] presented the hybrid neural network CovTANet for the early prediction and diagnosis of COVID-19 using CT scans. A segmentation network was used to predict the lesions with a 95.8% accuracy rate.
A transfer learning strategy was employed by Chun Li et al. [18] to propose a way of training the model using a few CT images. The evaluation accuracy of this method was 87.6% for COVID-19 severity using pre-trained ChexNet.
In order to detect COVID-19 from a CT scan, Varan Singh Rohila et al. [19] offer a DCNN model known as ReCOV-101 that makes use of ResNet-101 as its basis. To increase the dataset, data augmentation, transfer learning, and the 94.9 percent accurate "skip connection" method are employed. From the previous review, further work needs to be done to increase the reliability and accuracy of COVID-19 detection using CT scan images.
Limitations of the previous studies include:  The difficulty of sharing medical data is data privacy.
 The datasets that are currently accessible are incorrect, unclear, noisy, and incomplete.
 Most studies in the literature are conducted using datasets from different internet sources.

III. METHOD
The method used to achieve the objectives of the study is briefly described in this section. The diagram of the suggested method is shown in Fig. 1. Each model was trained individually on the training set; after that, the models were concatenated using stacking ensemble learning and fine-tuned using the training set. Fig. 3 and Fig. 4, which are subfigures of Fig. 1, explain the proposed model in more detail. www.ijacsa.thesai.org

A. Dataset
The SARS-CoV-2 CT scan dataset [20] was used in the proposed work to identify COVID-19 cases. This dataset is the most global because it contains more CT scan images that are clear and free of noise, and it is also used in more studies. The dataset consists of 2482 CT scan images, 1252 positive for COVID-19 (+ve) and 1230 negative for COVID-19 (-ve). These data were compiled from information provided by actual patients who went to hospitals in Sao Paulo, Brazil. This dataset aims to advance research and develop artificial intelligence (AI) tools that can detect SARS-CoV-2 or COVID-19 infection by looking at CT images.

B. Data Augmentation
A form of neural network design called a generative adversarial network (GAN) has much potential for artificial intelligence. The min-max two-player zero-sum game is an important factor in GAN. In this game one player profited by the same amount from the other's loss. The actors in this scenario are two separate GAN networks known as the discriminator and generator.
The primary goal of the discriminator, indicated as D, is to determine whether a sample is real or fake [21]. A fake sample of an image is produced by the generator, known as G, in contrast, in order to deceive the discriminator.
The discriminator determines the probability that a particular sample is real. The probability value will probably be greater for a real sample. A probability value that is very close to 0 indicates fake samples. When the discriminator is no longer able to distinguish between a real and fake sample and the probability value is close to 0.5, the generator can have an ideal answer [21]. Fig. 2 shows a sample of COVID and non-COVID images generated by GAN.

C. Data Pre-processing
Pre-processing has been done on the CT scan images. The image must fit the input size required to train the deep learning algorithm and make predictions using the data. To test the input size of the network, the data is rescaled. The image size in the proposed system has a dimension of 224 x 224. The data is consequently rescaled to match the supplied dimensions. These images were divided into two groups with an 80/20 split: a training set and a testing set. Table I shows the dataset after augmentation and preprocessing.

D. Classification Phase with Different Deep Learning Models
In order to classify the CT scan images, Xception [22], Resnet 50 [23] ,and VGG 16 [22] are used as examples of deep learning architectures. These models are trained through transfer learning. The stacked model is then used to integrate the earlier models, which were each trained for 100 epochs, into one. Complete details are provided below.

E. Transfer Learning
Transfer learning using ImageNet was used to solve the problem of insufficient data. For each model, the weights from the ImageNet training were downloaded. The applied layer training procedure used the feature maps as input. To prevent losing any data during subsequent training rounds, freeze the layers of the model that have already been trained. A fully connected deep neural network was fed with the most recent feature map, which was flattened. The other layers were www.ijacsa.thesai.org trained to extract more data from the later convolution layers because they were closer to the output features. As illustrated in Fig. 3, we added three additional layers to the top of each model: namely, dense with an output of 512, a dropout layer, and another dense layer with a sigmoid classifier. For each of the neural networks used in this study, a dropout layer of 0.25 was added to avoid overlapping [24]. The network was trained with a sigmoid classifier using an Adam optimizer for 100 iterations, with a batch size of 32 and a learning rate of 0.00001.

F. Stacking Ensemble Method
Ensemble approaches come in a variety of forms, including average, weighted average, boosting, bagging, and stacking. In this paper, stacked generalization is used, which is an ensemble technique that learns how to integrate the predictions from various existing models in the most effective way [25].
This study employs a neural network as a meta-learner when neural networks are used as sub-models. In more detail, the sub-networks can be incorporated into a more extensive multi-headed neural network, which will then figure out how to integrate the predictions from each input sub-model most effectively. It makes it possible to think of the stacking ensemble as a single, enormous model.
All of the loaded models are utilized as a distinct input to the bigger stacking ensemble model, which can be defined just after models are loaded as a list. To prevent the weights from being modified while the new, larger model is being trained, each of the loaded models must have all of its layers marked as not trainable.
This method has the advantage of immediately giving the meta-learner the outputs of the sub-models. This new model will employ a different input head for each input layer from each sub-model. This indicates that any input data must be delivered to the model in multiples of k, where k is the total number of input models, which in this case are 3.
The results from all the models can then be combined. Here, a straightforward concatenation merge was employed. Then, a hidden layer is built to interpret this "input" for the meta-learner, and an output layer is defined to produce its own probabilistic prediction. The base model's training parameters were used to train the stack model as well. Fig. 4 shows the architecture of the stacked generalization.

IV. RESULTS
This section discusses the results of both base and hybrid models using different evaluation measures.

A. Performance Evaluation Measures
A number of metrics, such as accuracy, precision, recall, and F1-score, can be used to evaluate the model's performance.
Accuracy: The ratio of correctly anticipated observations to all observations is the easiest and most obvious performance statistic. Given in the equation below: where  True positives (TP) are instances in which we made a prediction that someone had the disease and they actually did.  (b) Resnet50 predicted 302 as COVID and 302 as non-COVID out of 621 images.
(d) The stacked method predicted 306 as COVID and 307 as non-COVID out of 621 images. As shown in Table II and Fig. 5, the hybrid model achieved better results than the single model in terms of accuracy, recall, and f1-score.

V. DISCUSSION
Generally, the outcome is based on testing data, which is comprised of 20% of the entire images from the sars-cov2 dataset. Using the Keras library, the deep model employed in this study was developed. Keras is compatible with deep learning libraries such as TensorFlow and Theano. The model was developed using Google Colab, which enables you to create and run Python code in your browser and offers free access to the GPU.

A. Comparison
The suggested model is compared with other research done using the same dataset (Table III). This comparison shows that although many studies in the literature have combined more deep learning models, these studies are weak compared to ours. The best advantage of our proposed model is that we used GAN as an augmentation technique rather than traditional methods for increasing the number of images used www.ijacsa.thesai.org to train the models, trained the model for 100 epochs with the suggested training parameters discussed in Fig. 3, and eliminated overfitting by applying the stacking ensemble method.

VI. CONCLUSION AND FUTURE WORK
In this proposed work, greater transfer learning models such as VGG16, Resnet50, and Xception are trained individually on the training data before being combined to enhance the model's performance and prevent over fitting. Kaggle's collection of CT scan images contains fewer images than necessary, so data augmentation using GAN is used to obtain more images. Performance metrics, including precision, F1-score, and recall, are used to assess the model's performance. The stacked model outperforms the single model in terms of accuracy, coming in at 98.71. By comparing the proposed method with other studies applied to the same dataset, it is obvious that the proposed method gives high recall, accuracy, precision, and the f1-score.
The future work of this study will train the suggested model for more epochs using different preprocessing techniques, apply the suggested model to another dataset, and attempt to use a different optimizer.
Data Availability: The data that support the findings of this study are openly available upon request from the authors.
Funding: The authors received no specific funding for this work.