1 Star 0 Fork 0

Huang / fashion-mnist

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
MIT

Fashion-MNIST

GitHub stars Gitter Readme-EN Readme-JA License: MIT Year-In-Review

目录

Fashion-MNIST是一个替代MNIST手写数字集的图像数据集。 它是由Zalando(一家德国的时尚科技公司)旗下的研究部门提供。其涵盖了来自10种类别的共7万个不同商品的正面图片。Fashion-MNIST的大小、格式和训练集/测试集划分与原始的MNIST完全一致。60000/10000的训练测试数据划分,28x28的灰度图片。你可以直接用它来测试你的机器学习和深度学习算法性能,且不需要改动任何的代码。

这个数据集的样子大致如下(每个类别占三行):

为什么要做这个数据集?

经典的MNIST数据集包含了大量的手写数字。十几年来,来自机器学习、机器视觉、人工智能、深度学习领域的研究员们把这个数据集作为衡量算法的基准之一。你会在很多的会议,期刊的论文中发现这个数据集的身影。实际上,MNIST数据集已经成为算法作者的必测的数据集之一。有人曾调侃道:"如果一个算法在MNIST不work, 那么它就根本没法用;而如果它在MNIST上work, 它在其他数据上也可能不work!"

Fashion-MNIST的目的是要成为MNIST数据集的一个直接替代品。作为算法作者,你不需要修改任何的代码,就可以直接使用这个数据集。Fashion-MNIST的图片大小,训练、测试样本数及类别数与经典MNIST完全相同

写给专业的机器学习研究者

我们是认真的。取代MNIST数据集的原因由如下几个:

获取数据

很多的机器学习库已经内置了Fashion-MNIST数据或接口,方便你直接使用。

你可以使用以下链接下载这个数据集。Fashion-MNIST的数据集的存储方式和命名与经典MNIST数据集完全一致。

名称 描述 样本数量 文件大小 链接 MD5校验和
train-images-idx3-ubyte.gz 训练集的图像 60,000 26 MBytes 下载 8d4fb7e6c68d591d4c3dfef9ec88bf0d
train-labels-idx1-ubyte.gz 训练集的类别标签 60,000 29 KBytes 下载 25c81989df183df01b3e8a0aad5dffbe
t10k-images-idx3-ubyte.gz 测试集的图像 10,000 4.3 MBytes 下载 bef4ecab320f06d8554ea6380940ec79
t10k-labels-idx1-ubyte.gz 测试集的类别标签 10,000 5.1 KBytes 下载 bb300cfdad3c16e7a12a480ee83cd310

或者,你可以直接克隆这个代码库。数据集就放在data/fashion下。这个代码库还包含了一些用于评测和可视化的脚本。

git clone git@github.com:zalandoresearch/fashion-mnist.git

类别标注

每个训练和测试样本都按照以下类别进行了标注:

标注编号 描述
0 T-shirt/top(T恤)
1 Trouser(裤子)
2 Pullover(套衫)
3 Dress(裙子)
4 Coat(外套)
5 Sandal(凉鞋)
6 Shirt(汗衫)
7 Sneaker(运动鞋)
8 Bag(包)
9 Ankle boot(踝靴)

如何载入数据?

使用Python (需要安装numpy)

  • 你可以直接使用utils/mnist_reader
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')

使用Tensorflow

请确保你已经下载了我们的数据集并把它放到了data/fashion下。不然, Tensorflow会自动下载并使用原始的MNIST。

from tensorflow.examples.tutorials.mnist import input_data
data = input_data.read_data_sets('data/fashion')

data.train.next_batch(BATCH_SIZE)

注意,Tensorflow (master ver.) 支持向read_data_sets函数传入MNIST数据集的地址。你可以使用:

data = input_data.read_data_sets('data/fashion', source_url='http://fashion-mnist.s3-website.eu-central-1.amazonaws.com/')

Tensorflow的官网也提供了一份使用高级APItf.keras训练Fashion-MNIST的详细教程,你可以在这里查看它

使用其它机器学习库

截止今日,以下软件库中已内置了对Fashion-MNIST的支持。你只需要按照他们的文档载入Fashion-MNIST即可使用此数据集。

欢迎你同我们一起,为各个机器学习库增加对Fashion-MNIST的支持。

使用其它的语言

作为机器学习领域里最常使用的数据集,人们用各种语言为MNIST开发了很多载入工具。有一些方法需要先解压数据文件。注意,我们并没有测试过所有的载入方法。

基准测试

我们使用scikit-learn做了一套自动评测系统。它涵盖了除深度学习之外的129种经典机器学习模型(包含不同的参数)。你可以在这里以互动的方式查看结果。

你可以运行benchmark/runner.py对结果进行重现。而我们更推荐的方法是使用Dockerfile打包部署后以Container的方式运行。

我们欢迎你提交自己的模型评测。请使用Github新建一个Issue。不妨先看看如何贡献。如果你提交自己的模型,请先确保这个模型没有在这个列表中被测试过。

下面这个表格总结了提交的一些测试结果。注意,我们并没有对这些结果的准确性进行验证。你可以通过提交者附带的代码尝试对结果进行重现。当然,测试准确率最终取决于Epoch的多少,Batch的大小等因素。如果你发现了下表中的不妥,欢迎提交新的Issue。

