explaingit

zalandoresearch/fashion-mnist

12,733PythonAudience · researcherComplexity · 2/5Setup · easy

TLDR

A dataset of 70,000 clothing images in 10 categories designed as a harder drop-in replacement for the classic MNIST handwritten digit dataset. Loads directly in PyTorch, TensorFlow, and Keras with no manual download needed.

Mindmap

mindmap
  root((repo))
    What it is
      Image dataset
      10 clothing categories
      70,000 images total
    Why it exists
      MNIST replacement
      Harder benchmark
      Same file format
    How to load it
      PyTorch built-in
      Keras built-in
      TensorFlow Datasets
      NumPy raw files
    Use cases
      Model benchmarking
      Classification tutorials
      Research comparisons
    Background
      Zalando research team
      Academic papers
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Things people build with this

USE CASE 1

Train and benchmark an image classification model against a standard reference dataset that is more challenging than MNIST digits.

USE CASE 2

Replace MNIST with Fashion-MNIST in an existing training script or tutorial without changing any data-loading code.

USE CASE 3

Compare your model's accuracy against the community benchmark results table provided in the repository.

USE CASE 4

Run quick classification experiments in PyTorch or Keras without downloading any files manually.

Tech stack

PythonPyTorchTensorFlowKerasNumPy

Getting it running

Difficulty · easy Time to first run · 5min

In plain English

Fashion-MNIST is a dataset created by the research team at Zalando, the European fashion retailer. It contains 70,000 small grayscale images of clothing items, split into 60,000 for training machine learning models and 10,000 for testing them. Each image is 28 by 28 pixels and belongs to one of ten categories: T-shirt or top, trouser, pullover, dress, coat, sandal, shirt, sneaker, bag, or ankle boot. The dataset was built as a direct replacement for a much older and widely used dataset called MNIST, which contains handwritten digit images in the exact same format. The Zalando team's argument is that MNIST has become too easy: modern machine learning methods can classify handwritten digits with near-perfect accuracy, which makes it a poor test for comparing different approaches. They argue that clothing images are harder to distinguish, making Fashion-MNIST a more meaningful benchmark while keeping the same file format and size so that existing code written for MNIST can load it without any changes. Because it mirrors the MNIST format exactly, Fashion-MNIST is built into many popular machine learning libraries already. You can load it directly in PyTorch, TensorFlow, Keras, Hugging Face Datasets, and several others without downloading anything manually. If you prefer to download the raw files yourself, the README links to them directly. The repository also includes scripts for loading the data with NumPy, visualizing the images, and running benchmark comparisons. The README lists results from many different approaches that have been tested on this dataset, providing a reference table researchers can use to see how their own methods compare. This is a dataset and benchmarking resource, not an application. Its audience is machine learning researchers and practitioners who want a standard test case that is more demanding than handwritten digits but still simple enough to iterate on quickly.

Copy-paste prompts

Prompt 1
Load the Fashion-MNIST dataset in PyTorch and train a simple CNN to classify clothing images into the 10 categories.
Prompt 2
Replace MNIST with Fashion-MNIST in my existing Keras training script, show me the one-line change needed.
Prompt 3
Write a Python script using NumPy to load the raw Fashion-MNIST files and display a grid of sample images from each of the 10 classes.
Prompt 4
Run a benchmark in PyTorch comparing logistic regression vs a simple CNN on Fashion-MNIST and print the test accuracy for each.
Prompt 5
My model gets 90% on MNIST, help me adapt it for Fashion-MNIST and identify where accuracy drops between clothing categories.
Open on GitHub → Explain another repo

← zalandoresearch on gitmyhub — every repo by this author, as a profile.

Verify against the repo before relying on details.