File size: 1,333 Bytes
7f3e821
bd482ee
7f3e821
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
bd482ee
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
---
license: cc-by-sa-3.0
task_categories: []
tags:
- image
- mnist
pretty_name: MNIST Handwritten Digits
---

# Info

Balanced subsample of the classic MNIST handwritten digits dataset (LeCun, Cortes,
Burges), for use with the [AUTOENCODIX](https://github.com/jan-forest/autoencodix_package)
`Imagix` tutorial.

## Contents

- **2000 images**, 200 per digit (digits 0-9), 28x28 grayscale PNG, drawn from the
  MNIST training split.
- `mnist_images.zip`: image files, named `mnist_<digit>_<index>.png`.
- `mnist_mappings.txt`: tab-separated annotation file, columns `sample_ids`,
  `img_paths`, `label` (digit class, 0-9).

## Loading

```python
from huggingface_hub import hf_hub_download
import zipfile

mapping_path = hf_hub_download(repo_id="autoencodix/mnist", repo_type="dataset", filename="mnist_mappings.txt")
zip_path = hf_hub_download(repo_id="autoencodix/mnist", repo_type="dataset", filename="mnist_images.zip")

with zipfile.ZipFile(zip_path) as zf:
    zf.extractall("data/images/")
```

## License

**CC BY-SA 3.0.** Original MNIST dataset by Yann LeCun, Corinna Cortes, and
Christopher J.C. Burges, derived from NIST, licensed under
[Creative Commons Attribution-ShareAlike 3.0](https://creativecommons.org/licenses/by-sa/3.0/).
See [http://yann.lecun.com/exdb/mnist/](http://yann.lecun.com/exdb/mnist/) for details.