davanstrien HF staff commited on
Commit
efd9bcd
1 Parent(s): 1c44bf4

Convert dataset to Parquet (#6)

Browse files

- Convert dataset to Parquet (549f3f3dcb3fe79b4bbec869f70187263a367aa2)
- Delete loading script (6af36b6a7416cc8305733ba8eaba92553944daf4)
- Delete legacy dataset_infos.json (b576b3e6c26a71e81dec378258f754bcaaf619a7)

README.md CHANGED
@@ -7,7 +7,6 @@ license:
7
  - cc0-1.0
8
  multilinguality:
9
  - other-iconclass-metadata
10
- pretty_name: 'Brill Iconclass AI Test Set '
11
  size_categories:
12
  - 10K<n<100K
13
  source_datasets: []
@@ -19,9 +18,27 @@ task_ids:
19
  - multi-class-image-classification
20
  - multi-label-image-classification
21
  - image-captioning
 
22
  tags:
23
  - lam
24
  - art
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
25
  ---
26
 
27
  # Dataset Card for Brill Iconclass AI Test Set
7
  - cc0-1.0
8
  multilinguality:
9
  - other-iconclass-metadata
 
10
  size_categories:
11
  - 10K<n<100K
12
  source_datasets: []
18
  - multi-class-image-classification
19
  - multi-label-image-classification
20
  - image-captioning
21
+ pretty_name: 'Brill Iconclass AI Test Set '
22
  tags:
23
  - lam
24
  - art
25
+ dataset_info:
26
+ features:
27
+ - name: image
28
+ dtype: image
29
+ - name: label
30
+ list: string
31
+ splits:
32
+ - name: train
33
+ num_bytes: 3281967920.848
34
+ num_examples: 87744
35
+ download_size: 3313602175
36
+ dataset_size: 3281967920.848
37
+ configs:
38
+ - config_name: default
39
+ data_files:
40
+ - split: train
41
+ path: data/train-*
42
  ---
43
 
44
  # Dataset Card for Brill Iconclass AI Test Set
brill_iconclass.py DELETED
@@ -1,75 +0,0 @@
1
- # Copyright 2022 The HuggingFace Datasets Authors and the current dataset script contributor.
2
- #
3
- # Licensed under the Apache License, Version 2.0 (the "License");
4
- # you may not use this file except in compliance with the License.
5
- # You may obtain a copy of the License at
6
- #
7
- # http://www.apache.org/licenses/LICENSE-2.0
8
- #
9
- # Unless required by applicable law or agreed to in writing, software
10
- # distributed under the License is distributed on an "AS IS" BASIS,
11
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
- # See the License for the specific language governing permissions and
13
- # limitations under the License.
14
- """Brill Iconclass AI Test Set data."""
15
-
16
- import json
17
- import os
18
- from PIL import Image
19
- import datasets
20
-
21
- _CITATION = """\
22
- @MISC{iconclass,
23
- title = {Brill Iconclass AI Test Set},
24
- author={Etienne Posthumus},
25
- year={2020}
26
- }
27
- """
28
-
29
-
30
- _DESCRIPTION = """\
31
- A dataset for applying machine learning to collections described with the Iconclass classification system.
32
- """
33
-
34
- _HOMEPAGE = "https://iconclass.org/testset/"
35
-
36
- _LICENSE = "https://creativecommons.org/publicdomain/zero/1.0/"
37
-
38
- _URL = "https://iconclass.org/testset/779ba2ca9e977c58d818e3823a676973.zip"
39
-
40
- class BrillIconclass(datasets.GeneratorBasedBuilder):
41
- """Brill IconClass AI dataset"""
42
-
43
- VERSION = datasets.Version("1.1.0")
44
-
45
-
46
- def _info(self):
47
- features = datasets.Features(
48
- {
49
- "image": datasets.Image(),
50
- "label": [datasets.Value("string")]
51
- }
52
- )
53
- return datasets.DatasetInfo(
54
- description=_DESCRIPTION,
55
- features=features,
56
- homepage=_HOMEPAGE,
57
- license=_LICENSE,
58
- citation=_CITATION,
59
- )
60
-
61
- def _split_generators(self, dl_manager):
62
- data_dir = dl_manager.download_and_extract(_URL)
63
- return [
64
- datasets.SplitGenerator(
65
- name=datasets.Split.TRAIN,
66
- gen_kwargs={"data_json": os.path.join(data_dir, "data.json"), "data_dir": data_dir},
67
- ),
68
- ]
69
-
70
- def _generate_examples(self, data_json, data_dir):
71
- with open(data_json, encoding="utf-8") as f:
72
- data = json.load(f)
73
- for row, item in enumerate(data.items()):
74
- filepath, labels = item
75
- yield row, {"image": os.path.join(data_dir, filepath), "label": labels}
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
data/train-00000-of-00007.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:cc11a9d9c398f823de37ef8c1f1e84bbbf610d8f6a3a7c125b938a5e66d4c2b9
3
+ size 472326297
data/train-00001-of-00007.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:a5822b848184666d915716dbcabaff1c111ccacffd3f80e7e62747b0fbc7785f
3
+ size 472468413
data/train-00002-of-00007.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:1af2a2fca5a3a645a8e2b226b7dd8bf68b4f2976a01fe6854add75bc03848137
3
+ size 473253371
data/train-00003-of-00007.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:2bd35adce45d0dc0788a0ef631ab14a9e6015d0a015291074f405d26972d043c
3
+ size 473043138
data/train-00004-of-00007.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:b35939d71c70aaf576518f665b2200a5dbcbc5626dbbf46bbf33afeebe2ca7d9
3
+ size 473479736
data/train-00005-of-00007.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:fcc2df02964a422b736fe20905c06be23140cd7df6bbf0deb5359c625d138f54
3
+ size 474363785
data/train-00006-of-00007.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:2558c12eaf1a28f0c437377fb631686170b7db81f47d2c08c6d3bb0be6db6559
3
+ size 474667435
dataset_infos.json DELETED
@@ -1 +0,0 @@
1
- {"default": {"description": "A dataset for applying machine learning to collections described with the Iconclass classification system.\n", "citation": "@MISC{iconclass,\ntitle = {Brill Iconclass AI Test Set},\nauthor={Etienne Posthumus},\nyear={2020}\n}\n", "homepage": "https://iconclass.org/testset/", "license": "https://creativecommons.org/publicdomain/zero/1.0/", "features": {"image": {"decode": true, "id": null, "_type": "Image"}, "label": [{"dtype": "string", "id": null, "_type": "Value"}]}, "post_processed": null, "supervised_keys": null, "task_templates": null, "builder_name": "brill_iconclass", "config_name": "default", "version": {"version_str": "1.1.0", "description": null, "major": 1, "minor": 1, "patch": 0}, "splits": {"train": {"name": "train", "num_bytes": 19925506, "num_examples": 87744, "dataset_name": "brill_iconclass"}}, "download_checksums": {"https://iconclass.org/testset/779ba2ca9e977c58d818e3823a676973.zip": {"num_bytes": 3295276816, "checksum": "96403cd3fdd34c71e4fa97078435350c244c9023af022cc3b8c2500cc13c684a"}}, "download_size": 3295276816, "post_processing_size": null, "dataset_size": 19925506, "size_in_bytes": 3315202322}}