Datasets:
jeffliu-LL
commited on
Update README with instructions on main vs. script
Browse files
README.md
CHANGED
@@ -83,15 +83,29 @@ A single example in the v2a dataset looks like this:
|
|
83 |
|
84 |
Examples in the v1 datasets are analogous, with classes drawn from their respective tasks (infrastructure and damage).
|
85 |
## Using the Dataset
|
86 |
-
###
|
87 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
88 |
|
89 |
```python
|
90 |
from datasets import load_dataset
|
91 |
|
92 |
ds = load_dataset("MITLL/LADI-v2-dataset", "v2a_resized",
|
93 |
-
|
94 |
-
|
|
|
|
|
|
|
95 |
```
|
96 |
|
97 |
You can browse the bucket here: [https://ladi.s3.amazonaws.com/index.html](https://ladi.s3.amazonaws.com/index.html). Note that the `v2_resized` dataset is the same as the `v2` dataset, but with lower-resolution images (1800x1200 px). We expect that these images are still more than large enough to support most tasks, and encourage you to use the v2_resized and v2a_resized datasets when possible as the download is about 45x smaller. We try not to download images you don't need, so this will only fetch the v2_resized images, leaving v1 and v2 alone.
|
@@ -102,7 +116,9 @@ We intend for this dataset to be used mostly in streaming mode from individual f
|
|
102 |
from datasets import load_dataset
|
103 |
|
104 |
ds = load_dataset("MITLL/LADI-v2-dataset", "v2a_resized",
|
105 |
-
|
|
|
|
|
106 |
trust_remote_code=True)
|
107 |
```
|
108 |
|
|
|
83 |
|
84 |
Examples in the v1 datasets are analogous, with classes drawn from their respective tasks (infrastructure and damage).
|
85 |
## Using the Dataset
|
86 |
+
### Default Configuration
|
87 |
+
The `main` branch of the dataset will load the `v2a` label set with images resized to fit within 1800x1200. For most use cases, this should be sufficient.
|
88 |
+
|
89 |
+
```python
|
90 |
+
from datasets import load_dataset
|
91 |
+
ds = load_dataset("MITLL/LADI-v2-dataset")
|
92 |
+
```
|
93 |
+
|
94 |
+
### Advanced usage
|
95 |
+
If you need access to the full resolution images, the v2 label set, or the v1 dataset, you should load from the `script` revision.
|
96 |
+
This will use a custom dataset loader script, which will require you to set `trust_remote_code=True`.
|
97 |
+
|
98 |
+
You can download the dataset by loading it with `download_ladi=True`, which fetches the compressed data from an s3 bucket and extracts it into your filesystem at `base_dir`:
|
99 |
|
100 |
```python
|
101 |
from datasets import load_dataset
|
102 |
|
103 |
ds = load_dataset("MITLL/LADI-v2-dataset", "v2a_resized",
|
104 |
+
revision="script",
|
105 |
+
streaming=True,
|
106 |
+
download_ladi=True,
|
107 |
+
base_dir='./ladi_dataset',
|
108 |
+
trust_remote_code=True)
|
109 |
```
|
110 |
|
111 |
You can browse the bucket here: [https://ladi.s3.amazonaws.com/index.html](https://ladi.s3.amazonaws.com/index.html). Note that the `v2_resized` dataset is the same as the `v2` dataset, but with lower-resolution images (1800x1200 px). We expect that these images are still more than large enough to support most tasks, and encourage you to use the v2_resized and v2a_resized datasets when possible as the download is about 45x smaller. We try not to download images you don't need, so this will only fetch the v2_resized images, leaving v1 and v2 alone.
|
|
|
116 |
from datasets import load_dataset
|
117 |
|
118 |
ds = load_dataset("MITLL/LADI-v2-dataset", "v2a_resized",
|
119 |
+
revision="script",
|
120 |
+
streaming=True,
|
121 |
+
base_dir='./ladi_dataset',
|
122 |
trust_remote_code=True)
|
123 |
```
|
124 |
|