Deep Learning Approach for COVID-19 Diagnosis Using X-Ray Images

During the times of pandemics, faster diagnosis plays a key role in the response efforts to contain the disease as well as reducing its spread. Computer-aided detection would save time and increase the quality of diagnosis in comparison with manual human diagnosis. Artificial Intelligence (AI) through deep learning is considered as a reliable method to design such systems. In this research paper, an AI based diagnosis approach has been suggested to tackle the COVID-19 pandemic. The proposed system employs a deep learning algorithm on chest x-ray images to detect the infected subjects. An enhanced Convolutional Neural Network (CNN) architecture has been designed with 22 layers which is then trained over a chest x-ray dataset. More after, a classification component has been introduced to classify the x-ray images into two categories (Covid-19 and not Covid-19) of infection. The system has been evaluated through a series of observations and experimentations. The experimental results have shown a promising performance in terms of accuracy. The system has diagnosed Covid-19 with accuracy of 95.7% and normal subjects with accuracy of 93.1 while it showed 96.7 accuracy on Pneumonia.

by [5] with the aim of detecting lung tumor. The authors have used CT images which are then processed through number of steps to spot the infectious regions of the lung. The system has not employed deep learning which might have improved the performance in term of time complexity. Zhuo Liu et. al. [6] work has focused on the detection of lung cancer using reinforcement learning. They have used deep learning models with the aim of locating lung tumor and characterize them into different types of tumors. An advanced neural network framework has been introduced by [7] to optimize the diagnosis of tuberculosis diseases. The authors have claimed that the proposed architecture would produce good training results while improving the computational time performance. They also visualized the output using the saliency map as well as the grad-CAMs. A subjective test has been done by a radiologist to determine the system efficiency in detecting the infected areas of lung. Kim et. al. [8] proposed a method called "Class-selective Relevance Mapping" (CRM), which is capable of localizing and visualizing a particular region of interest (ROI) in, medical images. Their system would use image modalities to classify specific types of images to visually explain the learned behavior of a machine learning scenario.

3-Deep Learning
Deep learning is an approach of machine learning field inspired by an artificial neural network [9] [10]. It used multi-layer sequencing to extract high-level features from raw images or data [11].
Depending on the problem domain and degree of complexity, the features have been selected, as well as the number of layers are increased. One of the most modern deep learning techniques is Convolutional Neural Network (CNN) [12]. CNN is a branch of deep learning network [13], it is majorly designed as a series of phases formed by layers. In the current research, we have proposed CNN model with an architecture that consists of 22 layers. Convolutional Layer is the first layer of CNN [14] [15]. It takes a filter(kernel) and pass it through all the points in the entire image and passing at any point into a single position (Output). The next layer is Pooling layer which performs a down-sampling of an image, it takes sub-samples of convolutional layer output and produces a single output. There are different pooling methods such as max pooling, mean pooling, average pooling etc. Furthermore, convolution layers and all the training layers, fully connected layers take the features from all neurons in the previous layer and operate with an individual neuron in the current layer to generate features output which might be used in the classification phase.

4-Materials and Methodology
This section describes the detailed design of the proposed system's architecture. The proposed model consists of two components, namely: the training component and classification component. The training part has been designed based on deep learning using convolutional neural network. The purpose of it is to train a labelled chest x-ray dataset of images which are partitioned into infected with COVID-19 and normal. The second component aims to identify if an input x-ray image is for an infected subject or no. figure (1) illustrates the design paradigm of the proposed solution.

CNN Architecture Design
The proposed CNN architecture consists of 22 layers starting from the input layer to the classification layer. basically, the proposed model of CNN contains four phases of convolution layer for features extraction. Each one of them includes a convolutional layer, normalization layer, activation function and pooling.
• The first layer in the proposed CNN is an input layer which is used to determine the number of channels and input images dimensions. In this model, the properties for this layer were input size 224 × 224 and normalization used zero centers. by default, the layer performs normalization for the data, by subtracting the mean image of the training group for the entire group. • After that the convolutional layer a 2-D convolutional layer applies to slide convolutional filters to the input image. The layer scans the input matrix (image) vertically and horizontally, to compute the result of the weights and the input, and then adding a bias term. The first convolutional layer starting with 8 filters, with [3,3] size. And set the default properties for others. • The third part of the first block is the normalization layer; batch normalization layer was used with epsilon 0.00001. this layer is used to normalize each input channel across a mini-batch. Then, the layer changes the input raw data by a learnable offset as well as changing the scales by a learnable scale factor. To increase the training performance of CNN and reduce the sensitivity to network initialization. • Rectified Linear Unit ReLU Activation function is the most common activation function which is used in deep learning and CNN. ReLU is mathematically described in equation (1) ReLU • The next CNN layer is Pooling layer, the main function of this layer is to reduce the number of parameters. This operation applies to each features map individually. There are many pooling functions, in this model max-pooling are suggested. The above layers are repeated with different parameters for four times, to extract the high-level features from the x-ray images. Then two fully connected layer with drop out layer in between for classification phase. Finally, the soft-max and class output layer to classify the entire image belong to which class, based on training phase. Table 1 shows the configuration of a proposed CNN.

