This repository is a case study for detecting COVID-19 with Chest X-Ray using PyTorch from COVID-19 Radiography Dataset on Kaggle
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
- Create custom Dataset and DataLoader in PyTorch
- Train a ResNet-18 model in PyTorch to perform Image Classification
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.
- 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