gings commited on
Commit
54a3444
·
verified ·
1 Parent(s): 38f2cf6

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +92 -12
README.md CHANGED
@@ -1,33 +1,113 @@
1
  ---
2
  license: mit
 
 
 
 
 
3
  language:
4
  - en
5
- pretty_name: EntityNet
6
  size_categories:
7
  - 10M<n<100M
8
- task_categories:
9
- - image-to-text
10
- - text-to-image
11
- - image-classification
12
- - visual-question-answering
 
 
 
 
 
13
  ---
14
 
15
- # EntityNet: Using Knowledge Graphs to harvest datasets for efficient CLIP model training
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
16
 
17
- Dataloader and instructions can be found here: [https://github.com/lmb-freiburg/entitynet](https://github.com/lmb-freiburg/entitynet)
 
 
18
 
19
- If you use the dataset, code, or results, please cite:
20
 
21
  ```bibtex
22
- @inproceedings{ging2025entitynet,
23
  author = {Simon Ging and Sebastian Walter and Jelena Bratuli{\'c} and Johannes Dienert and Hannah Bast and Thomas Brox},
24
  title = {Using Knowledge Graphs to Harvest Datasets for Efficient {CLIP} Model Training},
25
  booktitle = {Pattern Recognition, 47th {DAGM} German Conference, {DAGM} {GCPR} 2025, Freiburg, Germany, September 23--26, 2025, Proceedings},
26
  series = {Lecture Notes in Computer Science},
27
  publisher = {Springer Nature Switzerland},
28
- year = {2025},
29
  pages = {287--302},
30
  isbn = {978-3-032-12840-9},
31
  doi = {10.1007/978-3-032-12840-9_19}
32
  }
33
- ```
 
1
  ---
2
  license: mit
3
+ task_categories:
4
+ - zero-shot-image-classification
5
+ - image-classification
6
+ - image-to-text
7
+ - text-to-image
8
  language:
9
  - en
 
10
  size_categories:
11
  - 10M<n<100M
12
+ tags:
13
+ - clip
14
+ - vision-language
15
+ - knowledge-graph
16
+ - wikidata
17
+ - image-text
18
+ - biodiversity
19
+ - species-recognition
20
+ - fine-grained-classification
21
+ pretty_name: EntityNet
22
  ---
23
 
24
+ # EntityNet
25
+
26
+ **33M web images paired with 46M texts, harvested by querying image search with 135k visual entities from Wikidata.**
27
+
28
+ 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.
29
+
30
+ [Paper](https://arxiv.org/abs/2505.02746) · [Code](https://github.com/lmb-freiburg/entitynet) · [Project page](https://entity-net.github.io) · [Models](https://huggingface.co/collections/lmb-freiburg/entitynet-6810b98ea9288fef9b6c09ca)
31
+
32
+ ## Why use it
33
+
34
+ - **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.
35
+ - **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.
36
+ - **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.
37
+
38
+ ## What's covered
39
+
40
+ 135k entities from 21 Wikidata super-categories:
41
+
42
+ 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
43
+
44
+ The full entity list with Wikidata IDs, attributes and parent relations is in [`entitynet-entities.parquet`](https://github.com/lmb-freiburg/entitynet/blob/main/entitynet-entities.parquet), and the generated search queries are in [`entitynet-queries.parquet`](https://github.com/lmb-freiburg/entitynet/blob/main/entitynet-queries.parquet).
45
+
46
+ ## Data format
47
+
48
+ 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.
49
+
50
+ | Split | Rows |
51
+ |---|---|
52
+ | train | 31.7M |
53
+ | validation | 19.4k |
54
+ | test | 19.3k |
55
+
56
+ Each row is one unique (deduplicated) image:
57
+
58
+ | Column | Description |
59
+ |---|---|
60
+ | `key` | Unique sample ID |
61
+ | `qh` | Hashes of the search queries that returned this image (join with `entitynet-queries.parquet`) |
62
+ | `texts` | Alt texts and page titles collected for the image |
63
+ | `images_link` | Image URLs (several URLs can point to the same image) |
64
+ | `images_contextlink` | URLs of the pages the image appeared on |
65
+ | `images_width`, `images_height` | Image size per URL |
66
+
67
+ ## Quickstart
68
+
69
+ Browse the metadata:
70
+
71
+ ```python
72
+ from datasets import load_dataset
73
+
74
+ ds = load_dataset("lmb-freiburg/entitynet", split="validation")
75
+ print(ds[0]["texts"], ds[0]["images_link"])
76
+ ```
77
+
78
+ Download images and build training shards (see the [GitHub README](https://github.com/lmb-freiburg/entitynet) for setup):
79
+
80
+ ```bash
81
+ python -m entitynet.cli.urlbuild_step1_metadata --splits val,test,train
82
+ python -m entitynet.cli.urlbuild_step2_images
83
+ python -m entitynet.cli.urlbuild_step3_tars
84
+ ```
85
+
86
+ Or skip training and use a pretrained model with open_clip:
87
+
88
+ ```python
89
+ import open_clip
90
+ model, _, preprocess = open_clip.create_model_and_transforms("hf-hub:lmb-freiburg/CLIP-ViT-B-16-EntityNet-33M")
91
+ ```
92
+
93
+ ## Limitations
94
 
95
+ - Images come from the open web. URLs go stale over time, so a fresh download will recover fewer than 33M images.
96
+ - Image copyright stays with the original owners. The MIT license covers our metadata and code, not the images.
97
+ - Web images carry web biases: stock photos and product shots are over-represented, and artistic or sketch-style depictions are under-represented.
98
 
99
+ ## Citation
100
 
101
  ```bibtex
102
+ @inproceedings{ging2026entitynet,
103
  author = {Simon Ging and Sebastian Walter and Jelena Bratuli{\'c} and Johannes Dienert and Hannah Bast and Thomas Brox},
104
  title = {Using Knowledge Graphs to Harvest Datasets for Efficient {CLIP} Model Training},
105
  booktitle = {Pattern Recognition, 47th {DAGM} German Conference, {DAGM} {GCPR} 2025, Freiburg, Germany, September 23--26, 2025, Proceedings},
106
  series = {Lecture Notes in Computer Science},
107
  publisher = {Springer Nature Switzerland},
108
+ year = {2026},
109
  pages = {287--302},
110
  isbn = {978-3-032-12840-9},
111
  doi = {10.1007/978-3-032-12840-9_19}
112
  }
113
+ ```