|
|
--- |
|
|
size_categories: |
|
|
- n<1K |
|
|
task_categories: |
|
|
- image-classification |
|
|
pretty_name: MNIST |
|
|
dataset_info: |
|
|
features: |
|
|
- name: image |
|
|
dtype: |
|
|
image: |
|
|
mode: L |
|
|
- name: label |
|
|
dtype: |
|
|
class_label: |
|
|
names: |
|
|
'0': '0' |
|
|
'1': '1' |
|
|
'2': '2' |
|
|
'3': '3' |
|
|
'4': '4' |
|
|
'5': '5' |
|
|
'6': '6' |
|
|
'7': '7' |
|
|
'8': '8' |
|
|
'9': '9' |
|
|
splits: |
|
|
- name: train |
|
|
num_bytes: 17223300.0 |
|
|
num_examples: 60000 |
|
|
- name: test |
|
|
num_bytes: 2875182.0 |
|
|
num_examples: 10000 |
|
|
download_size: 18157556 |
|
|
dataset_size: 20098482.0 |
|
|
configs: |
|
|
- config_name: default |
|
|
data_files: |
|
|
- split: train |
|
|
path: data/train-* |
|
|
- split: test |
|
|
path: data/test-* |
|
|
--- |
|
|
|
|
|
# Dataset Card for "MNIST" |
|
|
|
|
|
## Quick Start |
|
|
### Usage |
|
|
```python |
|
|
>>> from datasets.load import load_dataset |
|
|
|
|
|
>>> dataset = load_dataset('whyen-wang/mnist') |
|
|
>>> example = dataset['train'][0] |
|
|
>>> print(example) |
|
|
{'image': <PIL.PngImagePlugin.PngImageFile image mode=L size=28x28>, |
|
|
'label': 5} |
|
|
``` |
|
|
|
|
|
### Visualization |
|
|
```python |
|
|
>>> import cv2 |
|
|
>>> import numpy as np |
|
|
>>> from PIL import Image |
|
|
|
|
|
>>> def visualize(example): |
|
|
image = np.array(example['image']) |
|
|
image = cv2.resize(image, (280, 280)) |
|
|
cv2.putText( |
|
|
image, str(example['label']), (0, 50), cv2.FONT_HERSHEY_SIMPLEX, |
|
|
2, (255), 1, cv2.LINE_AA, False |
|
|
) |
|
|
return image |
|
|
|
|
|
>>> Image.fromarray(example) |
|
|
``` |
|
|
|
|
|
|
|
|
## Table of Contents |
|
|
- [Table of Contents](#table-of-contents) |
|
|
- [Dataset Description](#dataset-description) |
|
|
- [Dataset Summary](#dataset-summary) |
|
|
- [Supported Tasks and Leaderboards](#supported-tasks-and-leaderboards) |
|
|
- [Languages](#languages) |
|
|
- [Dataset Structure](#dataset-structure) |
|
|
- [Data Instances](#data-instances) |
|
|
- [Data Fields](#data-fields) |
|
|
- [Data Splits](#data-splits) |
|
|
- [Dataset Creation](#dataset-creation) |
|
|
- [Curation Rationale](#curation-rationale) |
|
|
- [Source Data](#source-data) |
|
|
- [Annotations](#annotations) |
|
|
- [Personal and Sensitive Information](#personal-and-sensitive-information) |
|
|
- [Considerations for Using the Data](#considerations-for-using-the-data) |
|
|
- [Social Impact of Dataset](#social-impact-of-dataset) |
|
|
- [Discussion of Biases](#discussion-of-biases) |
|
|
- [Other Known Limitations](#other-known-limitations) |
|
|
- [Additional Information](#additional-information) |
|
|
- [Dataset Curators](#dataset-curators) |
|
|
- [Licensing Information](#licensing-information) |
|
|
- [Citation Information](#citation-information) |
|
|
- [Contributions](#contributions) |
|
|
|
|
|
## Dataset Description |
|
|
|
|
|
- **Homepage:** http://yann.lecun.com/exdb/mnist/ |
|
|
- **Repository:** None |
|
|
- **Paper:** None |
|
|
- **Leaderboard:** [Papers with Code](https://paperswithcode.com/dataset/imagenet) |
|
|
- **Point of Contact:** None |
|
|
|
|
|
### Dataset Summary |
|
|
|
|
|
The MNIST database of handwritten digits, available from this page, has a training set of 60,000 examples, and a test set of 10,000 examples. It is a subset of a larger set available from NIST. The digits have been size-normalized and centered in a fixed-size image. |
|
|
|
|
|
### Supported Tasks and Leaderboards |
|
|
|
|
|
[Image Classification](https://huggingface.co/tasks/image-classification) |
|
|
|
|
|
### Languages |
|
|
|
|
|
None |
|
|
|
|
|
## Dataset Structure |
|
|
|
|
|
### Data Instances |
|
|
|
|
|
An example looks as follows. |
|
|
|
|
|
``` |
|
|
{ |
|
|
"image": PIL.Image(mode="L"), |
|
|
"label": "0" |
|
|
} |
|
|
``` |
|
|
|
|
|
### Data Fields |
|
|
|
|
|
[More Information Needed] |
|
|
|
|
|
### Data Splits |
|
|
|
|
|
| name | train | test | |
|
|
| ----- | -----: | -----: | |
|
|
|default| 60,000 | 10,000 | |
|
|
|
|
|
## Dataset Creation |
|
|
|
|
|
### Curation Rationale |
|
|
|
|
|
[More Information Needed] |
|
|
|
|
|
### Source Data |
|
|
|
|
|
#### Initial Data Collection and Normalization |
|
|
|
|
|
[More Information Needed] |
|
|
|
|
|
#### Who are the source language producers? |
|
|
|
|
|
[More Information Needed] |
|
|
|
|
|
### Annotations |
|
|
|
|
|
#### Annotation process |
|
|
|
|
|
[More Information Needed] |
|
|
|
|
|
#### Who are the annotators? |
|
|
|
|
|
[More Information Needed] |
|
|
|
|
|
### Personal and Sensitive Information |
|
|
|
|
|
[More Information Needed] |
|
|
|
|
|
## Considerations for Using the Data |
|
|
|
|
|
### Social Impact of Dataset |
|
|
|
|
|
[More Information Needed] |
|
|
|
|
|
### Discussion of Biases |
|
|
|
|
|
[More Information Needed] |
|
|
|
|
|
### Other Known Limitations |
|
|
|
|
|
[More Information Needed] |
|
|
|
|
|
## Additional Information |
|
|
|
|
|
### Dataset Curators |
|
|
|
|
|
[More Information Needed] |
|
|
|
|
|
### Licensing Information |
|
|
|
|
|
[More Information Needed] |
|
|
|
|
|
### Citation Information |
|
|
|
|
|
[More Information Needed] |
|
|
|
|
|
### Contributions |
|
|
|
|
|
Thanks to [@github-whyen-wang](https://github.com/whyen-wang) for adding this dataset. |
|
|
|