id int64 0 48.4k | image imagewidth (px) 72 640 | image_id int64 9 241k | width int32 72 640 | height int32 51 640 | bboxes listlengths 1 93 | categories listlengths 1 93 | category_names listlengths 1 93 | areas listlengths 1 93 | num_objects int32 1 93 | categories_present listlengths 1 16 | image_emb list |
|---|---|---|---|---|---|---|---|---|---|---|---|
0 | 9 | 640 | 480 | [
[
1.0800000429153442,
187.69000244140625,
612.6699829101562,
473.5299987792969
],
[
311.7300109863281,
4.309999942779541,
631.010009765625,
232.99000549316406
],
[
249.60000610351562,
229.27000427246094,
565.8400268554688,
474.3500061035156
],
[
0,
... | [
45,
45,
50,
45,
49,
49,
49,
49
] | [
"bowl",
"bowl",
"broccoli",
"bowl",
"orange",
"orange",
"orange",
"orange"
] | [
120057.140625,
44434.75,
49577.9453125,
24292.78125,
2239.29248046875,
1658.891357421875,
3609.302978515625,
2975.27587890625
] | 8 | [
"bowl",
"broccoli",
"orange"
] | [
-0.0625,
0.140869140625,
0.0208282470703125,
0.038116455078125,
-0.03326416015625,
-0.004444122314453125,
-0.017120361328125,
0.006313323974609375,
0.01480865478515625,
0.0023288726806640625,
-0.04595947265625,
-0.0273895263671875,
-0.05126953125,
0.00803375244140625,
-0.0155792236328125... | |
1 | 25 | 640 | 426 | [
[
385.5299987792969,
60.029998779296875,
600.5,
357.19000244140625
],
[
53.0099983215332,
356.489990234375,
185.0399932861328,
411.67999267578125
]
] | [
23,
23
] | [
"giraffe",
"giraffe"
] | [
19686.59765625,
2785.84765625
] | 2 | [
"giraffe"
] | [
-0.01213836669921875,
0.156982421875,
-0.09014892578125,
-0.0345458984375,
-0.007358551025390625,
0.00923919677734375,
0.0170440673828125,
0.0006351470947265625,
0.0462646484375,
0.061248779296875,
0.040985107421875,
0.01438140869140625,
0.037506103515625,
-0.029510498046875,
0.054534912... | |
2 | 30 | 640 | 428 | [
[
204.86000061035156,
31.020000457763672,
459.739990234375,
355.1400146484375
],
[
237.55999755859375,
155.80999755859375,
403.9599914550781,
351.05999755859375
]
] | [
58,
75
] | [
"potted plant",
"vase"
] | [
47675.6640625,
16202.7978515625
] | 2 | [
"potted plant",
"vase"
] | [
0.06976318359375,
0.20068359375,
-0.0919189453125,
0.0096435546875,
0.01235198974609375,
0.010009765625,
0.0338134765625,
0.0179443359375,
0.03485107421875,
0.0506591796875,
-0.0048675537109375,
-0.026123046875,
0.028289794921875,
0.06744384765625,
-0.059417724609375,
-0.01988220214843... | |
3 | 34 | 640 | 425 | [
[
0.9599999785423279,
20.059999465942383,
442.19000244140625,
399.2099914550781
]
] | [
22
] | [
"zebra"
] | [
92920.15625
] | 1 | [
"zebra"
] | [
-0.020660400390625,
0.1651611328125,
-0.12152099609375,
-0.0240478515625,
-0.037994384765625,
0.0120849609375,
0.035369873046875,
0.0246124267578125,
0.0239410400390625,
0.07373046875,
0.01512908935546875,
0.0229339599609375,
0.042755126953125,
-0.041412353515625,
0.01010894775390625,
... | |
4 | 36 | 481 | 640 | [
[
0,
50.119998931884766,
457.67999267578125,
480.4700012207031
],
[
167.5800018310547,
162.88999938964844,
478.19000244140625,
628.0800170898438
]
] | [
25,
0
] | [
"umbrella",
"person"
] | [
97486.8046875,
86145.296875
] | 2 | [
"person",
"umbrella"
] | [
0.0750732421875,
0.142578125,
-0.084228515625,
-0.1041259765625,
0.006244659423828125,
-0.0098114013671875,
0.055206298828125,
0.01483917236328125,
-0.033538818359375,
0.056182861328125,
-0.005413055419921875,
-0.048370361328125,
0.00604248046875,
-0.0645751953125,
-0.023284912109375,
... | |
5 | 42 | 640 | 478 | [
[
214.14999389648438,
41.290000915527344,
562.4099731445312,
285.07000732421875
]
] | [
16
] | [
"dog"
] | [
53481.51171875
] | 1 | [
"dog"
] | [
-0.00536346435546875,
0.0252838134765625,
0.01306915283203125,
-0.056793212890625,
0.03521728515625,
-0.01751708984375,
0.06732177734375,
0.047515869140625,
0.01096343994140625,
0.0297088623046875,
-0.016510009765625,
-0.0297698974609375,
0.0111083984375,
0.024810791015625,
0.00377082824... | |
6 | 49 | 381 | 500 | [
[
162.57000732421875,
226.55999755859375,
292.9800109863281,
410.989990234375
],
[
81.69999694824219,
244.94000244140625,
165.41000366210938,
403.1400146484375
],
[
203.38999938964844,
260.42999267578125,
269.0799865722656,
333.4700012207031
],
[
118.4... | [
17,
17,
0,
0,
0,
58,
0,
0,
0
] | [
"horse",
"horse",
"person",
"person",
"person",
"potted plant",
"person",
"person",
"person"
] | [
8451.2236328125,
5295.95751953125,
1754.8175048828125,
1349.9822998046875,
250.8199005126953,
2736.25537109375,
162.90005493164062,
90.16190338134766,
83.6895523071289
] | 9 | [
"horse",
"person",
"potted plant"
] | [
0.0192718505859375,
0.10101318359375,
-0.10467529296875,
0.037811279296875,
-0.0164947509765625,
0.01120758056640625,
0.02490234375,
0.03961181640625,
-0.00257110595703125,
0.0596923828125,
-0.05029296875,
0.019927978515625,
0.052947998046875,
0.00002658367156982422,
-0.045166015625,
-... | |
7 | 61 | 640 | 488 | [
[
261.20001220703125,
205.9199981689453,
309.2799987792969,
263.1600036621094
],
[
393.3900146484375,
210.33999633789062,
425.9200134277344,
250.0800018310547
],
[
370.1099853515625,
248.89999389648438,
453.20001220703125,
296.5400085449219
],
[
223.25... | [
0,
0,
20,
20,
0
] | [
"person",
"person",
"elephant",
"elephant",
"person"
] | [
914.361328125,
531.7515258789062,
3086.66357421875,
5214.435546875,
546.5148315429688
] | 5 | [
"elephant",
"person"
] | [
-0.03564453125,
0.04083251953125,
-0.07196044921875,
0.09808349609375,
0.031707763671875,
-0.0285797119140625,
0.0011758804321289062,
-0.01483154296875,
0.043670654296875,
-0.0211944580078125,
-0.021392822265625,
-0.0184173583984375,
0.0096282958984375,
0.0210723876953125,
-0.01216125488... | |
8 | 64 | 480 | 640 | [
[
52.36000061035156,
387.7699890136719,
228.72000122070312,
545.3900146484375
],
[
52.63999938964844,
353.7799987792969,
177.22000122070312,
413.25
],
[
115.83999633789062,
226.58999633789062,
152.86000061035156,
301.760009765625
],
[
112.0400009155273... | [
2,
7,
11,
74
] | [
"car",
"truck",
"stop sign",
"clock"
] | [
15185.1796875,
3406.182373046875,
2151.35400390625,
17624.40234375
] | 4 | [
"car",
"clock",
"stop sign",
"truck"
] | [
0.0765380859375,
0.0877685546875,
-0.062286376953125,
0.048797607421875,
-0.006053924560546875,
-0.0218353271484375,
-0.022735595703125,
0.032440185546875,
-0.0037631988525390625,
0.0164337158203125,
0.041229248046875,
0.0252532958984375,
-0.0214080810546875,
0.040435791015625,
0.0402526... | |
9 | 71 | 640 | 426 | [
[
467.82000732421875,
216.92999267578125,
495.57000732421875,
231.0800018310547
],
[
522.6900024414062,
223.39999389648438,
547.0399780273438,
235.39999389648438
],
[
436.8999938964844,
217.8300018310547,
460.2200012207031,
226.4499969482422
],
[
586.3... | [
2,
2,
2,
2,
6,
2,
2,
7,
7,
2,
2,
2,
2,
2,
2,
2
] | [
"car",
"car",
"car",
"car",
"train",
"car",
"car",
"truck",
"truck",
"car",
"car",
"car",
"car",
"car",
"car",
"car"
] | [
161.82940673828125,
205.83944702148438,
141.6260986328125,
274.7764892578125,
19503.666015625,
216.00155639648438,
67.95549774169922,
176.30455017089844,
127.83159637451172,
224.21180725097656,
207.67474365234375,
26.063199996948242,
124.19039916992188,
80.27144622802734,
73.070098876953... | 16 | [
"car",
"train",
"truck"
] | [
0.0015354156494140625,
-0.09783935546875,
-0.10943603515625,
-0.040771484375,
0.002872467041015625,
0.025390625,
-0.005542755126953125,
-0.01178741455078125,
0.05230712890625,
-0.0259857177734375,
-0.01207733154296875,
-0.06463623046875,
0.0184173583984375,
-0.02960205078125,
-0.00386047... | |
10 | 72 | 427 | 640 | [
[
136.6300048828125,
129.44000244140625,
425.7099914550781,
628.489990234375
],
[
50.45000076293945,
72.06999969482422,
283.9599914550781,
640
]
] | [
23,
23
] | [
"giraffe",
"giraffe"
] | [
80168.796875,
41879.1953125
] | 2 | [
"giraffe"
] | [
0.00036835670471191406,
0.1337890625,
-0.06597900390625,
-0.0084228515625,
0.00974273681640625,
-0.0207977294921875,
-0.0005307197570800781,
0.021575927734375,
0.0438232421875,
0.046630859375,
0.01824951171875,
-0.003620147705078125,
0.0208740234375,
-0.05609130859375,
0.035675048828125,... | |
11 | 73 | 565 | 640 | [
[
13,
22.75,
548.97998046875,
632.4199829101562
],
[
1.659999966621399,
3.319999933242798,
270.260009765625,
275.2300109863281
]
] | [
3,
3
] | [
"motorcycle",
"motorcycle"
] | [
172022.4375,
52666.33984375
] | 2 | [
"motorcycle"
] | [
0.00977325439453125,
0.04150390625,
-0.044158935546875,
-0.0177764892578125,
0.049224853515625,
-0.01885986328125,
-0.01343536376953125,
0.03460693359375,
0.0312042236328125,
0.043975830078125,
-0.009552001953125,
0.0411376953125,
0.042236328125,
-0.02508544921875,
0.003978729248046875,
... | |
12 | 74 | 640 | 426 | [
[
61.869998931884766,
276.25,
358.2900085449219,
379.42999267578125
],
[
2.75,
3.6600000858306885,
162.14999389648438,
316.05999755859375
],
[
295.54998779296875,
93.95999908447266,
313.9700012207031,
152.7899932861328
],
[
326.94000244140625,
97.0... | [
16,
1,
0,
0,
0,
0,
0,
0
] | [
"dog",
"bicycle",
"person",
"person",
"person",
"person",
"person",
"person"
] | [
18234.623046875,
30078.494140625,
638.7158203125,
180.86094665527344,
562.1028442382812,
758.616943359375,
319.6597900390625,
131.11439514160156
] | 8 | [
"bicycle",
"dog",
"person"
] | [
0.0108642578125,
0.1646728515625,
-0.1318359375,
0.032867431640625,
0.00041413307189941406,
0.052825927734375,
-0.012115478515625,
0.006000518798828125,
-0.033294677734375,
0.0201568603515625,
0.06805419921875,
-0.0239105224609375,
-0.023712158203125,
-0.046539306640625,
0.03994750976562... | |
13 | 77 | 500 | 375 | [
[
216.0399932861328,
56.310001373291016,
319.489990234375,
175.24000549316406
],
[
320.7300109863281,
53.72999954223633,
415.3599853515625,
151.00999450683594
],
[
41.54999923706055,
320.3399963378906,
92.08999633789062,
344.5799865722656
],
[
236.6300... | [
0,
0,
36,
36,
0,
0,
36,
0
] | [
"person",
"person",
"skateboard",
"skateboard",
"person",
"person",
"skateboard",
"person"
] | [
3733.542724609375,
2735.84375,
379.45733642578125,
174.3225555419922,
8154.572265625,
631.9514770507812,
151.0251007080078,
656.7854614257812
] | 8 | [
"person",
"skateboard"
] | [
-0.036102294921875,
0.052703857421875,
-0.0947265625,
0.10980224609375,
0.004505157470703125,
0.0135040283203125,
0.033233642578125,
-0.031707763671875,
-0.02728271484375,
-0.0384521484375,
0.0266876220703125,
-0.0164337158203125,
-0.0012912750244140625,
-0.0263824462890625,
-0.012580871... | |
14 | 78 | 612 | 612 | [
[
359.79998779296875,
2.069999933242798,
573.9299926757812,
237.97999572753906
]
] | [
74
] | [
"clock"
] | [
36828.0625
] | 1 | [
"clock"
] | [
0.03204345703125,
0.254150390625,
-0.06005859375,
0.06951904296875,
0.0012073516845703125,
0.044097900390625,
-0.021453857421875,
-0.01515960693359375,
0.01009368896484375,
0.06475830078125,
-0.00560760498046875,
0.00894927978515625,
-0.03094482421875,
-0.0035552978515625,
0.012886047363... | |
15 | 81 | 640 | 425 | [
[
38.54999923706055,
40.47999954223633,
622.5599975585938,
358.5
]
] | [
4
] | [
"airplane"
] | [
65010.4375
] | 1 | [
"airplane"
] | [
-0.0606689453125,
-0.20654296875,
-0.07769775390625,
-0.01329803466796875,
-0.036712646484375,
-0.0499267578125,
-0.05926513671875,
-0.01336669921875,
-0.0255889892578125,
0.047515869140625,
-0.046142578125,
-0.0257720947265625,
-0.004291534423828125,
0.052581787109375,
0.047943115234375... | |
16 | 86 | 512 | 640 | [
[
152.11000061035156,
183.10000610351562,
281.260009765625,
559.0700073242188
],
[
130.13999938964844,
346.5199890136719,
424.3999938964844,
635.1599731445312
],
[
265.1000061035156,
294.5899963378906,
399.70001220703125,
404.7699890136719
]
] | [
0,
3,
26
] | [
"person",
"motorcycle",
"handbag"
] | [
24441.5703125,
43566.796875,
11227.02734375
] | 3 | [
"handbag",
"motorcycle",
"person"
] | [
0.004459381103515625,
0.09893798828125,
-0.092529296875,
0.00650787353515625,
0.056793212890625,
0.01181793212890625,
0.01277923583984375,
-0.032562255859375,
-0.026824951171875,
0.0113677978515625,
-0.04510498046875,
0.036529541015625,
0.04156494140625,
0.0034637451171875,
-0.0254974365... | |
17 | 89 | 640 | 480 | [
[
502.6000061035156,
105.47000122070312,
528.4299926757812,
237.85000610351562
],
[
476.6199951171875,
127.48999786376953,
496.3399963378906,
233.60000610351562
],
[
528.7999877929688,
99.30000305175781,
555.27001953125,
237.19000244140625
],
[
555.669... | [
43,
43,
43,
43,
43,
69,
68,
73,
73,
73
] | [
"knife",
"knife",
"knife",
"knife",
"knife",
"oven",
"microwave",
"book",
"book",
"book"
] | [
2101.468994140625,
1167.2392578125,
2028.3297119140625,
1312.2186279296875,
1422.6409912109375,
77283.171875,
14312.041015625,
1889.6090087890625,
1485.163330078125,
2664.3046875
] | 10 | [
"book",
"knife",
"microwave",
"oven"
] | [
-0.023956298828125,
0.034332275390625,
0.035430908203125,
0.035980224609375,
-0.0305938720703125,
-0.01629638671875,
-0.046539306640625,
-0.0011606216430664062,
0.01261138916015625,
0.031494140625,
-0.0116119384765625,
-0.0216064453125,
0.013214111328125,
-0.057525634765625,
0.0108489990... | |
18 | 92 | 640 | 427 | [
[
418.6499938964844,
118.5999984741211,
583.3300170898438,
427
],
[
125.69999694824219,
0.9599999785423279,
501.8399963378906,
293.6199951171875
]
] | [
42,
55
] | [
"fork",
"cake"
] | [
10475.5849609375,
80095.6796875
] | 2 | [
"cake",
"fork"
] | [
0.055908203125,
0.1746826171875,
0.0030002593994140625,
0.06121826171875,
-0.0036773681640625,
-0.041351318359375,
0.0030117034912109375,
-0.01971435546875,
-0.009246826171875,
0.0284271240234375,
-0.02532958984375,
0.027801513671875,
-0.0167236328125,
0.038330078125,
0.035186767578125,
... |
COCO 2017 Object Detection (Lance Format)
Lance-formatted version of the COCO 2017 object detection benchmark — sourced from detection-datasets/coco — with 123,287 images and the full per-image list of bounding boxes, category labels, and CLIP image embeddings, all stored inline.
Why this version?
Object detection datasets typically split images, annotations, and embeddings across multiple files (often three different formats: JPEG, JSON, NumPy). Lance keeps all of it in one tabular dataset:
- one row per image,
- the JPEG bytes, the bounding box list, the category labels, and the CLIP image embedding all live as columns on the same row,
IVF_PQon the embedding column lets you do visual similarity search without leaving the dataset, andLABEL_LISToncategories_presentlets you filter to "images containing a dog and a frisbee" in milliseconds.
Splits
| Split | Rows |
|---|---|
train.lance |
117,000+ |
val.lance |
4,950+ |
(Counts come from the detection-datasets/coco redistribution; box counts: ~860k train / ~37k val.)
Schema
| Column | Type | Notes |
|---|---|---|
id |
int64 |
Row index within split |
image |
large_binary |
Inline JPEG bytes |
image_id |
int64 |
COCO image id |
width, height |
int32 |
Image dimensions in pixels |
bboxes |
list<list<float32, 4>> |
Each box is [x_min, y_min, x_max, y_max] in absolute pixel coords |
categories |
list<int32> |
COCO 80-class id (0-79) |
category_names |
list<string> |
Human-readable class name per object (e.g. person, dog, …) |
areas |
list<float32> |
Bounding-box area (pixels²) |
num_objects |
int32 |
Number of annotated objects in the image |
categories_present |
list<string> |
Deduped class names — feeds the LABEL_LIST index for fast filtering |
image_emb |
fixed_size_list<float32, 512> |
OpenCLIP ViT-B-32 image embedding (cosine-normalized) |
Pre-built indices
IVF_PQonimage_emb—metric=cosineBTREEonimage_id,num_objectsLABEL_LISToncategories_present— supportsarray_has_any/array_has_allpredicates
Quick start
import lance
ds = lance.dataset("hf://datasets/lance-format/coco-detection-2017-lance/data/val.lance")
print(ds.count_rows(), ds.schema.names, ds.list_indices())
Tip — for production use, download locally first.
hf download lance-format/coco-detection-2017-lance --repo-type dataset --local-dir ./coco-detection-2017-lance
Read one annotated image
import io
import lance
from PIL import Image, ImageDraw
ds = lance.dataset("hf://datasets/lance-format/coco-detection-2017-lance/data/val.lance")
row = ds.take([0], columns=["image", "bboxes", "category_names", "width", "height"]).to_pylist()[0]
img = Image.open(io.BytesIO(row["image"])).convert("RGB")
draw = ImageDraw.Draw(img)
for (x1, y1, x2, y2), name in zip(row["bboxes"], row["category_names"]):
draw.rectangle([x1, y1, x2, y2], outline="red", width=3)
draw.text((x1 + 4, y1 + 4), name, fill="red")
img.save("annotated.jpg")
Filter by classes (LABEL_LIST index)
import lance
ds = lance.dataset("hf://datasets/lance-format/coco-detection-2017-lance/data/val.lance")
# Images that contain BOTH a person and a frisbee.
rows = ds.scanner(
filter="array_has_all(categories_present, ['person', 'frisbee'])",
columns=["image_id", "category_names"],
limit=10,
).to_table().to_pylist()
# Images with at least 5 objects of any class.
busy = ds.scanner(
filter="num_objects >= 5",
columns=["image_id", "num_objects"],
limit=10,
).to_table().to_pylist()
Visual similarity search
import lance
import pyarrow as pa
ds = lance.dataset("hf://datasets/lance-format/coco-detection-2017-lance/data/val.lance")
emb_field = ds.schema.field("image_emb")
ref = ds.take([0], columns=["image_emb"]).to_pylist()[0]["image_emb"]
query = pa.array([ref], type=emb_field.type)
neighbors = ds.scanner(
nearest={"column": "image_emb", "q": query[0], "k": 5},
columns=["image_id", "category_names"],
).to_table().to_pylist()
Why Lance?
- One dataset carries images + boxes + categories + areas + embeddings + indices — no JSON sidecars.
- On-disk vector and label-list indices live next to the data, so filters and ANN search work on local copies and on the Hub.
- Schema evolution: add columns (segmentation polygons, keypoints, panoptic ids, fresh embeddings) without rewriting the data.
Source & license
Converted from detection-datasets/coco. COCO annotations are released under CC BY 4.0; the underlying images are subject to Flickr terms of service. See the COCO Terms of Use before redistribution.
Citation
@inproceedings{lin2014microsoft,
title={Microsoft COCO: Common objects in context},
author={Lin, Tsung-Yi and Maire, Michael and Belongie, Serge and Hays, James and Perona, Pietro and Ramanan, Deva and Doll{\'a}r, Piotr and Zitnick, C Lawrence},
booktitle={European Conference on Computer Vision (ECCV)},
year={2014}
}
- Downloads last month
- 50