CovidAID:COVID-19Detection Using Chest X-Ray
A Mid-Semester Project Report Submitted
In Fulfillment of the Requirement for the Degree of
BACHELOR OF TECHNOLOGY
in
Computer Science and Engineering
by
Rashi Verma -)
Ramakant -)
Sakshi Prajapati -)
Under the Guidance of
Sri. Muzammil Hasan
Associate Professor
Department of Computer Science and Engineering
MADAN MOHAN MALAVIYA UNIVERSITY OF TECHNOLOGY
Gorakhpur (U.P.) – INDIA
TABLE OF CONTENTS
Certificate............................................................................................................................. 1
Candidate’s Declaration ..................................................................................................... 2
Approval Sheet .................................................................................................................... 3
Acknowledgement ............................................................................................................... 4
Abstract ................................................................................................................................ 5
CHAPTER 1 INTRODUCTION ...................................................................................... 6
CHAPTER 2 LITERATURE REVIEW .......................................................................... 7
CHAPTER 3 STATEMENT OF PROBLEM .................................................................... 8
CHAPTER 4 SOLUTION APPROACH ............................................................................ 9
CHAPTER 5 WORK PROGRESS ................................................................................... 10
CHAPTER 6 CONCLUSION........................................................................................... 11
REFERENCES .................................................................................................................... 12
CERTIFICATE
It is certified that Rashi Verma, Ramakant and Sakshi Prajapati have carried out the project work presented in this report entitled “CovidAid:COVID-19 Detection Using chest X-Ray” for the award of Bachelor of Technology in Computer Science and Engineering from Madan Mohan Malaviya University of Technology (formerly Madan Mohan Malaviya Engineering College), Gorakhpur (UP) under my supervision and guidance. The report embodies result of original workand study carried out by students themselves and the contents of the report do not form the basis for the award of any other degree to the candidate or to anybody.
Sri. Muzammil Hasan
Associate Professor
Computer Science and Engineering Department
Madan Mohan Malaviya University of Technology, Gorakhpur.
Date:
CANDIDATE’S DECLARATION
We declare that this written submission represents our work and ideas in our own words and where others ideas or words have been included; we have adequately cited and referenced the original sources. We also declare that we have adhered to all principles of academic honesty and integrity and have not misrepresented or falsified any idea/data/fact/source in our submission. We understand that any violation of the above will be cause for disciplinary action by the University and can also evoke penal action from the sources which have thus not been properly cited or from whom proper permission has not been taken when needed.
Rashi Verma (Roll No-)
Ramakant (Roll No-)
Sakshi Prajapati (Roll No-)
B. Tech (CSE)
Department of Computer Science and Engineering
APPROVAL SHEET
This project report entitled “CovidAid:COVID-19 Detection Using chest X-Ray” by Rashi Verma, Ramakant and Sakshi Prajapati is approved for the degree of Bachelor of Technology in Computer Science and Engineering.
Examiner
Supervisor
Sri. Muzammil Hasan
Head of Department
Dr. P. K. Singh
Dean (UG)
Dr. D. K. Dwivedi
Date:
Place:
ACKNOWLEDGEMENT
It is matter of great pleasure and satisfaction for me to present this dissertation work entitled
“CovidAid:COVID-19 Detection Using chest X-Ray”, as a part of curriculum for award of “
Bachelor of Technology” from Madan Mohan Malaviya University of Technology,
Gorakhpur (U.P.) India.
I am very grateful to my Head of the Department, Dr. P. K. Singh. It has been truly reassuring to know that he is always willing to share his quest for new problem and new solutions forms a very challenging and rewarding environment with us. He provides all kind of academic as well as administrative support for smooth completion of my dissertation work.
I am very much thankful to my supervisor, Sri. Muzammil Hasan also to encourage me to perform work in emerging area of research i.e. CovidAid:COVID-19 Detection Using chest X-Ray as well as her continuous guidance and support throughout my work. I would also like to thank all my classmates for their valuable suggestions and helpful discussions.
At last, I am grateful to my family members, especially my beloved parents, for their encouragement and tender. Without them, I would not have been able to gather enough strength to finish this dissertation.
Date: 14/10/2020
ABSTRACT
CovidAid:COVID-19 Detection Using chest X-Ray is an incredible advancement that has grown over
the years. This project involves the COVID-19 pandemic has been causing devastating impacts on the
well-being of people around the world as well as the global economy. Motivated by the effort of the
open source community on collecting the COVID-19 dataset and the success of Deep Learning on
previous studies with chest radiography, this thesis builds a Deep Convolutional Neural Network in
order to detect COVID-19 using only chest X-Ray images.
This project use modern Deep Learning techniques such as using pretrained networks and fine-tuning
As well as regularizations such as data augmentation and dropout to fight overfitting. The resulting
model achieves an overall accuracy of 93% on the most realistic task of detecting COVID-19 patients .
Chapter 1
Introduction and Background
The COVID-19 pandemic has been causing devastating impacts on the well-being of people around the world as well as the global economy. As of the 24th of May 2020, more than 5 million people are confirmed to have been infected with the virus and more than 300 thousand people have died worldwide. In Finland, COVID-19 has infected more than 6500 people and caused more than 300 deaths. One effective method to combat COVID-19 is to increase the testing capacity. However, this is not possible in some places such as New York City due to the lack of testing kits. Motivated by the effort of the open source community on collecting the COVID-19 dataset and the success of Deep Learning on previous studies with chest radiography, this thesis builds a Deep Convolutional Neural Network in order to detect COVID-19 using only chest X-Ray images.
This thesis is organized as follows. First, section 2 briefly summarizes the history of Deep Learning. Section 3 gives a quick introduction to Convolutional Neural Networks. Section 4 discusses the main reasons for the rapid advancement of Deep Learning in recent years. Section 5 is about preparing the data including setting up the working environment, collecting the dataset, and preprocessing data. Section 6 presents the implementation of the models and the training process. Section 7 discusses the results of the models. Finally, section 8 draws conclusions and discusses the limitations and suggestions for future improvements.
Chapter 2
Literature Survey
1.Brief history of Deep Learning
Deep Learning, a subset of Artificial Intelligence, is a Machine Learning technique which can enable computers to solve problems that were otherwise unable to explicitly program them to do. Even though the principled method to train deep networks was available since the 1980s, it still was not able to scale to large networks and Neural Networks research fell into a dark period.
2. Convolutional Neural Networks
Convolutional Neural Network (CNN) is one of the most popular types of Deep Neural Networks that is very useful for computer vision tasks. CNNs take images as input, filter them using convolution operations to get a final vector that summarizes interesting features of an image. A layer of ten 3x3x3 filters only has 280 parameters and this number will stay the same even if the input image size increases, which makes training deeper and larger networks possible.
Figure 1: Architecture of AlexNet.
3. Dataset
Overview of the Dataset:
The first and most important part of a Deep Learning project is collecting data. For this project, chest X-ray images are needed from 4 classes: COVID-19, normal, pneumonia, and COVID-19 negative. recently published a public open dataset containing chest X-ray and CT images of patients suffering from COVID-19 as well as MERS, SARS, and ARDS [3]. As the COVID19 dataset is being updated daily as more cases are published.
4.Preparing data
Setting up Google Colaboratory:
Before getting the data, it is necessary to set up the working environment for the project.Google Colaboratory (colab) is a free cloud-based with no setup required Jupyter notebook environment. Colaboratory allows users to write and execute code and access powerful computing resources for free from the browser. Most importantly colab generously provides GPU which helps significantly speed up the training process which is computing intensive. For these reasons, colab has become very popular among Deep Learning and Data Science enthusiasts who might not necessarily own a PC with expensive
GPUs. Data is processed and saved to the dataset folder in google drive. In order to do that, on the left side panel of colab, on the Files section there is an option for Mount Drive.
Figure 2 Mount drive
Selecting Mount Drive, a dialog will show up asking for permission to access Google
Drive.
Figure 3 Confirm dialog to mount drive
Now colab has connected to google drive and can directly access files from google drive.
Figure 4 Drive is mounted
A simple workaround is to create a symbolic link to get a cleaner path.
Figure 5 Create a symbolic link
6.Getting COVID-19 chest X-ray images
The first step in building the dataset is to download the COVID chest X-ray dataset by cloning Dr. Cohen’s Github repository [6]. The `images` folder contains CT and chest Xray images with different chest views from patients of COVID-19 as well as other illnesses such as MERS, SARS, and ARDS. The `metadata.csv` file must be parsed into a pandas data frame in order to filter and select only COVID-19 positive chest X-ray images with posterior anterior (PA) view, the most preferred and common view, from the ‘images` folder.
Figure 8 COVID-19 chest X-Ray images
Image 8 shows examples of chest X-ray images of COVID-19 infected patients.
Chapter 3
Statement of Problem
1. Design an online web application which simulates the social networking.
2. Dataset
Overview Of Dataset
Preparing Data
I. Setting up Google Colaboratory
II. Getting COVID-19 chest X-ray images
III. Getting Pneumonia chest X-ray images
IV. Getting normal chest X-ray images
V. Getting COVID-19 negative chest X-ray images
3. Preprocessing data
4. Training models
Training a Convolutional Neural Network from scratch
Using a Pretrained Convolutional Neural Network
5.Result
Chapter 4
Solution Approach
1. For the front-end designing HTML, CSS, JavaScript and Bootstrap has been used.
2. As a back-end scripting language PHP has been used.
3. As a database management software MySQL has been used.
4. Session Tracking has been used to remember the login of user.
5. AJAX has been used for recommendation when user searches.
6. Bootstrap has been used to make the application responsive.
Chapter 5 Work Progress
1. Setting up the environment for web application (installment of WAMP server etc).
2. Defined the architecture of the web application (linking the pages with each other).
3. Designed the index, login and logout module.
4. Defined the schemas in the database.
5. Collected the images, text, videos and other required for this web application.
Chapter 6 Conclusion
This project includes setting up a cloud-based working environment with Google Colab,collecting the datasets, training Deep Learning models, and evaluating the models. Using modern Deep Learning techniques such as using pre-trained networks and fine-tuning as well as regularizations such as data augmentation and dropout to fight overfitting,
our model achieves an overall accuracy of 93% on the most realistic task of detecting
COVID-19 patients among healthy normal people.
The main limitation of this project is the lack of data, more specifically chest X-Ray images
of COVID-19 infected patients.This project still has a lot of room for improvement. First, the current model only uses image data.
Finally, visualizing the opacities in the chest X-Ray images can bring a better understanding of how an image is classified.
References
1. Hinton GE, Osindero S, Teh YW. A Fast Learning Algorithm for Deep Belief Nets.
Neural Computation. 2006;18(7):-.
URL: https://www.cs.toronto.edu/~hinton/absps/fastnc.pdf. Accessed 19 November 2018
2. Krizhevsky A, Sutskever I, Hinton GE. ImageNet Classification with Deep Convolutional Neural Networks. In: Neural Information Processing Systems Conference;
2012. Available from: Google Scholar. URL: https://papers.nips.cc/paper/4824-imagenet-classification-with-deep-convolutional-neural-networks.pdf. Accessed 19 November 2018
3. Cohen et al. COVID-19 image data collection. URL: https://github.com/ieee8023/covid-chestxray dataset. Accessed 13 April
2020.
4. Chollet F. Deep Learning with Python; 2017. Manning Publications.