co-mod-gan icon indicating copy to clipboard operation
co-mod-gan copied to clipboard

How to train with my own datasets?

Open WC-0525 opened this issue 3 years ago • 5 comments

I want to train on other face datasets. After I use dataset_tools to modify the format, how do I train? How to modify "--dataset=DATASET"?

WC-0525 avatar Apr 15 '21 01:04 WC-0525

The concatenation of DATA_DIR and DATASET should be the path to your tfrecords folder. For example, if the path of your tfrecords is ~/datasets/custom/custom.tfrecords, you can set --data-dir=~/datasets --dataset=custom

zsyzzsoft avatar Apr 15 '21 13:04 zsyzzsoft

Thank you very much for your help. I'm a novice. Today I want to use ffhq data set for training, but I encountered the following problems. I would appreciate it if you could help me.

I have the original ffhq dataset (1024*1024,.png). Should I put these pictures in "~/datasets"? And use "create_from_images.py" to generate into "~/datasets/ffhq/ffhq-r10.tfrecords"? For example,I typed "python dataset_tools/create_from_images.py --tfrecord-dir=./datasets/ffhq --train-image-dir=./datasets --shuffle --compressed " on the command line.

But then I used the files generated in this way for training, and the result failed. In addition, the file size of the ".tfrecords" I generated is 0KB, which I find very strange.

I'm sorry if there is any interruption.

WC-0525 avatar Apr 16 '21 03:04 WC-0525

You can directly download ffhq-r10.tfrecords without using create_from_images.py.

zsyzzsoft avatar Apr 16 '21 07:04 zsyzzsoft

Thanks for your help. Unfortunately, I am in China and cannot download the dataset from Google Drive. So I can only make it myself.

WC-0525 avatar Apr 17 '21 03:04 WC-0525

OK I see... --compressed only works for JPEG images, so you can remove this option and try again.

zsyzzsoft avatar Apr 17 '21 08:04 zsyzzsoft