GithubHelp home page GithubHelp logo

aastopher / progressive_gan Goto Github PK

View Code? Open in Web Editor NEW
1.0 3.0 1.0 354.65 MB

NVIDIA's Progressive GAN, implemented in PyTorch

Python 100.00%
deep-learning gan generative-model machine-learning progressive-gan

progressive_gan's Introduction

ProGAN (Progressive Generative Adversarial Network) trained on various image datasets

The purpose of this project is to expand knowledge of traditional GAN architectures by exploring NVIDIA's Progressive GAN research. Progressive Growing of GANs for Improved Quality, Stability, and Variation

Install Dependencies

  • pip install -r requirements.txt - from project root

Initialize the Project

  • python utils.py init - download all logs for exploration then init empty models and results directory
  • You must REMOVE the logs folder this command will NOT overwrite an log files.

Download the Pre-trained models and results

  • python utils.py download - download the pre-trained model files and image sets.
  • Options = [cars, cyber, dogs, faces, potatoes]; default = faces
  • This command will NOT override existing models you must delete both imgs and models folders to download a new image and model set

Explore Tensorboard Results

  • tensorboard --logdir logs - to start the tensorboard and explore the current models training progress.

Train the model

  • WARNING! This can overwrite existing models!
  • python train.py - continue training or re-train model.
  • Changing the LOAD_MODEL global in config.py; chooses between re-training (False) or continuing training (True) for the model.

Generate Samples

  • python utils.py sample - generates sample images, by default this will generate 10 images at 64x64.
  • This command can be customized to generate a chosen amount of images at a chosen size python utils.py sample <num_images> <size_factor>
  • Size factors: 0 = 4x4, 1 = 8x8, 2 = 16x16, 3 = 32x32, 4 = 64x64, 5 = 128x128, 6 = 256x256, 7 = 512x512, 8 = 1024x1024

Preview Image Transforms

  • python utils.py transform - generates output images, by default this will output all batches at 128x128.
  • This command can be customized to generate a chosen amount of batches python utils.py transform <num_batches>

Remove Duplicate Images

  • python utils.py removedups - remove duplicate images in the imgs folder using an image hash function.
  • This utility is designed to for cleaning custom image datasets of duplicate images
  • The hash_size for this function can be customized to have a looser hash criteria i.e accepting a larger difference between "duplicates"
  • This function will output how many duplicates have been removed and a path list for all duplicate images. NOTE: paths are not paired with duplicates.

References

@misc{https://doi.org/10.48550/arxiv.1701.07875,
  doi = {10.48550/ARXIV.1701.07875},
  url = {https://arxiv.org/abs/1701.07875},
  author = {Arjovsky, Martin and Chintala, Soumith and Bottou, Léon},
  keywords = {Machine Learning (stat.ML), Machine Learning (cs.LG), FOS: Computer and information sciences, FOS: Computer and information sciences},
  title = {Wasserstein GAN},
  publisher = {arXiv},
  year = {2017},
  copyright = {arXiv.org perpetual, non-exclusive license}
}
@misc{https://doi.org/10.48550/arxiv.1704.00028,
  doi = {10.48550/ARXIV.1704.00028},
  url = {https://arxiv.org/abs/1704.00028},
  author = {Gulrajani, Ishaan and Ahmed, Faruk and Arjovsky, Martin and Dumoulin, Vincent and Courville, Aaron},
  keywords = {Machine Learning (cs.LG), Machine Learning (stat.ML), FOS: Computer and information sciences, FOS: Computer and information sciences},
  title = {Improved Training of Wasserstein GANs},
  publisher = {arXiv},
  year = {2017},
  copyright = {arXiv.org perpetual, non-exclusive license}
}
@misc{https://doi.org/10.48550/arxiv.1710.10196,
  doi = {10.48550/ARXIV.1710.10196},
  url = {https://arxiv.org/abs/1710.10196},
  author = {Karras, Tero and Aila, Timo and Laine, Samuli and Lehtinen, Jaakko},
  keywords = {Neural and Evolutionary Computing (cs.NE), Machine Learning (cs.LG), Machine Learning (stat.ML), FOS: Computer and information sciences, FOS: Computer and information sciences},
  title = {Progressive Growing of GANs for Improved Quality, Stability, and Variation},
  publisher = {arXiv},
  year = {2017},
  copyright = {arXiv.org perpetual, non-exclusive license}
}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.