# Fashion-MNIST: a Novel Image Dataset for Benchmarking Machine Learning Algorithms

Fashion-MNIST swaps digits for clothing images to make a harder drop-in benchmark

Han Xiao, Kashif Rasul, Roland Vollgraf · arXiv · 2017-8-25

- **Problem** MNIST is nearly solved, with trained models reaching accuracies above 99.7%, so it has little room left to rank methods. A harder benchmark was needed that keeps MNIST's easy format.
- **Method** Fashion-MNIST keeps MNIST's 28 × 28 format and swaps the digits for fashion product images. Zalando's product photos are cropped, shrunk, sharpened, padded and negated into grayscale images with one label each.
- **Results** Fashion-MNIST is harder than MNIST for scikit-learn classifiers. The best SVC score on it is 0.897, below MNIST's best.

## Why MNIST no longer separates methods

MNIST remains the default testbed in deep learning, largely because its small size lets researchers prototype quickly. Common libraries and frameworks ship helper functions and examples built around MNIST, so most people reach for it first. The digits are now close to solved, since trained models reach accuracies above 99.7%. A benchmark at that level has little room left to rank methods.

The authors wanted a successor that keeps MNIST's accessibility, namely its small size, simple encoding and permissive license, while posing a harder classification task. Switching an existing MNIST pipeline over needs only a change of the URL the data is fetched from.

They also considered EMNIST, which adds uppercase and lowercase letters, but using it means extending the framework's MNIST helpers and changing the network to output the extra classes.

## A product-image dataset in MNIST's format

The key idea is to keep MNIST's container and image size while replacing the digits with pictures of clothing, footwear and bags. The source images come from Zalando's catalogue, where every product has professional photographs showing several views.

White products are left out, because their low contrast against the light-gray background would make them hard to see. The original pictures are 762 × 1000 JPEG files, and the 51 × 73 thumbnails are the input that the conversion starts from.

## How a thumbnail becomes a 28 × 28 image

The conversion runs in seven steps, and each step prepares the image for the next. The thumbnail is first converted to PNG, and then edges whose color matches the corner pixels are trimmed. Closeness is judged by a color distance of up to 5% of the full RGB intensity range.

Next, the longer side is shrunk to 28 pixels by dropping some rows and columns rather than computing new pixel values. A Gaussian sharpening step with radius and standard deviation of 1.0 follows, and its effect is strongest near outlines.

The shorter side is then extended to 28 pixels, and the image is placed at the center of the canvas. Finally the intensities are negated and the result is stored as 8-bit grayscale pixels.

## Labels, split and file format

Each product's class comes from its silhouette code, which fashion experts label by hand and a separate team at Zalando reviews. A product carries only one silhouette code, so every image has exactly one label.

The training set takes 6, 000 randomly selected examples from each class, which gives 60, 000 training images. The test set has 10, 000 images.

The files follow the MNIST layout, and the labels are sorted by class, which makes the label files smaller after compression. Sorting also makes it easier to pull out one class, but it means that shuffling the examples is left to the algorithm developer.

## Benchmark results against MNIST

The authors ran many scikit-learn classifiers on both datasets. Each algorithm was repeated 5 times with shuffled training data, and the mean test accuracy is the score.

This suggests that the extra difficulty shows up mainly for models that can capture more structure.

The authors also varied C for LinearSVC with the one-vs-rest scheme and L2 penalty. With the hinge loss, Fashion-MNIST accuracy fell from 0.836 at C=1 to 0.764 at C=10 and 0.758 at C=100. The squared hinge loss shows the same direction, dropping from 0.820 at C=1 to 0.779 and 0.776. So a larger C hurts this linear model on Fashion-MNIST across both losses.

## Limits of the evidence

The benchmark covers scikit-learn classifiers only, and each score is a mean over 5 runs with no spread shown. The tables include an MLPClassifier with at most two hidden layers, but no convolutional network appears. The EMNIST comparison stays at the level of discussion, so Fashion-MNIST was not benchmarked against it. Whether the harder ranking holds beyond the listed configurations was not tested.

## Paper info

