You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- you can either provide your own folder as `--train_data_dir`
84
+
- or you can upload your dataset to the hub (possibly as a private repo, if you prefer so), and simply pass the `--dataset_name` argument.
85
+
86
+
**Note**: If you want to create your own training dataset please have a look at [this document](https://huggingface.co/docs/datasets/image_process#image-datasets).
87
+
88
+
Below, we explain both in more detail.
89
+
90
+
### Provide the dataset as a folder
91
+
92
+
If you provide your own folders with images, the script expects the following directory structure:
93
+
94
+
```bash
95
+
data_dir/xxx.png
96
+
data_dir/xxy.png
97
+
data_dir/[...]/xxz.png
98
+
```
99
+
100
+
In other words, the script will take care of gathering all images inside the folder. You can then run the script like this:
101
+
102
+
```bash
103
+
accelerate launch train_unconditional.py \
104
+
--train_data_dir <path-to-train-directory> \
105
+
<other-arguments>
106
+
```
107
+
108
+
Internally, the script will use the [`ImageFolder`](https://huggingface.co/docs/datasets/v2.0.0/en/image_process#imagefolder) feature which will automatically turn the folders into 🤗 Dataset objects.
109
+
110
+
### Upload your data to the hub, as a (possibly private) repo
111
+
112
+
It's very easy (and convenient) to upload your image dataset to the hub using the [`ImageFolder`](https://huggingface.co/docs/datasets/v2.0.0/en/image_process#imagefolder) feature available in 🤗 Datasets. Simply do the following:
0 commit comments