kayoyin / FakeCelebs

Generating celebrity faces using StyleGAN

Home Page:https://towardsdatascience.com/how-to-train-stylegan-to-generate-realistic-faces-d4afca48e705

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Style-Based GAN in PyTorch

example output

Repository that gathers code to train StyleGAN.

The default parameters employs progressive training from 8x8 to 128x128, but this may be modified by passing arguments in train.py

Based on https://github.com/rosinality/style-based-gan-pytorch

Getting started

First, create a new virtual environment

virtualenv venv -p python3
source venv/bin/activate

You might need to make sure your python3 link is ready by typing

which python3

Then install the development requirements

pip install -r requirements.txt

Download the CelebA data (if you're not planning to use your own)

python helper.py

Prepare the dataset

python prepare_data.py --out data PATH_TO_DIRECTORY

Train the model

python train.py --mixing data

Generate new faces

python generate.py checkpoint/full-latest.model

About

Generating celebrity faces using StyleGAN

https://towardsdatascience.com/how-to-train-stylegan-to-generate-realistic-faces-d4afca48e705

License:MIT License


Languages

Language:Python 100.0%