lucidrains / stylegan2-pytorch

Simplest working implementation of Stylegan2, state of the art generative adversarial network, in Pytorch. Enabling everyone to experience disentanglement
https://thispersondoesnotexist.com
MIT License
3.71k stars 586 forks source link

Training with my own images #79

Closed pyZimbo closed 4 years ago

pyZimbo commented 4 years ago

So I have been trying to figure out how to use this to train and then generate faces. I am trying to feed the system pictures of dogs so that it can generate faces of dogs. How would I go about doing this? Where would I put the pics to train from and what is the command I would use? Which repo (original or simple) and how many images would I need to train? Do the photos have to be in a specific format and should they be headshots only?

lucidrains commented 4 years ago

@pyZimbo there's actually a great dataset for dogs! https://github.com/clovaai/stargan-v2/blob/master/README.md#animal-faces-hq-dataset-afhq I was planning on training one, but with my dog in the mix lol

In the past, you need around 50k images, but there has been a simple breakthrough in GAN training, and now you only need around 1-2k images! I will add the breakthrough to this repository later this week.

lucidrains commented 4 years ago

@pyZimbo https://github.com/lucidrains/stylegan2-pytorch#low-amounts-of-training-data

lucidrains commented 4 years ago

The photos can be in either jpg or png, and should ideally be a square, but if it isn't, it will be center cropped and resized. You can follow the README for your remaining questions