Skip to content

jain-pratham/Image_Identification

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🖼 Image Identification Web Application

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

📌 Project Objective

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

🧠 How the System Works (Step-by-Step)

Step 1: Model Training

  • 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

Step 2: User Upload

  • User uploads an image from the web interface
  • Image is stored inside static/uploads/

Step 3: Preprocessing

  • Uploaded image is resized
  • Converted into array format
  • Normalized
  • Reshaped to match model input shape

Step 4: Prediction

  • Saved model is loaded
  • Model predicts the class of the image
  • Result is displayed on the webpage

🛠 Technologies Used

Programming Language

  • Python 3.x

Machine Learning / Deep Learning

  • TensorFlow
  • Keras
  • NumPy
  • OpenCV / PIL

Web Framework

  • Flask

Frontend

  • HTML
  • CSS
  • Jinja2 Templates

Dataset

  • Caltech-101 Dataset

📂 Complete Project Structure

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

⚙️ Installation Guide (Step-by-Step)

1️⃣ Clone the Repository

git clone https://github.com/your-username/Image_Identification.git
cd Image_Identification

2️⃣ Create Virtual Environment (Recommended)

Windows

python -m venv venv
venv\Scripts\activate

Mac/Linux

python3 -m venv venv
source venv/bin/activate

3️⃣ Install Dependencies

pip install -r requirements.txt

If requirements.txt does not work, manually install:

pip install flask tensorflow keras numpy opencv-python pillow

▶️ How to Run the Project

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.


🧠 Model Training Details

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.


🖼 Example Flow

  1. User opens website
  2. Uploads image
  3. Clicks submit
  4. Image saved in static/uploads
  5. Model predicts class
  6. Prediction shown on screen

📊 Possible Improvements

  • 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)

🌍 Deployment Ideas

This project can be deployed using:

  • Render
  • Railway
  • AWS EC2
  • PythonAnywhere

🎯 Learning Outcomes

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

👨‍💻 Author

Pratham Jain
Machine Learning Developer
Customer Support – Tally on Cloud (Enjay IT Solution)

Skills:

  • Python
  • Machine Learning
  • Deep Learning
  • MERN Stack
  • Next.js

📜 License

This project is developed for educational and learning purposes.


⭐ Support

If you like this project, consider giving it a star ⭐ on GitHub.