Skip to content

aakashpydi/GenerativeAdversarialNetwork

Repository files navigation

Using a Generative Adversarial Network (GAN) to Create Novel Artistic Images

Aakash Pydi



Usage Instructions

Main Files

  • gan.py (file): The file that allows users to (i) generate images from saved GAN models, and (ii) train new GAN models. Included here. Requires no command line arguments to execute but expects training data to be present.
  • datasets.py (file): This file has the code to use the custom datasets used to train the GAN models in this project. Class used by gan.py and is never directly executed.
  • analysis.py (file): This file is used to analyze the generator and discriminator loss for each model, and the time taken to train each model. Requires no command line arguments to execute but does expect the saved_state file associated with each model to be present.

Saved State Files

  • bapu_saved_state.tar (file): A trained Bapu GAN saved model, that can be used in gan.py to generate new images. Presence optional for execution of gan.py. Presence necessary for execution of analysis.py. Not included here.
  • ravi_saved_state.tar (file): A trained Ravi GAN saved model, that can be used in gan.py to generate new images. Presence optional for execution of gan.py. Presence necessary for execution of analysis.py. Not included here.
  • combined_saved_state.tar (file): A trained Combined (Ravi+Bapu) GAN saved model, that can be used in gan.py to generate new images. Presence optional for execution of gan.py. Presence necessary for execution of analysis.py. Not included here.
  • cifar10_saved_state.tar (file): A trained CIFAR10 GAN saved model, that can be used in gan.py to generate new images. Presence optional for execution of gan.py. Presence necessary for execution of analysis.py. Not included here.
  • saved_state.tar (file): A state checkpoint file generated by gan.py after each epoch of training is completed. Presence not necessary for execution. If present, training resumes from the last completed epoch.

Training Data and Output Images

  • BAPU (directory): This directory is expected to contain 200 images depicting paintings by BAPU (Sattiraju Lakshmi Narayana). Empty directory included here. Required for training the bapu GAN model.
  • RAVI_VARMA (directory): This directory is expected to contain 200 images depicting paintings by Raja Ravi Varma. Empty directory included here. Required for training the Ravi Varma GAN model.
  • output (directory): This directory is used to store periodic snapshots of the generated images. Empty directory included here. WIll be populated if training is initiated.
  • ravi_varma_data.csv (file): CSV file where, first column has the address of the training data image (ex: 'RAVI_VARMA_01.jpg') and second column has the label of the image. Used by gan.py for training. Presence necessary for training. Included here.
  • bapu_data.csv (file): CSV file where, first column has the address of the training data image (ex: 'BAPU_01.jpg') and second column has the label of the image. Used by gan.py for training. Presence necessary for training. Included here.
  • combined_data.csv: CSV file where, first column has the address of the training data image (ex: 'BAPU_01.jpg' or 'RAVI_VARMA_01.jpg') and second column has the label of the image. Used by gan.py for training. Presence necessary for training. Included here.
  • Images (directory): Contains output images from trained models.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages