https://github.com/aastopher/progressive_gan
NVIDIA's Progressive GAN, implemented in PyTorch
https://github.com/aastopher/progressive_gan
deep-learning gan generative-model machine-learning progressive-gan
Last synced: 8 months ago
JSON representation
NVIDIA's Progressive GAN, implemented in PyTorch
- Host: GitHub
- URL: https://github.com/aastopher/progressive_gan
- Owner: aastopher
- Created: 2022-10-26T18:57:19.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2022-11-16T19:41:45.000Z (about 3 years ago)
- Last Synced: 2025-03-05T09:40:42.106Z (11 months ago)
- Topics: deep-learning, gan, generative-model, machine-learning, progressive-gan
- Language: Python
- Homepage:
- Size: 346 MB
- Stars: 1
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# 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](https://research.nvidia.com/publication/2018-04_progressive-growing-gans-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 `
* 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 `
### 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}
}
```