Learn practical skills, build real-world projects, and advance your career

COVID-19 detection using ResNet9 model

download.jpg
(Image source:https://dshs.texas.gov/coronavirus/)
In this project, I am going to train a model to detect COVID-19.
The model will take chest x-ray images as input and predict whether the the person is infected with COVID-19 or not.

In this model, we are going to use Convolutional Neural Netwoeks of Pytoch to prepare the model.

What is Neural Network?

Neural Network is also called as Artificial Neural Network or ANN for short.

Any digital image is basically a matrix of different pixel values for three color channels of image that is Red, Green and Blue, also known as RGB. Any digital color is produced using different itensities of these channels in an image.

So, what neural networks do, is they study these paterns and characteristics of pixel intensities, and predict whether the image belong to a specific type of category.

But before prediction, these models are trained on a large datasets of defferent types and classes of images, and after training, these nueral network models are used to predict the classes and types of real-world images.

So, the training and validation dataset used in this project is taken for the website kaggle.com.

The link for the datset is: https://www.kaggle.com/fusicfenta/chest-xray-for-covid19-detection

Importing the required libraries and modules

Importing the rquired libraries of pytorch and torchvision to design and train the model (ResNet9). Also importing the library matplotlib.pyplot to display the sample images and plotting the graph to track accuracies and training and validation losses.