{'fraction_non_alphanumeric': 0.03730262026963974, 'fraction_numerical': 0.02625181110483534, 'mean_word_length': 4.742772528557326, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Deep viewing for the identification of Covid-19 infection status from chest X-Ray image using CNN based architecture

In recent years, coronavirus (Covid-19) has evolved into one of the world’s leading life-threatening severe viral illnesses. A self-executing accord system might be a better option to stop Covid-19 from spreading due to its quick diagnostic option. Many researches have already investigated various deep learning techniques, which have a significant impact on the quick and precise early detection of Covid-19. Most of the existing techniques, though, have not been trained and tested using a significant amount of data. In this paper, we purpose a deep learning technique enabled Convolutional Neural Network (CNN) to automatically diagnose Covid-19 from chest x-rays. To train and test our model, 10,293 x-rays, including 2875 x-rays of Covid-19, were collected as a data set. The applied dataset consists of three groups of chest x-rays: Covid-19, pneumonia, and normal patients. The proposed approach achieved 98.5% accuracy, 98.9% specificity, 99.2% sensitivity, 99.2% precision, and 98.3% F1-score. Distinguishing Covid-19 patients from pneumonia patients using chest x-ray, particularly for human eyes is crucial since both diseases have nearly identical characteristics. To address this issue, we have categorized Covid-19 and pneumonia using x-rays, achieving a 99.60% accuracy rate. Our findings show that the proposed model might aid clinicians and researchers in rapidly detecting Covid-19 patients, hence facilitating the treatment of Covid-19 patients.


Introduction
Wuhan, a business hub in China's Hubei province, witnessed the outbreak of a novel coronavirus in 2019. Chinese researchers termed the novel virus the 2019-novel-coronavirus (2019 n-Cov) or the Wuhan virus (Singhal, 2020). The global virus-knowledgeable community refers to it as CoronaVirus-2 Severe Acute Respiratory Syndrome (SAR-S-CoV-2) and even the 2019 epidemic coronavirus infection (Covid-19) (Lai et al., 2020;Sharfstein et al., 2020). Coronaviruses have caused sickness in humans who have primarily been exposed to bats and rats as wild animals (Loey et al., 2020b;Rabi et al., 2020;York, 2020).
Covid-19 is a disease caused by an irresistible source that aggravates the lungs. Although RT-PCR testing (Wang et al., 2020b) is currently the most reliable method for identifying Covid-19 infection, it is a lengthy, hard, and complicated manual process, and there is an insufficient supply of testing kits. In addition, it involves nasopharyngeal swabs, which are uncomfortable for the patients while taking the sample.
In contrast, x-ray analysis can be an alternative appropriate method because it involves low cost, has extensive range of applications, and offers rapid speed to detect COVID-19. Consequently, this approach can eliminate the problems related to RT-PCR testing. Utilizing x-ray image is essential for screening and diagnosing Covid-19 cases as Covid-19 targets human pulmonary epithelial cells and x-rays are a valuable tool for determining the health of a patient's lungs (Bassi and Attux, 2022;Ghose et al., 2021;Pham, 2021;Rahman et al., 2021;Wang et al., 2020a). Without human interference, Convolutional Neural Networks (CNN) is capable to discover and derive characteristics and depict very complex nonlinear operations on its own. After a supervised training process, it operates solely based on input data. The ImageNet Large-Scale Visual Recognition Challenge (ILSVRC) reported a well-known scenario when a model outstripped human-level output in the task of classifying images in 2015 (He et al., 2015). Besides this, deep learning is also successfully applied in many sectors for it's superior capability for automatic features extraction and outstanding performance, for example, human activity recognition (Cheng et al., 2022;Huang et al., 2021Huang et al., , 2022Tang et al., 2022), the reconstruction of gene regulatory networks (Biswas et al., 2022), temporal forecasting of taxi flow (Lv et al., 2021b), and urban traffic visualization techniques (Lv et al., 2021a).
Many researchers (Biswas et al., 2022;Abdul Salam et al., 2021;Akter et al., 2021;Mahbub et al., 2022b) have alredy proposed CNN based Covid-19 detection approaches. For example, Akter et al. (2021) provided an automated classification approach based on deep learning and a Convolutional Neural Network that displays a quick COVID-19 detection rate. The training dataset includes of 3616 COVID-19 chest X-ray images and 10,192 healthy chest X-ray images. Abdul Salam et al. (2021) developed two machine learning models where one is a federated learning model and another is a standard machine learning model to show accuracy comparison to detect COVID-19 using a descriptive dataset and chest x-ray (CXR) images from COVID-19 patients. Agrawal and Choudhary (2022) proposed a deep convolutional neural network-based architecture for detecting COVID-19 utilizing chest radiographs.They used considerably large dataset and got a promising accuracy from their model. Biswas et al. (2022) collected a number of publicly available, unique COVID-19 x-ray and CT image datasets. They evaluated and compared the performance of their suggested 22-layer convolutional neural network model with and VGG16. This research aims to develop a paradigm based on deep learning for distinguishing Covid-19 patients from healthy and normal individuals by analyzing the presence of symptoms or x-ray abnormalities. We intend to provide a low-cost approach for radiologists and medical professionals to cross-check their interpretations and identify any potential outcomes that could otherwise be missed.
In addition, we designed a screening method so that it can assists the radiologists to easily identify the portions of the x-ray for Covid-19, bacterial or viral pneumonia, and normal peoples. We worked on the datasets newly generated by the radiological society, several sites such as kaggle, gitthub, and other researchers. This dataset gave us the labeled data required to train and test our architecture for classification. Afterwards, we made two datasets (datset-1 and dataset-2) from the collected x-rays. Datset-1 contained three class x-ray images which is Covid-19, normal and pneumonia patients images whereas dataset-2 made up with Covid-19 and pneumonia images. The contributions of this paper can be summarised as follows: • Collecting and pre-process x-ray data, build a CNN based architecture to recognize Covid-19 patient's x-ray. • First, we trained our system to classify three class x-ray image. Utilizing our architecture, we can recognize chest x-ray images with an accuracy rate of 98.5% for 3 classes (Covid-19, normal, and pneumonia). • For two class classification, we trained our model to differentiate Covid-19 sufferers from pneumonia patients which is very essential and critical. Our stated architecture showed good performance obtaining an accuracy of 99.60% on dataset-2. • Finally, the Gradient Class Activation Map (Grad-CAM) technique was applied to locate typical features from x-rays to assist visually interpretive decision-making for detection cases.
The rest of the part of this paper is outlined as follows: In 2, literature review described while briefly discuss our problem statement in 3. Our proposed Covid-19 detection system's method is discussed in 4. Finally, showing the outcomes of the research in 5 and in 6, we summarized our research with some future research scopes.

Literature review
Recently many researchers have explored different deep learning approaches to identify Covid-19 using clinical data such as CT scans and x-rays. For instance, Alqudah et al. (2019) applied machine learning methods to construct a tool for classifying Covid-19 from chest x-rays. They applied several classification algorithms such as SVM and RF for categorizing x-ray images. They claimed 95.2% accuracy, 100% specificity, and 93.3% sensitivity. The setback of this approach is that machine learning algorithms are not suitable for processing images like x-rays. For this reasons, many deep learning approaches have been applied in the research to detect COVID-19 from images. To mention next, Loey et al. (2020b) suggested a generative adversarial network (GAN) to detect Covid-19 using x-ray. For Covid-19 identification purposes, the system explored three pre-trained models: GoogleNet, Rest-NeT18, and AlexNet. GoogleNet was chosen as the powerful DL technique within the four class cases, and the authors gained 80.% test accuracy for three-class classification. In contrast, AlexNet achieved an 84.3% accuracy rate in the three classes case, whereas GoogleNet achieved 99.4% test accuracy in the two classes scenario. However, their models were trained using a limited number of x-rays. Likewise, Horry et al. (2020) devised a deep learning model to identify Covid-19 using chest x-rays to be fed into pre-trained algorithms. For classifying x-rays, the recommended system utilized Inception, ResNet, Xception, VGG16, and VGG19. The dataset used by the model is generated by collecting 322 pictures of pneumonia patients, 115 images of Covid-19 cases, and 6162 images of ordinary individuals. Both the VGG16 and VGG19 classifiers have 80% sensitivity and accuracy which is not so promising for such sensitive infectious diseases.
Again, Bhattacharyya et al. (2022) established an approach to effectively distinguish Covid-19 patients from healthy persons using x-ray images. They performed segmentation on x-rays using deep learning based segmentation process before feeding the data into classification models to enhance outcomes. A conditional generative adversarial network (GAN) was applied to segment the lung image and trained using available ground truth masks by using a pixel-to-pixel approach. Finally, they used several ML algorithms, including softmax, RF, SVM, and XG Boost to classify the images. The accuracy of the VGG 19 architecture combined with the BRISK key-points mining approach with RF as the classification layer was 96.6%.
Ucar and Korkmaz (2020) introduced a deep CNN based Covid-19 detection system utilizing x-ray images. The dataset used for training the model included 1583 images of normal cases, 4290 images of pneumonia cases, and 76 images of Covid-19 cases and for Covid-19 cases and the model achieved 98.3% accuracy. However, the dataset is not significantly large enough to adopt the model in real life. Meanwhile, Apostolopoulos and Mpesiana (2020) also proposed a transfer learning technique by employing CNN. This approach might effectively recognize Covid-19 patients by analyzing key characteristics from chest x-rays. The method used five CNN models to categorize Covid-19 pictures, namely Inception, InceptionResNetV2, VGG19, Xception, and MobileNet. VGG19 was selected as the primary model for achieving the highest results (94.48% accuracy, 93.85% specificity, and 97.57% sensitivity). They used 700 images of pneumonia patients, 224 Covid-19 patients, and 504 images of ordinary people for the dataset.
In contrast, Bandyopadhyay and Dutta (2020) offered a completely new approach that employed the LSTM-GRU to characterize confirmed, discharged, negative cases, and death instances of Covid-19. The original system achieved 8% for confirmed cases, 67.8% accuracy for negative patients, 62% accuracy for death cases, and 40.5 percent accuracy for discharged cases. Khan et al. (2020) proposed an enhanced DL network to automatically detect Covid-19 instances via lung x-rays. This study used 1248 images as a dataset combining Covid-19 pneumonia viral, pneumonia bacterial, and ordinary individuals' x-ray images. The suggested approach achieved 93.5% accuracy, 97% precision, and 100% sensitivity in the situation of Covid-19.
To distinguish Covid-19 cases from normal cases using CT scans, Singh et al. (2020) applied a deep transfer learning model, VGG. In this approach, features are extracted using principal component analysis (PCA) for classification with four different classifiers. With a bagging ensemble approach and SVM classifier, the following performances metrics were found: 95.6% accuracy, 94.8% precision, and 96.3% F1-score. Similarly, Ahuja et al. (2021) suggested a transfer learning technique employing a three-phase approach. Several pre-trained methods were fitted with an augmented image utilizing the ResNet18 model to indicate the irregularity of the image, resulting in 99.4% test case accuracy. Alshazly et al. (2021) exhibited a deep learning model trained using chest CT-scans to make this process more faster and automated. Several researchers have attempted to detect covid19 more reliable by combining multiple models. For example, Aslan et al. (2021) effectively merged two pre-trained Alexnet architectures (transfer learning and BiLSTM layer) for detecting . They claimed that the proposed hybrid system shows higher Covid-19 detection accuracy than any single model. Furthermore, Ter-Sarkisov (2022) presented a COVID-CT-MaskNeT model to forecast Covid-19 using chest CT-scan images, and they obtained 90.80% sensitivity for Covid-19 cases, 91.62% sensitivity for Pneumonia cases, and a mean accuracy of 91.66% and an F1-score of 91.50% by training only a tiny proportion of the model's parameters.
Further, Karthik et al. (2021) implemented a customized CNN-based system to distinguish Covid-19 instances, and it can adopt distinct convolutional filter patterns for each type of pneumonia. To prevent epidemics and increase production in the Lv et al. (2021a) introduced a deep learning model. To predict the urban traffic revitalization index for the influential cities in China, they built DeepTRI using deep learning. Traveling is a big issue during pandemic. As a result, prediction of traveling demand considering environmental factors is a important factor and bare in mind this (Xu et al., 2022) presented a deep learning based traveling demand prediction system. Deep learning also is being successfully applied in many medical sectors. For example, PreRBP-TL is used for the reconstruction of gene regulatory networks and prediction of genomic properties such as accessible regions, chromatin connections, and TFBSs (Biswas et al., 2022) Researchers also have explored diverse kinds of system that can effectively detect Covid-19 individuals from chest x-rays. The above discussion reveals that deep learning, mainly Convolution Neural Network (CNN), plays a crucial role in recognizing and characterizing Covid-19 infection in medical imaging. Therefore, this study aims to explore deep learning to detect Covid-19 from the x-ray images. Several state-of-the-art works are briefly presented in Table 1.

Problem statement
The Covid-19 virus, just like all the other bacteria or viruses, has been shown to cause pneumonia in some patients. However, the care of these cases is entirely different. If an individual is found sick, certain precautionary steps are taken in conjunction with the diagnosis. Precautionary step like keeping the patient under isolation for some days is required to underrate the risk of infecting someone in the case of the Covid-19 virus. It is also important to work out the distribution of the Covid-19 in different parts of the globe and take necessary measures to minimize the spread. Accurate and prompt detection of pneumonia caused by the Covid-19 virus is thus the greatest problem.
The WHO-approved coronavirus testing tool is the reverse transmission Polymerase chain reaction (RT-PCR) method, where the short DNA or RNA sequences are analyzed and replicated or intensified (Corman et al., 2020). To find out the possibility of the coronavirus, specific individuals need over one test. The WHO laboratory researchers establish that the negative findings in RT-PCR tests do not ignore the chance that the previously infected individuals may bare the virus with them (Liu et al., 2020). So, in this case, a quick test is required, which is possible by using an x-ray. Apart from this, the insufficient supply of Covid-19 scanning workstations and research kits poses a significant burden on medical practitioners and personnel to cope up with the problem. Rapid and effective identification of suspicious Covid-19 cases may be a big problem for physicians in this situation. The need for several checks using kits to ensure the proper infection status of patients and thus make acceptable decisions often occurs an exponential growth in situations.
Additionally, early identification of potential cases of Covid-19 is a concern as it includes public health protection and pandemic prevention. Any inability to detect the disease caused by the Covid-19 virus results in a rise in the risk of death. The amount of time that means the time between contracting the virus and starting to get disease signs is 1-14 days. This makes it really difficult to diagnose Covid-19 illness, accompanied by the individual's health conditions at a very preliminary phase. To overcome all these dificulties, diagnosis using x-ray could be a good alternative. The specific objectives are as follows: • Helping radiologists and medical experts to identify the slit and slow changes among multiple x-rays, that otherwise could be overlooked. • Due to the high expense of radiologist, many people in underdeveloped nations are unable to visit them. This tool might assist in the interpretation of chest x-ray as Covid-19, pneumonia, or normal. • As Covid-19 and pneumonia is very similar disease in nature, so it could be difficult to distinguish them by human eyes. For this reason, we built and trained our model to classify covid-19 and pneumonia patients using x-ray as well.

Research methodology
This section presents the main contribution of the paper: the architectural design and development of proposed methodology. The main idea of the method proposed in this paper is to increase the accuracy of Covid-19 patient detection from the chest x-rays dataset.

Methods and material
The artwork of the overall system for Covid-19 detection mainly consists of a number of phases as illustrated in Fig. 1.
At fast, raw x-ray images are given in the pre-processing pipeline for performing pre-processing tasks like resizing, normalization, flipping, zooming, and rotation. After pre-processing phase, the data set was broken into training and test set. Then the train data is used for training the proposed architecture. After every epoch, the accuracy and loss of training and validation are determined. Subsequently, effectiveness was evaluated utilizing assessment metrics: confusion matrix, accuracy, sensitivity, specificity, F1-score, precision, and AUC using ROC.

Data collection and description
As Covid-19 very recently emerged, hardly any of the enormous archives include any Covid-19 tag data. As a result, we must rely on various imaging sources, including normal, pneumonia, and Covid-19 instances. For Covid-19 cases, 2875 x-ray pictures were gathered from the subsequent sites: GitHub (Cohen et al., 2020) and kaggle (Patel, 2020). For pneumonia and normal cases 4200 and 3218 x-ray images are taken from the Kaggle repository (Mooney, 2017;Patel, 2020). We gathered 10,293 x-ray pictures in total. After that, the images are reshaped to 224x224 pixel resolution. The depiction of some x-ray pictures of each class is depicted in Fig. 2.
We intended to make our model robust. With that intention, we make two dataset from the collected data and trained our staed model using both dataset. One (dataset-1) for three class combining Covid-19, normal and pneumonia patients x-ray images shown in Table 2 and other (dataset-2) for two class combining all the Covid-19 and pneumonia x-rays as mention in Table 3.

Image pre-processing
Often pre-processing of the image is performed to enhance the efficiency of the model. In our job, we have also carried out certain preprocessing activities to produce better performance. The preprocessing techniques used in this research are listed in this section.

A.1 Resize Picture to Capture the Central Portion and Removing Black bars
Typically, CNN uses square images as details. Our chest x-ray data collection is obtained from various source data sets of different sizes. So, to feed the network, we'd have to change the scale of the photos to a square format. But as seen in the Fig. 3, it causes an asymmetry of the images.
In order to avoid removing the available data from the images, we wanted to avoid distortion of the input images. As a consequence, we used a technique introduced by Pasa et al. (2019) to remove the central area and delete black bars. The Fig. 4 depicted a pre-processed image that carries out the following operations: 1. If at the margins of the image, any black band arises, then they are discarded. 2. Until about the minimum boundary counts 224 pixels, the dimension of the image is morphed. 3. Retrieve the 224x224 pixel core area.

A.2 Normalization
The photos were then standardized and transformed to the proper data format in the final stage. Individual pixels in the original images are stored as Unit8 type with values ranging from 0 to 255. Data in the float32 type must be given for the Keras model. As a result, the photos that were pre-processed must be transformed. It had also been scaled to a range of 0 to 1. To normalize the images, each pixel was divided by the maximum value of uint8, which is 255.

A.3 Data Augmentation
Deep-learning methods, such as CNN, also deliver favorable solutions if large number of images is used. As a consequence, data  Fig. 2. Some x-ray images of the datasets.    augmentation is valuable in developing CNN based system. For this reason, at training time, we carried out the corresponding data augmentation operations: • 5 to 10 degrees of spontaneous rotation.

Proposed CNN model development
A system has been built in this paper to diagnose Covid-19 incidents systematically using three types of x-ray images. The suggested CNN model's architecture for Covid-19 detection is shown in the Fig. 5. The proposed CNN model has five convolutional blocks. Each convolutional block has multiple layers and each layer has one activation function named Rectified linear unit (ReLU). The third block and fourth block has a dropout layer to reduce the over-fitting problem. Two fully connected layers (FCN) have been used, the first FCN is used with the dropout layer and last FCN layer is connected with the softmax classifier.

A.1 Convolution Layer
Every convolution block of this model has multiple convolution layers. The name of the first convolution block consists of conv1-layer1, conv1-layer2. Similarly second convolution block conv2-layer1, conv2-layer2, third convolution block conv3-layer1, conv3-layer2, fourth convolution block conv4-layer1, conv4-layer2, and final fifth block conv5-layer1, conv5-layer2. The fourth block and fifth block have an extra dropout layer to reduce the overfitting problem. Conv1 block has used a total of 32 filters where every filter size is 5 x 5. Conv2 block has used a total of 64 filters where every filter size is 3 x 3. Conv3 block has used a total of 128 filters where every filter size is 3 x 3. Conv4 block has used a total of 256 filters where every filter size is 3 x 3 and similarly, Conv5 block has used a total of 512 filters where every filter size is 3 x 3. The functional process performed by the convolutional layer is as: where, the input matrix is represented with I, a 2D filter of size m ×n is denoted by β and ϕ depict a 2D feature map's output. I ×β describes the operation of the convolutional layer.

A.2 Rectified Linear Unit
Each convolution layer has an activation function. Here this model used Rectified linear unit (ReLU) activation function. The ReLU layer is used in feature maps to increase nonlinearity. By maintaining the threshold value at zero, ReLU does the activation of the neurons. It is stated mathematically as follows:

A.3 Zero Padding Layer
The application of this layer is to zeros to the left, right, top and bottom edges of an image. We have applied 1 x 1 zero padding during our work.

A.4 Pooling Layers
After the ReLU layer, we decide to apply a pooling layer. It is utilized to dynamically decrease the spatial size of the representation and furthermore, used to reduce the number of parameters and computation in the network. So, it ultimately helps to minimize the over fitting problem. Among different pooling system, the most common one, MAX pooling with filter size of 2 × 2 is used in this research.

A.5 Dropout Layer
There are lots of ways of controlling the capacity of convolutional neural networks to prevent overfitting. Dropout layer (Srivastava et al., 2014) is one of the major regularization methods to prevent overfitting problems. During training time, the dropout layer randomly sets some neurons activation to zero and that neurons will not update their weights. While training, dropout is set neuron active with some probabilities, otherwise set it to zero. Due to dropout, some neuron doesnt learn all features. In the testing time, there is no dropout layer applied. Most of the time, the value of dropout ratio, p =0.5 is a comfortable default. Although this value also can be tuned during data validation.

A.6 Fully Connected Layer
Fully connected layers create a connection between every neuron in one layer to each other neuron in another layer. The layer basically takes an input image or objects and outputs an N-dimensional vector against this, where N is the number of given classes that the model or program has to choose from Chang et al. (2018). The working procedure of it is, like, it aspects at the output of the previous layer and determines which features mostly associate to a particular class. Fundamentally, a fully connected layer looks at what high-level features most strongly correlate to a specific class and has specific weights so that when we compute the products between the weights and the previous layer output, we get the classification value.

A.7 Softmax
The softmax function with loss (Chen et al., 2014) is a used which crushes a N-dimensional vector x of random real values to an N-dimensional vector (x) of real values in the range from 0 to 1 that will sum upto 1. The function is as following equation 3: Here, j=1,2,...,k. For this model, the output feature map, will be for 3 classes. In the output feature map the pixels belonging to the predicted class will be 1 and for that same pixel, other classes will contain zero.

Cost sensitive learning
Our proposed method focuses on learning features automatically from x-ray images based on CNN. Cost-sensitive learning (CSL) (López et al., 2012) is a mechanism in which the method that ranks each class in a classification problem can be penalized. When using CNNs, CSL helps to prevent prejudice in classification. CSL then assists one as a tool to overcome the issue of imbalance. We have chosen it as our data set is imbalanced. In this analysis, the strategy of class weight is applied as one conceivable way while preparing to reduce the future effects of data imbalance. We change weights in the class weight system inversely related to class occurrences in the raw data. We have used a Sci-Kit Learn feature for all this, which acquires numbers to match the number of cases centered on logistic regression concepts. The weight W k in class k is determined by the following Eq. (4).

W k =
Total number of cases Number of classes × Number of cases in class(k) When matching the standard, the weights of the groups are used. Therefore, we allocate greater values to the cases of smaller groups in the loss function. The estimated loss would then be a weighted average, in which W k is defined for the weights within each sample relating to each class during the loss calculation.

Loss Function
The goal of network training is to maximize the probability of the actual class. This is gained by declining the cross-entropy loss for each training sample. The loss function used in our work is the categorical cross-entropy loss. In the following Eq. (5) categorical cross-entropy is specified.
where, k is the number of class used for training the model, and q is the Softmax function or predicted probability of class k and W k is weight for class k.

Screening and localizing pathogens
In order to better understand the stimulation of the last convolutionary layer of the developed model, we applied the Gradient-Weighted classes Activation Mapping (Grad-CAM) algorithm. The last convolutionary layer is the only one that delivers the parameters for the logistic layer of the final parameters to determine a probability distribution output. For constructing the Grad-CAM of an input file, the gradients of this layer have been used. Grad-CAM thus gives a coarse localization map that shows the most significant areas in the picture (radiological features).

Experimental results and discussion
In this section, we discussed the exploratory phase and assessment of the efficiency of the classification by the proposed architecture. The performances and the characteristics of our proposed system is also compared with existing works for Covid-19 detection.

Experimental process
The experimental details performed in this research are described in this section.

Experimental environment
The proposed method is based on a learning rate of 0.001 with a 25 epoch number. The proposed CNN was introduced using Python along with the Keras package with the TensorFlow2 backend on the 1.80 GHz Intel(R) Core i5-8265U processor. Additionally, the tests were carried out using the GPU provided by google colab. We apply open CV for image pre-processing, matplotlib and seaborn for visualization graphs, sklearn for classification matrics, numpy and pandas.

Split data into training set and testing set
We break the data into 90% for training images and 10% for testing which is 1029 images. We further break the training data by 10% for validation. We did this procedure for both dataset as mentioned in Tables 3 and 2. It was assured that the photographs were randomly divided between the test dataset and the train dataset, such that the two datasets were divided nearly evenly between the groups. It is also important that the model is educated in alternating categories. In other words, it would be over fitted, which is not desirable. Moreover, we perform five fold cross-validation to check the robustness of our model.

Model training methodology
Adam optimizer was used to train every layer of the improvement parcel with the normal performance parameters (β1 = 0.9 and β2 = 0.999) using batches of size 32 and running throughout every epoch through the whole dataset. Eventually, adding an effective learning rate scheduler called "ReduceLROnPlateau" defines a lookup to control the relevance of the loss of reliability, starting with a learning rate of 0.001 on demand. After 5 epochs, we decreased the hyperparameter learning rate by a factor of 0.5, where improvement was not recorded by the detector. In the regularization section, in order to mitigate the consequences of over-learning, we have also put an early stop to discourage the over-learning of the network. Hyper parameters used in the proposed model are shown in the Table 4. We kept the parameters same for the binary classification(Covid-19 and pneumonia). For binary classification, we only changed the last dense layer to two instead of three.

Performance evaluation metrics
The results evaluation measures, including accuracy, precision, sensitivity, specificity, and F1-score, are used to assess the proposed system's performance. The performance evaluation metrics can be calculated as: where, τρ = true positive; fρ = false positive :τη = true negative and fη = false negative. It is common to assess categorization results through schematic approaches such as the receiver operating characteristic curve (ROC curve) and its overall ranking, the area under the curve (AUC). As a result, we calculated the AUC ROC as well.

Results analysis
The details results of our stated model were discussed in this section. First, we trained our model applying dataset-1 (given in Table 2) to see how the stated model performs. Afterwards, we trained our model on dataset-2 (shown in Table 3) to check if our model was able to differentiate the Covid-19 and pneumonia cases correctly or not. normal,pneumonia):

