Datasets:
Merge branch 'main' of https://huggingface.co/datasets/MITLL/LADI-v2-dataset
Browse files
README.md
CHANGED
|
@@ -83,15 +83,31 @@ 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 +118,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 |
+
The available configurations for the script are: `v2`, `v2a`, `v2_resized`, `v2a_resized`, `v1_damage`, `v1_infra`.
|
| 99 |
+
|
| 100 |
+
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`:
|
| 101 |
|
| 102 |
```python
|
| 103 |
from datasets import load_dataset
|
| 104 |
|
| 105 |
ds = load_dataset("MITLL/LADI-v2-dataset", "v2a_resized",
|
| 106 |
+
revision="script",
|
| 107 |
+
streaming=True,
|
| 108 |
+
download_ladi=True,
|
| 109 |
+
base_dir='./ladi_dataset',
|
| 110 |
+
trust_remote_code=True)
|
| 111 |
```
|
| 112 |
|
| 113 |
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.
|
|
|
|
| 118 |
from datasets import load_dataset
|
| 119 |
|
| 120 |
ds = load_dataset("MITLL/LADI-v2-dataset", "v2a_resized",
|
| 121 |
+
revision="script",
|
| 122 |
+
streaming=True,
|
| 123 |
+
base_dir='./ladi_dataset',
|
| 124 |
trust_remote_code=True)
|
| 125 |
```
|
| 126 |
|