Pytorch Implementation of StyleGAN2
Original Implementation :- https://github.com/rosinality/stylegan2-pytorch
StyleGAN2 version which is compatible on CPU as well as GPU
To run it on local system :- Clone the Repo
cd StyleGAN2
pip install -r requirements.txt
I would suggest to run this project in nvidia pytorch docker .
docker pull nvcr.io/nvidia/pytorch:21.12-py3
When the download is complete then you can use run command to fire the docker container .
docker run --gpus all -it --rm -v local_dir:container_dir nvcr.io/nvidia/pytorch:xx.xx-py3
Download the pretrained weights for StyleGAN2 from https://drive.google.com/open?id=173WmV5EhFfMQTeDpYkLAJi3qhPtZOQs5
To generate fake images using some random latent code
python test.py
To train model from scratch you need to arange dataset as follows
|── dataset
│ ├── 1.png
│ ├── 2.png
│ ├── 3.png
│ ├── 4.png
│ └── ...
└── ...
python train.py --path {path to the dataset foler} --iter {Total number of epochs} --batch {batch size}
for more arguments like wandb refer train.py