This project demonstrates the use of a Convolutional Neural Network (CNN) with data augmentation techniques to classify images from the Fashion MNIST dataset. The model is built using TensorFlow and Keras, and includes custom callbacks for progress tracking and early stopping.
- Overview
- Dataset
- Model Architecture
- Data Augmentation
- Training
- Evaluation
- Results
- Usage
- Requirements
- License
This repository contains code to train a CNN on the Fashion MNIST dataset, using various techniques such as data augmentation, learning rate scheduling, and custom callbacks to enhance model performance and training experience. The code is provided in a single Jupyter Notebook for easy execution and experimentation.
The Fashion MNIST dataset is a collection of 70,000 grayscale images of 28x28 pixels, each belonging to one of 10 fashion categories:
- T-shirt/top
- Trouser
- Pullover
- Dress
- Coat
- Sandal
- Shirt
- Sneaker
- Bag
- Ankle boot
The model architecture consists of the following layers:
- Data augmentation layers
- Three convolutional layers with batch normalization and max pooling
- A dense layer with dropout for regularization
- An output layer with 10 units (one for each class)
Data augmentation techniques used include:
- Random horizontal flip
- Random rotation
- Random zoom
These augmentations help in improving the generalization of the model.
The model is trained using:
- Sparse Categorical Crossentropy loss
- Adam optimizer with an exponential decay learning rate schedule
- Early stopping callback to prevent overfitting
- Custom progress bar callback for better training visualization
The model's performance is evaluated on the test set, and the training history is visualized through accuracy and loss plots.
The trained model achieves high accuracy on the test set, demonstrating the effectiveness of the chosen architecture and training strategies.
To use this project, follow these steps:
-
Clone the repository:
git clone https://github.com/J3lly-Been/fashion-mnist-classification.git cd fashion-mnist-classification
-
Install the required dependencies:
pip install -r requirements.txt
-
Open and run the Jupyter Notebook:
jupyter notebook fashion_mnist_classification.ipynb
- TensorFlow
- NumPy
- Matplotlib
- TQDM
You can install the required packages using:
pip install tensorflow numpy matplotlib tqdm
This project is licensed under the MIT License. See the LICENSE file for details.