Detection of COVID-19 and Viral Pneumonia from Chest X-Rays

Using Deep Learning with the Resnet-18 model

September 18, 2020

Project Overview

Image classification using Resnet18 to predict whether a person has COVID-19 or Viral Pneumonia based on their chest X-ray.

The project goes into first creating the custom datasets. Separating them into a test and training set and transforming the image.

Batch of Chest X-ray images from our Dataset without transformation


We will be using the ResNet-18 model to perform image classification in order to predict if a given X-ray is COVID-19 positive, normal or contains viral pneumonia. We will use the pretrained version of ResNet-18 in our case and we will observe our results.

Last evaluation step of our model with an accuracy of 97.7%


The research team that created and worked on this dataset initially was able to get an accuracy of about 98.3%. We are able to get an accuracy of 97.7%. Considering we used a relatively small and simple model such as Resnet18, this seems to be a good accuracy score.

Head on over to the link below to check out the entire python notebook which contains the entire step by step process of transforming the images, creating our dataset and dataloader and finally training the model and evaluating the accuracy of the model on our test set.