-
Download the dataset from https://www.kaggle.com/c/siim-covid19-detection which includes a folder named RSNACOVID which you will need to unzip. Inside this folder are a test folder, train folder, and csv files. We only care about the train_study_level.csv which includes. Kindly make sure that the folder has the dataset is called RSNACOVID and is in the same directory as the code.
-
In order to preprocess data, run the preprocessing.py file as this is expected to run once to preprocess data and not used again.
-
Run the main code which require a number of input specifications which include:
- The experiment (technique) you wish to conduct: baseline model (resnet or densenet), transfer learning (imagenet or chexpert) (resnet or densenet), or self-supervised learning (SimCLR or MoCo)
- Several paths required for multiple parts of the code
- Batch size for the experiment
- Number of epochs
- Whether you wish to show a histogram for the data (not shown by default)
- Whether you wish to show the transformed image (not shown by default)
-
The main code would run your desired experiments with the help of the other '.py' files. The job for each is as follows:
- data.py: includes the class to define a chest x-ray dataset as well functions to show histogram for data classes, show transformed images, calculate class weights, and perform mean and standard deviation calculations
- train.py: includes a training class which is the base for the training of the different experiments
- test.py: includes a testing class which is the base for testing of the different experiments
- baseline.py: includes functions for baseline (resnet) and baseline (densenet)
- transfer.py: includes functions for transfer learning (ImageNet or CheXpert) (resnet or densenet)
- preprocessing_train_chexpert.py: includes a data set preparation function as well as a preprocessing/training function that is essential for the transfer learning CheXpert-pretrained experiments
- SimCLR_pretrain.py: builds SimCLR model and saves the model
- SimCLR.py: loads model from SimCLR_pretrain.py to carry on SimCLR experiment
- MoCo_pretrain.py: builds MoCo model and saves the model
- MoCo.py: loads model from MoCo_pretrain.py to carry on MoCo experiment
- GradCam.py: includes function to highlight key regions in the image for a particular prediction
- Analysis.py: includes functions essential for model evaluation such as a confusion matrix function and learning curve plotting function
-
Notifications
You must be signed in to change notification settings - Fork 0
shahdhardn/MLProjectFall21
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
No description, website, or topics provided.
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published