Results for three class classification
The confusion matrix enables us to quantify metrics of our categorization task's results. The confusion matrix of the proposed CNN architecture for the test cases is shown in the Fig. 6.
Among the 1029 test images, our suggested approach misinterpreted only 44 images which indicate better and more consistent true positive and valid negative values. Therefore, the suggested CNN architecture can be used to correctly categorize Covid-19 instances.
In addition, the CNN classifier's performance is visually displayed in Figs. 7 and 8 in terms of accuracy and loss during the training and validation phases. For example, the training and validation accuracies at epoch number 25 are 98.6% and 97.8%, respectively. Furthermore, the suggested approach secures training and validation losses of 0.102 and 0.205, respectively.
The general accuracy, specificity, sensitivity, precision, and F1-score for every case of the proposed system are summarized in Table 5. The proposed CNN network has achieved 99.3% accuracy, 99.4% specificity, 99.0% sensitivity, 99.6% F1 score, and 98.0% precision for the Covid-19 cases. For normal patients, it had been recorded 99.2% accuracy, 99.6% specificity, 99.0% sensitivity, 99.0% precision, and 98.4% F1 score. The pneumonia cases have obtained 96.9% accuracy, 97.9% specificity, 99.0% sensitivity, 99.0% F1 score, and 98.2% precision. The best accuracy, specificity, and sensitivity were obtained within the normal cases. The best F1-Score and precision were detected within the pneumonia patients, along with the simplest specificity value.
Furthermore, ROC curves between the true positive and falsepositive rates were generated to verify the overall performance, as illustrated in Fig. 9. For the recommended CNN architecture, the area under the ROC curve (AUC) was reported to be 96.6%.
In this study, our stated model had been compared to five different architectures. We kept the parameter same to train VGG16, VGG19,    Xception, MobileNet and Inception-V2-Resnet on this dataset for valid comparison with our system. Table 6 depicted the comparative performances of these model with our developed model taking the evaluation criteria accuracy, precision, specificity, sensitivity, and F1-Score. As demonstrated in Table 6, the suggested model also produced good performance in all the evaluation metrics with an accuracy of 98.5% on chest x-ray images.

