Skip to content

itsuki8914/stylegan-TensorFlow

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

StyleGAN-TensorFlow

A implementation of StyleGAN using Tensorflow

This implementation is on experiment and has many issues.

official paper: https://arxiv.org/abs/1812.04948

official implementation: https://github.com/NVlabs/stylegan

This code is based on my PGGAN implementation.

Usage

  1. Download ffhq-dataset from here.

  2. Put images1024x1024 in ffhq_dataset and thumbnails128x128 in ffhq_dataset128.

like this

...
│
├── ffhq_dataset
│     ├── 00000.png
│     ├── 00001.png
│     ├── ...
│     └── 69999.png
├── ffhq_dataset128
│     ├── 00000.png
│     ├── 00001.png
│     ├── ...
│     └── 69999.png 
├── main.py
├── model.py
...
  1. Train StyleGAN.
python main.py

How long does it take to train using RTX 2070,

64x64     1d00h
128x128   2d00h
256x256   3d18h
512x512   6d13h(estimated)
1024x1024 unknown
  1. After training, inference can be performed.

to draw uncurated images,

python pred.py -m uc

to draw truncation trick images,

python pred.py -m tt

to draw style mixing images,

python pred.py -m sm

Other Results

Anime faces

uncurated

truncation trick

style mixing

Issues

As mentioned at the beginning, this implementation has problems.

First layer noise

Diversity and quality are too sensitive to 1st noise.

The above figure is from the left

Use all noise

without 1st layer noise

without 1st and 2nd layers

without all noise

Because of this, style mixing and truncation trick cannot use 1st noise.

Disabling 1st noise results slight improvement in quality and loss of diversity.

below images are style mixing and trucation trick using noise of 1st layer.

Initial interpolation for each stage

At the beginning of the stage, the kernels are unlearned, so interpolation is not performed well, this leads to quality degradation?

There are some other problems and I will continue experiments.

About

A implementation of stylegan using Tensorflow

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages