An open API service indexing awesome lists of open source software.

https://github.com/aronno1920/fashion-classifier-mnist

This project is a full-stack web application that allows users to upload an image of a fashion item (e.g., shirt, sneaker, bag) and classifies it using a Neural Network (NN) and Convolutional Neural Network (CNN)
https://github.com/aronno1920/fashion-classifier-mnist

cnn convolutional-neural-networks deep-learning fashion-classifier flask mnist nn nuralnetwork python

Last synced: about 2 months ago
JSON representation

This project is a full-stack web application that allows users to upload an image of a fashion item (e.g., shirt, sneaker, bag) and classifies it using a Neural Network (NN) and Convolutional Neural Network (CNN)

Awesome Lists containing this project

README

          

# ๐Ÿงฅ Fashion Classifier (MNIST) โ€“ TensorFlow, Flask, and FastAPI

This project is a full-stack web application that allows users to upload an image of a fashion item (e.g., shirt, sneaker, bag) and classifies it using a Neural Network (NN) and Convolutional Neural Network (CNN) trained on the [Fashion Classifier](https://github.com/Aronno1920/Fashion-Classifier-MNIST) dataset.

The app features:
- ๐Ÿ” Real-time image classification
- โš™๏ธ NN and CNN model build separately
- ๐Ÿง  Robust preprocessing (resize, normalize, center the object)
- ๐Ÿ“ธ Live preview of uploaded image
- ๐Ÿ’ก Displays top 3 predictions with confidence scores
- ๐ŸŽจ Beautiful and responsive HTML/CSS interface

## ๐Ÿš€ Live Demo

> _Want to see it in action?_
> ๐Ÿ‘‰ [Coming Soon: Deployed on Render or Hugging Face Spaces]

## ๐Ÿง  Model Details

- **Architecture**: 3-layer CNN with BatchNorm, Dropout, and MaxPooling
- **Input shape**: 28ร—28 grayscale images
- **Training Dataset**: Fashion MNIST (60,000 training + 10,000 test images)
- **Accuracy**: ~91% on test data

---

## ๐Ÿ–ผ๏ธ Supported Classes

``` ['T-shirt/top', 'Trouser', 'Pullover', 'Dress', 'Coat','Sandal', 'Shirt', 'Sneaker', 'Bag', 'Ankle boot'] ```

---

## ๐Ÿงช Try It Locally

### 1๏ธโƒฃ Clone the repo
```bash
git clone https://github.com/Aronno1920/Fashion-Classifier-MNIST.git
cd fashion-classifier-mnist
```
2๏ธโƒฃ Install requirements
```bash
pip install -r requirements.txt
```
3๏ธโƒฃ Run the app
```bash
python app.py
```
Open your browser: http://127.0.0.1:5000

๐Ÿ“ Project Structure

```Image-Classification-AI/
โ”œโ”€โ”€ ImageSample/ # Folder for example images or datasets
โ”œโ”€โ”€ __pycache__/ # Python cache files (auto-generated)
โ”œโ”€โ”€ model/
โ”‚ โ”œโ”€โ”€ best_nn_model.keras # Saved trained NN model weights
โ”‚ โ””โ”€โ”€ best_cnn_model.keras # Saved trained CNN model weights
โ”œโ”€โ”€ notebooks/
โ”‚ โ”œโ”€โ”€ fashion_mnist_selim_ahmed.py # Saved colab file as python
โ”‚ โ””โ”€โ”€ Fashion_MNIST_Selim_Ahmed.ipynb # Saved colab file
โ”œโ”€โ”€ static/ # logo, style and other necessary
โ”‚ โ”œโ”€โ”€ logo.png
โ”‚ โ””โ”€โ”€ style.css
โ”œโ”€โ”€ templates/ # Templates for web app or reports (if any)
โ”‚ โ”œโ”€โ”€ index.html
โ”‚ โ””โ”€โ”€ train.html
โ”œโ”€โ”€ templates/
โ”œโ”€โ”€ README.md # Project description and documentation
โ”œโ”€โ”€ app.py # Main application script (e.g., for running or serving the model)
โ”œโ”€โ”€ model_config.py
โ”œโ”€โ”€ train_model_cnn.py # CNN model training class
โ””โ”€โ”€ train_model_nn.py # NN model training class
```

๐Ÿ›  Tech Stack
```bash
Python
TensorFlow / Keras
Flask
PIL (Pillow)
HTML5 + CSS
JavaScript (Image preview)
SciPy (for center-of-mass preprocessing)
```

๐Ÿ“ธ Screenshots

![Screenshot](https://github.com/Aronno1920/Fashion-Classifier-MNIST/blob/main/screenshot/Screenshot_1.png)
![Screenshot](https://github.com/Aronno1920/Fashion-Classifier-MNIST/blob/main/screenshot/Screenshot_2.png)
![Screenshot](https://github.com/Aronno1920/Fashion-Classifier-MNIST/blob/main/screenshot/Screenshot_3.png)
![Screenshot](https://github.com/Aronno1920/Fashion-Classifier-MNIST/blob/main/screenshot/Screenshot_4.png)
![Screenshot](https://github.com/Aronno1920/Fashion-Classifier-MNIST/blob/main/screenshot/Screenshot_5.png)
![Screenshot](https://github.com/Aronno1920/Fashion-Classifier-MNIST/blob/main/screenshot/Screenshot_6.png)

โœ๏ธ Author

Selim Ahmed

๐Ÿ“ซ [Connect on LinkedIn](https://www.linkedin.com/in/aronno1920/)

๐ŸŒ [GitHub Profile](https://github.com/aronno1920)