Dataset Viewer (First 5GB)
Auto-converted to Parquet Duplicate
image_path
string
caption
string
NSFW
string
similarity
float64
LICENSE
string
url
string
key
string
status
string
error_message
null
width
int64
height
int64
original_width
int64
original_height
int64
exif
string
md5
string
img_emb
list
image
image
path_dup
string
185120566
Statistics on challenges for automation in 2021
UNLIKELY
0.301743
?
https://verloop.io/wp-co…2/Challenges.jpg
185120566
success
null
701
299
701
299
{}
ec9606053a369e0961dc016eafddb562
[ 0.026458740234375, -0.032318115234375, -0.0032863616943359375, 0.004337310791015625, 0.00960540771484375, 0.003627777099609375, -0.01230621337890625, 0.011627197265625, -0.0308837890625, -0.010467529296875, -0.0201263427734375, 0.004291534423828125, -0.00109100341796875, -0.002901077270507...
185120566
185120575
Teacher Gifts / Great gifts for your child's teacher. Don't know what to get? Take a look at these gifts that the teacher in your life will love!
UNLIKELY
0.336206
?
https://i.pinimg.com/cus…7_1487893945.jpg
185120575
success
null
216
111
216
111
{}
410f7d76c9360d1c9af0d50573e8fb68
[ -0.036407470703125, -0.025604248046875, 0.00732421875, 0.04046630859375, 0.0018062591552734375, -0.0018205642700195312, -0.0033588409423828125, 0.0250701904296875, -0.035308837890625, -0.01264190673828125, 0.011383056640625, -0.020843505859375, 0.0191650390625, 0.042816162109375, 0.00734...
185120575
185120587
Safavieh Courtyard Cy6923 26 Power Loomed Rug
UNLIKELY
0.320005
?
https://cdn.shopify.com/…jpg?v=1579901018
185120587
success
null
160
160
160
160
{"Image Orientation": "Horizontal (normal)", "Image XResolution": "300", "Image YResolution": "300", "Image ResolutionUnit": "Pixels/Inch", "Image YCbCrPositioning": "Centered", "Image ExifOffset": "102", "EXIF ExifVersion": "0210", "EXIF ComponentsConfiguration": "YCbCr", "EXIF FlashPixVersion": "0100", "EXIF ColorSpace": "Uncalibrated", "EXIF ExifImageWidth": "160", "EXIF ExifImageLength": "160"}
b8f6d71d3db1b7856e6d7f0fb184949c
[ -0.05224609375, 0.0133209228515625, -0.0182037353515625, -0.01018524169921875, 0.045440673828125, -0.0260162353515625, 0.0158233642578125, -0.0284881591796875, -0.0268707275390625, -0.034637451171875, -0.02679443359375, -0.01044464111328125, -0.01001739501953125, -0.0540771484375, -0.038...
185120587
185120578
Memorial from flowers set up on Boylston Street in Boston, USA Stock Photo
UNLIKELY
0.313025
?
https://thumbs.dreamstim…led-30766420.jpg
185120578
success
null
240
160
240
160
{"Image XResolution": "300", "Image YResolution": "300", "Image ResolutionUnit": "Pixels/Inch", "Image YCbCrPositioning": "Centered", "Image Copyright": "(c) Fmua | Dreamstime.com", "Image XPTitle": "[104, 0, 116, 0, 116, 0, 112, 0, 58, 0, 47, 0, 47, 0, 119, 0, 119, 0, 119, 0, ... ]"}
0fc56a3912eef6f6e39c935779a8149c
[ -0.029266357421875, 0.07659912109375, 0.01030731201171875, 0.09527587890625, -0.00811004638671875, -0.021270751953125, -0.0280914306640625, -0.0189056396484375, -0.001007080078125, 0.050048828125, 0.0321044921875, -0.0221099853515625, -0.0016660690307617188, 0.024078369140625, -0.0251464...
185120578
185120581
Treacy Lowe Indian Silk Chiffon Black & Purple Floral Embroidered Dress, 1970s
UNLIKELY
0.314395
?
https://a.1stdibscdn.com…treacylowe_s.jpg
185120581
success
null
240
240
240
240
{}
aadfb2eb78f0d65992bf32d5c6f4e79a
[ 0.08489990234375, -0.03656005859375, -0.04901123046875, 0.0207366943359375, -0.02392578125, 0.002468109130859375, 0.0184326171875, 0.013580322265625, 0.0762939453125, -0.01424407958984375, -0.0196075439453125, -0.047149658203125, 0.0211181640625, -0.033294677734375, 0.007450103759765625,...
185120581
185120505
Mali 2011 Butterflies #2 perf sheetlet containing 4 values unmounted mint. Note this item is privately produced and is offered purely on its thematic appeal
UNLIKELY
0.326235
?
https://www.avionstamps.…cts/101612_1.jpg
185120505
success
null
435
384
825
729
{}
9baeab0d525ae432b7d1e04ed98aa4ef
[ 0.005519866943359375, 0.026092529296875, -0.01544952392578125, 0.0193328857421875, -0.0085906982421875, 0.023651123046875, 0.01239776611328125, 0.0291748046875, -0.03228759765625, -0.0148162841796875, 0.0225982666015625, -0.06951904296875, -0.0227203369140625, 0.030120849609375, 0.013641...
185120505
185120572
wedding-cake-atlanta
UNLIKELY
0.307268
?
https://images.squarespace-cdn.com/content/55f0afc1e4b0ee42a62141d6/1501044515987-FJ6XM935R5RB0C7AYQMA/wedding-cake-atlanta?format=1000w&content-type=image%2Fjpeg
185120572
success
null
384
576
1,000
1,500
{}
2a5704551ce2893bdbbc8c665a2780de
[ -0.017303466796875, 0.0242919921875, -0.007556915283203125, -0.00594329833984375, -0.0007824897766113281, -0.0161285400390625, -0.01012420654296875, 0.0002313852310180664, -0.0290985107421875, 0.038604736328125, 0.037109375, -0.019073486328125, 0.04498291015625, 0.0682373046875, -0.00097...
185120572
185120588
"Guardhouse Double Row Standard Slab Box - 12"" Slab & Krown Regular Duty Long Chipboard Box Guardhouse Double Row Green, Guardhouse, GH-12x5 3/4x3"
UNLIKELY
0.320393
?
https://storage.googleap…uctPics/3736.png
185120588
success
null
300
360
300
360
{}
bff36fc78ab6bf05957111c5092c344d
[ -0.0050201416015625, 0.0914306640625, 0.01543426513671875, -0.083984375, 0.0079803466796875, 0.0052947998046875, 0.06842041015625, 0.02301025390625, 0.03271484375, 0.025390625, 0.031341552734375, 0.0330810546875, 0.05438232421875, -0.01268768310546875, -0.0068206787109375, 0.0039825439...
185120588
185120570
table lamp lighting line icon for web vector image
UNLIKELY
0.301689
?
https://cdn3.vectorstock…tor-20762422.jpg
185120570
success
null
238
250
238
250
{}
3ca36b614511256d683b16537a91245f
[ -0.00812530517578125, 0.054229736328125, 0.00843048095703125, -0.0264739990234375, -0.00032830238342285156, 0.019744873046875, -0.00847625732421875, 0.0119171142578125, -0.06866455078125, 0.018646240234375, 0.009124755859375, -0.029937744140625, 0.04217529296875, 0.0012712478637695312, -...
185120570
185120576
Bricks Recycled Price Per 1000. Delivery Available. Paving & Feature Ashfield Ashfield Area Preview
UNLIKELY
0.309791
?
https://i.ebayimg.com/00…XRXZeyj/$_90.JPG
185120576
success
null
220
165
220
165
{}
78eff6176e50592797322febcd916b14
[ -0.052734375, 0.015594482421875, 0.00839996337890625, 0.0277862548828125, 0.03826904296875, -0.028900146484375, -0.0088348388671875, -0.019561767578125, 0.00902557373046875, -0.0014448165893554688, -0.040069580078125, -0.0129241943359375, -0.04376220703125, 0.00786590576171875, -0.012237...
185120576
208260010
Big mouth gulper angler fish pencil drawing
UNLIKELY
0.320322
?
http://rlv.zcache.com.au/big_mouth_gulper_angler_fish_pencil_drawing-r30957d8eb0344b009e46fccb3eaedca7_vgbaq_8byvr_324.jpg
208260010
success
null
324
324
324
324
{"Image ExifOffset": "22"}
a330883940bcc4fa7a614c4e2472b068
[ -0.0007557868957519531, -0.0019464492797851562, -0.01145172119140625, -0.00936126708984375, 0.006450653076171875, 0.0228424072265625, 0.006053924560546875, 0.01104736328125, 0.01517486572265625, 0.058074951171875, 0.0188140869140625, -0.04608154296875, -0.048126220703125, 0.01763916015625,...
208260010
208260015
"Freewing Seagull 4-in-1 Prop and EDF 1400mm (55"") Wingspan - PNP FG20113P"
UNLIKELY
0.310703
?
https://cdn.shopify.com/…jpg?v=1556022379
208260015
success
null
576
384
1,020
680
{"Image HostComputer": "imagery4"}
29440cee0bcd10f51c7c32592ffbb5e3
[ -0.0478515625, 0.0419921875, 0.01302337646484375, -0.053436279296875, 0.03253173828125, 0.0313720703125, -0.014892578125, -0.01617431640625, -0.044830322265625, -0.0207977294921875, -0.055755615234375, -0.035186767578125, 0.035675048828125, -0.01000213623046875, 0.002361297607421875, -...
208260015
End of preview. Expand in Data Studio

LAION-Subset (Lance Format)

A Lance dataset of LAION image-text corpus (~1M rows) with inline JPEG bytes, CLIP embeddings (img_emb), and full metadata available directly from the Hub: hf://datasets/lance-format/laion-1m/data/train.lance.

Why Lance?

Lance is an open-source format designed for multimodal AI data, offering significant advantages over traditional formats for modern AI workloads.

  • Blazing Fast Random Access: Optimized for fetching scattered rows, making it ideal for random sampling, real-time ML serving, and interactive applications without performance degradation.
  • Native Multimodal Support: Store text, embeddings, and other data types together in a single file. Large binary objects are loaded lazily, and vectors are optimized for fast similarity search.
  • Efficient Data Evolution: Add new columns and backfill data without rewriting the entire dataset. This is perfect for evolving ML features, adding new embeddings, or introducing moderation tags over time.
  • Versatile Querying: Supports combining vector similarity search, full-text search, and SQL-style filtering in a single query, accelerated by on-disk indexes.

Quick Start

Load with datasets.load_dataset

import datasets

hf_ds = datasets.load_dataset(
    "lance-format/laion-1m",
    split="train",
    streaming=True
)
# Take first three rows and print captions
for row in hf_ds.take(3):
    print(row["caption"])

Load with Lance

Use Lance for ANN search, image export, and any operation that needs the vector index or binary blobs:

import lance

ds = lance.dataset("hf://datasets/lance-format/laion-1m/data/train.lance")
print(ds.count_rows())

Load with LanceDB

These tables can also be consumed by LanceDB, the multimodal lakehouse for AI (built on top of Lance). LanceDB provides several convenience APIs for search, index creation and data updates on top of the Lance format.

import lancedb

db = lancedb.connect("hf://datasets/lance-format/laion-subset/data")
tbl = db.open_table("train")
print(f"LanceDB table opened with {len(tbl)} image-text pairs")

⚠️ HuggingFace Streaming Note

You may hit rate limits on HuggingFace's free tier. For best performance and to avoid rate limits, pass a token for an account with a Pro, Teams or Enterprise subscription (which come with much higher rate limits), or download the dataset locally:

# Download once
huggingface-cli download lance-format/laion-1m --repo-type dataset --local-dir ./laion`

# Then load locally
ds = lance.dataset("./laion")

Streaming is recommended only for quick exploration and testing.

Inspecting Existing Indices

This dataset comes with a built in vector (IVF) index for image embeddings. You can inspect the prebuilt indices on the dataset:

import lance

dataset = lance.dataset("hf://datasets/lance-format/laion-1m/data/train.lance")

# List all indices
indices = dataset.list_indices()
print(indices)

Create New Index

While this dataset comes with pre-built indices, you can also create your own custom indices if needed. For example:

# ds is a local Lance dataset
ds.create_index(
    "img_emb",
    index_type="IVF_PQ",
    num_partitions=256,
    num_sub_vectors=96,
    replace=True,
)
# ds is a local Lance dataset
ds.create_fts_index("caption")

Native Support for Multimodal Data

from pathlib import Path

rows = lance_ds.take([0, 1], columns=["image", "caption"]).to_pylist()
for idx, row in enumerate(rows):
    Path("samples").mkdir(exist_ok=True)
    with open(f"samples/{idx}.jpg", "wb") as f:
        f.write(row["image"])

In Lance, images are stored inline as binary columns (regular Lance binary, not the special blob handle used in OpenVid). They behave like any other column—scan captions without touching image, then take() when you want the bytes.

Usage Examples

1. Browse metadata

scanner = ds.scanner(columns=["caption", "url", "similarity"], limit=5)
for row in scanner.to_table().to_pylist():
    print(row)

2. Export images

rows = ds.take(range(3), columns=["image", "caption"]).to_pylist()
for i, row in enumerate(rows):
    with open(f"sample_{i}.jpg", "wb") as f:
        f.write(row["image"])

3. Vector similarity search

emb_field = ds.schema.field("img_emb")
ref = ds.take([123], columns=["img_emb"]).to_pylist()[0]
query = pa.array([ref["img_emb"]], type=emb_field.type)

neighbors = ds.scanner(
    nearest={
        "column": emb_field.name,
        "q": query[0],
        "k": 6,
        "nprobes": 16,
        "refine_factor": 30,
    },
    columns=["caption", "url", "similarity"],
).to_table().to_pylist()

Dataset Evolution

Lance supports flexible schema and data evolution (docs). You can add/drop columns, backfill with SQL or Python, rename fields, or change data types without rewriting the whole dataset. In practice this lets you:

  • Introduce fresh metadata (moderation labels, embeddings, quality scores) as new signals become available.
  • Add new columns to existing datasets without re-exporting terabytes of video.
  • Adjust column names or shrink storage (e.g., cast embeddings to float16) while keeping previous snapshots queryable for reproducibility.
import lance
import pyarrow as pa
import numpy as np

# Assumes you ran the export to Lance example above to store a local subset of the data
# ds = lance.dataset("./laion_1m_local")

# 1. Add a schema-only column (data to be added later)
dataset.add_columns(pa.field("moderation_label", pa.string()))

# 2. Add a column with data backfill using a SQL expression
dataset.add_columns(
    {
        "moderation_label": "case WHEN \"NSFW\" > 0.5 THEN 'review' ELSE 'ok' END"
    }
)

# 3. Generate rich columns via Python batch UDFs
@lance.batch_udf()
def random_embedding(batch):
    arr = np.random.rand(batch.num_rows, 128).astype("float32")
    return pa.RecordBatch.from_arrays(
        [pa.FixedSizeListArray.from_arrays(arr.ravel(), 128)],
        names=["embedding"],
    )

dataset.add_columns(random_embedding)

# 4. Bring in offline annotations with merge
labels = pa.table({
    "id": pa.array([1, 2, 3]),
    "label": pa.array(["horse", "rabbit", "cat"]),
})
dataset.merge(labels, "id")

# 5. Rename or cast columns as needs change
dataset.alter_columns({"path": "quality_bucket", "name": "quality_tier"})
dataset.alter_columns({"path": "embedding", "data_type": pa.list_(pa.float16(), 128)})

These operations are automatically versioned, so prior experiments can still point to earlier versions while the dataset keeps evolving.

LanceDB

LanceDB users can follow the following examples to run search queries on the dataset.

LanceDB Vector Similarity Search

import lancedb

# In LanceDB, you open a database, then a table
db = lancedb.connect("hf://datasets/lance-format/laion-1m/data")
tbl = db.open_table("train")
query_embedding = list(range(768))

results = tbl.search(query_embedding, vector_column_name="img_emb") \
    .limit(5) \
    .to_list()

LanceDB Full-Text Search

import lancedb

# In LanceDB, you open a database, then a table
db = lancedb.connect("hf://datasets/lance-format/laion-1m/data")
tbl = db.open_table("train")

results = tbl.search("dog running") \
    .select(["caption", "url", "similarity"]) \
    .limit(10) \
    .to_list()

Citation

@article{schuhmann2022laion5b,
  title={LAION-5B: An open large-scale dataset for training next generation image-text models},
  author={Schuhmann, Christoph and others},
  journal={NeurIPS Datasets and Benchmarks Track},
  year={2022}
}

License

Content inherits LAION’s original licensing and safety guidelines. Review LAION policy before downstream use.

Downloads last month
78