Left: Real Image, Right: Generated Image
MORE IMAGES AND RESULTS FOUND IN OUR PAPER LINKED HERE
- Generate images of lungs with COVID-19 to model progression of COVID-19
- Use this to expand current datasets, which are limited in quantity
- Eventually create an image-to-image model to see the progression of the disease in one set of lungs
- Model Definition and Training Script
- Demo of our final model, and demo of interpolation to model the progression
- Latent Space Widget for visualization
- Academic paper where we discuss our GAN
- Generated images from the GAN
- Project Resources containing the dataset and our final models can be found here.
- Models (.h5 files ready to be loaded and used)
- Data (from https://github.com/UCSD-AI4H/COVID-CT)
- Model definition and training is located in COVID_GAN.ipynb or COVID_GAN.py.
- To run, clone this repo, and download the data set available here.
- Make sure the above-mentioned script and the zip file of data are in the same directory.
- Before running, make sure all dependencies are installed by running
pip3 install -r requirements.txt
in terminal. - Ensure the hyperparameter
load_data_from_Google_Drive
is set toFalse
. - The program will define a new model and train it with the data provided and hyperparameters specified and changeable in COVID_GAN.ipynb or COVID_GAN.py.
- Run the program in terminal with
python3 COVID_GAN.py
orjupyter notebook COVID_GAN.ipynb
or with any other framework of your choosing. - The final models will be saved in a new subdirectory called "Saved_Models".
- If you would like to run the model creation/training in Google Colabs, you can make a copy of the Colab here.
- To obtain the data, go to our project resources and click Add shortcut to Drive for the whole folder.
- Ensure the hyperparameter
load_data_from_Google_Drive
is set toTrue
. - The program will define a new model and train it with the data provided and hyperparameters specified and changeable in the Colab after you've made a copy.
- Run the program on Google Colabs.
- The final models will be saved in a new directory in "My Drive" called "COVID_GAN_Saved_Models".
- Demo is located at Demo_COVID_GAN_Progression.ipynb.
- Download both the dataset and
.h5
files of the final models are downloaded from project resources. - Ensure the zipped dataset and final models are in the same directory as
Demo_COVID_GAN.ipynb
. - Before running, make sure all dependencies are installed by running
pip3 install -r requirements.txt
. - Ensure the hyperparameter
load_data_from_Google_Drive
is set toFalse
. - The demo will load in the pre-trained models using the
.h5
files as well as the data to run the demo. - Run the demo with
jupyter notebook Demo_COVID_GAN.ipynb
or with any other framework of your choosing.
- If you would like to run the demo in Google Colabs, you can make a copy of the Demo Colab here.
- To obtain the data and models, go to our project resources and click Add shortcut to Drive for the whole folder.
- Ensure the hyperparameter
load_data_from_Google_Drive
is set toTrue
. - The program will load in the pre-trained models from project resources as well as the data to run the demo.
- Run the program on Google Colabs.
Paper
Model Definition and Training Script Colab
Demo Colab
Project Resources (Final Models and Data)
[1] Age Progression/Regression by Conditional Adversarial Encoders
[2] Exploring GAN Latent Space
[3] Deep Convolutional Neural Network Tutorial
[4] GAN Tutorial
[5] Visualize Autoencoders (Latent Space)