albertvillanova HF staff commited on
Commit
27aa014
1 Parent(s): ff99f40

Convert dataset to Parquet (#5)

Browse files

- Convert dataset to Parquet (d458b717d277f324b15baa368565d122fd0e77c7)
- Delete loading script (b21d907637a1ff51f14d8f6abddf7e82776e4eb9)
- Delete legacy dataset_infos.json (29265e63b2835817e3847f35df500e9f006da800)

README.md CHANGED
@@ -33,16 +33,25 @@ dataset_info:
33
  '2': healthy
34
  splits:
35
  - name: train
36
- num_bytes: 382110
37
  num_examples: 1034
38
  - name: validation
39
- num_bytes: 49711
40
  num_examples: 133
41
  - name: test
42
- num_bytes: 46584
43
  num_examples: 128
44
- download_size: 180024906
45
- dataset_size: 478405
 
 
 
 
 
 
 
 
 
46
  ---
47
 
48
  # Dataset Card for Beans
 
33
  '2': healthy
34
  splits:
35
  - name: train
36
+ num_bytes: 143762054.662
37
  num_examples: 1034
38
  - name: validation
39
+ num_bytes: 18515527.0
40
  num_examples: 133
41
  - name: test
42
+ num_bytes: 17720308.0
43
  num_examples: 128
44
+ download_size: 179978834
45
+ dataset_size: 179997889.662
46
+ configs:
47
+ - config_name: default
48
+ data_files:
49
+ - split: train
50
+ path: data/train-*
51
+ - split: validation
52
+ path: data/validation-*
53
+ - split: test
54
+ path: data/test-*
55
  ---
56
 
57
  # Dataset Card for Beans
beans.py DELETED
@@ -1,102 +0,0 @@
1
- # coding=utf-8
2
- # Copyright 2021 The HuggingFace Datasets Authors and the current dataset script contributor.
3
- #
4
- # Licensed under the Apache License, Version 2.0 (the "License");
5
- # you may not use this file except in compliance with the License.
6
- # You may obtain a copy of the License at
7
- #
8
- # http://www.apache.org/licenses/LICENSE-2.0
9
- #
10
- # Unless required by applicable law or agreed to in writing, software
11
- # distributed under the License is distributed on an "AS IS" BASIS,
12
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- # See the License for the specific language governing permissions and
14
- # limitations under the License.
15
- """Beans leaf dataset with images of diseased and health leaves."""
16
-
17
- import os
18
-
19
- import datasets
20
- from datasets.tasks import ImageClassification
21
-
22
-
23
- _HOMEPAGE = "https://github.com/AI-Lab-Makerere/ibean/"
24
-
25
- _CITATION = """\
26
- @ONLINE {beansdata,
27
- author="Makerere AI Lab",
28
- title="Bean disease dataset",
29
- month="January",
30
- year="2020",
31
- url="https://github.com/AI-Lab-Makerere/ibean/"
32
- }
33
- """
34
-
35
- _DESCRIPTION = """\
36
- Beans is a dataset of images of beans taken in the field using smartphone
37
- cameras. It consists of 3 classes: 2 disease classes and the healthy class.
38
- Diseases depicted include Angular Leaf Spot and Bean Rust. Data was annotated
39
- by experts from the National Crops Resources Research Institute (NaCRRI) in
40
- Uganda and collected by the Makerere AI research lab.
41
- """
42
-
43
- _URLS = {
44
- "train": "https://huggingface.co/datasets/beans/resolve/main/data/train.zip",
45
- "validation": "https://huggingface.co/datasets/beans/resolve/main/data/validation.zip",
46
- "test": "https://huggingface.co/datasets/beans/resolve/main/data/test.zip",
47
- }
48
-
49
- _NAMES = ["angular_leaf_spot", "bean_rust", "healthy"]
50
-
51
-
52
- class Beans(datasets.GeneratorBasedBuilder):
53
- """Beans plant leaf images dataset."""
54
-
55
- def _info(self):
56
- return datasets.DatasetInfo(
57
- description=_DESCRIPTION,
58
- features=datasets.Features(
59
- {
60
- "image_file_path": datasets.Value("string"),
61
- "image": datasets.Image(),
62
- "labels": datasets.features.ClassLabel(names=_NAMES),
63
- }
64
- ),
65
- supervised_keys=("image", "labels"),
66
- homepage=_HOMEPAGE,
67
- citation=_CITATION,
68
- task_templates=[ImageClassification(image_column="image", label_column="labels")],
69
- )
70
-
71
- def _split_generators(self, dl_manager):
72
- data_files = dl_manager.download_and_extract(_URLS)
73
- return [
74
- datasets.SplitGenerator(
75
- name=datasets.Split.TRAIN,
76
- gen_kwargs={
77
- "files": dl_manager.iter_files([data_files["train"]]),
78
- },
79
- ),
80
- datasets.SplitGenerator(
81
- name=datasets.Split.VALIDATION,
82
- gen_kwargs={
83
- "files": dl_manager.iter_files([data_files["validation"]]),
84
- },
85
- ),
86
- datasets.SplitGenerator(
87
- name=datasets.Split.TEST,
88
- gen_kwargs={
89
- "files": dl_manager.iter_files([data_files["test"]]),
90
- },
91
- ),
92
- ]
93
-
94
- def _generate_examples(self, files):
95
- for i, path in enumerate(files):
96
- file_name = os.path.basename(path)
97
- if file_name.endswith(".jpg"):
98
- yield i, {
99
- "image_file_path": path,
100
- "image": path,
101
- "labels": os.path.basename(os.path.dirname(path)).lower(),
102
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
data/test-00000-of-00001.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:534a6b0648f585d69b7ec0ad7a7540720d60c8db8106dc6d0508296316f6cb27
3
+ size 17706070
data/train-00000-of-00001.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:7f905a7323966a58e89b8e839ed656bb869fc82d16a3fadc7dce40972a5f8b19
3
+ size 143773054
data/validation-00000-of-00001.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:33f774593d8b31585457b70c224744e9409ffdee4e91a11822b1ebfe8242928f
3
+ size 18499710
dataset_infos.json DELETED
@@ -1 +0,0 @@
1
- {"default": {"description": "Beans is a dataset of images of beans taken in the field using smartphone\ncameras. It consists of 3 classes: 2 disease classes and the healthy class.\nDiseases depicted include Angular Leaf Spot and Bean Rust. Data was annotated\nby experts from the National Crops Resources Research Institute (NaCRRI) in\nUganda and collected by the Makerere AI research lab.\n", "citation": "@ONLINE {beansdata,\n author=\"Makerere AI Lab\",\n title=\"Bean disease dataset\",\n month=\"January\",\n year=\"2020\",\n url=\"https://github.com/AI-Lab-Makerere/ibean/\"\n}\n", "homepage": "https://github.com/AI-Lab-Makerere/ibean/", "license": "", "features": {"image_file_path": {"dtype": "string", "id": null, "_type": "Value"}, "image": {"decode": true, "id": null, "_type": "Image"}, "labels": {"num_classes": 3, "names": ["angular_leaf_spot", "bean_rust", "healthy"], "id": null, "_type": "ClassLabel"}}, "post_processed": null, "supervised_keys": {"input": "image", "output": "labels"}, "task_templates": [{"task": "image-classification", "image_column": "image", "label_column": "labels"}], "builder_name": "beans", "config_name": "default", "version": {"version_str": "0.0.0", "description": null, "major": 0, "minor": 0, "patch": 0}, "splits": {"train": {"name": "train", "num_bytes": 382110, "num_examples": 1034, "dataset_name": "beans"}, "validation": {"name": "validation", "num_bytes": 49711, "num_examples": 133, "dataset_name": "beans"}, "test": {"name": "test", "num_bytes": 46584, "num_examples": 128, "dataset_name": "beans"}}, "download_checksums": {"https://huggingface.co/datasets/beans/resolve/main/data/train.zip": {"num_bytes": 143812152, "checksum": "284fe8456ce20687f4367ae7ad94a64577e7f9fde2c2c6b1c74340ab5dc82715"}, "https://huggingface.co/datasets/beans/resolve/main/data/validation.zip": {"num_bytes": 18504213, "checksum": "90b7aa1c26d91d9afff07a30bbc67a5ea34f1f1397f068d8675be09d7d0c602d"}, "https://huggingface.co/datasets/beans/resolve/main/data/test.zip": {"num_bytes": 17708541, "checksum": "ca67b15d960d1e2fd9d23fd8498ce86818ead90755c630a43baf19ec4af09312"}}, "download_size": 180024906, "post_processing_size": null, "dataset_size": 478405, "size_in_bytes": 180503311}}