Datasets:
Fix broken links
#5
by
albertvillanova
HF staff
- opened
- README.md +10 -6
- dataset_infos.json +0 -1
- fix_generated_dummy_data.py +0 -48
- huggingface.jpg +0 -0
- visual_genome.py +9 -5
README.md
CHANGED
@@ -96,9 +96,9 @@ config_names:
|
|
96 |
|
97 |
## Dataset Description
|
98 |
|
99 |
-
- **Homepage:** https://
|
100 |
- **Repository:**
|
101 |
-
- **Paper:** https://
|
102 |
- **Leaderboard:**
|
103 |
- **Point of Contact:** ranjaykrishna [at] gmail [dot] com
|
104 |
|
@@ -484,11 +484,15 @@ Visual Genome by Ranjay Krishna is licensed under a Creative Commons Attribution
|
|
484 |
### Citation Information
|
485 |
|
486 |
```bibtex
|
487 |
-
@
|
488 |
title={Visual Genome: Connecting Language and Vision Using Crowdsourced Dense Image Annotations},
|
489 |
-
author={Krishna
|
490 |
-
|
491 |
-
|
|
|
|
|
|
|
|
|
492 |
}
|
493 |
```
|
494 |
|
|
|
96 |
|
97 |
## Dataset Description
|
98 |
|
99 |
+
- **Homepage:** https://homes.cs.washington.edu/~ranjay/visualgenome/
|
100 |
- **Repository:**
|
101 |
+
- **Paper:** https://doi.org/10.1007/s11263-016-0981-7
|
102 |
- **Leaderboard:**
|
103 |
- **Point of Contact:** ranjaykrishna [at] gmail [dot] com
|
104 |
|
|
|
484 |
### Citation Information
|
485 |
|
486 |
```bibtex
|
487 |
+
@article{Krishna2016VisualGC,
|
488 |
title={Visual Genome: Connecting Language and Vision Using Crowdsourced Dense Image Annotations},
|
489 |
+
author={Ranjay Krishna and Yuke Zhu and Oliver Groth and Justin Johnson and Kenji Hata and Joshua Kravitz and Stephanie Chen and Yannis Kalantidis and Li-Jia Li and David A. Shamma and Michael S. Bernstein and Li Fei-Fei},
|
490 |
+
journal={International Journal of Computer Vision},
|
491 |
+
year={2017},
|
492 |
+
volume={123},
|
493 |
+
pages={32-73},
|
494 |
+
url={https://doi.org/10.1007/s11263-016-0981-7},
|
495 |
+
doi={10.1007/s11263-016-0981-7}
|
496 |
}
|
497 |
```
|
498 |
|
dataset_infos.json
DELETED
@@ -1 +0,0 @@
|
|
1 |
-
{"region_descriptions_v1.0.0": {"description": "Visual Genome enable to model objects and relationships between objects.\nThey collect dense annotations of objects, attributes, and relationships within each image.\nSpecifically, the dataset contains over 108K images where each image has an average of 35 objects, 26 attributes, and 21 pairwise relationships between objects.\n", "citation": "@inproceedings{krishnavisualgenome,\n title={Visual Genome: Connecting Language and Vision Using Crowdsourced Dense Image Annotations},\n author={Krishna, Ranjay and Zhu, Yuke and Groth, Oliver and Johnson, Justin and Hata, Kenji and Kravitz, Joshua and Chen, Stephanie and Kalantidis, Yannis and Li, Li-Jia and Shamma, David A and Bernstein, Michael and Fei-Fei, Li},\n year = {2016},\n url = {https://arxiv.org/abs/1602.07332},\n}\n", "homepage": "https://visualgenome.org/", "license": "Creative Commons Attribution 4.0 International License", "features": {"image": {"decode": true, "id": null, "_type": "Image"}, "image_id": {"dtype": "int32", "id": null, "_type": "Value"}, "url": {"dtype": "string", "id": null, "_type": "Value"}, "width": {"dtype": "int32", "id": null, "_type": "Value"}, "height": {"dtype": "int32", "id": null, "_type": "Value"}, "coco_id": {"dtype": "int64", "id": null, "_type": "Value"}, "flickr_id": {"dtype": "int64", "id": null, "_type": "Value"}, "regions": [{"region_id": {"dtype": "int32", "id": null, "_type": "Value"}, "image_id": {"dtype": "int32", "id": null, "_type": "Value"}, "phrase": {"dtype": "string", "id": null, "_type": "Value"}, "x": {"dtype": "int32", "id": null, "_type": "Value"}, "y": {"dtype": "int32", "id": null, "_type": "Value"}, "width": {"dtype": "int32", "id": null, "_type": "Value"}, "height": {"dtype": "int32", "id": null, "_type": "Value"}}]}, "post_processed": null, "supervised_keys": null, "task_templates": null, "builder_name": "visual_genome", "config_name": "region_descriptions_v1.0.0", "version": {"version_str": "1.0.0", "description": null, "major": 1, "minor": 0, "patch": 0}, "splits": {"train": {"name": "train", "num_bytes": 260873884, "num_examples": 108077, "dataset_name": "visual_genome"}}, "download_checksums": {"https://visualgenome.org/static/data/dataset/image_data.json.zip": {"num_bytes": 1780854, "checksum": "b87a94918cb2ff4d952cf1dfeca0b9cf6cd6fd204c2f8704645653be1163681a"}, "https://visualgenome.org/static/data/dataset/region_descriptions_v1.json.zip": {"num_bytes": 99460401, "checksum": "9e54cd76082f7ce5168a1779fc8c3d0629720492ec0fa12f2d8339c3e0dc9734"}, "https://cs.stanford.edu/people/rak248/VG_100K_2/images.zip": {"num_bytes": 9731705982, "checksum": "51c682d2721f880150720bb416e0346a4c787e4c55d7f80dfd1bd3f73ba81646"}, "https://cs.stanford.edu/people/rak248/VG_100K_2/images2.zip": {"num_bytes": 5471658058, "checksum": "99da1a0ddf87011319ff3b05cf9176ffee2731cc3c52951162d9ef0d68e3cfb5"}}, "download_size": 15304605295, "post_processing_size": null, "dataset_size": 260873884, "size_in_bytes": 15565479179}}
|
|
|
|
fix_generated_dummy_data.py
DELETED
@@ -1,48 +0,0 @@
|
|
1 |
-
import json
|
2 |
-
import re
|
3 |
-
from pathlib import Path
|
4 |
-
from zipfile import ZipFile
|
5 |
-
|
6 |
-
|
7 |
-
def main():
|
8 |
-
dummy_dir = Path(__file__).parent / "dummy"
|
9 |
-
config_paths = list(dummy_dir.iterdir())
|
10 |
-
|
11 |
-
for config in config_paths:
|
12 |
-
versions = list(config.iterdir())
|
13 |
-
assert len(versions) == 1, versions
|
14 |
-
version = versions[0]
|
15 |
-
zip_filepath = version / "dummy_data.zip"
|
16 |
-
|
17 |
-
# We need to open the zip file
|
18 |
-
with ZipFile(zip_filepath, "r") as zip_dir:
|
19 |
-
with zip_dir.open("dummy_data/image_data.json.zip/image_data.json", "r") as fi:
|
20 |
-
image_metadatas = json.load(fi)
|
21 |
-
|
22 |
-
default_jpg_path = Path(__file__).parent / "huggingface.jpg"
|
23 |
-
with ZipFile(zip_filepath, "a") as zip_dir:
|
24 |
-
for image_metadata in image_metadatas:
|
25 |
-
url = image_metadata["url"]
|
26 |
-
|
27 |
-
matches = re.match(r"https://cs.stanford.edu/people/rak248/VG_100K(?:_(2))?/[0-9]+.jpg", url)
|
28 |
-
assert matches is not None
|
29 |
-
|
30 |
-
# Find where locally the images should be
|
31 |
-
vg_version = matches.group(1)
|
32 |
-
if vg_version is None:
|
33 |
-
local_path = re.sub(
|
34 |
-
"https://cs.stanford.edu/people/rak248/VG_100K", "dummy_data/images.zip/VG_100K", url
|
35 |
-
)
|
36 |
-
else:
|
37 |
-
local_path = re.sub(
|
38 |
-
f"https://cs.stanford.edu/people/rak248/VG_100K_{vg_version}",
|
39 |
-
f"dummy_data/images{vg_version}.zip/VG_100K_{vg_version}",
|
40 |
-
url,
|
41 |
-
)
|
42 |
-
|
43 |
-
# Write those images.
|
44 |
-
zip_dir.write(filename=default_jpg_path, arcname=local_path)
|
45 |
-
|
46 |
-
|
47 |
-
if __name__ == "__main__":
|
48 |
-
main()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
huggingface.jpg
DELETED
Binary file (656 Bytes)
|
|
visual_genome.py
CHANGED
@@ -27,11 +27,15 @@ import datasets
|
|
27 |
logger = datasets.logging.get_logger(__name__)
|
28 |
|
29 |
_CITATION = """\
|
30 |
-
@
|
31 |
title={Visual Genome: Connecting Language and Vision Using Crowdsourced Dense Image Annotations},
|
32 |
-
author={Krishna
|
33 |
-
|
34 |
-
|
|
|
|
|
|
|
|
|
35 |
}
|
36 |
"""
|
37 |
|
@@ -41,7 +45,7 @@ They collect dense annotations of objects, attributes, and relationships within
|
|
41 |
Specifically, the dataset contains over 108K images where each image has an average of 35 objects, 26 attributes, and 21 pairwise relationships between objects.
|
42 |
"""
|
43 |
|
44 |
-
_HOMEPAGE = "https://
|
45 |
|
46 |
_LICENSE = "Creative Commons Attribution 4.0 International License"
|
47 |
|
|
|
27 |
logger = datasets.logging.get_logger(__name__)
|
28 |
|
29 |
_CITATION = """\
|
30 |
+
@article{Krishna2016VisualGC,
|
31 |
title={Visual Genome: Connecting Language and Vision Using Crowdsourced Dense Image Annotations},
|
32 |
+
author={Ranjay Krishna and Yuke Zhu and Oliver Groth and Justin Johnson and Kenji Hata and Joshua Kravitz and Stephanie Chen and Yannis Kalantidis and Li-Jia Li and David A. Shamma and Michael S. Bernstein and Li Fei-Fei},
|
33 |
+
journal={International Journal of Computer Vision},
|
34 |
+
year={2017},
|
35 |
+
volume={123},
|
36 |
+
pages={32-73},
|
37 |
+
url={https://doi.org/10.1007/s11263-016-0981-7},
|
38 |
+
doi={10.1007/s11263-016-0981-7}
|
39 |
}
|
40 |
"""
|
41 |
|
|
|
45 |
Specifically, the dataset contains over 108K images where each image has an average of 35 objects, 26 attributes, and 21 pairwise relationships between objects.
|
46 |
"""
|
47 |
|
48 |
+
_HOMEPAGE = "https://homes.cs.washington.edu/~ranjay/visualgenome/"
|
49 |
|
50 |
_LICENSE = "Creative Commons Attribution 4.0 International License"
|
51 |
|