license: apache-2.0
task_categories:
- image-classification
- zero-shot-image-classification
language:
- bg
- cs
- el
- hr
- hu
- pl
- ro
- sk
tags:
- e-commerce
- duplicate-detection
- entity-resolution
- multimodal
size_categories:
- 1M<n<10M
configs:
- config_name: images
default: true
data_files:
- split: train
path: images/shard-*.parquet
- config_name: items
data_files:
- split: train
path: items_train.csv
- split: test
path: items_test.csv
- config_name: splits
data_files:
- split: train
path: train_split.csv
- split: validation
path: val_split.csv
- config_name: groups
data_files:
- split: g5
path: groups_5.csv
- split: g6
path: groups_6.csv
- split: g7
path: groups_7.csv
- split: g8
path: groups_8.csv
- split: g9
path: groups_9.csv
- split: g10
path: groups_10.csv
- split: hard_5
path: groups_hard_5.csv
- split: category_5
path: groups_category_5.csv
GLAMI Duplication Detection
Product-duplicate detection over GLAMI e-commerce listings: ~1.3M product images plus multilingual titles, descriptions and attributes, with labelled groups of items that do or do not refer to the same physical product.
Released under the Apache License 2.0 — see LICENSE.
TODO: describe how the labels were produced.
Structure
| Config | Files | Contents |
|---|---|---|
images |
images/shard-*.parquet |
itemId → image bytes, one row per product image |
items |
items_train.csv, items_test.csv |
itemId, price, colorTagIdsString, departmentIds, brandEditionTagId, title, description, geo, and label on train |
splits |
train_split.csv, val_split.csv |
train/validation partition of the training items |
groups |
groups_*.csv |
item1..itemN, label — candidate groups of 5–10 items, plus hard_ and category_ adversarial variants |
Images are keyed by itemId alone and are not pre-split. Every other file
references itemId, so all of them join against the same image table and no
picture is stored twice.
Usage
from datasets import load_dataset
images = load_dataset("zidcenek/GLAMI-Entity-Matching-Dataset", "images", split="train")
items = load_dataset("zidcenek/GLAMI-Entity-Matching-Dataset", "items", split="train")
groups = load_dataset("zidcenek/GLAMI-Entity-Matching-Dataset", "groups", split="g5")
images[0]["image"] # PIL.Image, decoded lazily
images[0]["itemId"]
The image config is ~TODO GB, so stream it if you do not want a full local copy:
images = load_dataset(
"zidcenek/GLAMI-Entity-Matching-Dataset", "images", split="train", streaming=True
)
To attach images to items, build the itemId → row-index map once and index into it:
index = {item_id: i for i, item_id in enumerate(images["itemId"])}
row = images[index[items[0]["itemId"]]]
Reproducing the image shards
pip install -U datasets Pillow "huggingface_hub[hf_xet]"
python scripts/build_image_shards.py --inspect # check the filename -> itemId mapping
python scripts/build_image_shards.py # glami_images.tar.gz -> images/shard-*.parquet
hf auth login
python scripts/upload_to_hub.py # push to the Hub over HTTP
Both scripts are resumable: rerun the same command after an interruption. See the header of each for the full options.
Citation
TODO