# Fashion-MNIST (2017)

> 70,000 Zalando product images, 28×28 grayscale, 10 classes. A harder MNIST.

Page: https://mralbu.github.io/ai-datasets/d/fashion-mnist

## Key facts

- Category: Vision
- Task: Image classification (clothing)
- Creators: Han Xiao, Kashif Rasul, Roland Vollgraf (Zalando Research)
- Size: 70,000 images
- Splits: train 60,000, test 10,000
- Input: 28×28 grayscale image
- Labels: T-shirt/top, trouser, pullover, dress, coat, sandal, shirt, sneaker, bag, ankle boot
- License: MIT
- Paper: [Fashion-MNIST: a Novel Image Dataset for Benchmarking Machine Learning Algorithms](https://arxiv.org/abs/1708.07747)
- Homepage: https://github.com/zalandoresearch/fashion-mnist
- Hugging Face: [zalando-datasets/fashion_mnist](https://huggingface.co/datasets/zalando-datasets/fashion_mnist)
- Sampled at Hub revision 531be5e2ccc9dba0c201ad3ae567a4f3d16ecdd2 (2026-11-07)

## Why it matters

Built as a drop-in replacement for MNIST: same image size, same format, same 60k/10k split, so any MNIST code runs unchanged. The authors' case was that MNIST had become too easy (classic methods reach 97%, CNNs 99.7%) and too unlike modern vision problems. Fashion-MNIST leaves more room between a linear model and a good CNN, and it became the second dataset in countless tutorials and papers.

## Worth knowing

- Each image is a Zalando catalog photo that was trimmed, resized so its longest edge is 28 px, sharpened, centered, inverted and converted to grayscale.
- Shirt is the hardest class. It is easily confused with T-shirt/top, pullover and coat, and even humans disagree on it.
- A small crowd-sourced test in the project README put untrained human accuracy at about 83.5%, while good CNNs pass 93%.

## Get the data

```bash
# pip install -U huggingface_hub
hf download zalando-datasets/fashion_mnist --repo-type dataset \
  --local-dir fashion-mnist
```

```python
from datasets import load_dataset   # pip install datasets

ds = load_dataset("zalando-datasets/fashion_mnist", "fashion_mnist")
print(ds)
```

```python
import polars as pl

df = pl.read_parquet("hf://datasets/zalando-datasets/fashion_mnist@~parquet/fashion_mnist/test/*.parquet")
print(df.shape)
```

## Related datasets

- [MNIST](https://huggingface.co/datasets/ylecun/mnist): 1998, the dataset it replaces (on this site: https://mralbu.github.io/ai-datasets/d/mnist)
- [KMNIST](https://github.com/rois-codh/kmnist): 2018, cursive Japanese characters in the same format

## Landmark papers

- [Random Erasing Data Augmentation](https://arxiv.org/abs/1708.04896) (2017)
