Skip to content

Notebooks created to determine if data augmentation improves chest x-ray classification

Notifications You must be signed in to change notification settings

ArmaizAdenwala/deep-learning-augmented-xray-classification

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 

Repository files navigation

deep-learning-augmented-xray-classification

This repo contains Jupyter notebooks that I created while working on a group paper for CSC177 to determine if data augmentation improves chest x-ray classification accuracy

Problem:

In some cases, it isn't possible to gather enough data to train one's models on can. For example, the medical field is required to keep data private (HIPPA), so gathering x-ray scans could prove difficult. In the paper we look at different approaches and the results of each approach within the scope of medical scans.

View chest-xray-pneumonia Dataset

dataset-xray


This repository contains the following notebooks:

CNN:

This is a convolutional neural network trained against the original and augmented dataset to properly identify if a patient has pneumonia and whether or not it is bacterial or viral through multiclass classification.

The CNN uses transfer learning from the ResNeXt-50 (32x4d) model with an Adam optimizer. The initial 1D convolution layer within ResNeXt-50 (32x4d) is adjusted to accept tensors from single-channel images

Below is an example of the CNN running against the normal dataset: download (7)

GAN:

This is a generative adversarial network utilizing the Adam optimizer. It takes in 128x128x1 Tensors (128x128px single-channel images) and trains the generator and disriminator. This is used to generate augmented images of chest x-ray scans which we use to see if it improves a convolutional neural network in identifying whether a patient has pneumonia.

Below are 3 images that the generator from the GAN created:

dataset-xray-group

Transformation:

This is a simple notebook that applies simple transformations to the original dataset. This will be used to help prevent overfitting and promote generalization.


Tools / Frameworks

Google Colab: This is incredibly affordable ($10/mo for 3 concurrent instances of Tesla P100 gpus). Google Drive can be mounted to circumvent the ephemeral storage. Additionally, Google's custom notebook software allows input into cli prompts.

Weight & Biases: Used to log and track runs.

PyTorch

Torchvision


References / Learning Resources:

[1] https://pytorch.org/tutorials/beginner/dcgan_faces_tutorial.html

[2] https://towardsdatascience.com/getting-started-with-gans-using-pytorch-78e7c22a14a5

[3] https://www.pluralsight.com/guides/introduction-to-resnet

About

Notebooks created to determine if data augmentation improves chest x-ray classification

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published