Skip to content

Latest commit

 

History

History
72 lines (46 loc) · 1.85 KB

README.md

File metadata and controls

72 lines (46 loc) · 1.85 KB

StyleGAN2

Pytorch Implementation of StyleGAN2

Original Implementation :- https://github.com/rosinality/stylegan2-pytorch

StyleGAN2 version which is compatible on CPU as well as GPU

Requirements

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

Usage

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 

Train

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

Results

file000000

000001

000019 000007

Webp net-gifmaker (1)