entitynet / README.md
gings's picture
Update README.md
54a3444 verified
|
Raw History Blame Contribute Delete
4.92 kB
metadata
license: mit
task_categories:
  - zero-shot-image-classification
  - image-classification
  - image-to-text
  - text-to-image
language:
  - en
size_categories:
  - 10M<n<100M
tags:
  - clip
  - vision-language
  - knowledge-graph
  - wikidata
  - image-text
  - biodiversity
  - species-recognition
  - fine-grained-classification
pretty_name: EntityNet

EntityNet

33M web images paired with 46M texts, harvested by querying image search with 135k visual entities from Wikidata.

EntityNet is the training set from Using Knowledge Graphs to Harvest Datasets for Efficient CLIP Model Training (GCPR 2025). Instead of scraping the web and filtering afterwards, we start from a knowledge graph: we extract visual entities and their attributes from Wikidata, turn them into search queries, and collect the returned images together with their alt texts.

Paper · Code · Project page · Models

Why use it

  • Compute-efficient CLIP training. CLIP models trained from scratch on EntityNet reach strong ImageNet and fine-grained results with a fraction of the compute of models trained on billion-scale web crawls.
  • Structured labels, not just alt text. Every image traces back to the Wikidata entity and query that found it. Mixing these entity labels with the alt texts during training works better than either alone.
  • Domain experts from a subset. A 10M-image subset of living organisms (animals, plants, fungi) trains a species-recognition model that outperforms BioCLIP (trained on the same order of data, TreeOfLife-10M) on the Rare Species benchmark.

What's covered

135k entities from 21 Wikidata super-categories:

product, substance, physical tool, animal, plant, material, vehicle, geographical feature, food, architectural structure, anatomical structure, facility, physical activity, clothing, building, musical instrument, organ, furniture, body of water, weather, precipitation

The full entity list with Wikidata IDs, attributes and parent relations is in entitynet-entities.parquet, and the generated search queries are in entitynet-queries.parquet.

Data format

This repository contains URLs and texts, not image files. Use the download scripts in the GitHub repo to fetch the images and build webdataset shards.

Split Rows
train 31.7M
validation 19.4k
test 19.3k

Each row is one unique (deduplicated) image:

Column Description
key Unique sample ID
qh Hashes of the search queries that returned this image (join with entitynet-queries.parquet)
texts Alt texts and page titles collected for the image
images_link Image URLs (several URLs can point to the same image)
images_contextlink URLs of the pages the image appeared on
images_width, images_height Image size per URL

Quickstart

Browse the metadata:

from datasets import load_dataset

ds = load_dataset("lmb-freiburg/entitynet", split="validation")
print(ds[0]["texts"], ds[0]["images_link"])

Download images and build training shards (see the GitHub README for setup):

python -m entitynet.cli.urlbuild_step1_metadata --splits val,test,train
python -m entitynet.cli.urlbuild_step2_images
python -m entitynet.cli.urlbuild_step3_tars

Or skip training and use a pretrained model with open_clip:

import open_clip
model, _, preprocess = open_clip.create_model_and_transforms("hf-hub:lmb-freiburg/CLIP-ViT-B-16-EntityNet-33M")

Limitations

  • Images come from the open web. URLs go stale over time, so a fresh download will recover fewer than 33M images.
  • Image copyright stays with the original owners. The MIT license covers our metadata and code, not the images.
  • Web images carry web biases: stock photos and product shots are over-represented, and artistic or sketch-style depictions are under-represented.

Citation

@inproceedings{ging2026entitynet,
  author    = {Simon Ging and Sebastian Walter and Jelena Bratuli{\'c} and Johannes Dienert and Hannah Bast and Thomas Brox},
  title     = {Using Knowledge Graphs to Harvest Datasets for Efficient {CLIP} Model Training},
  booktitle = {Pattern Recognition, 47th {DAGM} German Conference, {DAGM} {GCPR} 2025, Freiburg, Germany, September 23--26, 2025, Proceedings},
  series    = {Lecture Notes in Computer Science},
  publisher = {Springer Nature Switzerland},
  year      = {2026},
  pages     = {287--302},
  isbn      = {978-3-032-12840-9},
  doi       = {10.1007/978-3-032-12840-9_19}
}