Skip to content

Detecting COVID-19 with Chest X-Ray using PyTorch from COVID-19 Radiography Dataset on Kaggle

License

Notifications You must be signed in to change notification settings

mohd-faizy/09P_Detecting_COVID_19_with_Chest_X-Ray_using_PyTorch

Repository files navigation

author made-with-Markdown Language Platform Maintained Last Commit GitHub issues Open Source Love svg2 Stars GitHub GitHub license Size

Detecting COVID 19 with Chest X-Ray using PyTorch

head_image

This repository is a case study for detecting COVID-19 with Chest X-Ray using PyTorch from COVID-19 Radiography Dataset on Kaggle

Dataset

Chest X-ray images for COVID-19 dataset:-

In our current release, there are 1143 COVID-19 positive images, 1341 normal images and 1345 viral pneumonia images.

# Create api key -> account ->Create New Token 
# .json file is genrated 

!pip install -q kaggle
from google.colab import files 
files.upload() #upload kaggle.json
!mkdir -p ~/.kaggle 
!cp kaggle.json ~/.kaggle/ 
!ls ~/.kaggle 
!chmod 600 /root/.kaggle/kaggle.json 

# API Command 
!kaggle datasets download -d tawsifurrahman/covid19-radiography-database

Objective

  • Create custom Dataset and DataLoader in PyTorch
  • Train a ResNet-18 model in PyTorch to perform Image Classification

Installation

Clone this repository:

git clone https://github.com/mohd-faizy/09P_Detecting_COVID_19_with_Chest_X-Ray_using_PyTorch.git

or click Download ZIP in right panel of repository and extract it.

Open latest version of notebook in Jupyter Notebook.

Project Structure

  • Task 0️⃣1️⃣ Importing the Dataset from Kaggle
  • Task 0️⃣2️⃣ Importing Libraries
  • Task 0️⃣3️⃣ Preparing Training and Test Sets
  • Task 0️⃣4️⃣ Creating Custom Dataset
  • Task 0️⃣5️⃣ Image Transformations
  • Task 0️⃣6️⃣ Prepare DataLoader
  • Task 0️⃣7️⃣ Data Visualization
  • Task 0️⃣8️⃣ Creating the Model
  • Task 0️⃣9️⃣ Training the Model
  • Task 1️⃣0️⃣ Show the Predictions
  • Task 1️⃣1️⃣ Saving the Model
  • Task 1️⃣2️⃣ Inference on a Single Image

Model Training Privew

head_image

Prediction Preview

head_image

Connect with me:

codeSTACKr | Twitter codeSTACKr | LinkedIn codeSTACKr.com


Faizy's github stats

Top Langs

Releases

No releases published

Packages

No packages published