Detection and Diagnosis of COVID-19 Using Deep Learning


This project used the below dataset’s , gathered from two open source Github repositories:

  1. Chest X-ray images (1000 images) were obtained from:
  2. CT Scan images (750 images) were obtained from:


To build the model we first added 3 layers to the pre-trained models so that they can be trained on our dataset’s. The below code is for adding custom layers, for example, to the ResNet50 model is shown below. The code for the rest of the models remains the same.

Train the Model

I first defined an Image Data Generator to train the models at modified versions of the images, such as at different angles, flips, rotations or shifts.


Predictions were generated by running the trained models on images of the test set. The predictions for the first 10 images of the dataset were plotted as shown below:



Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Jajula Ramesh

Jajula Ramesh

Aspiring Data Scientist Learner with hunger for knowledge Life enthusiast with adventurous minds Data Cleaner, Models Builder, Problem Solver