Skip to content

SunnerLi/StyleGAN_demo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

StyleGAN_demo

Packagist Packagist

Abstract

This repository try to re-implement the idea of style-based generator. You should notice this is not the official implementation. We train the model only toward CelebA dataset. Furthermore, we also train the traditional GAN to do the comparison. The total training epoch is 250.

Difference

There are several difference between the paper and this implementation:

  1. We only train for the size of 128 * 128.
  2. The progressive training mechanism is not adopted.

Usage

We also provide the pre-trained model here!!!!!

# Train the traditional generator
$ python3 train.py --epoch 250 --type origin --resume origin_result/models/latest.pth --det origin_result_250_epoch

# Train the style-based generator
$ python3 train.py --epoch 250 --type style --resume style_result/models/latest.pth --det style_result_250_epoch

# Generate 32 faces with traditional generator
$ python3 inference.py --type origin --resume origin_result_250_epoch/models/latest.pth --num_face 32 

# Generate 64 faces with style-based generator
$ python3 inference.py --type style --resume style_result_250_epoch/models/latest.pth --num_face 64 

Discussion

Compare to the traditional design, the style-based generator hard to converge. The above image shows the render result which conditioning on the fixed latent representation. From left to right, the result of traditional GAN has little change, but the style-based generator has lots of change. Maybe adding noice within each intermediate layer can indeed increase the diversity of the style. On the other hand, the quality of style-based generator is low still.

About

The re-implementation of style-based generator idea

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages