The Application of Artificial Intelligence Technique (CNN-Alexnet) in Diagnosing COVID-19 Using Chest X-ray Images
Background: The coronavirus which initially appeared in China in December 2019 was later declared global pandemic in the year 2020. It has caused a devastating effect on daily lives, public health, and the global economy. Early detection of positive cases is overly critical to prevent further spread of the pandemic and to quickly treat affected patients in isolation. Which is why introduction to fast and accurate alternative of diagnosing the virus is very vital. Methods: An AI technique called deep learning which is most applied to analyze visual imagery like radiological images, This AI technique uses convolutional neural networks (CNN) to analyze the images, AlexNet is the CNN model used for this research. Several studies suggest that medical images contain salient information about the Covid-19 virus, which is why applying such advanced artificial intelligence (AI) techniques coupled with radiological imaging can be helpful for the accurate detection of this disease with a huge potential to address the problem of a limited to no specialized physicians in remote areas like Nigeria’s most vulnerable regions. Results: Initially, the model gave high accuracy of 97.97%, this was suspected to be overfitting. This was corrected by increasing the dataset and applying cross validation thereby reducing noise by giving a lower accuracy to 85% and also increasing its specificity. Conclusions: The aim of the study was to introduce an alternative way of diagnosing the Covid-19 asides from the PCR that is currently the most popular one, this has been archived by our working system and the waiting time has been reduced from 24-48hours to 58 minutes. Secondly, to identify a suitable model in Deep learning in medical science and to measure the performance and to access the effectiveness of the chosen model Alexnet in terms of accuracy, precision, recall &F1score. We archived this by striking a balance in the high percentile number of the following terms and reducing it to a more believable, reliable, and accurate figure.
Artificial Intelligence, Deep learning, Convolutional neural networks, Pandemic
The novel Covid-19 virus came to light after a cluster of patients with pneumonia of unknown cause was linked to a wet market in Wuhan city, Hubei Province, China. Since emerging in Wuhan, in December 2019, the coronavirus disease (Covid-19) epidemic caused by severe acute respiratory syndrome coronavirus 2 (SARSCoV- 2) has progressed rapidly into a pandemic [1,2]. The novel Covid-19 virus quickly spread around the world . On 30th January 2020, the World Health Organization (WHO) declared the Chinese outbreak of Covid-19 to be a Public Health Emergency of International Concern posing a high risk to countries with vulnerable health systems. The virus adversely affects the health and welfare of the world's population, killing many people and impacting the economy of nations worldwide. The novel Covid-19 virus belongs to a large group of dangerous viruses . The Covid-19 is classified as such disease due to its nature which can cause cold, like the SARS coronavirus (SARS-CoV). The disease is named Covid-19 and the virus is termed SARSCoV- 2. The infectious disease caused by this type of virus was named Covid-19 by the World Health Organization (WHO) on February 11, 2020 . This new type of virus spread from Wuhan to much of China in just 30 days, which in no short time spread rapidly around the world and became a pandemic .
The most common symptoms of Covid-19 include fever, cough, headache, dyspnea, dizziness, muscle pain, and fatigue . Hence, the spread of Covid-19 may be interrupted by early detection, isolation, prompt treatment, and the implementation of a robust contact tracing apps. Early detection of Covid-19 is crucially significant and vital in curbing the spread of the novel coronavirus.
Nowadays, applying artificial intelligence techniques such as deep learning algorithms for diagnosis in the medical field have gained popularity by becoming a supplementary tool for health practitioners [8-11]. Therefore, the deep learning techniques was adopted in the analysis of Chest X-rays for Covid-19 detection in this study. This application can be considered as the primary diagnostic tool in epicenters of the pandemic to reduce staff exposure to the virus and test result wait time .
In this study, we work with data consisting of Chest X-ray images because of its past application in the diagnosis for Covid-19 and disease progression evaluation in hospital admitted cases . Hence, there are portable X-ray units widely available and can be easily accessed in most primary healthcare facilities, which makes X-ray imaging to be widely available including in remote areas. Chest X-rays can also be operated in more isolated rooms limiting staff exposure to the deadly virus. Sometimes, the patient’s clinical situation does not warrant a CT scan; therefore, Chest X-rays are a better choice for the initial assessment of infection cases.
Materials and Methods
In the process of preparing this research, we have done an in-depth study of related works, literature reviews that are evaluated using a qualitative research method. The performance of the proposed methods is also evaluated with some metrics like, accuracy, precision, recall, and F1 score. It is difficult to access real patients records from the healthcare facilities. Thus, I have acquired some image data of patients from online repositories i.e., secondary data was used [14, 15]. The secondary data contains 3 categories of sample data: Normal chest Xray, Pneumonia X-ray samples and positive Covid-19 X-ray samples.
The dataset consists of 3800 total X-ray images; 1200 confirmed COVID-19 patient chest X-ray images (Figure 1), 1300 pneumonia patient chest X-ray images (Figure 2) and 1300 normal (healthy) people chest X-ray images (Figure 3).
Figure 1: A chest X-ray image of a patient with COVID-19.
Figure 2: A chest X-ray image of a patient with pneumonia.
Figure 3: A normal chest X-ray image.
The dataset used in training the model will be organized into 3 folders (training, test data & cross validation) which contains subfolders for each image category (COVID-19 (positive)/ normal (negative) and pneumonia). The proposed model is trained with 70% of the data, testing will be done with 20% and cross validation 10%.
Convolutional neural network
Using un-supervised learning, the image classification model used during this project is the CNN model, this was selected due to its high recognition accuracy. Image classification in CNN works by training a dataset filled with labelled images and learns from them without human intervention, then responds back with an output. This is later tested to confirm if the model has learnt properly. Thus, why there is a training dataset and a test data set. We used pretrained network with transfer learning because it is much faster and easier than training from scratch as it requires minimum amount of data and computational resources. One of the major advantages of CNN and is its high accuracy in Object detection. It processes and classifies objects in images and since our data is mainly X-ray images, this model fits perfectly.
AlexNet is a Convolutional Neural Network that is 8 layers, it can be used to load a pretrained version of a network trained on large Image datasets up to a million from the ImageNet database. AlexNet can easily classify images into 1000 objects categories. The network takes an image as input, then outputs a label for the object in the image. AlexNet as a pre-trained model has gained a rich feature representation to classify variety of images ranging from various applications. The first five layers, the convolutional layers, from the pre-trained AlexNet CNN model are saved as fixed feature extractors, while the last three layers are the fully connected layers . The network training options were set at 20 epoch(s). A complete pass of the algorithm over the entire training set is called an epoch. The mini-batch size was set as ‘default’. Mini-batch size is the subset of the training dataset used by the SGDM to update the network parameters. In contrast, the learning rate of training the model was set at 0.001 which basically signifies the rate of adjusting the weights of the network to the gradient.
This section of our study presents the results that were obtained during the experiment that was conducted on building our COVID-19, pneumonia and normal patients’ diagnosis model using X-ray images as input parameters. We further evaluate the implementation of our models in detail, showing the effectiveness of our proposed framework.
The pre-trained AlexNet CNN model we employed for the purpose of transfer learning achieved 93.8% training accuracy with training loss value of 0.198 at 0.001 learning rate. Furthermore, we conducted this experiment several times using the same model with different training options and obtained the results discussed in this study.
Given such high accuracy figure, overfitting is suspected to have occurred, this can be due to many reasons one of which is suspected to be the system cramming previous solutions instead of learning from it. However, this problem is overcome by Cross-validation and Stratified cross validation. Initially we selected images at random for training from each dataset, we later changed using cross validation by selecting the images 1:1. Stratified cross validation was also applied to help break down the dataset into smaller fractions in other to avoid the sets from overlapping. These are all included to increase the efficiency of our model. The proposed model is then trained using 70% of the dataset for training, 20% for test and the remaining 10% for validation.
The initial prediction result was giving an accuracy of 96%. This accuracy level was way too high. One of 2 things was suspected to cause this high number, the first was that there was too much noise in the data hence the high result, second was the system was not actually learning but rather cramming results and since it was selecting data randomly it is possible it kept on selecting the same images.
This led to the introduction of cross validation. Instead of the images being selected at random, it selects images 1:1 to enable all the data images to be trained there by archiving the main goal of cross validation which is to test the model’s ability to predict new data in this case ‘Test data’ that was not used to train the model initially in order to flag problems like overfitting or bias selection and to give an insight on how the model will generalize an independent dataset.
The dataset was also increased from 1000 to 3800 to enable better results. The learning rate was reduced from 0.0001 to 0.000001. Increasing the iteration to 14 and each having 20 epochs. All these changes enabled us to estimate the accuracy of the model. finalizing the accuracy to 85% (Table 1).
Table 1. Performance of the proposed method.
Psychological stress due to COVID-19 pandemic can result in fear and worry among people about their health and financial conditions. It can also cause changes in eating patterns, sleeping problems, concentration difficulties, and exacerbation of chronic health problems, mental health conditions, usage of tobacco, alcohol, and other substances . The current pandemic-related coping strategies may harm mental health, such as decreased well-being and increased depression and anxiety symptoms [18,19], insomnia, and anger [20-22]. Also, inactivity due to COVID-19 disease can have a negative effect on physical and mental health and coping with stress and anxiety during isolation time [23,24]. Besides, there were some negative lifestyle changes due to the COVID-19 pandemic . Furthermore, the fairly big changes in food consumption preferences were reported . Also, in another study, there was a significant decrease in family incomes and a significant increase in family expenditures during the pandemic outbreak . Also, Nigerian women entrepreneurs experienced the negative effect of COVID-19 outbreak on their businesses . Duration and severity of loss of smell and loss of taste and durations of fatigue and headache symptoms was higher in women than in men. These results can be attributed the gender related differences in depression [19,29] and anxiety [18,19]. In previous studies, the relationships of some environmental and hereditary factors such as gender, education, physical abnormalities, handedness, marital status, visual memory, and salivary testosterone with some psychologies including self-esteem, alexithymia, depression [29-36]. Besides, in a recent study, some COVID-19 symptoms were higher and more severe in women than in men .
This study details the metrics and measures used to evaluate the performance of the chosen model (AlexNet) in diagnosing covid19. We used the CNN model AlexNet for features extraction on image data to train for diagnosis of patients using X-ray images. The study indicates the effectiveness of using technological tools as an alternative to curbing the spread of Covid19 by conducting rapid diagnosis to identify people with the disease.
Using 3 types of data (Normal, Pneumonia, Covid19) Xray images, the AlexNet model was modified, and layers 23 & 25 were selected to solve the problem statement. The data was partitioned into 70% training, 20% testing & 10% validation. The initial prediction result was giving an accuracy of 96%. This accuracy level was way too high 2 things was suspected to cause this high number, the first was that there was too much noise in the data hence the high result, second was the system was not actually learning but rather cramming results. This led to the introduction of cross validation. Instead of the images being selected at random, it selects images 1:1 to flag problems like overfitting or bias selection and to give an insight on how the model will generalize an independent dataset. The dataset was also increased from 1000 to 3800 images to enable better results. The learning rate was reduced from 0.0001 to 0.000001. Increasing the iteration to 14 and each having 20 epochs. All these changes enabled us to estimate the accuracy of the model. finalizing the accuracy to 85%.
In this study, the main aim was to introduce an alternative way of diagnosing the Covid-19 asides from the PCR that is currently the most popular one, reason being the long waiting time for results. This has been archived by our working system and the waiting time has been reduced from 24-48hours to 58 minutes.
Secondly, to identify a suitable model in Deep learning in medical science and to measure the performance of the algorithm using a general guideline on evaluating such methods. We compared this model (Alex Net) to others and later modified it to work with our data in other to solve the problem statement which is diagnosing Covid19.
Lastly, was to access the effectiveness of the chosen model Alexnet in terms of accuracy, precision, recall &F1score. We archived this by striking a balance in the high percentile number of the following terms and reducing it to a more realistic and reliable figure.
- Bi Q, Wu Y, Mei S, Ye C, Zou X, Zhang Z, et al. Epidemiology and transmission of COVID-19 in 391 cases and 1286 of their close contacts in Shenzhen, China: a retrospective cohort study. Lancet Infect Dis 2020; 20(8): 911-919.
- Li Q, Guan X, Wu P, Wang X, Zhou L, Tong Y, et al. Early transmission dynamics in Wuhan, China, of novel coronavirus-infected pneumonia. N Engl J Med 2020; 382(13): 1199-1207.
- Chan JFW, Yuan S, Kok KH, To KKW, Chu H, Yang J, et al. A familial cluster of pneumonia associated with the 2019 novel coronavirus indicating person-to-person transmission. Lancet 2020; 395: 514-523.
- Paules CI, Marston HD, Fauci AS. Coronavirus infections-more than just the common cold. JAMA 2020; 323(8): 707-708.
- Sohrabi C, Alsafi Z, O'Neill N, Khan M, Kerwan A, Al-Jabir A, Iosifidis C, Agha R. World Health Organization declares global emergency: A review of the 2019 novel coronavirus (COVID-19). Int J Surg 2020; 76:71-76.
- Wu Z, McGoogan JM. Characteristics of and important lessons from the coronavirus disease 2019 (COVID-19) outbreak in China: summary of a report of 72314 cases from the Chinese center for disease control and prevention. JAMA 2020; 323(13):1239-1242.
- Razai MS, Doerholt K, Ladhani S, Oakeshott P. Coronavirus disease 2019 (covid-19): A guide for UK GPS. The BMJ 2020; 368:m800.
- Litjens G, Kooi T, Bejnordi BE, Setio AAA, Ciompi F, Ghafoorian M, van der Laak JAWM, van Ginneken B, Sánchez CI. A survey on deep learning in medical image analysis. Medical Image Analysis 2017; 42: 60-88.
- Murat F, Yildirim O, Talo M, Baloglu UB, Demir Y, Acharya UJ. Application of deep learning techniques for heartbeats detection using ECG signals-analysis and review. Computers in Biology and Medicine 2020; 120: 103726.
- Faust O, Hagiwara Y, Hong YJ, Lih OS, Acharya UJ. Deep learning for healthcare applications based on physiological signals. Computer Methods and Programs in Biomedicine 2018; 161:1-13.
- Shen D, Wu G, Suk HI. Deep learning in medical image analysis. Annu Rev Biomed Eng 2017; 19:221-248.
- Ai T, Yang Z, Hou H, Zhan C, Chen C, Lv W, Tao Q, Sun Z, Xia L. Correlation of chest CT and RT-PCR testing for coronavirus disease 2019 (COVID-19) in China: A Report of 1014 Cases. Radiology 2020; 296(2): E32-E40.
- Cocconcelli E. Clinical features and chest imaging as predictors of intensity of care in patients with COVID-19. J Clin Med 2020; 9(9): 2990.
- Josepf PC. Building a public COVID-19 dataset of X-ray and CT scans. https://docs.google.com/document/d/1lDx1i2HWjoCHJDuY-v5YPIYuYhYuIIBXryFmhMBK6Wc/edit.
- Mooney P. Chest X-Ray Images (Pneumonia). https://www.kaggle.com/paultimothymooney/chest-xray-pneumonia.
- Almisreb AA, Jamil N, Din NM. Utilizing AlexNet Deep Transfer Learning for Ear Recognition. Fourth International Conference on Information Retrieval and Knowledge Management (CAMP), Kota Kinabalu, 2018.
- Rakhmanov O, Dane S. Knowledge and anxiety levels of African university students against COVID-19 during the pandemic outbreak by an online survey. J Res Med Dent Sci 2020; 8:53-56.
- Rakhmanov O, Demir A, Dane S. A brief communication: anxiety and depression levels in the staff of a Nigerian private university during COVID 19 pandemic outbreak. J Res Med Dent Sci 2020; 8:118-122.
- Wang C, Pan R, Wan X, et al. Immediate psychological responses and associated factors during the initial stage of the 2019 coronavirus disease (COVID-19) epidemic among the general population in China. Int J Environ Res Public Health 2020; 17:1729.
- Rajkumar RP. COVID-19 and mental health: A review of the existing literature. Asian J Psychiatr 2020; 52:102066.
- Torales J, O'Higgins M, Castaldelli-Maia JM, et al. The outbreak of COVID-19 coronavirus and its impact on global mental health. Int J Soc Psychiatry 2020; 66:317-320.
- Ravalli S, Musumeci G. Coronavirus outbreak in Italy: Physiological benefits of home-based exercise during pandemic. J Funct Morphol Kinesiol 2020; 5:31.
- Rakhmanov O, Shaimerdenov Y, Dane S. The effects of COVID-19 pandemic on anxiety in secondary school students. J Res Med Dent Sci 2020; 8:186-190.
- Rakhmanov O, Shaimerdenov Y, Nacakgedigi O, Dane S. COVID-19 Outbreak Negatively Impacted Nigerian Secondary School Students Lifestyles, J Res Med Dent Sci, 2021, 9 (2): 279-284.
- Celik B, Dane S. The effects of COVID-19 pandemic outbreak on food consumption preferences and their causes. J Res Med Dent Sci 2020; 8:169-173.
- Celik B, Ozden K, Dane S. The effects of COVID-19 pandemic outbreak on the household economy. J Res Med Dent Sci 2020; 8:51-56.
- Dane S, Akyuz M, Opusunju MI. COVID-19 and entrepreneurship development among Nigerian women. J Res Med Dent Sci 2021; in press.
- Christina ON, Akin OM, Salisu RA, et al. The effects of sex, physical defect on body, acne on face and education on depression in Nigerian university students. J Res Med Dent Sci 2019; 7:103-108.
- Boukar MM, Dane S. The effects of sex, education and handedness on Rosenberg. J Res Med Dent Sci 2019; 7:17-20.
- Saka MJ, Biliaminu SA, Sanni EO, Imran J, Oluwatosin IO, Dane S. Gender related relationships among salivary cortisol and testosterone hormones and self-esteem and aggressiveness in university students. J Res Med Dent Sci, 2020; 8 (4):136-140.
- Demir A, Dane S. Simian crease related differences in self-esteem and depression scores in university students. J Res Med Dent Sci, 2019; 7 (6): 70-73.
- Rakhmanov O, Dane S. The relationships among gender, handedness, GPA, depression and visual memory in the ROCF test in university students. J Res Med Dent Sci 2020; 8:37-42.
- Boukar MM, Dane S. The effects of sex, education and marital status on alexithymia. J Res Med Dental Sci 2019; 7:82-85.
- Biliaminu SA, Saka MJ, Sanni EO, et al. Gender-related differences in correlations among BMI, salivary testosterone and cortisol and depression and alexithymia scores in university students. J Res Med Dent Sci 2020; 8:152-157.
- Demir A, Dane S. Gender related differences in the possible effect of simian crease on alexithymia scores in university students. J Res Med Dent Sci 2020; 8:1-4.
- Dane S, Akyuz M. Symptom spectrum and the evaluation of severity and duration of symptoms in Nigerian patients with COVID-19. J Res Med Dent Sci 2021; in press.
2Department of Physiology, Faculty of Basic Medical Sciences, College of Health Sciences, Nile University of Nigeria, Abuja, Nigeria
Received: 03-Apr-2021 Accepted: 10-May-2021 Published: 17-May-2021