yichuan-huang's picture
update
1d4a25c
|
raw
history blame
2.67 kB

Waste Classification Application

This project is a web-based application that classifies waste materials from user-uploaded images. It identifies the type of waste (e.g., cardboard, glass, metal) and provides information on how to properly dispose of it.

πŸš€ Live Demo

Try the application live on Hugging Face Spaces!

➑️ Waste Classification Demo


✨ Features

  • Image-based classification: Upload an image of a waste item to have it automatically classified.
  • Multiple waste categories: The application can identify a variety of waste materials.
  • Disposal information: After classification, the app provides guidance on how to dispose of the identified waste material.
  • Web interface: A user-friendly web interface built with Gradio makes the application easy to use.

πŸ’‘ How it works

The application uses a pre-trained Gemma3n (E2B) model to perform the image classification. The model has been fine-tuned on a dataset of waste images to accurately identify different materials. The disposal information is retrieved from a knowledge base within the application.


πŸ““ Kaggle Notebook

Explore the model fine-tuning process and the underlying code in our detailed Kaggle Notebook.

➑️ Gemma3n Challenge Notebook


πŸ› οΈ Getting Started

Prerequisites

  • Python 3.9+
  • Pip
  • Cuda (optional)

Installation

  1. Clone the repository:
    git clone https://github.com/yichuan-huang/gemma3n-challenge
    
  2. Navigate to the project directory:
    cd gemma3n-challenge
    
  3. Install the required dependencies:
    pip install -r requirements.txt
    

Running the application

To start the application, run the following command:

python app.py

This will launch a Gradio web server. You can access the application by opening the provided URL in your web browser.

πŸ“‚ Project Structure

  • app.py: The main application file, containing the Gradio interface and the classification logic.
  • classifier.py: Handles the image classification using the pre-trained model.
  • config.py: Contains configuration settings for the application, such as the model name and labels.
  • knowledge_base.py: A simple knowledge base containing disposal information for different waste materials.
  • requirements.txt: A list of the Python dependencies required to run the application.
  • test_images/: A directory containing sample images for testing the application.