Datasets:
Add files using upload-large-folder tool
Browse files- .gitattributes +7 -0
- README.md +126 -0
- data/train.lance/_indices/034a1155-5c6e-4509-80f9-e946c787ad41/bitmap_page_lookup.lance +3 -0
- data/train.lance/_indices/88b5b66a-a788-4166-b49d-e99d31c380d5/page_data.lance +0 -0
- data/train.lance/_indices/88b5b66a-a788-4166-b49d-e99d31c380d5/page_lookup.lance +0 -0
- data/train.lance/_indices/d5a2d19b-8c7f-4f1c-837d-86729fbdcde1/auxiliary.idx +3 -0
- data/train.lance/_indices/d5a2d19b-8c7f-4f1c-837d-86729fbdcde1/index.idx +3 -0
- data/train.lance/_transactions/0-5455dc09-b082-4cd6-8f4e-fd4a88a35356.txn +0 -0
- data/train.lance/_transactions/1-8858bb19-e8ac-4134-973a-7076fd0a75cd.txn +0 -0
- data/train.lance/_transactions/2-7a9584b2-7cf2-426a-9581-6e90e6bd946c.txn +0 -0
- data/train.lance/_transactions/3-e960d70b-a384-46ba-8189-40e07e026c15.txn +0 -0
- data/train.lance/_versions/18446744073709551611.manifest +0 -0
- data/train.lance/_versions/18446744073709551612.manifest +0 -0
- data/train.lance/_versions/18446744073709551613.manifest +0 -0
- data/train.lance/_versions/18446744073709551614.manifest +0 -0
- data/train.lance/data/011110011011110101000111a9c29546a2ac1daa9e28674fae.lance +3 -0
- data/validation.lance/_indices/7f498f64-279d-4dbe-a1ef-5f35f8d4fbfe/bitmap_page_lookup.lance +3 -0
- data/validation.lance/_indices/b37ccb6c-98d7-44b3-a64b-004f51ad787d/auxiliary.idx +3 -0
- data/validation.lance/_indices/b37ccb6c-98d7-44b3-a64b-004f51ad787d/index.idx +0 -0
- data/validation.lance/_indices/c038c22d-5bbf-478e-982f-b1834d103c98/page_data.lance +0 -0
- data/validation.lance/_indices/c038c22d-5bbf-478e-982f-b1834d103c98/page_lookup.lance +0 -0
- data/validation.lance/_transactions/0-66c9eaec-0c1f-4d69-8fed-976a3ae91ad1.txn +0 -0
- data/validation.lance/_transactions/1-b44c02ec-463f-46a3-80ca-07541bc71316.txn +0 -0
- data/validation.lance/_transactions/2-762f4d51-7d42-45aa-bc67-8bfff9a16985.txn +0 -0
- data/validation.lance/_transactions/3-df37e09d-2c22-4d05-8d25-0f629501d0e8.txn +0 -0
- data/validation.lance/_versions/18446744073709551611.manifest +0 -0
- data/validation.lance/_versions/18446744073709551612.manifest +0 -0
- data/validation.lance/_versions/18446744073709551613.manifest +0 -0
- data/validation.lance/_versions/18446744073709551614.manifest +0 -0
- data/validation.lance/data/011101111001101110100100469a9c46f599837cb71ece4f95.lance +3 -0
.gitattributes
CHANGED
|
@@ -58,3 +58,10 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
|
| 58 |
# Video files - compressed
|
| 59 |
*.mp4 filter=lfs diff=lfs merge=lfs -text
|
| 60 |
*.webm filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 58 |
# Video files - compressed
|
| 59 |
*.mp4 filter=lfs diff=lfs merge=lfs -text
|
| 60 |
*.webm filter=lfs diff=lfs merge=lfs -text
|
| 61 |
+
data/validation.lance/_indices/7f498f64-279d-4dbe-a1ef-5f35f8d4fbfe/bitmap_page_lookup.lance filter=lfs diff=lfs merge=lfs -text
|
| 62 |
+
data/validation.lance/_indices/b37ccb6c-98d7-44b3-a64b-004f51ad787d/auxiliary.idx filter=lfs diff=lfs merge=lfs -text
|
| 63 |
+
data/train.lance/_indices/034a1155-5c6e-4509-80f9-e946c787ad41/bitmap_page_lookup.lance filter=lfs diff=lfs merge=lfs -text
|
| 64 |
+
data/train.lance/_indices/d5a2d19b-8c7f-4f1c-837d-86729fbdcde1/index.idx filter=lfs diff=lfs merge=lfs -text
|
| 65 |
+
data/train.lance/_indices/d5a2d19b-8c7f-4f1c-837d-86729fbdcde1/auxiliary.idx filter=lfs diff=lfs merge=lfs -text
|
| 66 |
+
data/validation.lance/data/011101111001101110100100469a9c46f599837cb71ece4f95.lance filter=lfs diff=lfs merge=lfs -text
|
| 67 |
+
data/train.lance/data/011110011011110101000111a9c29546a2ac1daa9e28674fae.lance filter=lfs diff=lfs merge=lfs -text
|
README.md
ADDED
|
@@ -0,0 +1,126 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: bsd-3-clause
|
| 3 |
+
task_categories:
|
| 4 |
+
- image-segmentation
|
| 5 |
+
- image-feature-extraction
|
| 6 |
+
language:
|
| 7 |
+
- en
|
| 8 |
+
tags:
|
| 9 |
+
- ade20k
|
| 10 |
+
- scene-parsing
|
| 11 |
+
- semantic-segmentation
|
| 12 |
+
- instance-segmentation
|
| 13 |
+
- lance
|
| 14 |
+
- clip-embeddings
|
| 15 |
+
pretty_name: ade20k-lance
|
| 16 |
+
size_categories:
|
| 17 |
+
- 10K<n<100K
|
| 18 |
+
---
|
| 19 |
+
# ADE20K (Lance Format)
|
| 20 |
+
|
| 21 |
+
Lance-formatted version of the full [ADE20K scene parsing benchmark](https://groups.csail.mit.edu/vision/datasets/ADE20K/) (sourced from [`1aurent/ADE20K`](https://huggingface.co/datasets/1aurent/ADE20K)) — **27,574 scene images** with semantic and instance segmentation maps, scene labels, and per-object metadata, all stored inline.
|
| 22 |
+
|
| 23 |
+
## Splits
|
| 24 |
+
|
| 25 |
+
| Split | Rows |
|
| 26 |
+
|-------|------|
|
| 27 |
+
| `train.lance` | 25,574 |
|
| 28 |
+
| `validation.lance` | 2,000 |
|
| 29 |
+
|
| 30 |
+
## Schema
|
| 31 |
+
|
| 32 |
+
| Column | Type | Notes |
|
| 33 |
+
|---|---|---|
|
| 34 |
+
| `id` | `int64` | Row index within split |
|
| 35 |
+
| `image` | `large_binary` | Inline JPEG bytes |
|
| 36 |
+
| `segmentation` | `large_binary` | Inline PNG bytes — semantic segmentation map (RGB encoding per ADE20K spec) |
|
| 37 |
+
| `instance` | `large_binary?` | Inline PNG bytes — instance map; null if not provided |
|
| 38 |
+
| `filename` | `string` | ADE20K relative filename |
|
| 39 |
+
| `scene` | `list<string>` | Scene labels (e.g. `["bathroom"]`) |
|
| 40 |
+
| `object_names` | `list<string>` | Names of all annotated objects (one entry per polygon) |
|
| 41 |
+
| `objects_present` | `list<string>` | Deduped object names — feeds the `LABEL_LIST` index |
|
| 42 |
+
| `num_objects` | `int32` | Number of annotated objects |
|
| 43 |
+
| `image_emb` | `fixed_size_list<float32, 512>` | OpenCLIP `ViT-B-32` image embedding (cosine-normalized) |
|
| 44 |
+
|
| 45 |
+
## Pre-built indices
|
| 46 |
+
|
| 47 |
+
- `IVF_PQ` on `image_emb` — `metric=cosine`
|
| 48 |
+
- `BTREE` on `num_objects`
|
| 49 |
+
- `LABEL_LIST` on `objects_present` — supports `array_has_any` / `array_has_all`
|
| 50 |
+
|
| 51 |
+
## Quick start
|
| 52 |
+
|
| 53 |
+
```python
|
| 54 |
+
import lance
|
| 55 |
+
|
| 56 |
+
ds = lance.dataset("hf://datasets/lance-format/ade20k-lance/data/validation.lance")
|
| 57 |
+
print(ds.count_rows(), ds.schema.names, ds.list_indices())
|
| 58 |
+
```
|
| 59 |
+
|
| 60 |
+
## Read an image with its segmentation
|
| 61 |
+
|
| 62 |
+
```python
|
| 63 |
+
import io
|
| 64 |
+
import lance
|
| 65 |
+
from PIL import Image
|
| 66 |
+
|
| 67 |
+
ds = lance.dataset("hf://datasets/lance-format/ade20k-lance/data/validation.lance")
|
| 68 |
+
row = ds.take([0], columns=["image", "segmentation", "scene", "objects_present"]).to_pylist()[0]
|
| 69 |
+
|
| 70 |
+
Image.open(io.BytesIO(row["image"])).save("img.jpg")
|
| 71 |
+
Image.open(io.BytesIO(row["segmentation"])).save("seg.png")
|
| 72 |
+
print("scene:", row["scene"])
|
| 73 |
+
print("objects:", row["objects_present"][:10])
|
| 74 |
+
```
|
| 75 |
+
|
| 76 |
+
## Filter by scene / objects
|
| 77 |
+
|
| 78 |
+
```python
|
| 79 |
+
import lance
|
| 80 |
+
ds = lance.dataset("hf://datasets/lance-format/ade20k-lance/data/validation.lance")
|
| 81 |
+
|
| 82 |
+
# Indoor scenes containing both a bed and a window.
|
| 83 |
+
rows = ds.scanner(
|
| 84 |
+
filter="array_has_all(objects_present, ['bed', 'window'])",
|
| 85 |
+
columns=["filename", "scene"],
|
| 86 |
+
limit=10,
|
| 87 |
+
).to_table().to_pylist()
|
| 88 |
+
```
|
| 89 |
+
|
| 90 |
+
## Visual similarity search
|
| 91 |
+
|
| 92 |
+
```python
|
| 93 |
+
import lance
|
| 94 |
+
import pyarrow as pa
|
| 95 |
+
|
| 96 |
+
ds = lance.dataset("hf://datasets/lance-format/ade20k-lance/data/validation.lance")
|
| 97 |
+
emb_field = ds.schema.field("image_emb")
|
| 98 |
+
ref = ds.take([0], columns=["image_emb"]).to_pylist()[0]["image_emb"]
|
| 99 |
+
query = pa.array([ref], type=emb_field.type)
|
| 100 |
+
|
| 101 |
+
neighbors = ds.scanner(
|
| 102 |
+
nearest={"column": "image_emb", "q": query[0], "k": 5},
|
| 103 |
+
columns=["filename", "scene"],
|
| 104 |
+
).to_table().to_pylist()
|
| 105 |
+
```
|
| 106 |
+
|
| 107 |
+
## Why Lance?
|
| 108 |
+
|
| 109 |
+
- One dataset for images + segmentation + instance + scene + objects + embeddings + indices — no folder of paired files.
|
| 110 |
+
- On-disk vector and label-list indices live next to the data, so search works on local copies and on the Hub.
|
| 111 |
+
- Schema evolution: add columns (panoptic ids, fresh embeddings, model predictions) without rewriting the data.
|
| 112 |
+
|
| 113 |
+
## Source & license
|
| 114 |
+
|
| 115 |
+
Converted from [`1aurent/ADE20K`](https://huggingface.co/datasets/1aurent/ADE20K). ADE20K is released under the [BSD 3-Clause license](https://github.com/CSAILVision/ADE20K/blob/main/LICENSE) by the MIT CSAIL Computer Vision group.
|
| 116 |
+
|
| 117 |
+
## Citation
|
| 118 |
+
|
| 119 |
+
```
|
| 120 |
+
@inproceedings{zhou2017scene,
|
| 121 |
+
title={Scene Parsing through ADE20K Dataset},
|
| 122 |
+
author={Zhou, Bolei and Zhao, Hang and Puig, Xavier and Fidler, Sanja and Barriuso, Adela and Torralba, Antonio},
|
| 123 |
+
booktitle={Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR)},
|
| 124 |
+
year={2017}
|
| 125 |
+
}
|
| 126 |
+
```
|
data/train.lance/_indices/034a1155-5c6e-4509-80f9-e946c787ad41/bitmap_page_lookup.lance
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:56cf233354371213c5098f394b16739919bddcd0b41d2cae93f90ee70275ab14
|
| 3 |
+
size 672259
|
data/train.lance/_indices/88b5b66a-a788-4166-b49d-e99d31c380d5/page_data.lance
ADDED
|
Binary file (50.4 kB). View file
|
|
|
data/train.lance/_indices/88b5b66a-a788-4166-b49d-e99d31c380d5/page_lookup.lance
ADDED
|
Binary file (1.26 kB). View file
|
|
|
data/train.lance/_indices/d5a2d19b-8c7f-4f1c-837d-86729fbdcde1/auxiliary.idx
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:55791b4fa781996541a1b0404ea0f08c98c3073786f4f14dec08713cc51497b3
|
| 3 |
+
size 2214602
|
data/train.lance/_indices/d5a2d19b-8c7f-4f1c-837d-86729fbdcde1/index.idx
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:b96899134daeca863aec780aa2993610c334afcac32dee2c9eb76d22104d417a
|
| 3 |
+
size 131722
|
data/train.lance/_transactions/0-5455dc09-b082-4cd6-8f4e-fd4a88a35356.txn
ADDED
|
Binary file (600 Bytes). View file
|
|
|
data/train.lance/_transactions/1-8858bb19-e8ac-4134-973a-7076fd0a75cd.txn
ADDED
|
Binary file (190 Bytes). View file
|
|
|
data/train.lance/_transactions/2-7a9584b2-7cf2-426a-9581-6e90e6bd946c.txn
ADDED
|
Binary file (199 Bytes). View file
|
|
|
data/train.lance/_transactions/3-e960d70b-a384-46ba-8189-40e07e026c15.txn
ADDED
|
Binary file (192 Bytes). View file
|
|
|
data/train.lance/_versions/18446744073709551611.manifest
ADDED
|
Binary file (1.33 kB). View file
|
|
|
data/train.lance/_versions/18446744073709551612.manifest
ADDED
|
Binary file (1.19 kB). View file
|
|
|
data/train.lance/_versions/18446744073709551613.manifest
ADDED
|
Binary file (1.03 kB). View file
|
|
|
data/train.lance/_versions/18446744073709551614.manifest
ADDED
|
Binary file (1.29 kB). View file
|
|
|
data/train.lance/data/011110011011110101000111a9c29546a2ac1daa9e28674fae.lance
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:46ea463a409a5af26b477efdac065bf1bc507189d6d6a69cd2369d25737d3644
|
| 3 |
+
size 5280222157
|
data/validation.lance/_indices/7f498f64-279d-4dbe-a1ef-5f35f8d4fbfe/bitmap_page_lookup.lance
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:79e190ce730518587274190c0cdcd53fbc2bd6e8df3e59faf24c48e32f3f18a1
|
| 3 |
+
size 116332
|
data/validation.lance/_indices/b37ccb6c-98d7-44b3-a64b-004f51ad787d/auxiliary.idx
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:7c195a69a2868fcdd586ddbc6674f50e4f66bd4949ac1223b6816a6a7a4d4f8a
|
| 3 |
+
size 656323
|
data/validation.lance/_indices/b37ccb6c-98d7-44b3-a64b-004f51ad787d/index.idx
ADDED
|
Binary file (33.1 kB). View file
|
|
|
data/validation.lance/_indices/c038c22d-5bbf-478e-982f-b1834d103c98/page_data.lance
ADDED
|
Binary file (4.3 kB). View file
|
|
|
data/validation.lance/_indices/c038c22d-5bbf-478e-982f-b1834d103c98/page_lookup.lance
ADDED
|
Binary file (1.26 kB). View file
|
|
|
data/validation.lance/_transactions/0-66c9eaec-0c1f-4d69-8fed-976a3ae91ad1.txn
ADDED
|
Binary file (599 Bytes). View file
|
|
|
data/validation.lance/_transactions/1-b44c02ec-463f-46a3-80ca-07541bc71316.txn
ADDED
|
Binary file (189 Bytes). View file
|
|
|
data/validation.lance/_transactions/2-762f4d51-7d42-45aa-bc67-8bfff9a16985.txn
ADDED
|
Binary file (198 Bytes). View file
|
|
|
data/validation.lance/_transactions/3-df37e09d-2c22-4d05-8d25-0f629501d0e8.txn
ADDED
|
Binary file (192 Bytes). View file
|
|
|
data/validation.lance/_versions/18446744073709551611.manifest
ADDED
|
Binary file (1.33 kB). View file
|
|
|
data/validation.lance/_versions/18446744073709551612.manifest
ADDED
|
Binary file (1.19 kB). View file
|
|
|
data/validation.lance/_versions/18446744073709551613.manifest
ADDED
|
Binary file (1.02 kB). View file
|
|
|
data/validation.lance/_versions/18446744073709551614.manifest
ADDED
|
Binary file (1.28 kB). View file
|
|
|
data/validation.lance/data/011101111001101110100100469a9c46f599837cb71ece4f95.lance
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:288f878565ffcdd1702ea063bd327453a020958e0a97df0de4a5ae8770980b07
|
| 3 |
+
size 435187795
|