Volume 8 - Year 2021 - Pages 36-40
DOI: 10.11159/jbeb.2021.005

Using Deep Learning for Efficient Diagnoses of COVID-19, Viral Illnesses (Other than COVID-19), and Bacterial Illnesses


Vibha Addala1

1Jesuit High School
9000 SW Beaverton Hillsdale Hwy, Portland, OR 97229
vaddala24@jesuitmail.org


Abstract - According to the World Health Organization the COVID-19 pandemic has killed more than 3.3 million people worldwide. Efficiently and accurately diagnosing people with COVID-19 is essential to help slow down the spread of the virus. Although swab tests do exist, they are not easily accessible in underdeveloped areas, whereas Chest X-Ray scanning has been available before the pandemic. However, there is a lack of radiologists to analyze and diagnose illnesses from Chest X-Rays. This is why this research aimed to use deep learning for efficient and automated diagnoses of COVID-19, Viral (Other than COVID-19), and Bacterial illnesses via Chest X-Ray images. Since the deep learning models had to analyze images, a CNN (Convolutional Neural Network) was built. There were three different CNN architectures fine-tuned and trained on real-time patient data. Out of all three fine-tuned CNN models, the VGG-16 fine-tuned CNN model received the highest testing accuracy of 92.34% when tested on 977 images. This means that when given a new image, the model was able to correctly classify it in one of the four different classes 92.43% of the time. Further improvements will be made to this project in order to make it into an actual usable platform.

Keywords: Deep Learning, Transfer Learning, Convolutional Neural Network, Chest X-Rays, COVID-19

© Copyright 2021 Authors This is an Open Access article published under the Creative Commons Attribution License terms. Unrestricted use, distribution, and reproduction in any medium are permitted, provided the original work is properly cited.

Date Received: 2021-10-09
Date Accepted: 2021-10-14
Date Published: 2021-11-26

1. Introduction

Since the start of the COVID-19 pandemic over 160 million people have been infected with SARS-CoV-2. While many have recovered, over 3 million people have died due to COVID-19 [1]. Though many have been able to access masks, vaccines, COVID-19 testing, and doctors to either help prevent or fight the virus, a large population of underprivileged people don’t have access to these resources. In countries like India where there is a high rate of poverty due to a lack of resources for a population of over 1.3 billion people, many have died. Infact, on May 18th 2021 4,529 people living in India were reported dead, setting the global record of deaths in one day from COVID-19 from a single country [2]. These are just the reported cases and clearly in overpopulated areas it’s simply not possible to track all the deaths.

To control the spread of the virus, testing has been proven to be very helpful. When someone is tested positive for COVID-19 they can take preventative measures to avoid infecting others which can help save lives. However, like mentioned before there is a lack of resources for underprivileged countries which includes the lack of COVID-19 swab tests and labs to process the samples [3]. Another method for testing for COVID-19 includes diagnosing someone using a Chest X-Ray. Chest X-Ray machines have been available before the pandemic and have proven to be accurate for diagnoses. However, diagnosing COVID-19 through Chest X-Rays requires a trained radiologist. The radiologist to people ratio in India is 1:100,000 proving that having radiologists go through Chest X-Ray scans of a large population of patients is not reasonable [4]. In addition to that, even if there is a radiologist available it can be time consuming to distinguish between whether a person has COVID-19, Viral Illnesses (Other than COVID-19), or a Bacterial illness [5]. Hence, the creation of an automated system for diagnoses of COVID-19 as well as similar illnesses would save time, costs, and most importantly lives.

Artificial Intelligence refers to machines that are programmed to think like humans. This includes the ability to learn patterns to help make informed decisions [6]. AI has been used to solve some of the biggest issues in the medical field. For example, a research team at Google used AI to look for signs of diabetic retinopathy-one of the leading causes of blindness-based on retinal fundus scans. This research benefits areas where there is a lack of doctors to analyze retinal fundus scans. The deep convolutional neural network was able to take in an input image of a retinal fundus scan and apply convolutions to learn patterns to distinguish whether or not someone showed signs of diabetic retinopathy [7]. Essentially in a Convolutional Neural Network certain features are extracted from the images to help the model understand the uniqueness of each image class [8]. In the case of this specific research project the classes were COVID-19, Viral Illnesses (Other than COVID-19), Bacterial Illnesses, and Normal. In addition to building models from scratch many researchers have fine-tuned pre-existing models for their specific purposes. This technique is known as transfer learning. Transfer learning is very useful when there is not very much data as it takes the knowledge learnt from a previous task to help with understanding another [9]. In this project transfer learning was used as the VGG-16, Inception v3, and ResNet architectures were fine-tuned into three different deep CNN models to fit the purpose of this project and trained and tested with patient Chest X-Ray image data.

