Abstract
The disastrous era of COVID-19 has altered the perspectives of nearly all nations concerning the health and education sectors. Artificial intelligence is a pressing need that needs to be implemented thoroughly in the medical and educational fields. Imperatively, the diagnosis of Covid-19 has become crucial. In this study, we have designed a classification model based on Convolutional Neural Network (CNN) and transfer learning. The COVID-19 chest X-ray images have been considered for the proposed methodology and are classified as COVID-19 positive and normal cases. The proposed shallow CNN Model achieved an accuracy of 96%, which is computationally very effective as only three Convolutional blocks are required. Then, the Xception architecture-based model is experimented with. The accuracy and loss of the proposed model have been evaluated using Adam and SGD optimizer. With the Adam Optimizer, Xception Net achieved the best classification accuracy of 99.94%. The precision, recall, and f1-score of 100% are achieved. The proposed model has outperformed the previous studies in the same domain, which highlights the model’s state-of-the-art performance. Our study will be helpful for decision-makers and can help further minimize mortality and morbidity by effectively diagnosing the disease.
Introduction
The development of the novel Coronavirus (COVID-19) has changed the old perspectives of mankind and has turned the tables. The Coronavirus started in Wuhan, China, and has left the world at a standstill due to its proliferating contamination. The World Health Organization (WHO) recently revealed that around 98 million COVID-19 confirmed cases, 2.1 million deaths, and 54 million recovered cases are reported globally.
1
Life has also become horrible for top countries with world-class health facilities. Covid-19 has dramatically changed the scenario of life in almost all world countries. Everything on which the nation stands has been impacted and thrashed due to the Covid-19 pandemic. Goals such as resource availability, eradication of hunger, health and well-being, and quality education are under significant threat. Quality education transition and environmental and energy research have been affected to a greater extent due to the COVID-19 escalation.
2
The COVID-19 pandemic has caused widespread lockdowns and restrictions and has affected nearly every country. The rural areas of the southern United States, Rochina in Rio de Janeiro, Brazil, and the Khayelitsha region of South Africa are among the locations most adversely affected by COVID-19, particularly with educational deficits stemming from inadequate internet connectivity and the scarcity of essential daily requirements.
3
Policymakers are implementing testing and immunization efforts to limit the effects of COVID-19.
4
Many articles have proposed prediction-based models to predict the pandemic outbreak. One of the most crucial aspects of COVID-19 is its efficient diagnosis. Several cases have been reported where the COVID-19 test fails to detect the presence of disease, and hence, effective diagnosis is still a challenge for the medical fraternity. This article proposes a CNN-based deep vision model to diagnose COVID-19 with a high accuracy of 99.97 based on chest X-ray analysis of the questioned person. The foremost novelty of the proposed work is summarized below: • Study the existing methods for diagnosis of COVID-19 • Proposed an accurate transfer-learning-based Xception Net model for classifying COVID-19 into positive and normal cases. • Analysis of the Xception Net model using classification metrics in terms of accuracy, precision, recall, and f-measure to find the performance of the proposed model. • Explore and fine-tune the model to enhance the results and accuracy further.
The paper is structured into distinct sections. Section 2 delineates examining contemporary academic literature pertinent to the current research. Section 3 outlines the research technique, encompassing data description and the proposed experimental configuration. Section 4 provides the results visually, alongside the classification metrics of the suggested model. The comparative analysis, along with the limitations of the study, has been discussed in section 5. Section 6 provides the conclusions and anticipated expansion of the study.
Review of literature
Several studies have been accomplished to analyze the trend of the outbreak of Covid-19. Some aim to aid the testing and diagnosis of others. But still, a lot of gaps are there. Several AI researchers contributed to the diagnosis of COVID-19 using technical expertise. Image processing integrated with machine/deep learning has already shown a lot of accomplishment in diagnosing diseases like cancer detection, brain tumor detection, lesion detection, etc. For example, Recurrent Neural Networks (RNN) with AlexNet architecture to detect the Covid-19. The CT X-ray chest images are used to build the model using transfer learning. 5 The CCSHNet model has been developed to analyze COVID-19 utilizing Chest Computed Tomography (CCT). Several algorithms were also proposed to extract features optimally. The CCSHNet model performs better than the other 12 best models. 6 Other authors proposed deep learning-based approaches for COVID-19 detection. 7 Similarly, 8 proposed a capsule network for COVID-19 detection. Many transfer learning-based models are proposed with high accuracy. Authors in 9 proposed a concatenation of Xception and ResNet50V2 to extract multiple features from COVID-19 chest X-ray images and add techniques for the network to learn from the unbalanced datasets. In, ref. 10 the authors used transfer learning techniques to highlight the abnormalities within the small medical image datasets and evaluate the Convolutional neural network (CNN) models given over recent times. A deep Learning CoroNet model has been proposed in. ref. 11 A pre-trained Xception model on ImageNet has been used to extract features from COVID-19 chest X-ray images. Authors in ref. 12 used the approach based on deep transfer learning to identify COVID-19 in positive and normal cases. Two loss functions have also been used to handle the noise and imbalanced COVID-19 dataset. To detect COVID-19 pneumonia patients automatically, authors in ref. 13 used deep CNN to classify COVID-19 cases using digitized X-ray images. This study automatically enabled the learning rate given with a pre-trained ResNet50 network, which has been fine-tuned using three technical steps: discriminative learning rates, progressive resizing, and cyclical learning rate. Authors in ref. 14 have proposed five pre-trained CNN-based models such as ResNet50, ResNet152, ResNet101, Inception-ResNetV2, and InceptionV3. Using these models on COVID-19 chest X-ray radiographs, cases have been classified into COVID-19 confirmed normal, viral pneumonia, and bacterial pneumonia. Recently, 15 proposed InstaCovNet-19 with a better accuracy of 99.08 for COVID-19 detection. Still, there is a search for an efficient, cost-effective, and accurate method for diagnosis.
Policymakers are already using testing and vaccination as ways to reduce the impact of the Covid-19 virus. A large number of studies have presented prediction-based models to anticipate the outbreak of the pandemic. The accuracy of the diagnosis provided by Covid-19 is one of its most significant characteristics. There have been several reports of instances in which the COVID-19 test could not identify the presence of disease; as a result, accurate diagnosis continues to be difficult for the medical community. The need for improved efficiency in COVID-19 diagnosis underlines our motivation in undertaking the proposed study.
Methodology
Overview of the dataset
A dataset including 5000 images is being used for the experimental study. The dataset has multiple origins and is categorized into COVID-19 and Normal X-ray images. The COVID-19 X-ray images dataset was taken from https://github.com/ieee8023/covid-chestxray-dataset and developed by, ref.
16
as shown in Figure 1(a). A standard X-ray images dataset was taken from https://github.com/shervinmin/DeepCovid.git and produced by, ref. 17 as shown in Figure 1(b). The original dataset comprises around 5k images with only 184 X-ray images of COVID-19 infections. Rest all are non-Covid-19 images. There is a lot of imbalance in the dataset. We used a balanced data approach for binary classification and augmentation to upsurge COVID-19 data images. We obtained 1455 images for COVID-19 infections after data augmentation. X-ray images representation for (a) Covid-19 infected patients (b) Normal patients.
Data augmentation is the method to override the shortage of limited COVID-19 datasets available so far. A large dataset is required to train the neural networks for perfect results. The proposed transfer learning models’ potential measures depend on the dimensions of the validation and training dataset. For data augmentation, different methods are applied to the original dataset, such as horizontal flip, height shift, rotation, width shift, zoom range, and shear range. Figure 2 shows the applied methods to significantly increase the limited COVID-19 dataset and make it suitable to overcome the class imbalance problem. Furthermore, the class imbalance problem can cause the overfitting problem, so the model cannot learn from the training data to generalize the model for unseen images.
9
Therefore, to combat the overfitting problem, data augmentation is used in this study. Image augmentation of the Covid-19 dataset.
Train-validate-test split for the proposed model.
Experimental setup
Various set of experiments have been performed for accurate Covid-19 diagnosis using deep learning and transfer learning. One of the best experiments with the CNN model and another with transfer learning is presented here. The validation uses open-source tools such as Pandas, PyTorch, Matplotlib, NumPy, Keras, TensorFlow, and Pandas, employing Python 3.3 in Google Colaboratory. 18
Deep learning based proposed shallow CNN
Comparatively, deep learning algorithms perform better than conventional machine learning algorithms on medical image analysis. One such subtle method of deep learning is the Convolutional Neural Network (CNN), which can provide improved performance metrics in medical imaging and computational sciences. 19 The visual nervous system biologically inspires feed-forward neural network-based CNN. The image’s lower dimension is mapped, visual components are highlighted using CNN, and the essential features of the images are retained. Convolutional, pooling, and fully connected layers are three types of layers in the CNN architecture. CNN uses a convolutional kernel to extract the local features for the Input training images. The dimensionality of the parameters has been reduced efficiently by a sub-sampling process with the help of a pooling layer, which can prevent this from overfitting. To predict the final results, the fully connected output layer is used to project the outputs. 20
This paper proposes a novel CNN model for identifying COVID-19., as shown in Figure 3. It has four main blocks. Each block contains convolution, ReLU, and pooling layers. Finally, three fully connected layers with dropout function and softmax layer are also used. Table 2 includes all the parameters and their values. Details of proposed shallow CNN. Parameter Values used for proposed CNN.
Transfer learning
In transfer learning, the pre-trained models on some tasks can be utilized to solve the other tasks with updates for the new task. It took advantage of pre-trained models trained on substantial training databases and then helped the target task, which has limited data available. Transfer learning is used when ample numbers of images are not available to train the models, especially in the case of medical imaging classification. 21 There are a lot of pre-trained CNN models that we can use to model the limited databases to extract their features. InceptionV3, 22 ResNet-50, 23 Xception, 24 and ResNext50 25 are famous pre-trained CNN models. These unique pre-trained CNN models are proficient in handling extensive data of different categories. Such a quality-controlled large database called ImageNet contains 14 million images from 1000 different living and non-living being categories.
To implement pre-trained models like Xception on small-scale datasets (COVID-19 in our case), some problem arises. The pre-trained models are trained on a large volume of the dataset based on living and non-living things, and our Covid-19 dataset comprises limited X-ray images, which result in conflict in the visual appearance of datasets.
26
Our problem is having an insufficient database; therefore, we can transfer the learning information to work with it. Direct model training with the pre-trained models leads to the biased extracted features for the source and will be less comprehensive for the target data. Therefore, existing models are then fine-tuned according to the images of our dataset (Covid-19 dataset in our case), as shown in Figure 4. Basic characteristics such as edges and texture can be learned from the shallow layers of the hierarchical structure of CNN. Architectural view of transfer learning.
Two phases are followed to implement the pre-trained models on different datasets. The first step is to extract the features using the pre-trained model and train the classifier on it to do classification tasks. The internal weights of the existing model cannot be updated for the new task. The other step is to fine-tune the network over the new task, use the previous weights of the pre-trained model as the initial weight in the new task, and update the weights further during the training phase. 17
To classify the chest X-ray images into Covid-19 positive and normal cases, we used a pre-trained Xception network. We modified the last layers of the pre-trained Xception model. Xception model achieved better results than ResNet, InceptionresnetV2, and NasNet Large.
27
The images in our pre-processed input dataset consist of 299 × 299 pixels. Xception generates an 18 × 18 × 728 feature map in its last layer with 2048 dimensional vectors. The architecture of the Xception model is shown in Figure 5. The hyper-parameters used for the pre-trained Xception model are shown in Table 3. The optimum combination of hyperparameters chosen by the Xception Network is tuned using random search optimization. The random search optimization technique was performed on the Xception Net with a maximum number of trials = 10 and several epochs = 24. The model was then trained with the optimum combination of hyperparameters with a learning rate 0.001. SGD and Adam optimizers are experimented with. SGD is a variant of gradient descent. Instead of performing computations on the whole dataset, SGD only computes on a small subset of a random selection of data examples. SGD performs similarly to regular gradient descent when the learning rate is low. Adam’s optimization method computes individual adaptive learning rates for different parameters from estimates of the first and second moments of the gradients. It combines the advantages of Root Mean Square Propagation and Adaptive Gradient Algorithm to compute individual adaptive learning rates for different parameters. Instead of adapting the parameter learning rates based on the average first moment (the mean) as in RMSProp, Adam also uses the average of the second moments of the gradients. In the research, we experimented with SGD and Adam optimizer as Adam converges rapidly to a “sharp minima,” whereas SGD is computationally heavy and converges to a “flat minima” but performs well on the test data. Xception model layer architecture. Details of hyper-parameters used for pre-trained Xception model.
The xception model is a modification over the inception net with depth-wise separable convolutions. Pseudocode 1 is proposed for the Xception model using COVID-19 chest X-ray images available in supplementary material. Figure 6 illustrates the proposed Model for COVID-19 diagnoses based on Xception architecture. The final layer is flattened, and the output is changed to get binary output for COVID-19 detection. The sigmoid function is used as an activation function to predict output probability. Proposed Model for Covid-19 diagnosis based on Xception architecture.
Results
The proposed research methodology for the classification of Covid-19 cases into confirmed and normal has been implemented in python using various libraries like Keras, Pandas, PyTorch, Matplotlib, Numpy, etc. To provide best results. Various models and architecture are explored for the best results. In this paper, we have presented shallow CNN and Xception architecture-based models. Shallow CNN has achieved an accuracy of 96%, but it is computationally very effective as only three Convolutional blocks are required. The results of the proposed models have been evaluated using accuracy, precision, recall, and f-measure. The formula for each classification metric has been shown in equations 1–4.
28
Performance of proposed shallow CNN model with dropout and L2 regulariser.
Classification metrics for proposed Xception net model.