Results for two class classification (Covid-19 and pneumonia cases):
The confusion matrix of the proposed CNN architecture for the dataset-2 is shown in the Fig. 10.
The confusion matrix indicates that our introduced deep learning model performed very well in precisely classifying Covid-19 patients from the pneumonia patients.
Additionally, the ROC curves are generated between actual-positiverate and the false-positive-rate with a view to determining the general performance shown in Fig. 11. For dataset-2, we obtained the region under the ROC curve (AUC) 99% for the proposed CNN architecture.
Again, to compare our introduced CNN model's performances, we have considered the VGG16, VGG19, Xception, MobileNet and Inception-V2-Resnet deep learning models and trained these using dataset-2. Table 8 depicted the comparative performances of these model with our developed model taking the evaluation criteria. As demonstrated in Table 8, the stated model again showed good performance in all the evaluation metrics with an accuracy of 99.6% for categorizing Covid-19 and pneumonia patients.

Results for 5-fold cross-validation:
We also have performed k-fold cross-validation to verify our proposed method's robustness and select k=5 in our experiment. The foldwise results for 5-fold cross-validation are shown in Fig. 12 and Table 9. The confusion matrix and ROC curve depicted in Figs. 13 and 14 show our proposed model's robustness. Figure 3 shows that our proposed model achieves an average accuracy of around 97%, which is excellent for three classes. Again the ROC curve represents the outstanding Fig. 9. ROC analysis of the developed work for dataset-1(covid, normal and pneumonia cases).

