A complete Deep Learning based Image Classification Web App built using Python, Flask, and TensorFlow/Keras.
This project allows users to upload an image through a web interface, and the system predicts the category of that image using a trained deep learning model.
It uses the Caltech-101 dataset for training and demonstrates the complete end-to-end pipeline:
- Dataset Handling
- Model Training
- Model Saving
- Model Loading
- Web Integration using Flask
- Real-time Image Prediction
The main goal of this project is:
- To build an end-to-end Image Classification System
- To integrate a Machine Learning model with a Web Application
- To demonstrate how Deep Learning models can be deployed for real-world use
This project is suitable for:
- Machine Learning Beginners
- Deep Learning Practice
- College Mini Project
- Portfolio Project
- Deployment Learning
- Images from Caltech-101 dataset are loaded
- Images are resized and normalized
- A CNN (Convolutional Neural Network) model is trained
- Model learns patterns from images
- Trained model is saved inside the
model/folder
- User uploads an image from the web interface
- Image is stored inside
static/uploads/
- Uploaded image is resized
- Converted into array format
- Normalized
- Reshaped to match model input shape
- Saved model is loaded
- Model predicts the class of the image
- Result is displayed on the webpage
- Python 3.x
- TensorFlow
- Keras
- NumPy
- OpenCV / PIL
- Flask
- HTML
- CSS
- Jinja2 Templates
- Caltech-101 Dataset
Image_Identification/
│
├── caltech-101/ # Dataset folder (Training images)
│
├── model/ # Saved trained model (.h5 or similar)
│
├── static/
│ └── uploads/ # Uploaded images stored here
│
├── templates/ # HTML files (Frontend)
│
├── app.py # Main Flask application
│
├── product.ipynb # Model training notebook
│
├── requirements.txt # All required Python libraries
│
└── README.md # Project documentation
git clone https://github.com/your-username/Image_Identification.git
cd Image_Identification
python -m venv venv
venv\Scripts\activate
python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt
If requirements.txt does not work, manually install:
pip install flask tensorflow keras numpy opencv-python pillow
After installing everything:
python app.py
Open your browser and go to:
http://127.0.0.1:5000/
Upload an image and get the prediction result.
The model training code is available inside:
product.ipynb
Inside the notebook:
- Dataset loading
- Data preprocessing
- CNN model creation
- Model compilation
- Model training
- Model saving
After training, the model is saved inside:
model/
The Flask app loads this saved model during prediction.
- User opens website
- Uploads image
- Clicks submit
- Image saved in
static/uploads - Model predicts class
- Prediction shown on screen
- Add accuracy display
- Add confidence score
- Improve UI design
- Add drag & drop upload
- Add live camera prediction
- Deploy on cloud (Render / Railway / AWS)
- Use advanced architectures (ResNet / MobileNet)
This project can be deployed using:
- Render
- Railway
- AWS EC2
- PythonAnywhere
By building this project, you will learn:
- How CNN works
- How to train an image classification model
- How to save & load trained model
- How to connect ML model with Flask
- How to build an ML Web App
- Basic project structuring
Pratham Jain
Machine Learning Developer
Customer Support – Tally on Cloud (Enjay IT Solution)
Skills:
- Python
- Machine Learning
- Deep Learning
- MERN Stack
- Next.js
This project is developed for educational and learning purposes.
If you like this project, consider giving it a star ⭐ on GitHub.