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.
A fashion product image dataset released by Zalando Research. 70,000 28×28 grayscale images, 10 categories—serving as a direct replacement for the classic MNIST and providing a more challenging benchmark for image classification research.
Fashion-MNIST is becoming the new standard benchmark dataset in image classification
A direct replacement for classic MNIST, compatible with the same file formats, data structures, and toolchains, allowing you to switch without modifying any code.
Real clothing images (T-shirts, trousers, dresses, coats, etc.), offering greater visual diversity and classification challenges than handwritten digits.
Uses the permissive MIT License, freely available for both commercial projects and academic research; the original copyright and license notice must be retained when redistributing.
Training/test images and labels each have separate ZIP files, containing raw IDX.GZIP files, the MIT License, and a source manifest; IDX tools can read them after extraction.
More difficult than MNIST but simpler than CIFAR-10, making it ideal for transitioning from beginner to advanced learning and for model tuning experiments.
PyTorch, TensorFlow, and Keras all provide built-in support; load the dataset with a single line of code and use it out of the box.
From academic research to industrial applications—common uses of Fashion-MNIST
CNN, ResNet, Vision Transformer—the preferred benchmark dataset for validating various image classification models
Compare the accuracy, parameter count, and inference speed of different network architectures on standardized data
Used to evaluate the performance of automated machine learning frameworks and validate automatically discovered optimal model architectures
Prototype validation for product classification in fashion e-commerce scenarios, enabling rapid development of apparel image recognition MVPs
Fashion-MNIST contains grayscale images of fashion items from 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 only takes a few minutes
View detailed descriptions, category definitions, and data previews for the Fashion-MNIST dataset on the Ace Data Cloud platform.
Four private ZIP files with licensing information are ready, but self-service purchase and download are not yet available; first review previews of the actual images and label distributions for each item.
Load the data with PyTorch, TensorFlow, or Keras in one line of code and start training your image classification model.
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%
You can first view verified real images and label distributions; purchase and licensed downloads will be available after full verification.