Table 6
Comparative analysis for three class classification results of the proposed and reimplemented deep CNN architectures in terms of performance metrics for dataset-1 (in %).  performance of our introduced system, obtaining an average AUC of 99.45% and above 99% for Covid-19, pneumonia, and normal cases on five-fold cross-validation.

Screening for pathogens
Gradient-weighted Class Activation Mapping (Grad-CAM) is often referred to as a heat map that is used the gradients of an identifying and mapping to dynamically view our test. In order to focus the significant portions within the image for forecasting, a rough localization map is generated after passing into the last layer. Of most important region (processed attributes) from which the classification decision has been made by the network reflects the deep blue colour. Fig. 15 shows the heat map for Covid-19, pneumonia, and normal cases of classified test samples.
The analysis of the results demonstrates that a CNN architecture plays an important effect on the detection of Covid-19 by supporting automated feature extraction from x-ray images. Our proposed system can extricate Covid-19 from pneumonia and normal cases with significant accuracy. Though it is tough to separate Covid-19 individuals from pneumonia patients, yet our proposed model is able to recognize Covid-19 showing good performances.

Discussion and comparison with state-of-the-arts
As demonstrated in Tables 10 and 11, we assessed our model to other state-of-the-art Deep CNN techniques for recognizing Covid-19 on chest x-ray pictures. For the categorization of Covid-19 and other individuals pictures in our dataset, all of the algorithms in Tables 10 and 11 was reimplemented.
Correspondingly, the average classification accuracy, sensitivity, and   Fig. 12. Fold wise and average accuracy, precision, sensitivity and F-1 score.

