Fashion-MNIST
is a dataset of Zalando's article imagesโconsisting of a training set of 60,000 examples and a test set of 10,000 examples. Each example is a 28x28 grayscale image, associated with a label from 10 classes. We intend Fashion-MNIST
to serve as a direct drop-in replacement for the original MNIST dataset for benchmarking machine learning algorithms. It shares the same image size and structure of training and testing splits.
Here's an example how the data looks (each class takes three-rows):
The original MNIST dataset contains a lot of handwritten digits. Members of the AI/ML/Data Science community love this dataset and use it as a benchmark to validate their algorithms. In fact, MNIST is often the first dataset researchers try. "If it doesn't work on MNIST, it won't work at all", they said. "Well, if it does work on MNIST, it may still fail on others."
Seriously, we are talking about replacing MNIST. Here are some good reasons:
- MNIST is too easy. Convolutional nets can achieve 99.7% on MNIST. Classic machine learning algorithms can also achieve 97% easily. Check out our side-by-side benchmark for Fashion-MNIST vs. MNIST, and read "Most pairs of MNIST digits can be distinguished pretty well by just one pixel."
- MNIST is overused. In this April 2017 Twitter thread, Google Brain research scientist and deep learning expert Ian Goodfellow calls for people to move away from MNIST.
- MNIST can not represent modern CV tasks, as noted in this April 2017 Twitter thread, deep learning expert/Keras author Franรงois Chollet.
You can use direct links to download the dataset. The data is stored in the same format as the original MNIST data.
Name | Content | Examples | Size | Link |
---|---|---|---|---|
train-images-idx3-ubyte.gz |
training set images | 60,000 | 26 MBytes | Download |
train-labels-idx1-ubyte.gz |
training set labels | 60,000 | 29 KBytes | Download |
t10k-images-idx3-ubyte.gz |
test set images | 10,000 | 4.2 MBytes | Download |
t10k-labels-idx1-ubyte.gz |
test set labels | 10,000 | 5.0 KBytes | Download |
Alternatively, you can clone this GitHub repository; the dataset appears under data/fashion
. This repo also contains some scripts for benchmark and visualization.
git clone git@github.com:zalandoresearch/fashion-mnist.git
Each training and test example is assigned to one of the following labels:
Label | Description |
---|---|
0 | T-shirt/top |
1 | Trouser |
2 | Pullover |
3 | Dress |
4 | Coat |
5 | Sandal |
6 | Shirt |
7 | Sneaker |
8 | Bag |
9 | Ankle boot |
Loading data with Python (requires NumPy)
Use utils/mnist_reader
in this repo:
import mnist_reader
X_train, y_train = mnist_reader.load_mnist('data/fashion', kind='train')
X_test, y_test = mnist_reader.load_mnist('data/fashion', kind='t10k')
from tensorflow.examples.tutorials.mnist import input_data
data = input_data.read_data_sets('data/fashion')
data.train.next_batch(BATCH_SIZE)
As one of the Machine Learning community's most popular datasets, MNIST has inspired people to implement loaders in many different languages. You can use these loaders with the Fashion-MNIST
dataset as well. (Note: may require decompressing first.) To date, we haven't yet tested all of these loaders with Fashion-MNIST.
We built an automatic benchmarking system based on scikit-learn
that covers 129 classifiers (but no deep learning) with different parameters. Find the results here.
You can reproduce the results by running benchmark/runner.py
. We recommend building and deploying this Dockerfile.
You are welcome to submit your benchmark; simply create a new issue and we'll list your results here. Before doing that, please make sure it does not already appear in this list. Visit our contributor guidelines for additional details.
Classifier | Preprocessing | Fashion test accuracy | MNIST test accuracy | Submitter | Code |
---|---|---|---|---|---|
2 Conv Layers with max pooling (Keras) | None | 0.876 | - | Kashif Rasul | ๐ |
2 Conv Layers with max pooling (Tensorflow) >300 epochs | None | 0.916 | - | Tensorflow's doc | ๐ |
Simple 2 layer convnet <100K parameter | None | 0.925 | 0.992 | @hardmaru | ๐ |
GRU+SVM | None | 0.888 | 0.965 | @AFAgarap | ๐ |
GRU+SVM with dropout | None | 0.855 | 0.976 | @AFAgarap | ๐ |
WRN40-4 8.9M params | standard preprocessing (mean/std subtraction/division) and augmentation (random crops/horizontal flips) | 0.967 | - | @ajbrock | ๐ ๐ |
DenseNet-BC 768K params | standard preprocessing (mean/std subtraction/division) and augmentation (random crops/horizontal flips) | 0.954 | - | @ajbrock | ๐ ๐ |
MobileNet | augmentation (horizontal flips) | 0.950 | - | @่ๅๆ | ๐ |
ResNet18 | Normalization, random horizontal flip, random vertical flip, random translation, random rotation. | 0.949 | 0.979 | Kyriakos Efthymiadis | ๐ |
simple 2-layer conv net | Normalization, random horizontal flip, random vertical flip, random translation, random rotation. | 0.919 | 0.971 | Kyriakos Efthymiadis | ๐ |
- Tensorflow implementation of various GANs and VAEs. (Recommend to read! Note how various GANs generate different results on Fashion-MNIST, which can not be easily observed on the original MNIST.)
- Make a ghost wardrobe using DCGAN
- fashion-mnist็gan็ฉๅ ท
- CGAN output after 5000 steps
Thanks for your interest in contributing! There are many ways to get involved; start with our contributor guidelines and then check these open issues for specific tasks.
To discuss the dataset, please use .
If you use Fashion-MNIST in a scientific publication, we would appreciate references to the following paper:
Fashion-MNIST: a Novel Image Dataset for Benchmarking Machine Learning Algorithms. Han Xiao, Kashif Rasul, Roland Vollgraf. arXiv:1708.07747
Biblatex entry:
@online{xiao2017/online,
author = {Han Xiao and Kashif Rasul and Roland Vollgraf},
title = {Fashion-MNIST: a Novel Image Dataset for Benchmarking Machine Learning Algorithms},
date = {2017-08-28},
year = {2017},
eprintclass = {cs.LG},
eprinttype = {arXiv},
eprint = {cs.LG/1708.07747},
}
The MIT License (MIT) Copyright ยฉ [2017] Zalando SE, https://tech.zalando.com
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the โSoftwareโ), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED โAS ISโ, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.