Datasets:
Tasks:
Image Classification
Formats:
parquet
Sub-tasks:
multi-class-image-classification
Languages:
English
Size:
1K - 10K
License:
parquet-converter
commited on
Commit
•
7c06294
1
Parent(s):
072128b
Update parquet files
Browse files- .gitattributes +0 -27
- README.md +0 -202
- beans.py +0 -102
- dataset_infos.json +0 -1
- data/validation.zip → default/beans-test.parquet +2 -2
- data/train.zip → default/beans-train.parquet +2 -2
- data/test.zip → default/beans-validation.parquet +2 -2
.gitattributes
DELETED
@@ -1,27 +0,0 @@
|
|
1 |
-
*.7z filter=lfs diff=lfs merge=lfs -text
|
2 |
-
*.arrow filter=lfs diff=lfs merge=lfs -text
|
3 |
-
*.bin filter=lfs diff=lfs merge=lfs -text
|
4 |
-
*.bin.* filter=lfs diff=lfs merge=lfs -text
|
5 |
-
*.bz2 filter=lfs diff=lfs merge=lfs -text
|
6 |
-
*.ftz filter=lfs diff=lfs merge=lfs -text
|
7 |
-
*.gz filter=lfs diff=lfs merge=lfs -text
|
8 |
-
*.h5 filter=lfs diff=lfs merge=lfs -text
|
9 |
-
*.joblib filter=lfs diff=lfs merge=lfs -text
|
10 |
-
*.lfs.* filter=lfs diff=lfs merge=lfs -text
|
11 |
-
*.model filter=lfs diff=lfs merge=lfs -text
|
12 |
-
*.msgpack filter=lfs diff=lfs merge=lfs -text
|
13 |
-
*.onnx filter=lfs diff=lfs merge=lfs -text
|
14 |
-
*.ot filter=lfs diff=lfs merge=lfs -text
|
15 |
-
*.parquet filter=lfs diff=lfs merge=lfs -text
|
16 |
-
*.pb filter=lfs diff=lfs merge=lfs -text
|
17 |
-
*.pt filter=lfs diff=lfs merge=lfs -text
|
18 |
-
*.pth filter=lfs diff=lfs merge=lfs -text
|
19 |
-
*.rar filter=lfs diff=lfs merge=lfs -text
|
20 |
-
saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
21 |
-
*.tar.* filter=lfs diff=lfs merge=lfs -text
|
22 |
-
*.tflite filter=lfs diff=lfs merge=lfs -text
|
23 |
-
*.tgz filter=lfs diff=lfs merge=lfs -text
|
24 |
-
*.xz filter=lfs diff=lfs merge=lfs -text
|
25 |
-
*.zip filter=lfs diff=lfs merge=lfs -text
|
26 |
-
*.zstandard filter=lfs diff=lfs merge=lfs -text
|
27 |
-
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
README.md
DELETED
@@ -1,202 +0,0 @@
|
|
1 |
-
---
|
2 |
-
annotations_creators:
|
3 |
-
- expert-generated
|
4 |
-
language_creators:
|
5 |
-
- expert-generated
|
6 |
-
language:
|
7 |
-
- en
|
8 |
-
license:
|
9 |
-
- mit
|
10 |
-
multilinguality:
|
11 |
-
- monolingual
|
12 |
-
pretty_name: Beans
|
13 |
-
size_categories:
|
14 |
-
- 1K<n<10K
|
15 |
-
source_datasets:
|
16 |
-
- original
|
17 |
-
task_categories:
|
18 |
-
- image-classification
|
19 |
-
task_ids:
|
20 |
-
- multi-class-image-classification
|
21 |
-
dataset_info:
|
22 |
-
features:
|
23 |
-
- name: image_file_path
|
24 |
-
dtype: string
|
25 |
-
- name: image
|
26 |
-
dtype: image
|
27 |
-
- name: labels
|
28 |
-
dtype:
|
29 |
-
class_label:
|
30 |
-
names:
|
31 |
-
0: angular_leaf_spot
|
32 |
-
1: bean_rust
|
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
|
49 |
-
|
50 |
-
## Table of Contents
|
51 |
-
- [Table of Contents](#table-of-contents)
|
52 |
-
- [Dataset Description](#dataset-description)
|
53 |
-
- [Dataset Summary](#dataset-summary)
|
54 |
-
- [Supported Tasks and Leaderboards](#supported-tasks-and-leaderboards)
|
55 |
-
- [Languages](#languages)
|
56 |
-
- [Dataset Structure](#dataset-structure)
|
57 |
-
- [Data Instances](#data-instances)
|
58 |
-
- [Data Fields](#data-fields)
|
59 |
-
- [Data Splits](#data-splits)
|
60 |
-
- [Dataset Creation](#dataset-creation)
|
61 |
-
- [Curation Rationale](#curation-rationale)
|
62 |
-
- [Source Data](#source-data)
|
63 |
-
- [Annotations](#annotations)
|
64 |
-
- [Personal and Sensitive Information](#personal-and-sensitive-information)
|
65 |
-
- [Considerations for Using the Data](#considerations-for-using-the-data)
|
66 |
-
- [Social Impact of Dataset](#social-impact-of-dataset)
|
67 |
-
- [Discussion of Biases](#discussion-of-biases)
|
68 |
-
- [Other Known Limitations](#other-known-limitations)
|
69 |
-
- [Additional Information](#additional-information)
|
70 |
-
- [Dataset Curators](#dataset-curators)
|
71 |
-
- [Licensing Information](#licensing-information)
|
72 |
-
- [Citation Information](#citation-information)
|
73 |
-
- [Contributions](#contributions)
|
74 |
-
|
75 |
-
## Dataset Description
|
76 |
-
|
77 |
-
- **Homepage:** [Beans Homepage](https://github.com/AI-Lab-Makerere/ibean/)
|
78 |
-
- **Repository:** [AI-Lab-Makerere/ibean](https://github.com/AI-Lab-Makerere/ibean/)
|
79 |
-
- **Paper:** N/A
|
80 |
-
- **Leaderboard:** N/A
|
81 |
-
- **Point of Contact:** N/A
|
82 |
-
|
83 |
-
### Dataset Summary
|
84 |
-
|
85 |
-
Beans leaf dataset with images of diseased and health leaves.
|
86 |
-
|
87 |
-
### Supported Tasks and Leaderboards
|
88 |
-
|
89 |
-
- `image-classification`: Based on a leaf image, the goal of this task is to predict the disease type (Angular Leaf Spot and Bean Rust), if any.
|
90 |
-
|
91 |
-
### Languages
|
92 |
-
|
93 |
-
English
|
94 |
-
|
95 |
-
## Dataset Structure
|
96 |
-
|
97 |
-
### Data Instances
|
98 |
-
|
99 |
-
A sample from the training set is provided below:
|
100 |
-
|
101 |
-
```
|
102 |
-
{
|
103 |
-
'image_file_path': '/root/.cache/huggingface/datasets/downloads/extracted/0aaa78294d4bf5114f58547e48d91b7826649919505379a167decb629aa92b0a/train/bean_rust/bean_rust_train.109.jpg',
|
104 |
-
'image': <PIL.JpegImagePlugin.JpegImageFile image mode=RGB size=500x500 at 0x16BAA72A4A8>,
|
105 |
-
'labels': 1
|
106 |
-
}
|
107 |
-
```
|
108 |
-
|
109 |
-
### Data Fields
|
110 |
-
|
111 |
-
The data instances have the following fields:
|
112 |
-
|
113 |
-
- `image_file_path`: a `string` filepath to an image.
|
114 |
-
- `image`: A `PIL.Image.Image` object containing the image. Note that when accessing the image column: `dataset[0]["image"]` the image file is automatically decoded. Decoding of a large number of image files might take a significant amount of time. Thus it is important to first query the sample index before the `"image"` column, *i.e.* `dataset[0]["image"]` should **always** be preferred over `dataset["image"][0]`.
|
115 |
-
- `labels`: an `int` classification label.
|
116 |
-
|
117 |
-
Class Label Mappings:
|
118 |
-
|
119 |
-
```json
|
120 |
-
{
|
121 |
-
"angular_leaf_spot": 0,
|
122 |
-
"bean_rust": 1,
|
123 |
-
"healthy": 2,
|
124 |
-
}
|
125 |
-
```
|
126 |
-
|
127 |
-
### Data Splits
|
128 |
-
|
129 |
-
|
130 |
-
| |train|validation|test|
|
131 |
-
|-------------|----:|---------:|---:|
|
132 |
-
|# of examples|1034 |133 |128 |
|
133 |
-
|
134 |
-
## Dataset Creation
|
135 |
-
|
136 |
-
### Curation Rationale
|
137 |
-
|
138 |
-
[More Information Needed]
|
139 |
-
|
140 |
-
### Source Data
|
141 |
-
|
142 |
-
#### Initial Data Collection and Normalization
|
143 |
-
|
144 |
-
[More Information Needed]
|
145 |
-
|
146 |
-
#### Who are the source language producers?
|
147 |
-
|
148 |
-
[More Information Needed]
|
149 |
-
|
150 |
-
### Annotations
|
151 |
-
|
152 |
-
#### Annotation process
|
153 |
-
|
154 |
-
[More Information Needed]
|
155 |
-
|
156 |
-
#### Who are the annotators?
|
157 |
-
|
158 |
-
[More Information Needed]
|
159 |
-
|
160 |
-
### Personal and Sensitive Information
|
161 |
-
|
162 |
-
[More Information Needed]
|
163 |
-
|
164 |
-
## Considerations for Using the Data
|
165 |
-
|
166 |
-
### Social Impact of Dataset
|
167 |
-
|
168 |
-
[More Information Needed]
|
169 |
-
|
170 |
-
### Discussion of Biases
|
171 |
-
|
172 |
-
[More Information Needed]
|
173 |
-
|
174 |
-
### Other Known Limitations
|
175 |
-
|
176 |
-
[More Information Needed]
|
177 |
-
|
178 |
-
## Additional Information
|
179 |
-
|
180 |
-
### Dataset Curators
|
181 |
-
|
182 |
-
[More Information Needed]
|
183 |
-
|
184 |
-
### Licensing Information
|
185 |
-
|
186 |
-
[More Information Needed]
|
187 |
-
|
188 |
-
### Citation Information
|
189 |
-
|
190 |
-
```
|
191 |
-
@ONLINE {beansdata,
|
192 |
-
author="Makerere AI Lab",
|
193 |
-
title="Bean disease dataset",
|
194 |
-
month="January",
|
195 |
-
year="2020",
|
196 |
-
url="https://github.com/AI-Lab-Makerere/ibean/"
|
197 |
-
}
|
198 |
-
```
|
199 |
-
|
200 |
-
### Contributions
|
201 |
-
|
202 |
-
Thanks to [@nateraw](https://github.com/nateraw) for adding this dataset.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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}}
|
|
|
|
data/validation.zip → default/beans-test.parquet
RENAMED
@@ -1,3 +1,3 @@
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:
|
3 |
-
size
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:b8093f2630db760746d370a975aa4ee4fc16d9b92cac5a4a44b61de3f47a36fa
|
3 |
+
size 17703762
|
data/train.zip → default/beans-train.parquet
RENAMED
@@ -1,3 +1,3 @@
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:
|
3 |
-
size
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:32cbf17fd52d3525144a6bea19e95370732c27ca4bdd3943a7cc80cfe3eae0c2
|
3 |
+
size 143752655
|
data/test.zip → default/beans-validation.parquet
RENAMED
@@ -1,3 +1,3 @@
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:
|
3 |
-
size
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:1f0f1e3bc3f52eda362c177c98ba2516be35665b52d9004457dcfeb5602510df
|
3 |
+
size 18497183
|