|
--- |
|
license: bsd-2-clause |
|
dataset_info: |
|
features: |
|
- name: image |
|
dtype: image |
|
- name: writer_id |
|
dtype: string |
|
- name: hsf_id |
|
dtype: int64 |
|
- name: character |
|
dtype: |
|
class_label: |
|
names: |
|
'0': '0' |
|
'1': '1' |
|
'2': '2' |
|
'3': '3' |
|
'4': '4' |
|
'5': '5' |
|
'6': '6' |
|
'7': '7' |
|
'8': '8' |
|
'9': '9' |
|
'10': A |
|
'11': B |
|
'12': C |
|
'13': D |
|
'14': E |
|
'15': F |
|
'16': G |
|
'17': H |
|
'18': I |
|
'19': J |
|
'20': K |
|
'21': L |
|
'22': M |
|
'23': 'N' |
|
'24': O |
|
'25': P |
|
'26': Q |
|
'27': R |
|
'28': S |
|
'29': T |
|
'30': U |
|
'31': V |
|
'32': W |
|
'33': X |
|
'34': 'Y' |
|
'35': Z |
|
'36': a |
|
'37': b |
|
'38': c |
|
'39': d |
|
'40': e |
|
'41': f |
|
'42': g |
|
'43': h |
|
'44': i |
|
'45': j |
|
'46': k |
|
'47': l |
|
'48': m |
|
'49': 'n' |
|
'50': o |
|
'51': p |
|
'52': q |
|
'53': r |
|
'54': s |
|
'55': t |
|
'56': u |
|
'57': v |
|
'58': w |
|
'59': x |
|
'60': 'y' |
|
'61': z |
|
splits: |
|
- name: train |
|
num_bytes: 206539811.49 |
|
num_examples: 814277 |
|
download_size: 200734290 |
|
dataset_size: 206539811.49 |
|
configs: |
|
- config_name: default |
|
data_files: |
|
- split: train |
|
path: data/train-* |
|
task_categories: |
|
- image-classification |
|
size_categories: |
|
- 100K<n<1M |
|
--- |
|
|
|
# Dataset Card for FEMNIST |
|
|
|
The FEMNIST dataset is a part of the [LEAF](https://leaf.cmu.edu/) benchmark. |
|
It represents image classification of handwritten digits, lower and uppercase letters, giving 62 unique labels. |
|
|
|
## Dataset Details |
|
|
|
### Dataset Description |
|
|
|
Each sample is comprised of a (28x28) grayscale image, writer_id, hsf_id, and character. |
|
|
|
- **Curated by:** [LEAF](https://leaf.cmu.edu/) |
|
- **License:** BSD 2-Clause License |
|
|
|
### Dataset Sources |
|
|
|
The FEMNIST is a preprocessed (in a way that resembles preprocessing for MNIST) version of [NIST SD 19](https://www.nist.gov/srd/nist-special-database-19). |
|
|
|
## Uses |
|
|
|
This dataset is intended to be used in Federated Learning settings. |
|
|
|
### Direct Use |
|
|
|
We recommend using [Flower Dataset](https://flower.ai/docs/datasets/) (flwr-datasets) and [Flower](https://flower.ai/docs/framework/) (flwr). |
|
|
|
To partition the dataset, do the following. |
|
1. Install the package. |
|
```bash |
|
pip install flwr-datasets[vision] |
|
``` |
|
2. Use the HF Dataset under the hood in Flower Datasets. |
|
```python |
|
from flwr_datasets import FederatedDataset |
|
from flwr_datasets.partitioner import NaturalIdPartitioner |
|
|
|
fds = FederatedDataset( |
|
dataset="flwrlabs/femnist", |
|
partitioners={"train": NaturalIdPartitioner(partition_by="writer_id")} |
|
) |
|
partition = fds.load_partition(partition_id=0) |
|
``` |
|
|
|
## Dataset Structure |
|
|
|
|
|
The whole dataset is kept in the train split. If you want to leave out some part of the dataset for centralized evaluation, use Resplitter. (The full example is coming soon here) |
|
Dataset fields: |
|
|
|
* image: grayscale of size (28, 28), PIL Image, |
|
* writer_id: string, unique value per each writer, |
|
* hsf_id: string, corresponds to the way that the data was collected (see more details [here](https://www.nist.gov/srd/nist-special-database-19), |
|
* character: ClassLabel (it means it's int if you access it in the dataset, but you can convert it to the original value by `femnist["train"].features["character"].int2str(value)`. |
|
|
|
|
|
## Dataset Creation |
|
|
|
### Curation Rationale |
|
|
|
This dataset was created as a part of the [LEAF](https://leaf.cmu.edu/) benchmark. |
|
We make it available in the HuggingFace Hub to facilitate its seamless use in FlowerDatasets. |
|
|
|
### Source Data |
|
|
|
[NIST SD 19](https://www.nist.gov/srd/nist-special-database-19) |
|
|
|
#### Data Collection and Processing |
|
|
|
For the preprocessing details, please refer to the original paper, the source code and [NIST SD 19](https://www.nist.gov/srd/nist-special-database-19) |
|
|
|
#### Who are the source data producers? |
|
|
|
For the preprocessing details, please refer to the original paper, the source code and [NIST SD 19](https://www.nist.gov/srd/nist-special-database-19) |
|
|
|
|
|
## Citation |
|
|
|
When working on the LEAF benchmark, please cite the original paper. If you're using this dataset with Flower Datasets, you can cite Flower. |
|
|
|
**BibTeX:** |
|
``` |
|
@article{DBLP:journals/corr/abs-1812-01097, |
|
author = {Sebastian Caldas and |
|
Peter Wu and |
|
Tian Li and |
|
Jakub Kone{\v{c}}n{\'y} and |
|
H. Brendan McMahan and |
|
Virginia Smith and |
|
Ameet Talwalkar}, |
|
title = {{LEAF:} {A} Benchmark for Federated Settings}, |
|
journal = {CoRR}, |
|
volume = {abs/1812.01097}, |
|
year = {2018}, |
|
url = {http://arxiv.org/abs/1812.01097}, |
|
eprinttype = {arXiv}, |
|
eprint = {1812.01097}, |
|
timestamp = {Wed, 23 Dec 2020 09:35:18 +0100}, |
|
biburl = {https://dblp.org/rec/journals/corr/abs-1812-01097.bib}, |
|
bibsource = {dblp computer science bibliography, https://dblp.org} |
|
} |
|
``` |
|
``` |
|
@article{DBLP:journals/corr/abs-2007-14390, |
|
author = {Daniel J. Beutel and |
|
Taner Topal and |
|
Akhil Mathur and |
|
Xinchi Qiu and |
|
Titouan Parcollet and |
|
Nicholas D. Lane}, |
|
title = {Flower: {A} Friendly Federated Learning Research Framework}, |
|
journal = {CoRR}, |
|
volume = {abs/2007.14390}, |
|
year = {2020}, |
|
url = {https://arxiv.org/abs/2007.14390}, |
|
eprinttype = {arXiv}, |
|
eprint = {2007.14390}, |
|
timestamp = {Mon, 03 Aug 2020 14:32:13 +0200}, |
|
biburl = {https://dblp.org/rec/journals/corr/abs-2007-14390.bib}, |
|
bibsource = {dblp computer science bibliography, https://dblp.org} |
|
} |
|
``` |
|
|
|
## Dataset Card Contact |
|
|
|
In case of any doubts, please contact [Flower Labs](https://flower.ai/). |