Datasets:
Tasks:
Image Classification
Formats:
parquet
Sub-tasks:
multi-class-image-classification
Languages:
English
Size:
1K - 10K
License:
Commit
•
dbb4d96
0
Parent(s):
Update files from the datasets library (from 1.12.0)
Browse filesRelease notes: https://github.com/huggingface/datasets/releases/tag/1.12.0
- .gitattributes +27 -0
- README.md +175 -0
- beans.py +98 -0
- dataset_infos.json +1 -0
- dummy/0.0.0/dummy_data.zip +3 -0
.gitattributes
ADDED
@@ -0,0 +1,27 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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
ADDED
@@ -0,0 +1,175 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
annotations_creators:
|
3 |
+
- expert-generated
|
4 |
+
language_creators:
|
5 |
+
- expert-generated
|
6 |
+
languages:
|
7 |
+
- en
|
8 |
+
licenses:
|
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 |
+
- other
|
19 |
+
task_ids:
|
20 |
+
- other-other-image-classification
|
21 |
+
---
|
22 |
+
|
23 |
+
# Dataset Card for Beans
|
24 |
+
|
25 |
+
## Table of Contents
|
26 |
+
- [Table of Contents](#table-of-contents)
|
27 |
+
- [Dataset Description](#dataset-description)
|
28 |
+
- [Dataset Summary](#dataset-summary)
|
29 |
+
- [Supported Tasks and Leaderboards](#supported-tasks-and-leaderboards)
|
30 |
+
- [Languages](#languages)
|
31 |
+
- [Dataset Structure](#dataset-structure)
|
32 |
+
- [Data Instances](#data-instances)
|
33 |
+
- [Data Fields](#data-fields)
|
34 |
+
- [Data Splits](#data-splits)
|
35 |
+
- [Dataset Creation](#dataset-creation)
|
36 |
+
- [Curation Rationale](#curation-rationale)
|
37 |
+
- [Source Data](#source-data)
|
38 |
+
- [Annotations](#annotations)
|
39 |
+
- [Personal and Sensitive Information](#personal-and-sensitive-information)
|
40 |
+
- [Considerations for Using the Data](#considerations-for-using-the-data)
|
41 |
+
- [Social Impact of Dataset](#social-impact-of-dataset)
|
42 |
+
- [Discussion of Biases](#discussion-of-biases)
|
43 |
+
- [Other Known Limitations](#other-known-limitations)
|
44 |
+
- [Additional Information](#additional-information)
|
45 |
+
- [Dataset Curators](#dataset-curators)
|
46 |
+
- [Licensing Information](#licensing-information)
|
47 |
+
- [Citation Information](#citation-information)
|
48 |
+
- [Contributions](#contributions)
|
49 |
+
|
50 |
+
## Dataset Description
|
51 |
+
|
52 |
+
- **Homepage:** [Beans Homepage](https://github.com/AI-Lab-Makerere/ibean/)
|
53 |
+
- **Repository:** [AI-Lab-Makerere/ibean](https://github.com/AI-Lab-Makerere/ibean/)
|
54 |
+
- **Paper:** N/A
|
55 |
+
- **Leaderboard:** N/A
|
56 |
+
- **Point of Contact:** N/A
|
57 |
+
|
58 |
+
### Dataset Summary
|
59 |
+
|
60 |
+
Beans leaf dataset with images of diseased and health leaves.
|
61 |
+
|
62 |
+
### Supported Tasks and Leaderboards
|
63 |
+
|
64 |
+
- image-classification
|
65 |
+
|
66 |
+
### Languages
|
67 |
+
|
68 |
+
English
|
69 |
+
|
70 |
+
## Dataset Structure
|
71 |
+
|
72 |
+
### Data Instances
|
73 |
+
|
74 |
+
A sample from the training set is provided below:
|
75 |
+
|
76 |
+
```
|
77 |
+
{
|
78 |
+
'image_file_path': '/root/.cache/huggingface/datasets/downloads/extracted/0aaa78294d4bf5114f58547e48d91b7826649919505379a167decb629aa92b0a/train/bean_rust/bean_rust_train.109.jpg',
|
79 |
+
'labels': 1
|
80 |
+
}
|
81 |
+
```
|
82 |
+
|
83 |
+
### Data Fields
|
84 |
+
|
85 |
+
The data instances have the following fields:
|
86 |
+
|
87 |
+
- `image_file_path`: a `string` filepath to an image.
|
88 |
+
- `labels`: an `int` classification label.
|
89 |
+
|
90 |
+
Class Label Mappings:
|
91 |
+
|
92 |
+
```json
|
93 |
+
{
|
94 |
+
"angular_leaf_spot": 0,
|
95 |
+
"bean_rust": 1,
|
96 |
+
"healthy": 2,
|
97 |
+
}
|
98 |
+
```
|
99 |
+
|
100 |
+
### Data Splits
|
101 |
+
|
102 |
+
|
103 |
+
| |train|validation|test|
|
104 |
+
|-------------|----:|---------:|---:|
|
105 |
+
|# of examples|1034 |133 |128 |
|
106 |
+
|
107 |
+
## Dataset Creation
|
108 |
+
|
109 |
+
### Curation Rationale
|
110 |
+
|
111 |
+
[More Information Needed]
|
112 |
+
|
113 |
+
### Source Data
|
114 |
+
|
115 |
+
#### Initial Data Collection and Normalization
|
116 |
+
|
117 |
+
[More Information Needed]
|
118 |
+
|
119 |
+
#### Who are the source language producers?
|
120 |
+
|
121 |
+
[More Information Needed]
|
122 |
+
|
123 |
+
### Annotations
|
124 |
+
|
125 |
+
#### Annotation process
|
126 |
+
|
127 |
+
[More Information Needed]
|
128 |
+
|
129 |
+
#### Who are the annotators?
|
130 |
+
|
131 |
+
[More Information Needed]
|
132 |
+
|
133 |
+
### Personal and Sensitive Information
|
134 |
+
|
135 |
+
[More Information Needed]
|
136 |
+
|
137 |
+
## Considerations for Using the Data
|
138 |
+
|
139 |
+
### Social Impact of Dataset
|
140 |
+
|
141 |
+
[More Information Needed]
|
142 |
+
|
143 |
+
### Discussion of Biases
|
144 |
+
|
145 |
+
[More Information Needed]
|
146 |
+
|
147 |
+
### Other Known Limitations
|
148 |
+
|
149 |
+
[More Information Needed]
|
150 |
+
|
151 |
+
## Additional Information
|
152 |
+
|
153 |
+
### Dataset Curators
|
154 |
+
|
155 |
+
[More Information Needed]
|
156 |
+
|
157 |
+
### Licensing Information
|
158 |
+
|
159 |
+
[More Information Needed]
|
160 |
+
|
161 |
+
### Citation Information
|
162 |
+
|
163 |
+
```
|
164 |
+
@ONLINE {beansdata,
|
165 |
+
author="Makerere AI Lab",
|
166 |
+
title="Bean disease dataset",
|
167 |
+
month="January",
|
168 |
+
year="2020",
|
169 |
+
url="https://github.com/AI-Lab-Makerere/ibean/"
|
170 |
+
}
|
171 |
+
```
|
172 |
+
|
173 |
+
### Contributions
|
174 |
+
|
175 |
+
Thanks to [@nateraw](https://github.com/nateraw) for adding this dataset.
|
beans.py
ADDED
@@ -0,0 +1,98 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 |
+
from pathlib import Path
|
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://storage.googleapis.com/ibeans/train.zip",
|
45 |
+
"validation": "https://storage.googleapis.com/ibeans/validation.zip",
|
46 |
+
"test": "https://storage.googleapis.com/ibeans/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 |
+
"labels": datasets.features.ClassLabel(names=_NAMES),
|
62 |
+
}
|
63 |
+
),
|
64 |
+
supervised_keys=("image_file_path", "labels"),
|
65 |
+
homepage=_HOMEPAGE,
|
66 |
+
citation=_CITATION,
|
67 |
+
task_templates=[
|
68 |
+
ImageClassification(image_file_path_column="image_file_path", label_column="labels", labels=_NAMES)
|
69 |
+
],
|
70 |
+
)
|
71 |
+
|
72 |
+
def _split_generators(self, dl_manager):
|
73 |
+
data_files = dl_manager.download_and_extract(_URLS)
|
74 |
+
return [
|
75 |
+
datasets.SplitGenerator(
|
76 |
+
name=datasets.Split.TRAIN,
|
77 |
+
gen_kwargs={
|
78 |
+
"archive": data_files["train"],
|
79 |
+
},
|
80 |
+
),
|
81 |
+
datasets.SplitGenerator(
|
82 |
+
name=datasets.Split.VALIDATION,
|
83 |
+
gen_kwargs={
|
84 |
+
"archive": data_files["validation"],
|
85 |
+
},
|
86 |
+
),
|
87 |
+
datasets.SplitGenerator(
|
88 |
+
name=datasets.Split.TEST,
|
89 |
+
gen_kwargs={
|
90 |
+
"archive": data_files["test"],
|
91 |
+
},
|
92 |
+
),
|
93 |
+
]
|
94 |
+
|
95 |
+
def _generate_examples(self, archive):
|
96 |
+
for i, path in enumerate(Path(archive).glob("**/*")):
|
97 |
+
if path.suffix == ".jpg":
|
98 |
+
yield i, dict(image_file_path=str(path), labels=path.parent.name.lower())
|
dataset_infos.json
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
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"}, "labels": {"num_classes": 3, "names": ["angular_leaf_spot", "bean_rust", "healthy"], "names_file": null, "id": null, "_type": "ClassLabel"}}, "post_processed": null, "supervised_keys": {"input": "image_file_path", "output": "labels"}, "task_templates": [{"task": "image-classification", "image_file_path_column": "image_file_path", "label_column": "labels", "labels": ["angular_leaf_spot", "bean_rust", "healthy"]}], "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": 188916, "num_examples": 1034, "dataset_name": "beans"}, "validation": {"name": "validation", "num_bytes": 24575, "num_examples": 133, "dataset_name": "beans"}, "test": {"name": "test", "num_bytes": 23022, "num_examples": 128, "dataset_name": "beans"}}, "download_checksums": {"https://storage.googleapis.com/ibeans/train.zip": {"num_bytes": 143812152, "checksum": "284fe8456ce20687f4367ae7ad94a64577e7f9fde2c2c6b1c74340ab5dc82715"}, "https://storage.googleapis.com/ibeans/validation.zip": {"num_bytes": 18504213, "checksum": "90b7aa1c26d91d9afff07a30bbc67a5ea34f1f1397f068d8675be09d7d0c602d"}, "https://storage.googleapis.com/ibeans/test.zip": {"num_bytes": 17708541, "checksum": "ca67b15d960d1e2fd9d23fd8498ce86818ead90755c630a43baf19ec4af09312"}}, "download_size": 180024906, "post_processing_size": null, "dataset_size": 236513, "size_in_bytes": 180261419}}
|
dummy/0.0.0/dummy_data.zip
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:2ddc58b91ecc233001a4c4fce992b7215d26cbd5b967e241b0feb9c86328efe7
|
3 |
+
size 2515009
|