Fashion-MNIST Image Classifier
Model Description
This is a neural network model trained to classify Fashion-MNIST images into 10 different clothing categories. The model uses a simple feedforward architecture with dense layers and achieves good performance on the Fashion-MNIST benchmark dataset.
Model Architecture
- Input Layer: 28x28 grayscale images
- Preprocessing: Pixel normalization (rescaling to [0,1])
- Hidden Layers:
- Dense layer with 128 neurons (ReLU activation)
- Dense layer with 64 neurons (ReLU activation)
- Output Layer: Dense layer with 10 neurons (Softmax activation)
- Total Parameters: Approximately 109K parameters
Training Details
- Dataset: Fashion-MNIST (60,000 training images, 10,000 test images)
- Optimizer: Stochastic Gradient Descent (SGD)
- Loss Function: Categorical Crossentropy
- Batch Size: 64
- Max Epochs: 100 (with early stopping)
- Validation Split: 20% of training data
- Callbacks: Early stopping and learning rate reduction on plateau
Performance
The model was evaluated on the Fashion-MNIST test set with the following metrics:
- Accuracy: 0.8386
- F1 Score: 0.8397
Intended Use
This model is designed for:
- Educational purposes and learning about image classification
- Classifying Fashion-MNIST images into 10 categories:
- 0: T-shirt/top
- 1: Trouser
- 2: Pullover
- 3: Dress
- 4: Coat
- 5: Sandal
- 6: Shirt
- 7: Sneaker
- 8: Bag
- 9: Ankle boot
Usage
import tensorflow as tf
# Load the model
model = tf.keras.models.load_model('fashion_mnist_model.h5')
# Prepare your image (28x28 grayscale, values 0-255)
# image = your_preprocessed_image
# Make prediction
prediction = model.predict(image.reshape(1, 28, 28))
predicted_class = tf.argmax(prediction, axis=1).numpy()[0]
Limitations
- Only works with 28x28 grayscale images
- Trained specifically on Fashion-MNIST dataset
- May not generalize well to real-world clothing images
- Simple architecture may not capture complex patterns
Training Procedure
The model was trained with:
- Data normalization (pixel values scaled to [0,1])
- Train/validation split (80/20)
- Early stopping based on validation F1 score
- Learning rate scheduling
- Downloads last month
- -
Inference Providers
NEW
This model isn't deployed by any Inference Provider.
🙋
Ask for provider support
Dataset used to train c2p-cmd/fashion_mnist_tf
Evaluation results
- Accuracy on Fashion-MNISTself-reported0.839
- F1 Score on Fashion-MNISTself-reported0.840