Fig. 1: This is the VGG-16 CNN architecture [10]. Instead of a picture of a car the input would be a picture of a Chest X-Ray

2. Methods

2.1. Engineering Goal

The goal of this project was to use deep learning to create an automated system to successfully diagnose whether someone has COVID-19, a viral Illness (Other than COVID-19), a bacterial Illness, or is normal based on Chest X-Ray imaging.

Bacterial Illness COVID-19
Viral Illness
(Other than COVID-19)
Normal

Fig. 2: These are Chest X-Ray images for four patients each with different diagnoses [11][12].


2.2. Engineering Criteria

The following were the main criteria for this project:

  • The deep learning models built should use data from real patients to train and test on.
  • The deep learning models built must be easily accessible for others to use.
  • The deep learning models built must be able to differentiate between the four classes: COVID-19, Viral Illnesses (Not Including COVID-19), Bacterial Illnesses, and Normal and should have a testing accuracy of at least 98% when tested on 977 images.

2.3. Dataset Preparation

Chest X-Ray images were used from two different datasets and were organized in google drive. One of the datasets was developed by researchers at Qatar University and the University of Dhaka [11]. Another was developed by researchers at University of California, San Diego [12]. The data was organized in google drive so 80% (3924) of the images were for training the model and 20% (977) of the images were for testing the model. For image pre-processing all of the images were resized to 224 by 224 pixels.

2.4. Building, Training, and Testing the Model

The code for building the deep learning models was written in google collab because all the libraries (TensorFlow, Keras, etc.) were already available there. The three different CNN architectures were loaded separately and were fine tuned for the purposes of this specific project. To able to incorporate transfer learning correctly, the last layer of the different architectures had to be removed so that the model could start to learn patterns specifically about this dataset.

Fig. 3: This shows the different layers/convolutions of the VGG-16 architecture. This corresponds to Fig.1 except there were a few layers that were fine tuned.

For compiling the models, the loss was set to categorical cross entropy, the optimizer set to adam, and metrics set to accuracy. For training, all of the deep learning CNN models went through the training data 15 times (epochs). There was a total of 3924 training images and each epoch was split into 123 batches with 32 training images in each batch.

Once the model was trained, the testing accuracy was determined by giving the models new data to classify. The testing accuracy was determined by how well the models could classify 977 images into their appropriate classes. The graphs for understanding both the training and testing accuracies were plotted using the matplotlib library.

3. Results

3.1. Graphs


Fine-tuned ResNet model

Fine-tuned VGG-16 model

Fine-tuned Inception-v3 model
Fig. 4: These graphs represent the training and testing accuracies for the three different fine-tuned CNN models. The accuracy on the y-axis is in decimal form.

3.2. Table

Fine-Tuned CNN Model

 

Testing Accuracy

VGG-16

 

92.43%

ResNet

 

79.63%

Inception-v3

 

89.15%

Fig. 5: The table shows the testing accuracies of each of the three fine-tuned CNN models. The VGG-16 fine-tuned CNN model had the highest testing accuracy as it was able to make accurate diagnoses predictions 92.43% of the time when new data was given.

4. Conclusion

Clearly all of the deep learning fine-tuned CNN models had a testing accuracy above 79.63% The ResNet fine-tuned model performed the worst out of the three as it had a testing accuracy of 79.63% The VGG-16 fine-tuned model performed the best out of the three as it had a testing accuracy of 92.43% The deep learning models built successfully fulfilled the criteria of using real-time patient data. The deep learning models built fulfilled the criteria of being easily accessible to others. This is because google collab was used to write the code for the deep learning models which made it shareable with just a link. The deep learning models built didn’t fulfil the criteria of having at least one of the models have a testing accuracy over 98% with 977 images. Overall, this project partially fulfilled the engineering goal as deep learning was indeed used to diagnose illnesses from Chest X-Rays but all the criteria was not met.

5. Impact and Next Steps