Confusion matrix for (a) Shallow CNN (b) Adam optimizer and (c) SGD optimizer.

Xception model using adam optimizer (a) Accuracy (b) Loss and Xception model using SGD optimizer (c) Accuracy (d) Loss.
Comparison of proposed Xception and shallow CNN methodology with previous studies.
The model demonstrated effective classification, as indicated by the elevated precision and recall values associated with True Positives (TPs) and True Negatives (TNs). The elevated true positive rate indicates the model’s efficacy in recognizing COVID-19 patterns, whereas the high true negative rate validates its reliability in differentiating non-Covid cases. These observations suggest that although our model demonstrates high effectiveness, enhancing image preprocessing techniques and integrating additional annotated training data may further decrease misclassification rates, thereby improving overall performance and clinical applicability.
Discussion
Our proposed fine-tuned Xception model shows significant improvements in all key performance metrics compared to previous studies. Table 6 demonstrates that our model attained an accuracy of 99.94%, sensitivity of 99.87%, specificity of 100%, and an F1-Measure of 100%, surpassing numerous existing methodologies. The Xception + ResNet50V2 method from Rahimzadeh et al. 9 attained an accuracy of 91.40% and a sensitivity of 80.53%. In contrast, models such as ResNet-50 13 and InstaCovNet-19 15 demonstrated accuracies ranging from 96% to 99%. Our fine-tuned Xception model exhibits high accuracy and excellent specificity, demonstrating its effectiveness in accurately identifying non-COVID-19 cases without false positives. Compared to the Shallow CNN model from our study, which attained an accuracy of 95.62%, the Xception-based approach significantly enhances sensitivity and F1-Measure, underscoring the advantages of employing a more sophisticated architecture for COVID-19 detection in X-ray images. The findings highlight the efficacy of the Xception architecture, especially when fine-tuned and optimized, for enhancing the accuracy and reliability of COVID-19 diagnosis. Therefore, we can conclude that it is most suitable for Covid-19 diagnosis. The proposed scheme is feasible in terms of cost and technical requirements. It just needs a chest X-ray image of the patient, which is very cost-effective, and equipment is readily available in health centers. Additionally, the proposed readymade trained model is required. A cloud-based or standalone solution can be easily set up using the trained model to classify the patient X-ray image into the COVID-19 / non-covid category.
Limitations of the study
The dataset used to train the models includes only 1455 COVID-19 images after augmentation. Data augmentation fixed this, however a larger dataset could improve the model’s robustness. The suggested model diagnoses only with chest X-rays. However, this method may not be suitable for medical situations when CT scans are more readily available or needed for complete diagnosis. Variability in X-ray image quality may affect model performance. Even though the model performs well on well-processed photos, low-quality or poor real-life images may cause modest misclassifications. Fine-tuning the pre-trained Xception model improved performance; however, pre-training on ImageNet may have introduced biases. However, thorough model fine-tuning to match the COVID-19 dataset alleviated this.
Conclusion and future work
Covid-19 has changed everything mankind relies on. This research proposes a transfer-learning-based Xception Net and a Shallow CNN Model with dropout and L2 regulariser to classify COVID-19 X-ray images into positive and normal cases. To overcome the problem of limited COVID-19 class data available, we used data augmentation to enhance our dataset. Xception Net involves new inception layers added to the deep Convolutional network to construct the depth-wise convolution layers after the point-wise convolution. Xception on the ImageNet dataset is fine-tuned to make the pre-trained model fit for the limited training dataset of COVID-19-positive cases. The proposed Shallow CNN Model achieved an accuracy of 96%, which is computationally very effective as only three Convolutional blocks are required. The Adam and SGD optimizer has evaluated the accuracy and loss of the proposed model. Xception Net achieved the best model accuracy of 99.94% using the Adam optimizer at the last layer. Also, the precision, recall, and f1-score of 100% are achieved. For the SGD optimizer, an overall accuracy of 99% has been achieved. The proposed model has outperformed the previous studies published in the same domain, highlighting the proposed model’s subtle performance. In the future, the same model may be experimented with in diagnosing other diseases. Additionally, we have discussed various educational parameters of COVID-19, like a bio-psychosocial emergency, opportunities, obstacles in E-learning, and initiatives taken by the government. The economy and other factors affected by Covid-19’s emergence can be studied in the future.
Footnotes
Acknowledgment
The work is dedicated to the workers, health practitioners, and saviors of all the patients in the lockdown period of COVID-19.
Author contributions
KS: Writing - Original draft preparation, Methodology. SG: Data curation, Visualization, NM: Investigation. SS: Supervision, SK: Conceptualization, VM: Validation, AS & S.Kh: Writing- Reviewing and Editing.
Funding
The authors received no financial support for the research, authorship, and/or publication of this article.
Declaration of conflicting interests
The authors declared no potential conflicts of interest with respect to the research, authorship, and/or publication of this article.
