brettrenfer's picture
Update dataset card
cc1a5ac verified
metadata
license: cc0-1.0
pretty_name: The Met Open Access  openclip-vitg14 embeddings
tags:
  - art
  - museum
  - embeddings
  - openclip-vitg14
configs:
  - config_name: default
    data_files:
      - split: train
        path: default/train/openclip-vitg14-*.parquet

metmuseum/openaccess-embeddings-openclip-vitg14

Image embeddings for every public-domain artwork in metmuseum/openaccess, produced by laion/CLIP-ViT-bigG-14-laion2B-s39B-b160K.

Column Type Notes
objectID int64 Primary key — matches objectID in metmuseum/openaccess
embedding list<float32> L2-normalised, dim = 1280
model string Source model id
dim int32 Embedding dimension

Image bytes are not stored here; join against the main dataset to recover them.

Embedding spec: dim=1280, expected image size=224px.

Joining with the main dataset

from datasets import load_dataset

meta = load_dataset("metmuseum/openaccess", split="train")
emb  = load_dataset("metmuseum/openaccess-embeddings-openclip-vitg14", split="train")

# Build an objectID -> embedding lookup, then attach to the metadata rows.
lookup = {r["objectID"]: r["embedding"] for r in emb}
joined = meta.map(lambda r: {"embedding": lookup.get(r["objectID"])})
print(joined[0].keys())

Nearest-neighbour example

import numpy as np
from datasets import load_dataset

emb = load_dataset("metmuseum/openaccess-embeddings-openclip-vitg14", split="train")
ids = np.array(emb["objectID"])
mat = np.array(emb["embedding"], dtype=np.float32)  # already L2-normalised

query = mat[0]
scores = mat @ query
top = np.argsort(-scores)[:10]
print(list(zip(ids[top].tolist(), scores[top].tolist())))

Generated by et-openaccess-embeddings.