stylegan2-pytorch icon indicating copy to clipboard operation
stylegan2-pytorch copied to clipboard

What does happen if I train with say less than 500 images

Open tyoc213 opened this issue 3 years ago • 6 comments

What does happen if I train with low number of images less than 500.

I need to ask this because I still dont know, the generated comes from the learning of this data, but how samples of outputs of stylegan2 show say a "source image" on the left and target images as headers, so you get new images from the style of the "source image" applied to each one of the columns.

So if the generated images comes from the learning of the data only, how can you plot this? if they are generated without me inputing the targets image?

image

tyoc213 avatar Aug 03 '20 00:08 tyoc213

Also been trainning with flowers dataset and trained it to 100% with stylegan2_pytorch --name sg2_0 --data '/data/oxford-102-flowers/jpg' --aug-prob 0.25 --results_dir /results --models_dir /to/models

image

So if I do

stylegan2_pytorch  --name sg2_0   --generate


continuing from previous epoch - 0
sample images generated at ./results/sg2_0/generated-08-04-2020_10-26-54

I got this image

Even that when training it generated something like this? image

The first epochs it was this

image

But started to give something "good" at

image

So why generate gives this? image

tyoc213 avatar Aug 04 '20 15:08 tyoc213

Hi, I came across the same problem. Have you fix this problem?

banianzr avatar Aug 12 '20 07:08 banianzr

Hi, I've fixed the problem. I noticed that you used stylegan2_pytorch --name sg2_0 --data '/data/oxford-102-flowers/jpg' --aug-prob 0.25 --results_dir /results --models_dir /to/models to train your network, but when you generate you executed (without specifying paths): stylegan2_pytorch --name sg2_0 --generate It seems that the program looked for models in the default models path.

I suggest you use the command below: stylegan2_pytorch --name sg2_0 --generate --models_dir /to/models

banianzr avatar Aug 13 '20 11:08 banianzr

Oh yeah, you know what the files with -ema and -mr mean?.

Have you found how to generate only 1 image not the grid?

tyoc213 avatar Aug 14 '20 18:08 tyoc213

Hi, I've fixed the problem. I noticed that you used stylegan2_pytorch --name sg2_0 --data '/data/oxford-102-flowers/jpg' --aug-prob 0.25 --results_dir /results --models_dir /to/models to train your network, but when you generate you executed (without specifying paths): stylegan2_pytorch --name sg2_0 --generate It seems that the program looked for models in the default models path.

I suggest you use the command below: stylegan2_pytorch --name sg2_0 --generate --models_dir /to/models

I use a combination of --load_from and --name, it seems to do the job

AlexTS1980 avatar Aug 16 '20 21:08 AlexTS1980

Oh yeah, you know what the files with -ema and -mr mean?.

Have you found how to generate only 1 image not the grid?

@tyoc213 The author had mentioned about -ema and -mr in another issue. -ema means exponential moving average, and -mr stands for mixing regularity. A more detailed explanation please refer to What does "ema" and "mr" mean in simple terms? #31

For generate only 1 image, I think you can set the parameter by --num_image_tiles 1 ...

banianzr avatar Sep 29 '20 08:09 banianzr