Fashion-MNIST Training Images
60,000 28x28 grayscale training images of fashion articles
Data sample
License
MIT License (2017 Zalando SE); retain copyright and license notice when redistributing.
Zalando fashion article images - 70,000 28x28 grayscale images across 10 clothing categories, a modern MNIST replacement
A fashion product image dataset published by Zalando Research. 70,000 28×28 grayscale images across 10 categories—a direct replacement for the classic MNIST, providing a more challenging benchmark for image classification research.
Fashion-MNIST is becoming a new standard benchmark dataset for image classification
A drop-in replacement for classic MNIST, compatible with the same file format, data structure, and toolchain, with no code changes required.
Real clothing images (T-shirts, trousers, dresses, coats, etc.) offer greater visual diversity and classification challenges than handwritten digits.
Uses the permissive MIT license, allowing free use in commercial projects and academic research; the original copyright and license notices must be retained upon redistribution.
Training/test images and labels each have a separate ZIP containing the original IDX.GZIP, MIT license, and source manifest; IDX tools can read the files after extraction.
Harder than MNIST but easier than CIFAR-10, making it ideal for progressing from beginner to advanced learning and model tuning experiments.
PyTorch, TensorFlow, and Keras all provide built-in support, allowing the dataset to be loaded with one line of code and used out of the box.
From academic research to industrial applications—common uses of Fashion-MNIST
CNN, ResNet, Vision Transformer—a go-to benchmark dataset for validating various image classification models
Compare the accuracy, parameter counts, and inference speeds of different network architectures on standard data
Evaluate the performance of automated machine learning frameworks and validate optimal model architectures found through automated search
Validate product classification prototypes for fashion e-commerce and quickly build a clothing image recognition MVP
Fashion-MNIST contains grayscale images of fashion items in 10 categories
Label Category Name Description ─────────────────────────────────────── 0 T-shirt/top T-shirt/top 1 Trouser Trousers 2 Pullover Pullover 3 Dress Dress 4 Coat Coat 5 Sandal Sandal 6 Shirt Shirt 7 Sneaker Sneaker 8 Bag Bag 9 Ankle boot Ankle boot
From browsing to using, it takes just a few minutes
View the detailed description, class definitions, and data preview for the Fashion-MNIST dataset on the Ace Data Cloud platform.
First, review real images and the label distribution. After purchasing a dataset package, obtain four private ZIP delivery files from the console: training images, training labels, test images, and test labels.
After extracting the delivery files, load the images and labels using a tool that supports IDX. The torchvision example below downloads the same benchmark from a public source for quick experimentation.
import torch
import torch.nn as nn
import torch.optim as optim
from torchvision import datasets, transforms
from torch.utils.data import DataLoader
# 数据预处理
transform = transforms.Compose([
transforms.ToTensor(),
transforms.Normalize((0.5,), (0.5,))
])
# 以下 torchvision 示例单独从公开来源下载,不读取平台交付 ZIP
# 加载 Fashion-MNIST 数据集
train_data = datasets.FashionMNIST(
root="./data", train=True, download=True, transform=transform
)
test_data = datasets.FashionMNIST(
root="./data", train=False, download=True, transform=transform
)
train_loader = DataLoader(train_data, batch_size=64, shuffle=True)
test_loader = DataLoader(test_data, batch_size=64, shuffle=False)
# 定义简单的神经网络
class FashionNet(nn.Module):
def __init__(self):
super().__init__()
self.flatten = nn.Flatten()
self.fc1 = nn.Linear(28 * 28, 256)
self.fc2 = nn.Linear(256, 128)
self.fc3 = nn.Linear(128, 10)
self.relu = nn.ReLU()
def forward(self, x):
x = self.flatten(x)
x = self.relu(self.fc1(x))
x = self.relu(self.fc2(x))
return self.fc3(x)
model = FashionNet()
criterion = nn.CrossEntropyLoss()
optimizer = optim.Adam(model.parameters(), lr=0.001)
# 训练模型
for epoch in range(5):
model.train()
for images, labels in train_loader:
optimizer.zero_grad()
outputs = model(images)
loss = criterion(outputs, labels)
loss.backward()
optimizer.step()
# 评估准确率
model.eval()
correct, total = 0, 0
with torch.no_grad():
for images, labels in test_loader:
outputs = model(images)
_, predicted = torch.max(outputs, 1)
total += labels.size(0)
correct += (predicted == labels).sum().item()
print(f"测试准确率: {100 * correct / total:.2f}%") # 约 88%
Preview real images and label distributions, and view one-time packages on the pricing page.
60,000 28x28 grayscale training images of fashion articles
MIT License (2017 Zalando SE); retain copyright and license notice when redistributing.
60,000 training labels (10 categories)
MIT License (2017 Zalando SE); retain copyright and license notice when redistributing.
10,000 28x28 grayscale test images of fashion articles
MIT License (2017 Zalando SE); retain copyright and license notice when redistributing.
10,000 test labels (10 categories)
MIT License (2017 Zalando SE); retain copyright and license notice when redistributing.
After payment, the delivery appears in My Datasets. Download links are short-lived.