Table 9
Performance of the proposed network on five-fold cross-validation(in %).  (2020), Khan et al. (2020), Ozturk et al. (2020), and Wang et al. (2020a) also tried to detect Covid-19 patients from x-rays using three types of x-ray: Covid-19, pneumonia and healthy individual's x-ray and they achieved more than 85% accuracy. In Rahman et al. (2021), the authors has proposed a novel DL model and obtained 97.65% accuracy, 100% precision, 95.59% recall, and 94.56% F1-Score.  Table 11. As per the tabel depicts, most of them did a tremendous job for classifying Covid-19 patients from others with a good accuracy scores. From the Table 11, it is clears that our stated model is absolutely comparable with the state-of-the-arts models for detecting Covid-19.

Conclusion
We built a deep CNN-based system to classify Covid-19, pneumonia, and healthy persons from x-ray pictures. CNN was used as a pattern identifier from the images for Covid-19 virus detection. The stated model can effectively differentiate other people from Covid-19 patients utilizing x-rays. The suggested framework achieved 98.5% accuracy, 98.9% specificity, 99.0% sensitivity, 99.2% precision, and 98.3% F1 score for three-class classification results. Furthermore, for two-class classification results, our stated architecture gained 99.6% accuracy, 99.60% specificity, 99.90% sensitivity, and 99.30% F1 score, which indicates that our model can effectively classify Covid-19 patients from pneumonia as well. Thus observing the results, it is clear that our designed architecture might be a better alternative for swiftly recognizing Covid-19 infection status and thereby halting the disease's development.
The proposed architecture's concept does have certain drawbacks. The use of limited data sets is the main shortcoming. As a result, in the future, we plan to perform additional tests with larger data sets and analyze the findings to improve our model's suitability and stability. We also intend to identify covid-19 patients suffers from other diseases. Furthermore, we want to train our model with other datasets like different cancerous datasets.We even want to associate the proposed model with radiologists who will be involved in future efforts.