key: cord-0825139-ul1dajjf authors: Hemied, Omar S.; Gadelrab, Mohammed S.; Sharara, Elsayed A.; Soliman, Taysir Hassan A.; Tsuji, Akinori; Terada, Kenji title: A COVID‐19 Visual Diagnosis Model Based on Deep Learning and GradCAM date: 2022-03-25 journal: IEEJ Transactions on Electrical and Electronic Engineering DOI: 10.1002/tee.23593 sha: af8ece600ef0fa328caafe0de0c7786698876f4f doc_id: 825139 cord_uid: ul1dajjf Recently, the whole world was hit by COVID‐19 pandemic that led to health emergency everywhere. During the peak of the early waves of the pandemic, medical and healthcare departments were overwhelmed by the number of COVID‐19 cases that exceeds their capacity. Therefore, new rules and techniques are urgently required to help in receiving, filtering and diagnosing patients. One of the decisive steps in the fight against COVID‐19 is the ability to detect patients early enough and selectively put them under special care. Symptoms of this disease can be observed in chest X‐rays. However, it is sometimes difficult and tricky to differentiate “only” pneumonia patients from COVID‐19 patients. Machine‐learning can be very helpful in carrying out this task. In this paper, we tackle the problem of COVID‐19 diagnostics following a data‐centric approach. For this purpose, we construct a diversified dataset of chest X‐ray images from publicly available datasets and by applying data augmentation techniques. Then, we employ a transfer learning approach based on a pre‐trained convolutional neural network (DenseNet‐169) to detect COVID‐19 in chest X‐ray images. In addition to that, we employ Gradient‐weighted Class Activation Mapping (GradCAM) to provide visual inspection and explanation of the predictions made by our deep learning model. The results were evaluated against various metrics such as sensitivity, specificity, Positive Predictive Value (PPV), Negative Predictive Value (NPV) and the confusion matrix. The resulting models has achieved an average detection accuracy close to 98.82%. © 2022 Institute of Electrical Engineers of Japan. Published by Wiley Periodicals LLC. Artificial Intelligence (AI) is playing an important role in medical applications and especially in diagnostics and disease detection. The critical situation and the challenges that were introduced by COVID-19 pandemic invites researchers to seek help in AI and Deep Learning (DL). As a branch of AI, DL is increasingly applied where it shows significant improvements. In many countries, during the first wave, health care systems have been overwhelmed because of the limited diagnostic groups, limited hospital beds for admission of these patients, lack of personal protection equipment (PPE) for healthcare professionals and limited ventilation equipment. The second and the third waves showed a sharp rise in the number of COVID-19 patients. It is expected that subsequent waves could add unprecedented burden a Correspondence to: Mohammed S. Gadelrab. E-mail: masgad@ieee.org *Faculty of Computers and Information, Assiut University, Assiut, Egypt **IT Metrology Lab, National Institute of Standards, Giza, Egypt ***Intellectual Property Department, Rakuten Mobile Inc., Tokyo, Japan ****Department of Information Science and Intelligent Systems, Faculty of Engineering, Tokushima University, Tokushima, Japan on health care systems worldwide, especially with the arrival of new, possibly vaccination-resisting variants of the virus. Several measures should be considered to alleviate this stressful situation. For example, it is important to differentiate patients with acute respiratory illnesses such as pneumonia who may have a COVID-19 infection in order to efficiently utilize the limited resources. In this work we suggest deep learning application on chest X-rays to detect COVID-19 infection in pneumonia patients. With our approach we can classify X-rays into one of three categories: Normal, Pneumonia, COVID-19. The use of X-rays has several advantages over conventional diagnostic tests. For example: (a) The X-ray imaging is widespread and provides good means in diagnostic tests, besides its relative low cost. (b) Transmitting digital X-ray images does not require expensive means. It can be transmitted from the acquisition point to the point of analysis via the Internet, which makes the diagnosis process very fast. Sometimes, it may be difficult for some radiologists to notice the very subtle differences between pneumonia and COVID-19. This could be due to the lack of experience or because of the work stress. A computerized diagnosis system can provide a great help in the fight against COVID-19 by supporting medical teams to differentiate accurately COVID-19 patients from others. Such AI-based tool can serve as a guide for radiologists to clarify the nuances. However, the proposed model is not supposed to completely replace the conventional diagnostic tests for COVID-19 infection. Rather, it can be considered as an initial screening tool for triaging patients with severe acute respiratory infection to undergo further infection tests or start treatment preparation. It is worth to note that scientists do not have yet a full understanding of the continuously evolving COVID-19 and its dynamics where researchers continue to discover new surprising information. Consequently, new datasets should be collected from various regions and the DL model should be updated regularly. This why we carry out this work despite similar research work has been already published. In general, such research is most likely valid in the light of the current information and the symptoms captured in the available X-ray image datasets. New research should be conducted to keep updating the ML models as we get newer information, new virus variants or new datasets in order to maintain model accuracy [1] . In this research we present a visualized diagnosis assistance model based on deep learning and GradCAM to detect COVID-19 infection from chest X-ray images. The model can differentiate between COVID-19 and pneumonia infections with ability to highlight the input regions that guided the classification model to the prediction decision. That can support medical teams to accelerate and increase the accuracy of the COVID-19 diagnosis. Our contributions in this paper can be summarized as follows: 1. Developing a visualized diagnosis assistance method for COVID-19 through a data-centric ML approach. 2. Creating models that can differentiate not only between the normal and COVID-19 but also between pneumonia and COVID-19 that sometimes represent a difficult task even for specialists. 3. Constructing a new dataset from two different datasets that consolidates the diversity of the data and its resilience to bias. Also using dataset augmentation techniques to enhance and increase dataset size. 4. Modifying DenseNet-169 neural network architecture as a pre-trained model to enhance COVID-19 detection and to add the ability for visualization. Besides that, tuning the hyper-parameters to enhance the accuracy. The paper is organized as follows: Section 2 presents some relevant research work. Section 3 briefly describes our proposed method and explains how we constructed our dataset. In Section 4, we describe the details of the various stages of our deep learning approach and how we designed and trained our learning model. Moreover, it also introduces the basis of Class Activation Maps (CAM). Then, we present in Section 5 the evaluation metrics, the results, the GradCAM output and a comparison with results from previous work. Finally, we conclude the paper and discuss some directions for the future work in Section 6. Several AI techniques were applied for detecting pneumonia caused by COVID-19 from chest X-ray images. Among the challenges AI is facing is how the system can differentiate whether the detected pneumonia in the chest X-ray is caused by COVID-19. In common practice, many researchers believe that most deaths from COVID-19 are owing to pneumonia in the lungs of vulnerable patients. AI algorithms can be trained to detect pneumonia in real time. AI used to help the community in different ways such as early warnings and alerts; diagnosis and prognosis; tracking and prediction; treatments and cures; data dashboards; and social control. Blue Dot [2] , a Canadian AI model informed users about the COVID-19 outbreak on 31st December 2019 before World Health Organization (WHO) announced on 9th January 2020. Not only that, but researchers also working on Blue Dot published an article in the Journal of Travel Medicine in January 2020 [3] that predicts the spread of the virus in 20 different cities in the world from Wuhan, China by travelers. Another AI-based model is HealthMap [4] , which also gave an early alert of significant outbreak of COVID-19 back on December 2019 at Boston Children's Hospital in USA. These examples, show that AI-based models can accelerate response to save many lives. AI can also help in predicting and controlling the spread of the disease. Scientists working with UN Global Pulse, reviewed several AI-based applications for the detection of COVID-19. They mentioned that both X-ray and Computed Tomography (CT) scans can be used for the detection of COVID-19 based on AI models. They also proposed the idea of using a mobile phone to scan CT images for the detection of COVID-19 [5] . Following the previous Zika-virus pandemic in 2015, AI-based system was developed to predict the spread of the disease [6] . Such existing models can be utilized for COVID-19 after re-training with data related to COVID-19. The algorithm trained for the prediction of seasonal flu can also be re-trained with new data from COVID-19 [7] . MIT technologies provided several lists to the AI-based dashboard for tracking and forecasting the outbreak of COVID-19 such that HealthMap [4] , Next Train [8] , and Upcode [9] . These dashboards provide a global view of COVID-19 outbreak in all the countries. Lock-down and social distancing are considered the preliminary and basic precautionary measures by healthcare department. AI can be used to control the scanning of people in crowded or potentially affected areas such as railway stations. In China, infrared camera has been used to detect the human body temperature for the prediction of fever against COVID-19 [1] . On the treatment side, AI was contributing long time before COVID-19 outbreak in discovering potentially emerging drugs. Upon the outbreak of COVID-19, several research lab indicated the need of AI to search the vaccine for the treatment. Scientists believe that the use of AI model can accelerate the process of searching cure and developing vaccines for COVID-19. Some research has already investigated the structure of the protein of COVID-19 that was predicted by Google's DeepMind and suggested that it probably can provide useful information for the discovery of the vaccine [10] . Another paper works on the early detection and treatment of pneumonia to reduce mortality rates among children [11] . It presents Convolutional Neural Network models (CNN) to detect pneumonia using X-ray images. Several CNNs were trained to classify X-ray images into two classes: pneumonia and nonpneumonia, by tuning the hyper-parameters and the number of convolutional layers. Six models have been mentioned in the paper and the dataset used is available on Kaggle under the name "Chest X-Ray Images (Pneumonia)" (dataset URL is provided in Table II , 1st row). This 1.16 GB dataset contains 5216 images for training and 624 images for testing. Images in this dataset are grayscale with the dimension of 64 × 64. The dataset consists of three types of images: Normal, Bacterial Pneumonia, and Viral Pneumonia. The first and second models achieve a validation accuracy of 85.26% and 92.31% respectively. The accuracy of the remaining models VGG16, VGG19, ResNet50 and Inception-v3 are 87.28%, 88.46%, 77.56% and 70.99% respectively. Another interesting work applies deep learning to detect COVID-19 patients from their chest radiography images [12] . Its dataset contains about 5000 images that are a mix of chest X-ray and CT images from the publicly available datasets. Images exhibiting COVID-19 disease presence were identified by board-certified radiologist. Transfer learning on a subset of 2000 radiograms was used to train four popular convolutional neural networks. The Deep learning methods used as transfer learning approach include ResNet18, ResNet50, SqueezeNet, and DenseNet-121. They were evaluated on the remaining 3000 images where mostly achieved a sensitivity rate of 98% (± 3%), while having a specificity rate of around 90%. Besides sensitivity and specificity rates, the results present the receiver operating characteristic curve (ROC), precision-recall curve, average prediction, and confusion matrix of each model. Moreover, heat-maps of lung regions potentially infected by COVID-19 were generated and their results show that the generated heatmaps contain most of the infected areas annotated by the board-certified radiologist. Their best performing model achieved a sensitivity rate of 98%, while having a specificity of 92% [12] . In Ref. [13] , the authors present their approach for solving COVID-19 diagnosis problem based on two AI-based methods for classification and diagnosis from lung MRI images. The first technique consists of classification and feature extraction based on ANN and fractal methods. Moreover, they presented CNN-based segmentation methods that can determine infected lung tissues in the MRI images. Besides that, the authors presented the results of two algorithms for the diagnosis: Deep Neural Network (DNN) on the fractal feature of images and Convolutional Neural Network (CNN) on lung images and segmentation. CNN architecture showed higher accuracy (93.2%) and sensitivity (96.1%) than the DNN method with an accuracy of 83.4% and sensitivity of 86%. Results show that the presented method can almost detect infected regions with high accuracy of 83.84%. This finding also can be used to monitor and control patients from infected region growth [13] . Shibly et al. [14] applied faster R-CNN to detect COVID-19 from chest X-Ray images using a dataset similar to [18] . Chowdhury et al. has proposed their own approach for COVID-19 detection [15] . They have trained eight models: SqueezeNet, MobileNetv2, ResNet18, InceptionV3, ResNet101, CheXNet, DenseNet-201 and VGG19. All the models were trained four times: first, to detect two-classes (COVID and Non-COVID) and secondly, to detect three classes (COVID, viral Pneumonia and Normal); both with and without image augmentation. They managed to achieve detection accuracy up to 97.94%. using DenseNet-201 and 96.38% average accuracy of all the eight models on the three-class problem with augmented images. In Section 5, we compare our results with the results from these previous works and further explain the similarities and investigate the differences with our work. In this research, we aim to develop a diagnosis system with visual assistance that can classify a given frontal-view chest X-ray image into one of the following classes: Normal, Pneumonia and COVID-19. The motivation behind the three-class configuration is to provide better understanding in case of any confusion between regular pneumonia and COVID-19 that could be due to the similarity of pathological characteristics between COVID-19 and pneumonia. To achieve that we follow a data-centric approach with significant focus on dataset construction. We start by analyzing available datasets and compare their features in order to select relevant images to be included in our dataset. Then, we generate more images by applying data augmentation technique to extend the dataset and to avoid over-fitting. Once the dataset has been constructed, we start applying a transfer deep learning process on DenseNet-169. The output of the training stage is a trained model that can classify X-ray images into one of three classes: Normal, Pneumonia and COVID-19. We treat each class as a categorical classification problem of the input that consists of a frontal-view chest X-ray image and the output represents a binary that results from the activation of the output layer 'SoftMax'. Besides that, we use categorical cross entropy as a loss function. The results will be evaluated against various metrics such as sensitivity, specificity, PPV and NPV, and the confusion matrix. On top of that, we add GradCAM layers to visualize the parts of the image that led to the classification (i.e., the diagnosis) decision. Unfortunately, few datasets are publicly available on COVID-19. After comparing several datasets, we decided to select images from (COVID-19 and Pneumonia) [16] (as Sub-Dataset1) with data augmentation [19] and COVID-19 Radiography Database [17] (as Sub-Dataset2). Both has a reasonable and diverse amount of the three types of chest X-ray images: COVID -19, pneumonia and normal. Moreover, the two sub-datasets have collected images from different sources. Hence, it will be more likely that there is no overlapping or duplicates when we combine the two sub-datasets. We have constructed our dataset as illustrated in Fig. 1 . We combined each type of the X-ray images from the two sub-datasets together. We used all the available images for COVID-19 and Pneumonia while we selected only To evaluate the dependence of the results on the specific normal images from Sub-Dataset2, we repeated the experiment three times while selecting the 3917 images randomly. The obtained output shows tightly close results, which proves model-independence on normal image selection that may be caused by over-fitting. As shown in Fig. 1 , our newly composed-dataset has a total of 15 310 images with 4192 COVID-19 images, 5618 Pneumonia images and 5500 Normal images. It is divided into 80-20% training and test, respectively. Because we are running several epochs during the training phase, we retained 5% from the training dataset to be used for intermediate evaluations of the generated models from each single epoch. Fig. 2 shows a sample of three images for each of the three types in Sub-Dataset1. To further increase the resilience of our model to variations in images and to enhance its performance, we apply data augmentation technique to generate more data for training and testing as explained in the next subsection. To train deep learning models we need a huge amount of training data. Doubtful or inaccurate results may be obtained if we train DL models on small datasets or imbalanced datasets. Having a balanced, large dataset is crucial for the performance and the accuracy of the deep learning model. When large datasets are difficult to obtain, we sometimes employ well-known techniques such as dataset augmentation to increase the size of the dataset that we already have. We have applied augmentation techniques to create more images as variations of the existing images. Thus, we increase the overall dataset size to improve the resilience of our model. To achieve that, we employed the built-in data augmentation utilities that are available in most deep learning frameworks [19] . Generally, these utilities can: 1. Generate more data to avoid over-fitting. 2. Resize all images at the same size. 3. Apply normalization on all images to make the images at same scale. 4. Shuffle images. Transfer learning emerged as a popular method in computer vision because it allows accurate models to be built [20, 21] . With transfer learning, a model learned from a domain can be re-used on different domains. It can be performed with or without a pretrained model. A pre-trained model is a model developed to solve a similar task. Instead of creating a model from scratch to solve the new task, the model that was trained on another problem is utilized as a starting point. Even though a pre-trained model is trained on a task which is different from the original task, the features learned, in most cases, found to be useful for the new task. The objective of training a deep learning model is to find the correct weights for the network by numerous forward and backward iterations. By using pre-trained models that have been previously trained on large datasets, the weights and architecture obtained can be used and applied to the current problem [22] . One of the advantages of pre-trained models is the reduced cost and the accelerated time of training for the new model [23] thanks to the pre-trained weights. The new model only has to learn the weights of the last few layers. Many CNN architectures are pre-trained on ImageNet [24] . Dense Convolutional Network (DenseNet) is another popular architecture [5] , which was the winner of the 2017 ImageNet competition. In DenseNet, each layer obtains additional inputs from all preceding layers and passes on its own feature-maps to all subsequent layers. Each layer is receiving a 'collective knowledge' from all preceding layers [12] . Since each layer receives feature maps from all preceding layers, network can be thinner and compact (i.e., the number of channels can be fewer). This why it has higher computational efficiency and memory efficiency [25] . Fig. 3 , we designed the learning model such that it contains pre-trained (transfer learning) with a 169-layer Dense Convolutional Network (DenseNet-169) backbone, followed by our customized, fully connected layers. We replaced DenseNet top layer with 3 layers: Convolution layer with 512 filter, (3×3) kernel size and ReLU as activation function + Global average Pooling + finial layer with SoftMax. The final classifier produces one of three classes (COVID-19, Normal, Pneumonia). Each of these classes with a SoftMax activation to produce the final output as {0,1}. Fig. 4 shows the detailed structure of DenseNet-169. We initialize our DL model, that was described in the previous section, with pre-trained weights for DenseNet169 implementation by xhlulu on Kaggle [20] . Then, the training process goes through two stages as described hereafter. Firstly, DenseNet backbone weights of the first 295 layer from 595 DenseNet layers are frozen and only the remaining DenseNet layers and our layers are trained. Then, training is performed using RMSprop optimizer with learning rate parameter set to 10-4. We use categorical cross entropy as a loss function and mini batches of size 50, and train for about 50 epochs. All images are down sampled to 224 × 224 before being fed to the neural network (as these pre-trained models are usually trained with a specific image resolution). All our implementations are done in TensorFlow and Keras framework. [26] and [27] which is a CAM variation, on our CNN models they become more transparent as we can visualize input regions that are significant in making a predication or a decision. Class activation mapping helps to identify the bias in the training set and thus increases model accuracy. For example, if we discover that the network bases its predictions on wrong features, then we can make the network more robust by removing bad-quality data, collecting better data or modifying the feature set. CAM can be produced from image classification CNNs where the Global average pooled convolutional feature maps are fed directly into the output layer with 'SoftMax' as an activation function. Specifically, if the last CNN layer produces K feature maps A k R u×v of width u and height v , these feature maps are then spatially pooled using Global Average Pooling 2D (GAP) and linearly transformed to produce a score y c for each class c, as shown by Equation (1): GradCAM computes the gradient of a differentiable output, for example class score, with respect to the convolutional features in the chosen layer. The gradients are spatially pooled to find the neuron importance weights. These weights are then used to linearly combine the activation maps and determine which features are most important to the prediction. Suppose that we have an image classification network with output y c , representing the score for class c, to compute the GradCAM map for a convolutional layer with k feature maps (channels), A k i,j , where i , j indexes the pixels. The neuron importance weight becomes: To ensure that we get only the positive features of the class of interest we apply the rectified linear activation function (ReLU): The output is therefore a heatmap for the specified class that has the same size as the feature map. Four metrics are used to evaluate our results: sensitivity, specificity, positive predictive value (PPV) and negative predictive value (NPV) [28, 29] . generates correctly a positive result for people who have the condition that has being tested for (also known as the 'true positive' rate). A test that is highly sensitive will flag almost everyone who has the disease and not generate many false-negative results. correctly generate a negative result for people who do not have the condition that has being tested for (also known as the "true negative" rate). A high-specificity test will correctly rule out almost everyone who does not have the disease and will not generate many false-positive results. to prevalence and allow to clinically say how likely it is that a patient has a specific disease. In particular, the Positive Predictive Value (PPV) is the probability that following a positive test result, that individual will truly have that specific disease. The Negative Predictive Value (NPV) is the probability that following a negative test result, that individual will truly not have that specific disease. We trained our model for 50 epochs that finished training with approximately 99% accuracy. Fig. 5 shows the accuracy and the losses of the resulting model during the training and the validation stages. When tested against the Test Dataset, that was constructed as explained in Section 3.1, the model achieved an average accuracy 98.824%. Table I presents the results in terms of the evaluation metrics that were defined in the previous sub-section: Sensitivity, Specificity, PPV and NPV for each category. Regarding COVID-19, it has the following evaluation metrics: Sensitivity = 99.64%, Specificity = 99.50%, PPV = 98.69% and NPV = 99.86%. Besides that, Fig. 6 shows the corresponding confusion matrix of the model. To evaluate the validity of our results and the robustness of our model vis-a-vis the selected dataset and how it was split, we have used stratified K-fold cross-validation method. In this case, we set K = 5 folds and repeated the experiment on the same dataset for 50 epochs for each fold. Fortunately, the 5-fold cross-validation results are very close to the results of the original experiment (that was 98.824%.) with an average accuracy 98.4006%, minimum accuracy 98.171% and maximum accuracy 98.661%. results of the visualization model by Gradient-weighted class activation mapping (GradCAM). Firstly, the original X-ray scan image and the GradCAM are shown separately. Then, the GradCAM and the original scan are superimposed to produce a new image that displays the localization of the image part (features) that the CNN model used to make its decision. In other words, to some extent it can identify the localization of the visual symptoms of COVID-19 or pneumonia. The visualization output was validated through a simple comparison with a separate and blind identification of the disease spots on same image samples by two physicians and fortunately there was a promising match with our GradCAM output. All these results were confirmed by a specialist of a chest radiologist. Fig. 7 displays sample images with the visual symptom spots highlighted. With the aid of GradCAM, we tried to understand the causes of the classification errors of our model. When we examined the miss-classified images, we noticed that some images have either low resolution, poor quality (i.e., have some noise, undesirable shadows or blurry contents) or both, as shown in Fig. 8 . This could be inherent to the original images or could be introduced later due to poor scanning devices during the digitalization process of paper-based images. The GradCAM output for most miss-classified images seems to be meaningless. In most of these cases, the GradCAM output points to "nowhere" or highlights unrelated spots of the image far away from the lung (e.g., image borders, the neck, or the shoulders), which requires more investigation. Moreover, we noticed that almost all the normal images that were wrongly classified as COVID-19 or Pneumonia suffer from low resolution/quality. In some other fewer cases, miss-classified images, especially COVID-19 < = > Pneumonia, have good quality but were difficult to distinguish even by human specialists, according to radiology specialists. compare our work with the relevant works that were discussed in Section 2. Not only we compare the results, but we also compare the ML method, the categories, the utilized datasets, dataset types and the evaluation metrics. We noticed that all the discussed papers share the common goal to diagnose Pneumonia and/or COVID-19 and sometimes have common datasets. However, they differ in other several aspects. For example, they apply different ML methods and even if they apply same ML methods they are applied differently. Most are using variations of CNN pre-trained models. Some work is capable of distinguishing COVID from Non-COVID [12, 13, 15] while others (such as [14, 15] and ours) offer to differentiate between COVID-19, Normal and Pneumonia. One work is focusing on detecting Normal, Bacterial Pneumonia and Viral Pneumonia [11] . Ref. [15] Table II summarizes the results and broadly compares our work with some relevant previous work to position our work with respect to others and to provide readers with an overview of similar research. It provides a broad idea about each paper such as: the applied ML method, output type, datasets and the resulting metrics. It is worth to note that our work mainly differs from the others in the way the dataset is constructed and split. Moreover, we follow a data-centric approach to train a single model rather than training several models on the same data as most other papers did. Having a detailed comparison is out-of-the-scope of the current paper due to space limitations and because of the difficulty to reproduce the same research work with exactly the same resulting metrics shown in the table. During the peak of its early waves, as COVID-19 pandemic spreads around the world, the number of cases was growing exponentially. While waiting for the upcoming waves, finding a method that can help in diagnosing COVID-19 through a cheap and fast method is fundamental to avoid overwhelming healthcare systems again. In this context, we propose a data-centric machine learning techniques to identify and differentiate between pneumonia and COVID-19 from X-ray images. Moreover, we apply GradCAM to highlight the input regions that guided the classification model to the prediction decision. In this paper, we have developed a deep learning diagnosis system for COVID-19 from chest X-ray images. We used transfer learning by DenseNet-169 Convolutional Neural Network while applying data augmentation techniques to generate more data and to avoid over-fitting. The resulting model employs GradCAM to provide highlights for the regions containing potential infections. Our paper is distinguished from the previous work by two main aspects. First, by following a data-centric approach. It encompasses all the stages starting from fine-tuning a pre-trained convolutional model DenseNet-169 on the training dataset to the generation of the diagnosis results. Second, by adding the ability to generate the GradCAM that assists doctors visually to make accurate diagnosis for the diseases. For training and testing, we employed two publicly available datasets to construct our own dataset. When compared to the results from previous work, our model managed to achieve 98.824% average accuracy. It is worth noting that the purpose of this work is to assist in the diagnosis during the triage of patients to reach an accurate separation in emergency medical support services. As a future work, we plan to build a larger and more diverse dataset so we can apply more sophisticated deep learning techniques with proper depth in the samples. Moreover, we need to work on the newly discovered variants of COVID-19 such as delta, lambda and Omicron variants to ensure that our models remain resilient to variations in X-ray images that could occur due to the new generations of the virus. Moreover, we are planning to study the effects of various datasets on a fixed model as well as the behavior of various models against the same dataset, which deserves a separate paper. One of the drawbacks of using open datasets on chest radiographs is the often lack of information related to different positioning methods while taking X-ray images. In general, many X-rays taken in a standing position are healthy, and those taken in a sitting position might reflect serious problems. CovidAID: COVID-19 detection using chest Xray BlueDot: BlueDot: Outbreak Risk Software Pneumonia of unknown aetiology in Wuhan, China: Potential for international spread via commercial air travel HealthMap A novel AI-enabled framework to diagnose coronavirus COVID 19 using smartphone embedded sensors: Design study A dynamic neural network model for predicting risk of Zika in real time COVID-19 Singapore Dashboard Deepmind: Computational predictions of protein structures associated with COVID-19 DeepMind Pneumonia detection in chest X-ray images using convolutional neural networks and transfer learning Deep-COVID: Predicting COVID-19 from chest X-ray images using deep transfer learning Diagnosis and detection of infected tissue of COVID-19 patients based on lung x-ray image using convolutional neural network approaches COVID faster R-CNN: A novel framework to diagnose novel coronavirus disease (COVID-19) in X-ray images Chest X-ray images (pneumonia) Can AI help in screening viral and COVID-19 pneumonia? Covid-19 & Pneumonia) Data Augmentation for Deep Learning, Medium COVID-19 Radiography Database Xhlulu: Keras DenseNet Weights A practical transfer learning algorithm for face verification A survey of deep learning for lung disease detection on medical images: State-of-theart, taxonomy, issues and future directions Pulmonary image classification based on inception-v3 transfer learning model ImageNet classification with deep convolutional neural networks Densely connected convolutional networks. ArXiv160806993 Cs Why did you say that?, ArXiv161107450 Cs Stat GradCAM: visual explanations from deep networks via gradientbased localization Health News Review: Sensitivity, specificity and understanding medical tests Understanding and using sensitivity, specificity and predictive values The authors would like to thank Dr. Mohamed Abdel-Tawab, Lecturer of radiology at Assiut University Hospitals, who provided medical insights and expertise that greatly assisted the research. We would like also to show our gratitude to the "anonymous" reviewers for their insightful comments on an earlier version of this manuscript to be further improved. O. S. HEMIED ET AL. Here research interests include data mining, data science, semantic data integration, biodiversity informatics, bioinformatics, big data analytics. Besides that, she was a visiting scientist at IBM, CAS Center, Cairo Division. She is also a member of IEEE, ACM SIGKDD, and ACM SIGBIO. Moreover, she supervised and currently leading and participating in several national and international research projects.