π§ Image Classification Web App (TensorFlow + Flask + Heroku)
A deep learning web application that classifies uploaded images into one of 10 categories using a Convolutional Neural Network (CNN) built with TensorFlow/Keras. The model is deployed as a Flask web app and hosted on Heroku for real-time image prediction.
π Live Demo
π https://your-app-name.herokuapp.com
πΈ Features
π§© Custom CNN architecture built from scratch using TensorFlow/Keras
π§ 92% test accuracy on a 10-class image dataset (e.g., CIFAR-10)
π Data augmentation, dropout, and batch normalization for robustness
π Flask web interface for uploading and classifying images
βοΈ Deployed on Heroku for public access
π§Ύ Real-time predictions displayed in browser
π§ Model Overview
The CNN model consists of:
Multiple Conv2D + MaxPooling2D layers for feature extraction
BatchNormalization for stable training
Dropout layers to reduce overfitting
Fully connected dense layers with softmax output for multi-class prediction
Example architecture:
model = Sequential([ Conv2D(32, (3,3), activation='relu', input_shape=(32,32,3)), BatchNormalization(), MaxPooling2D(2,2), Dropout(0.25),
Conv2D(64, (3,3), activation='relu'),
BatchNormalization(),
MaxPooling2D(2,2),
Dropout(0.25),
Flatten(),
Dense(128, activation='relu'),
Dropout(0.5),
Dense(10, activation='softmax')
])
π§° Technologies Used Component Technology Deep Learning TensorFlow, Keras Web Framework Flask Frontend HTML5, CSS3, Bootstrap Deployment Heroku Tools NumPy, OpenCV, Pillow π Project Structure π¦ image-classification-flask β βββ app.py # Flask web application βββ model.py # CNN model training script βββ model.h5 # Trained model file βββ static/ # CSS, JS, and image assets βββ templates/ # HTML templates (Flask frontend) βββ requirements.txt # Dependencies βββ Procfile # Heroku deployment file βββ README.md # Project documentation
βοΈ Installation & Setup 1οΈβ£ Clone the repository git clone https://github.com//image-classification-flask.git cd image-classification-flask
2οΈβ£ Install dependencies pip install -r requirements.txt
3οΈβ£ Run locally python app.py
Now visit: http://127.0.0.1:5000
4οΈβ£ Deploy to Heroku heroku create your-app-name git add . git commit -m "Initial deployment" git push heroku main
π§ͺ Example Results
Input Image Predicted Label
πΆ Dog Dog
π Add Grad-CAM visualizations
π Add interactive charts for training metrics
π Support custom user datasets
π Deploy using Docker for scalability
πͺͺ License
This project is licensed under the MIT License .