Skip to content

alphatechlogics/garbage-sorting-image-classification

Repository files navigation

♻️ Garbage Sorting Image Classification 🚮

This project is an AI-powered image classification web application that classifies uploaded waste images into one of four categories:

  • 🥫 METAL
  • 🍃 ORGANIC
  • 📄 PAPER
  • 🛍️ PLASTIC

It leverages a pretrained MobileNetV2 model fine-tuned on a custom waste classification dataset and is deployed through an interactive Streamlit web interface.

✨ Streamline waste management with intelligent sorting for a cleaner, greener future! 🌱


Table of Contents

  1. Overview
  2. Project Features
  3. Setup Instructions
  4. Run the Application
  5. Model Details
  6. App Usage
  7. Sample Output

Overview

The Waste Classifier Web App enables users to upload an image of waste, and the model will predict its category. This solution aims to:

  • Automate waste sorting for environmental sustainability.
  • Leverage deep learning transfer learning techniques using MobileNetV2.
  • Provide an easy-to-use interface using Streamlit.

Project Features

  • Image Classification: Predicts waste categories (METAL, ORGANIC, PAPER, PLASTIC).
  • Pretrained Model: MobileNetV2 pretrained on ImageNet, fine-tuned on a waste dataset.
  • Interactive Web App: Built using Streamlit for easy image uploads and predictions.

Setup Instructions

1. Clone the Repository

Clone the project repository to your local machine:

git clone https://github.com/RohmaButt/garbage-sorting-image-classification.git
cd waste-classifier-streamlit

2. Create and Activate a Virtual Environment

Create an isolated Python environment using venv:

python3 -m venv venv
source venv/bin/activate  # For Linux/Mac
venv\Scripts\activate     # For Windows

3. Install Dependencies

Install all required Python libraries using pip:

pip install -r requirements.txt

4. Save the Model

Ensure the trained MobileNetV2 model (mobilenetv2_waste_classifier.h5) is present in the project directory.

If not, place the model file in the project root.

Run the Application To run the Streamlit app, execute the following command in your terminal:

streamlit run app.py

Once the app is running, it will provide the Local URL and Network URL:

Local URL: http://localhost:8501
Network URL: http://<your-ip-address>:8501

Open the Local URL in your browser to interact with the app.

Sample Output

Below are some demo screenshots of the Waste Classifier Web App in action:


1. Uploaded Image and Prediction

Screenshot 1: Uploading an image and getting the predicted waste category.

Uploaded Image and Prediction


2. Prediction Result

Screenshot 2: The model predicts the class along with the confidence score.

Prediction Result


About

This project is an AI-powered image classification web application that classifies uploaded waste images into one of four categories.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •