This project is part of the course IDATT2502 - Applied Machine Learning at the Norwegian University of Science and Technology (NTNU) by:
In this project, we explore various applications and metrics for Generative Adversary Networks.
-
Clone the repository:
git clone https://github.com/CJGutz/DCGAN-IDATT2502.git
OR
git clone [email protected]:CJGutz/DCGAN-IDATT2502.git
-
Download the required packages:
pip install -r requirements.txt
-
Add necessary folders
The structure beneath should be followed for the different datasetsDCGAB-IDATT2502 ├── datasets │ ├── figures │ └── model
-
To train a DCGAN model with default values:
python3 Entrypoint.py dcgan MNIST --channels 1
Models are saved automatically(if you don't want to save the models use no-model-save):
python3 Entrypoint.py dcgan MNIST --channels 1 --no-model-save
To load models use:
python3 Entrypoint.py dcgan MNIST --channels 1 --load-model
Specify your preferred dataset directory or zip path as an argument to use it. For torchvision datasets, refer to DatasetLoader.py for supported datasets.
python3 Entrypoint.py dcgan datasets/celeba-dataset -c 3 -i 64 -l 3 -b 128 -e 5 -lr 0.0002 -b1 0.5 --ndf 64 --ngf 64 --nz 100
These datasets are already a part of the program and can be directly accessed from the command line using the specific titles listed in the table below.
Datasets | Description |
---|---|
MNIST | Handwritten digits (0-9) in 28x28 grayscale images |
celeba-dataset | 200,000+ celebrity images with 40 attribute labels each |
FashionMNIST | 28x28 grayscale images of 10 fashion categories |
CIFAR10 | 60,000 32x32 color images across 10 classes |
If the celeba dataset is to be used follow the steps beneath
-
Download the zipfile from "https://drive.google.com/drive/folders/0B7EVK8r0v71pTUZsaXdaSnZBZzg?resourcekey=0-rJlzl934LzC-Xp28GeIBzQ"
-
Place the zipfile into your dataset folder or directory The structure beneath should be followed for the different datasets
DCGAB-IDATT2502 ├── datasets │ ├── figures │ ├── model │ └── celeba.zip