This research project impacts people by providing an efficient tool for diagnosing COVID-19, Viral Illnesses (Other than COVID-19), and Bacterial illnesses. This tool can be especially helpful for areas where COVID-19 swab tests are unavailable, there is a lack of labs to process swab tests, or where there may be a few healthcare workers and lots of patients. There are many improvements that need to be made to this project. For example, the false positives, true positives, false negatives, and true negatives should be evaluated to see if the model performs better in classifying one class over another. In addition to that, backpropagation can be performed to improve the accuracy of the model. The model should be trained on more diverse data so it become more robust. Also, more specific classes can be added. For example, instead of having the class of Viral Illnesses the class of the Flu can be put instead. This is because there are many types of Viral Illnesses. In addition to that, deep learning model should take other factors into account while making the final diagnoses prediction. This can include whether or not a patient has symptoms like a fever, chills, etc. Also, prognosis suggestions can be given based on the detected illness. Lastly, the VGG-16 fine-tuned CNN model should be made into an actual usable application for use in the real-world.

Fig. 5: The diagram shows what this project could look like with all the improvements made.


Fig. 6: Currently, this project is being improved to become a usable app. Above shows the prototype app VIRUS_AI diagnosing COVID-19 and other illnesses using artificial intelligence. An input image is taken and then the predictions for each class are given.

Acknowledgments

Thank you to researchers at Qatar University and the University of Dhaka and researchers at University of California, San Diego for the open-source data. Thanks Dr.Brahmaji and Dr.Vijaya for useful feedback about this project.

References

[1] “WHO Coronavirus (COVID-19) Dashboard,” World Health Organization. [Online]. Available: https://covid19.who.int/. [Accessed: 18-May-2021]. View Article

[2] C. Linnane, “As Europe relaxes COVID-19 restrictions and U.S. cases fall, India suffers deadliest single day of the pandemic,” MarketWatch, 19-May-2021. [Online]. Available: https://www.marketwatch.com/story/as-europe-relaxes-covid-19-restrictions-and-u-s-cases-fall-india-sets-one-day-record-for-deaths-as-asia-remains-hot-spot-11621435637. [Accessed: 19-May-2021]. View Article

[3] O. Vandenberg, D. Martiny, O. Rochas, A. van Belkum, and Z. Kozlakidis, “Considerations for diagnostic COVID-19 tests,” Nature Reviews Microbiology, vol. 19, no. 3, pp. 171–183, 2020. View Article

[4] R. Arora, “The training and practice of radiology in India: current trends,” Quantitative imaging in medicine and surgery, Dec-2014. [Online]. Available: https://www.ncbi.nlm.nih.gov/pmc/articles/PMC4256238/#:~:text=India%20is%20a%20populous%20country,ratio%20is%201%3A10%2C000). [Accessed: 10-May-2021]. View Article

[5] S. Altmayer, M. Zanon, G. S. Pacini, G. Watte, M. C. Barros, T.-L. Mohammed, N. Verma, E. Marchiori, and B. Hochhegger, “Comparison of the Computed Tomography Findings in COVID-19 and Other Viral Pneumonia in Immunocompetent Adults: A Systematic Review and Meta-Analysis,” SSRN Electronic Journal, 2020. View Article

[6] C. Shorten, T. M. Khoshgoftaar, and B. Furht, “Deep Learning applications for COVID-19,” Journal of Big Data, vol. 8, no. 1, 2021. View Article

[7] S. Ravindran, “How artificial intelligence is helping to prevent blindness,” Nature, 2019. View Article

[8] S. Kulshrestha, “What Is A Convolutional Neural Network?,” Developing an Image Classifier Using TensorFlow, 2019. View Article

[9] “Transfer Learning in Bioinformatics,” Transfer Learning, pp. 293–306, 2020. View Article

[10] VGG16 - Convolutional Network for Classification and Detection, 24-Feb-2021. [Online]. Available: https://neurohive.io/en/popular-networks/vgg16/. [Accessed: 10-May-2021]. View Article

[11] M. E. Chowdhury, T. Rahman, A. Khandakar, R. Mazhar, M. A. Kadir, Z. B. Mahbub, K. R. Islam, M. S. Khan, A. Iqbal, N. A. Emadi, M. B. Reaz, and M. T. Islam, “Can AI Help in Screening Viral and COVID-19 Pneumonia?,” IEEE Access, vol. 8, pp. 132665–132676, 2020. View Article

[12] D. Kermany, “Labeled Optical Coherence Tomography (OCT) and Chest X-Ray Images for Classification,” mendeley, 06-Jan-2018. [Online]. Available: https://data.mendeley.com/datasets/rscbjbr9sj/2. [Accessed: 10-May-2021]. View Article

[13] B. Yirka, “Research shows you can't tell if a person is sick by the sound of their cough,” Medical Xpress - medical research advances and health news, 10-Jun-2020. [Online]. Available: https://medicalxpress.com/news/2020-06-person-sick.html. [Accessed: 10-May-2021]. View Article