﻿# Fashion-MNIST: use a controlled grayscale classification baseline

Build a reproducible Fashion-MNIST baseline by checking product-image preprocessing, IDX decoding, training order and benchmark controls.

Author: Retrivium editorial team
Updated: 2026-11-04
Canonical URL: https://retrivium.ai/journal/data-guide-fashion-mnist-grayscale-classification/
Language: en

## Understand what the thumbnail represents

The [dataset paper](https://arxiv.org/html/1708.07747v2) builds Fashion-MNIST from front-view thumbnails of unique Zalando products. It excludes white products with insufficient background contrast and converts photographs into centered, intensity-inverted grayscale silhouettes. Consequently, this is a controlled product-category benchmark, not a test of recognizing clothes worn in arbitrary scenes. Trimming, sharpening and downsampling are part of the released visual representation. Applying another automatic background-removal stage changes that representation and should be described as an experimental transformation.

## Verify the IDX pair rather than the file name

The [owner repository](https://github.com/zalandoresearch/fashion-mnist) supplies separate image and label archives for train and t10k. Its [small reference reader](https://raw.githubusercontent.com/zalandoresearch/fashion-mnist/master/utils/mnist_reader.py) reads unsigned bytes after the respective IDX headers, then reshapes the pixel stream using the number of labels. The resulting flat vectors need the intended 28 by 28 geometry for convolutional models. Confirm sample alignment and archive identity before substituting the data into an old MNIST example. Compatible dimensions do not prove that an inherited tutorial actually loaded the fashion resource.

## Shuffle without detaching images from labels

The paper explains that examples are stored in label order for compression and leaves shuffling to the algorithm developer. Taking an initial contiguous slice as a quick training subset can therefore distort class coverage. Shuffle paired records, preserve the permutation and use class-aware sampling when constructing a small development subset. The ten categories include visually related tops as separate labels; changing those names into broader garment groups creates a different classification problem. Keep the source-to-target map with [dataset lineage](/journal/document-markdown-json-provenance/).

## Read the benchmark's preprocessing behavior

The [owner benchmark runner](https://raw.githubusercontent.com/zalandoresearch/fashion-mnist/master/benchmark/runner.py) fits StandardScaler on training vectors and transforms training and test inputs with that fitted scaler. It then shuffles training pairs for repeated classifier fits. Thus, its baseline is not necessarily comparable to a model consuming raw pixel intensities. State whether normalization is global, pixelwise or absent, and reserve separate training-derived validation data for new parameter selection. The runner's historical parameter sweep is evidence about that procedure, not a requirement to repeatedly choose winners on the published test partition; see [leakage controls](/journal/document-level-data-split-leakage/).

## Report confusion with the controlled baseline

Fashion-MNIST has a fixed product-category target and a published training/test split, without bounding boxes, texture labels or product descriptions. An editorial comparison could keep the input representation and selection rule fixed while comparing a linear classifier with a convolutional model. Examine shirt, coat and pullover confusions rather than treating overall accuracy as complete fashion understanding. Record the repository revision, reader and scaling rule alongside the result. Neither a community result table nor format compatibility establishes that every submitted experiment used identical controls.