- **Authors**: Han Xiao, Kashif Rasul, Roland Vollgraf
- **Venue**: arXiv · Preprint
- **First published**: 2017-8-25
- **Added**: 2026-11-11
- **Updated**: 2017-9-15
- **Version**: v2
- **arXiv**: 1708.07747
- **Category**: cs.LG · cs.CV · stat.ML
- **Original paper terms**: [arXiv non-exclusive 1.0](https://arxiv.org/licenses/nonexclusive-distrib/1.0/)
- **What we show**: Paper info and commentary

[Original paper ↗](https://arxiv.org/abs/1708.07747v2) · [PDF ↗](https://arxiv.org/pdf/1708.07747v2)

AI commentary is a separate explanation from the original paper and may contain errors. The original paper and figures follow each source's terms of use and any rights noted separately.

## Quote from the paper

Han Xiao, Kashif Rasul, Roland Vollgraf (2017). Fashion-MNIST: a Novel Image Dataset for Benchmarking Machine Learning Algorithms. arXiv:1708.07747v2. https://arxiv.org/abs/1708.07747v2

**BibTeX**

```
@misc{xiao2017fashion,
  title = {{Fashion-MNIST: a Novel Image Dataset for Benchmarking Machine Learning Algorithms}},
  author = {Han Xiao and Kashif Rasul and Roland Vollgraf},
  year = {2017},
  eprint = {1708.07747},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1708.07747v2}
}
```

## Related papers

- [EMNIST: an extension of MNIST to handwritten letters](https://refivu.com/en/papers/c0f15d57-13ab-41d2-b5f0-6b120e9504c7-emnist-an-extension-of-mnist-to-handwritten-letters.md)
- [Robust and Communication-Efficient Federated Learning from Non-IID Data](https://refivu.com/en/papers/8cfbbb74-26ed-46b1-9bcb-908c177043d6-robust-and-communication-efficient-federated-learning-from.md)
- [When Can a Rewiring Control Test LLM Weight Readers? C2 and an Eligibility Protocol](https://refivu.com/en/papers/ca62c1dd-9cda-4db6-95ba-f9a745d44a5a-when-can-a-rewiring-control-test-llm-weight.md)

## Other paper commentary

- [Searching for MobileNetV3](https://refivu.com/en/papers/0831f87e-094f-403b-b55b-27cf192fd9c4-searching-for-mobilenetv3.md)
- [UNet++: A Nested U-Net Architecture for Medical Image Segmentation](https://refivu.com/en/papers/156db9ed-e303-494d-af9e-c37b8715a287-unet-a-nested-u-net-architecture-for-medical.md)
- [Identity Mappings in Deep Residual Networks](https://refivu.com/en/papers/4dcb24a4-8fe8-4b2a-b957-a69e3f0212b0-identity-mappings-in-deep-residual-networks.md)
- [Perceptual Losses for Real-Time Style Transfer and Super-Resolution](https://refivu.com/en/papers/780825d2-51b4-4426-9340-0f1859a637a2-perceptual-losses-for-real-time-style-transfer-and.md)
- [Learning Deep Features for Discriminative Localization](https://refivu.com/en/papers/6bdcd2a6-8c81-46b4-95d2-9560f97fd427-learning-deep-features-for-discriminative-localization.md)
- [V-Net: Fully Convolutional Neural Networks for Volumetric Medical Image Segmentation](https://refivu.com/en/papers/a6e119c3-3c19-41b0-afee-c1d81e538a35-v-net-fully-convolutional-neural-networks-for-volumetric.md)
- [Gemini: A Family of Highly Capable Multimodal Models](https://refivu.com/en/papers/210f7673-6e80-4763-9ef2-d58f1a878648-gemini-a-family-of-highly-capable-multimodal-models.md)
- [Enriching Word Vectors with Subword Information](https://refivu.com/en/papers/c9e8d8e6-e24f-4128-8771-cadeb8b6c17e-enriching-word-vectors-with-subword-information.md)
- [DeepSeekMath: Pushing the Limits of Mathematical Reasoning in Open Language Models](https://refivu.com/en/papers/1de65a84-2d26-40df-8104-656807b7a166-deepseekmath-pushing-the-limits-of-mathematical-reasoning-in.md)
- [Training Verifiers to Solve Math Word Problems](https://refivu.com/en/papers/6eaa7788-f79e-40b8-87b7-3ca3217edfe9-training-verifiers-to-solve-math-word-problems.md)

## Terms in this paper

- [MNIST](https://refivu.com/en/terms/28b9bb66d1c6-mnist)
- [Machine Learning](https://refivu.com/en/terms/86e004431ba6-machine-learning)
- [test accuracy](https://refivu.com/en/terms/021c3c30b755-test-accuracy)
- [Fashion-MNIST](https://refivu.com/en/terms/a2f7c0a7f9f5-fashion-mnist)
- [benchmark](https://refivu.com/en/terms/83ba7f0a7ab9-benchmark)
- [EMNIST](https://refivu.com/en/terms/07145e6b598b-emnist)

---

AI-written text can contain mistakes. [Refivu](https://refivu.com/en/papers/a95484f1-3372-4671-ab1c-c9d084962641-fashion-mnist-a-novel-image-dataset-for-benchmarking)