算法 预处理 Fashion测试集准确率 经典MNIST测试集准确率 提交者 代码
2 Conv+pooling None 0.876 - Kashif Rasul :link:
2 Conv+pooling None 0.916 - Tensorflow's doc :link:
2 Conv+pooling+ELU activation (PyTorch) None 0.903 - @AbhirajHinge :link:
2 Conv Normalization, random horizontal flip, random vertical flip, random translation, random rotation. 0.919 0.971 Kyriakos Efthymiadis :link:
2 Conv <100K parameters None 0.925 0.992 @hardmaru :link:
2 Conv ~113K parameters Normalization 0.922 0.993 Abel G. :link:
2 Conv+3 FC ~1.8M parameters Normalization 0.932 0.994 @Xfan1025 :link:
2 Conv+3 FC ~500K parameters Augmentation, batch normalization 0.934 0.994 @cmasch :link:
2 Conv+pooling+BN None 0.934 - @khanguyen1207 :link:
2 Conv+2 FC Random Horizontal Flips 0.939 - @ashmeet13 :link:
3 Conv+2 FC None 0.907 - @Cenk Bircanoğlu :link:
3 Conv+pooling+BN None 0.903 0.994 @meghanabhange :link:
3 Conv+pooling+2 FC+dropout None 0.926 - @Umberto Griffo :link:
3 Conv+BN+pooling None 0.921 0.992 @GunjanChhablani :link:
5 Conv+BN+pooling None 0.931 - @Noumanmufc1 :link:
CNN with optional shortcuts, dense-like connectivity standardization+augmentation+random erasing 0.947 - @kennivich :link:
GRU+SVM None 0.888 0.965 @AFAgarap :link:
GRU+SVM with dropout None 0.897 0.988 @AFAgarap :link:
WRN40-4 8.9M params standard preprocessing (mean/std subtraction/division) and augmentation (random crops/horizontal flips) 0.967 - @ajbrock :link: :link:
DenseNet-BC 768K params standard preprocessing (mean/std subtraction/division) and augmentation (random crops/horizontal flips) 0.954 - @ajbrock :link: :link:
MobileNet augmentation (horizontal flips) 0.950 - @苏剑林 :link:
ResNet18 Normalization, random horizontal flip, random vertical flip, random translation, random rotation. 0.949 0.979 Kyriakos Efthymiadis :link:
GoogleNet with cross-entropy loss None 0.937 - @Cenk Bircanoğlu :link:
AlexNet with Triplet loss None 0.899 - @Cenk Bircanoğlu :link:
SqueezeNet with cyclical learning rate 200 epochs None 0.900 - @snakers4 :link:
Dual path network with wide resnet 28-10 standard preprocessing (mean/std subtraction/division) and augmentation (random crops/horizontal flips) 0.957 - @Queequeg :link:
MLP 256-128-100 None 0.8833 - @heitorrapela :link:
VGG16 26M parameters None 0.935 - @QuantumLiu :link: :link:
WRN-28-10 standard preprocessing (mean/std subtraction/division) and augmentation (random crops/horizontal flips) 0.959 - @zhunzhong07 :link:
WRN-28-10 + Random Erasing standard preprocessing (mean/std subtraction/division) and augmentation (random crops/horizontal flips) 0.963 - @zhunzhong07 :link:
Human Performance Crowd-sourced evaluation of human (with no fashion expertise) performance. 1000 randomly sampled test images, 3 labels per image, majority labelling. 0.835 - Leo -
Capsule Network 8M parameters Normalization and shift at most 2 pixel and horizontal flip 0.936 - @XifengGuo :link:
HOG+SVM HOG 0.926 - @subalde :link:
XgBoost scaling the pixel values to mean=0.0 and var=1.0 0.898 0.958 @anktplwl91 :link:
DENSER - 0.953 0.997 @fillassuncao :link: :link:
Dyra-Net Rescale to unit interval 0.906 - @Dirk Schäfer :link: :link:
Google AutoML 24 compute hours (higher quality) 0.939 - @Sebastian Heinz :link:

更多在Fashion-MNIST上的探索和尝试

Fashion-MNIST: 年度总结

在Google Scholar中查看引用Fashion-MNIST的论文

生成对抗网络 (GANs)

聚类

视频教程

Machine Learning Meets Fashion by Yufeng G @ Google Cloud

Machine Learning Meets Fashion

Introduction to Kaggle Kernels by Yufeng G @ Google Cloud

Introduction to Kaggle Kernels

动手学深度学习 by Mu Li @ Amazon AI

MXNet/Gluon中文频道

Apache MXNet으로 배워보는 딥러닝(Deep Learning) - 김무현 (AWS 솔루션즈아키텍트)

Apache MXNet으로 배워보는 딥러닝(Deep Learning)

数据可视化

t-SNE在Fashion-MNIST(左侧)和经典MNIST上的可视化(右侧)

PCA在Fashion-MNIST(左侧)和经典MNIST上的可视化(右侧)

UMAP在Fashion-MNIST(左侧)和经典MNIST上的可视化(右侧)

参与贡献

我们热烈欢迎您参与贡献这个项目。请先阅读这里! 并查看有什么open issues可以帮助解决。

联系

若要讨论这个数据集上的应用和评测,请使用这个聊天室Gitter

在论文中引用Fashion-MNIST

如果你在你的研究工作中使用了这个数据集,欢迎你引用这篇论文:

Fashion-MNIST: a Novel Image Dataset for Benchmarking Machine Learning Algorithms. Han Xiao, Kashif Rasul, Roland Vollgraf. arXiv:1708.07747

亦可使用Biblatex:

@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},
}

有谁引用了Fashion-MNIST?

License

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.

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.

简介

暂无描述 展开 收起
MIT
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
1
https://gitee.com/hcj5206/fashion-mnist.git
git@gitee.com:hcj5206/fashion-mnist.git
hcj5206
fashion-mnist
fashion-mnist
master

搜索帮助