Build CNN: Apparel Image Classification for Fashion MNIST

This MATLAB script trains a CNN for MNIST digit classification, achieving >90% accuracy.
17 Downloads
Updated 26 Feb 2025

View License

This MATLAB script trains a Convolutional Neural Network (CNN) on the MNIST dataset for digit classification. It follows a structured workflow:
  1. Data Extraction & Processing – Decompresses and loads MNIST images and labels.
  2. Visualization – Displays sample images from training and test sets.
  3. CNN Architecture – Uses convolutional, batch normalization, ReLU, and pooling layers.
  4. Training – Optimized with Adam optimizer and early stopping.
  5. Evaluation – Computes accuracy, confusion matrix, precision, recall, and F1-score.

Cite As

Kunal Khandelwal (2026). Build CNN: Apparel Image Classification for Fashion MNIST (https://www.mathworks.com/matlabcentral/fileexchange/180241-build-cnn-apparel-image-classification-for-fashion-mnist), MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2024b
Compatible with any release
Platform Compatibility
Windows macOS Linux
Version Published Release Notes
1.0.0