5-Experimental Result and Analysis
The proposed solution has been examined and evaluated by conducting a series of experiments which has been done under different scenarios.

Experimental Setting
The experimental settings have been organized as follows: i.

Dataset Collection
The proposed CNN model has been trained and evaluated based on collected chest x-ray images datasets. To evaluate the proposed model, we trained CNN based on these images. The Covid-19 collection of images were collected from two different datasets, First one chest x-ray images (pneumonia) [15], and the second one COVID-19 images collection [16] [17]. The chest x-ray dataset contains two label classes Normal and pneumonia, 1585 samples for Normal class and 4275 samples for pneumonia. The COVID-19 images collection consists of 123 samples of chest x-ray images. One of the most important challenges that we have faced during the course of this research was the limited number of chest x-ray for patients who are suffering from COVID-19. All the images were uninformed into 224×244, as well as enhanced by using adaptive histogram equalization. figure 2 shows sample of normal chest x-ray and COVID-19 case.

Training and Implementation
The proposed model based on CNN was trained on the chest x-ray collected images. Initially, the CNN model was trained and evaluated based on sub-Covid19-collected images from the 123 images for each label class, then trained on all the dataset. The training option and parameters that used for training were as the following: Momentum: 0.9000, initial learning rate = 0.0100, Max Epochs=20 and Mini Batch Size=64. As well as using learning rate schedule with piecewise option, to updating the learning rate every certain number of epochs during the training phase. The solver of the training network was stochastic gradient descent with momentum "SGDM" optimizer. Table 2 shows the training option for the CNN.

Result and Discussion
To evaluate the performance of the proposed CNN model, we will analysis the result based on standard measurement, to understand the detection performance. The first measurement that we calculate is an accuracy of a method determines how correct the values are predicted, equation 2 shows the accuracy calculation. = where TP, TN, FP and FN are truly positive, true negative, false positive, and false negative respectively. As well as confusion matrix was calculated. Figure 3 shows the confusion matrix of the chest x-ray collected dataset. As can see the correct predication of COVID-19 was 95.7% when 22 images are detected from 23 tested image. the second class of Normal the true detection was 93.1%, And finally, the third class achieved 96.7% success ratio.  The dataset, that were used to test the performance of COVID-19 detection contain three classes COVID-19, Normal and pneumonia. The highest detection ratio was for pneumonia. And its acceptable ratio for COVID-19. Because of limited number of chest x-ray images which is belong to who's suffering from COVID-19 virus. The performance of CNN proposed model in training and validation based on chest x-ray images as shown in figure 4. The validation was traced on each epoch to calculated the performance based on accuracy at each epoch and iterations. Table 4 shows the validation accuracy during training.   In this research work we picked Alexnet to compare with the  proposed CNN, because the architecture design is a sequential same style with our model table 5 show the summary of comparison on same dataset. From all tables above and figures, the proposed model achieved higher accuracy than pre-trained Alexnet in case of our selected chest x-ray image "Covid19-project dataset".

6-Conclusion and Future Work
This work presents a CNN model for COVID-19 Diagnosis Using X-Ray Images. The proposed CNN consists of 22 layers. As well as the dataset were used for evolution the model collected from two public datasets: chest x-ray images (pneumonia) and COVID image collection. The CNN make predication based on deeper features extracted from x-ray images. The accuracy measurement was used to analyses the performance of the proposed model. the proposed model based on CNN achieved accuracy 95.8. and for COVID-19: 95.7, Normal :93.1 and pneumonia :96.7.

Conflict of Interests
On behalf of all authors, the corresponding author states that there is no conflict of interest.