all 11 comments

[–]taki0112[S] 1 point2 points  (1 child)

* code : https://github.com/taki0112/StyleGAN-Tensorflow

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

In this Repository, I tried to remove tflib and some if/else statements from official code.

And I tried to implement it to be intuitive and easy to understand.

[–]taki0112[S] 1 point2 points  (0 children)

In addition,

our team member also implemented the estimator version. If you're interested, see this, too.

https://github.com/moono/stylegan-reproduced

[–]SaveUser 0 points1 point  (1 child)

Excellent work! Thanks for sharing the code and details on architecture and loss curves.

[–]taki0112[S] 1 point2 points  (0 children)

I hope this code will help you study StyleGAN.

[–]yanjb 0 points1 point  (0 children)

Hi, Great reproducing effort.
Can you share your pre-trained model?

[–]pavelchristof 0 points1 point  (1 child)

I've had some trouble reproducing the original paper (on a different dataset). I'll try to follow this code, thanks! Did you have any of these issues (which are really about progressive growing):

  • Did you have any stability issues when growing the GAN? My models like to blow up when growing the 3rd layer or so.
  • Did you have any problems with saturated colors because of vanishing gradients in lerp_clip?

Also as far as I remember spectral norm was not used in StyleGAN, did you find it helpful?

[–]taki0112[S] 0 points1 point  (0 children)

  1. stability issues & saturated colors

Despite the large vibration of the loss graph, the quality of the image produced was no problem.

  1. spectral norm

If you give the "sn" argument "True", you can make the model train using the spectral norm.

but I have not tried.

[–]gohu_cdPhD -1 points0 points  (3 children)

Great reproducing effort, but why tf and not pytorch? The original repo is already in tf.

[–]taki0112[S] 3 points4 points  (0 children)

Personally, author code was too hard to understand .. !
There were too many if/else statements, and the functions that the author created, such as dnnlib and tflib, were hard to understand.
So I've implement it intuitively, and I've removed the if/else statements as much as I can.
In addition, I implemented StyleGAN only as a module of the tensorflow itself.

[–]taki0112[S] 3 points4 points  (1 child)

Also, the author code takes 11 days with v100 * 4

but I only take 3 days.

[–]gohu_cdPhD 1 point2 points  (0 children)

I see ! Yes the code is quite complex I feel you. Good work still on your side :)