Deep Learning Technique for Covid-19 Detection

Nowadays, the detection of coronavirus disease 2019 (COVID-19) is one of the main challenges in the world, due to the rapid spreading of this viral disease. Currently, new variant of covid-19 virus was discovered in south Africa, India, and United Kingdom (UK) due to the mutation of the virus. Owing this critical situation of the world health and with increased number of the cases with the absence of efficient a cure vaccine, early and accurate detection of COVID-19 is necessity of time to prevent and control this pandemic by timely quarantine and medical treatment. Chest x-ray is the most suitable imaging technique for diagnosing in term of effectiveness and cost. Deep learning techniques have achieved state-of-the-art performances in computer-aided medical diagnosis which provides useful analysis to study a large amount of chest x-ray images that can critically impact on detecting the presence of Covid-19. In this work we present Deep Learning-based techniques for detecting Covid-19 and well differentiate between Covid-19 and Pneumonia disease using public dataset of 6432 X-ray images. The proposed model achieves 93% of accuracy, 95% of precision, 97% of recall, and 95% For f1-score.


Introduction
or Coronavirus Disease 2019 caused by Severe Acute Respiratory Syndrome (SARS-CoV-2) which is Coronaviridae family disease. The first appearance of the disease was in December 2019 in the city of Wuhan, in the province of Hubei in China. It quickly spread, first throughout China and then overseas causing a global epidemic (kern, 2021). Covid-19 is a respiratory disease that can be fatal in patients weakened by age or another chronic disease. It is spread through close contact with infected people. The disease could also be transmitted by asymptomatic patients, but scientific data are lacking to prove this with certainty (kern, 2021). Meanwhile, the most common symptoms of COVID-19 are Fever, Dry cough, Fatigue. However, there are other less common symptoms that may affect some patients include: Loss of taste or smell, Nasal congestion, Conjunctivitis (also known as red eyes), Sore throat, Headache, Muscle or joint pain, Different types of skin rash, Nausea or vomiting, Diarrhea, Chills or dizziness (World Health Organization, 2021 The reverse transcription-polymerase chain reaction (RT-PCR) method was approved by WHO as the standard diagnostic technique for detecting the virus (Wang, 2020). RT-PCR tests are based on samples of nasal secretions to analyze ribonucleic (RNA) and deoxyribonucleic acids (DNA) using fluorescence (Alazab, 2020). In recent studies, radiological imaging is considered an important screening method for COVID-19 diagnosis such as X-ray imaging.
The experimental studies on X-ray images affirmed the possibility of detecting in lungs the presence of COVID-19 in his initial stages. Also, X-ray images is real-time process and their equipment is low in cost and simple to operate (Wang, 2020). At present, the biggest challenge is the presence of medical experts and the time required to analyze the X-ray images, which create an urgent need for a computer-aided diagnosis system to help radiologists interpret images faster and more accurately.Meanwhile, the advanced of Artificial Intelligence methods can be suitable for these issues such as Deep Learning that shown promising results in medical field (Jain, 2020).
Since the great achievement of the CNN, as deep learning technique, in images processing such as classification, prediction and other metrics in different domain, researchers used CNN for Covid-19 detection. A lot of works done in the domain of Covid-19 detection using chest X-ray dataset of normal and covid-19 people with different implementation of CNN such as (Che Azemin, 2020). The authors proposed ResNet-101 convolutional neural network architecture to predict COVID-19 using dataset of 1547 X-ray images for their training process. Their proposed model shows 71.9% of accuracy.Also, (Jain R. G., 2021) presented comparative study between ResNeXt, Inception V3 and Xception models to classify the infected patients of COVID-19. They used Kaggle repository as Chest X-rays images dataset. The shown results indicate that Xception model performs better than other used modals such ResNeXt and Inception V3, with accuracy of 97.97%.
A combination of three public datasets (1102 chest X-ray images in total) were used in the work of (Wang, 2020) as the main source of data for conventional transfer learning method and the combination of a pre-trained deep learning model and traditional machine learning classification to identify COVID-19 in chest X-rays. The experimental analysis of the methods achieves 96.75% of accuracy. Moreover, CNN model with the help of capsules were proposed by (Afshar, 2020). They aimed to optimize the model by using few numbers of trainable parameters. The results of their study indicate an accuracy of 95.7%.
However, the presented works only depend on small datasets that contain x-ray images of normal and covid-19 patients. Meanwhile, there are some diseases that have close similarity with Covid-19 in their X-ray images, such as Pneumonia disease, what make confusion in the model and it will not give an accurate classification. In case when the patient has Pneumonia disease and pass his X-ray image to the model that trained only on normal and Covid-19 X-ray image, he will classify it as Covid-19 which is wrong classification.
In this paper we will solve the problem of extracting the features from the X-ray images in order to make the model train on three cases of X-ray images such as Covid-19, normal and Pneumonia disease by using dataset of 6432 X-ray images.

Materials and methods
In our experimentation we used public big dataset that contains 6432 X-ray images extracted from Kaggle repository (Patel, 2021). The dataset divided on two folders for the training (5144 X-ray images) and test (1288 X-ray images), each one of these folders contain three subfolders named Covid-19, Normal, Pneumonia. After the extraction of the dataset we apply some pre-processing methods, such as resizing the images then generating new images for data augmentation. As result, our dataset is ready to be passed to the model.
As deep learning method we used Convolution Neural network with 3 ConvD2 layers and 3 maxpooling layers, one flatten layer and 3 dense layers (Figure 1). After building our model we pass to it the prepared dataset to be trained and tested. After the training process we get trainable model that will be ready for the use by the patient. The patient can pass his X-ray image to the trained model and get the result of the classification of their x-ray image (Figure 2) present the general architecture of the proposed system.

Results and Discussion
In our implementation, we used Python with Keras and Tensorflow libraries which provide the most needed tools for deep learning implementation. These libraries are built on top of PyCharm environment. Lenovo PC with Windows 10 pro 64 -bit, CPU of Intel Core i7, 3.60GHz, 16 GB of RAM, Intel HD Graphics 4600 GPU and 1TB of hard disc is used. Our model achieves good results in term of classification metrics such as 93% of accuracy, 95% of precision, 97% of recall and 95% for F1-score. Table 1 below shows the classification results of the model. Table 1. The classification results of the model Also, we can see the out performance of our system in the training process by using accuracy and loss metrics. As we see in the graphic curve, the increasing green curve improve the high accuracy. Meanwhile, the loss function is decreasing till reach low values (Figure 3).

Conclusion
The increased number of Covid-19 cases in the world and with new variants of this pandemic in the absence of an accurate vaccine, physical distancing, wearing mask and washing hands still the most used precaution to minimize the spread of this epidemic. In this study, we proposed CNN based technique for Covid-19 detection. We have successfully classified Normal, Covid-19 and Pneumonia disease which is the most similar disease in term of X-ray images, but it is verry different in his medical treatment. The results of our experimentation indicate the high performance of the system with 93% of accuracy in the classification metrics, also, the precision of the system reaches 95%, the recall and F1-score confirmed the classification metrics with 97% and 95% respectively. However, the use of the same dataset in order to compare our results with other works still the limit of this work. As future work, we aimed to use other similar diseases datasets such as Tuberculosis and other chest disease in order to make more precision in the diagnosing the X-ray image.