Covid-19 Detection Using X-Ray Images

Himanshubhawnani
GDSC, IIIT Allahabad
3 min readMar 15, 2022
Source: https://www.who.int/health-topics/coronavirus

The COVID-19 outbreak is causing havoc on the world’s economy and public health. Until now, more than 27 million confirmed cases have been reported around the world. Because of the rising number of confirmed instances and the challenges posed by COVID-19 mutations, it is critical to classify healthy and infected people as soon as possible in order to control and treat COVID-19. During initial phases of, manual testing technique was used to detect the COVID -19 patients.

However, manual testing has several disadvantages, like limited availability of testing kits, high prices, and inefficient blood tests. As a result, Deep Learning can be used to overcome these obstacles in order to provide a more effective and efficient treatment. Because the sickness is very contagious, the sooner we provide the results, the less it will affect the economy and health of people. And to get our job done, Convolutional Neural Networks can be used because they can identify the difference between chest X-Rays of a normal person and Covid infected person. Even Deep Learning cannot produce 100% accurate results but still, their performance is good and they can be improved.

Source: https://www.wusa9.com/article/news/verify/are-covid-19-lungs-worse-than-smokers-lungs-covid-19-lung-photos/65-13085a3d-6516-42c5-a128-c0f2abc9d5cc

Following steps to be followed before training the model.

Dataset Selection

First of all, a large amount of data is needed to train the model. For this problem the required dataset demands chest X-Rays of Covid infected and uninfected people. A dataset to illustrate the problem can be found here.

To balance our data we will take an equal number of images and will randomize them and later will divide into test and train data.

Source: https://www.cognex.com/blogs/deep-learning/diagnosing-covid-deep-learning

Defining Model

After preparing the dataset, the next step will be training the CNN model to classify between normal and uninfected people. Ideal dimension of the input image in CNN is considered to be 224,224,3.

This problem is like a binary classification problem where X-Ray images have to be classified as Covid infected or not so after fully connected layers, sigmoid activation will be used. Adam as optimizers are used for binary classification problems as they take less time to train and are much more efficient and binary cross entropy can be used as loss function.

Model Training

After defining the model, the next step is to train the data on any predefined model like VGG-16, Xception Network.

Data augmentation can also be done as it is useful to improve performance of the models by adding different examples in our dataset. After training the model, loss and accuracy can be plotted for better understanding of the model.

Conclusion

The Covid-19 epidemic is spreading rapidly. Many studies have been conducted on this subject, and they show that such techniques can be used to automate diagnosing jobs in the near future. The great accuracy observed could be cause for concern because it could be due to overfitting. In addition, I encourage readers to play with the model to improve its precision.

About me

Hello everyone, I’m Himanshu Bhawnani, an AI/ML enthusiast and member of the AI wing at Geekhaven and Google Developer Student Club, IIIT Allahabad. I’m currently a Sophomore at college and am exploring the different areas in the world of Artificial Intelligence. Reach me at Linkedin.

--

--