forked from NVlabs/edm
-
Notifications
You must be signed in to change notification settings - Fork 0
/
dataset-tool-help.txt
65 lines (49 loc) · 2.58 KB
/
dataset-tool-help.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
Usage: dataset_tool.py [OPTIONS]
Convert an image dataset into a dataset archive usable with StyleGAN2 ADA
PyTorch.
The input dataset format is guessed from the --source argument:
--source *_lmdb/ Load LSUN dataset
--source cifar-10-python.tar.gz Load CIFAR-10 dataset
--source train-images-idx3-ubyte.gz Load MNIST dataset
--source path/ Recursively load all images from path/
--source dataset.zip Recursively load all images from dataset.zip
Specifying the output format and path:
--dest /path/to/dir Save output files under /path/to/dir
--dest /path/to/dataset.zip Save output files into /path/to/dataset.zip
The output dataset format can be either an image folder or an uncompressed
zip archive. Zip archives makes it easier to move datasets around file
servers and clusters, and may offer better training performance on network
file systems.
Images within the dataset archive will be stored as uncompressed PNG.
Uncompresed PNGs can be efficiently decoded in the training loop.
Class labels are stored in a file called 'dataset.json' that is stored at
the dataset root folder. This file has the following structure:
{
"labels": [
["00000/img00000000.png",6],
["00000/img00000001.png",9],
... repeated for every image in the datase
["00049/img00049999.png",1]
]
}
If the 'dataset.json' file cannot be found, class labels are determined from
top-level directory names.
Image scale/crop and resolution requirements:
Output images must be square-shaped and they must all have the same power-
of-two dimensions.
To scale arbitrary input image size to a specific width and height, use the
--resolution option. Output resolution will be either the original input
resolution (if resolution was not specified) or the one specified with
--resolution option.
Use the --transform=center-crop or --transform=center-crop-wide options to
apply a center crop transform on the input image. These options should be
used with the --resolution option. For example:
python dataset_tool.py --source LSUN/raw/cat_lmdb --dest /tmp/lsun_cat \
--transform=center-crop-wide --resolution=512x384
Options:
--source PATH Input directory or archive name [required]
--dest PATH Output directory or archive name [required]
--max-images INT Maximum number of images to output
--transform MODE Input crop/resize mode
--resolution WxH Output resolution (e.g., 512x512)
--help Show this message and exit.