This repository implements training and inference methods of DCGAN on mnist as well as celeb faces dataset
For setting up the mnist dataset: Follow - https://github.com/explainingai-code/Pytorch-VAE#data-preparation
The directory structure should look like this
$REPO_ROOT
-> data
-> train
-> images
-> 0
*.png
-> 1
...
-> 9
*.png
-> test
-> images
-> 0
*.png
...
-> dataset
-> tools
For setting up the celeb dataset:
- Simple Download the images from here -> Downloads -> Align&Cropped Images
- Download the
img_align_celeba.zip
file from drive link - Extract it under the root directory of the repo
- $REPO_ROOT -> img_align_celeba/*.jpg files
- Create a new conda environment with python 3.8 then run below commands
git clone https://github.com/explainingai-code/DCGAN-Pytorch.git
cd DCGAN-Pytorch
pip install -r requirements.txt
python -m tools.train --config config/mnist.yaml
for training and saving inference samples on mnist
config/mnist.yaml
- For mnistconfig/mnist_colored.yaml
- For mnist colored imagesconfig/celeb.yaml
- For training on celeb dataset
Outputs will be saved according to the configuration present in yaml files.
For every run a folder of task_name
key in config will be created
- Best Model checkpoints(discriminator and generator) in
task_name
directory - Generated samples saved in
task_name/samples