alexjc commited on
Commit
a1bc236
1 Parent(s): f7d2a68

Add usage instructions and examples of .

Browse files
Files changed (1) hide show
  1. README.md +27 -2
README.md CHANGED
@@ -21,7 +21,7 @@ task_ids: []
21
  viewer: false
22
  ---
23
 
24
- _This custom Dataset Teaser is just so much better, no wonder it was disabled!_
25
 
26
  ![preview of all texture sets](https://huggingface.co/datasets/texturedesign/td01_natural-ground-textures/resolve/main/docs/teaser.webp)
27
 
@@ -38,8 +38,33 @@ Overall information about this dataset:
38
  * **Technique** — hand-held
39
  * **Orientation** — portrait or landscape
40
  * **Author**: Alex J. Champandard
 
41
 
42
- Photos are arranged into multiple sets...
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
43
 
44
 
45
  ## Set #1: Rock and Gravel
 
21
  viewer: false
22
  ---
23
 
24
+ _The Dataset Teaser is now enabled instead! Isn't this better?_
25
 
26
  ![preview of all texture sets](https://huggingface.co/datasets/texturedesign/td01_natural-ground-textures/resolve/main/docs/teaser.webp)
27
 
 
38
  * **Technique** — hand-held
39
  * **Orientation** — portrait or landscape
40
  * **Author**: Alex J. Champandard
41
+ * **Configurations**: 4K, 2K (default), 1K
42
 
43
+ To load the medium- and high-resolution images of the dataset, you'll need to install `jxlpy` from [PyPI](https://pypi.org/project/jxlpy/) with `pip install jxlpy`:
44
+
45
+ ```python
46
+ # Recommended use, JXL at high-quality.
47
+ from jxlpy import JXLImagePlugin
48
+ from datasets import load_dataset
49
+ d = load_dataset('texturedesign/td01_natural-ground-textures', 'JXL@4K')
50
+
51
+ print(len(d['train']), len(d['test']))
52
+ ```
53
+
54
+ The lowest-resolution images are available as PNG with a regular installation of `pillow`:
55
+
56
+ ```python
57
+ # Alternative use, PNG at low-quality.
58
+ from datasets import load_dataset
59
+ d = load_dataset('texturedesign/td01_natural-ground-textures', 'PNG@1K')
60
+
61
+ # EXAMPLE: Discard all other sets except Set #1.
62
+ dataset = dataset.filter(lambda s: s['set'] == 1)
63
+ # EXAMPLE: Only keep images with index 0 and 2.
64
+ dataset = dataset.select([0, 2])
65
+ ```
66
+
67
+ Use built-in dataset `filter()` and `select()` to narrow down the loaded dataset for training, or to ease with development.
68
 
69
 
70
  ## Set #1: Rock and Gravel