e-271 / few-shot-gan

Few-shot adaptation of GANs.
https://e-271.github.io/few-shot-gan
Other
120 stars 12 forks source link

How to train? #3

Open atugar opened 3 years ago

atugar commented 3 years ago

Can you please explain what the below params mean? They are not needed for StyleGAN 2.

python run_training.py \ --config=config-ada-sv-flat \ --data-dir=/path/to/datasets \ --dataset-train=path/to/train \ - What is this? --dataset-eval=path/to/eval \ - What is this? --total-kimg=30 \ --metrics=None

atugar commented 3 years ago

Ok. I read the readme again. When you say split dataset into training and eval, are those directories supposed to hold the raw JPG or TFRecord? And how do I specify what network to start from? I assume for 1024 this will be FFHQ config-f, but where to specify this?

e-271 commented 3 years ago

Hi, so they should both be paths to TFRecord dirs. You first create the TFRecord dirs from images using the dataset_tool.py script, and then run training with paths to those dirs. --resume-pkl-dir controls which path pickles are found in and --resume-pkl' controls the name, but if this is not given it is inferred based on the name of--dataset-train`. I'll update the readme with these details.

atugar commented 3 years ago

Hello. Thanks for getting back to me. If --dataset-train is the path to the training dir, then what is --data-dir? I thought that was the path to the training dir.

AndreTInfante commented 3 years ago

I am also unclear on what data-dir is, and would appreciate clarification!

AndreTInfante commented 3 years ago

@atugar I actually figured it out. data-dir is the parent directory for the datasets, and data-train and data-eval are subdirectories relative to that parent directory