caffeinism / StyleGAN-pytorch

PyTorch implementation of A Style-Based Generator Architecture for Generative Adversarial Network

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Requirements

  • Python3
  • Pytorch >= 1.0.0
  • TensorBoardX
  • fire
  • apex [optional]
  • pyyaml

Usage

train

python main.py 
    --config_file=path_to_config_file
    --checkpoint=path_to_config_file[default='']

inference

python main.py 
    --config_file=path_to_config_file
    --run_type=inference

Default configuration file is located in config directory.

Currently completed task

  • Progressive method
  • Tuning
  • Add mapping and styles
  • Remove traditional input
  • Add noise inputs
  • Mixing regularization

Fake image and real image score graph

fp32 precision

fp32_score

mixed precision

mixed_score

There seems to be no difference in the score.

Discriminator loss

fp32 precision

fp32_dloss

mixed precision

mixed_dloss

There is a problem with R1 regularization, so training does not work properly. This also affects image samples. It would be better not to use it now.

Train speed

precision_speed

There seems to be a clear speed difference depending on the precision, but it seems to be meaningless because the mixed precision training isn't done properly.

Inference Images

8x8 images

8x8

16x16 images

16x16

32x32 images

32x32

64x64 images

64x64

128x128 images

128x128

256x256 images

256x256

Pretrained checkpoint

256x256 See #1

About

PyTorch implementation of A Style-Based Generator Architecture for Generative Adversarial Network


Languages

Language:Python 100.0%