Skip to content

Priti2127/Image-classfication-using-CNN

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

2 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🧠 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 ✈️ Airplane Airplane πŸš— Car Automobile πŸ“ˆ Results Metric Value Test Accuracy 92% Loss 0.23 Epochs 25 Optimizer Adam πŸ“š Future Improvements

πŸ” 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 .

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages