Use Pytorch to create and train a ResNet-18 model and apply it to check X Ray Radiography Dataset to classify the X rays into three classes 'Normal', 'Viral Pneumonia', 'COVID'.
Dataset: Chest X-Ray Radiography Dataset
- Import Packages and Libraries (torch, torchvision, numpy, matplotlib, PIL, random)
- Creating Custom Dataset - Pytorch Format
- Image Transformations (torchvision.transforms)
- Prepare Dataloader (torch.utils.data.Dataloader)
- Data Visualization - Plotting (Matplotlib)
- Creating the Model (resnet18 - pretrained)
- Training the Model (training the model until we get 95% accuracy)
- Final Results (predictions)
Hyperparameters:
Optimizer : Adams Optimizer
Learning Rate : 3e-5
Betas = (0.9,0.999)
Batch Size – 28