This repository contains the code for a waste classification web application built with Streamlit. The application allows users to take a photo using a webcam connected to a Khadas VIM2 and classify the type of waste into 5 categories: cardboard, glass, metal, paper, and plastic.
To set up and run the web application, follow these steps:
- Python 3.7+
- Streamlit
- TensorFlow
- OpenCV
- PIL (Pillow)
- Clone this repository:
git clone https://github.com/your_username/waste-classification-webapp.git- Navigate to the project directory:
cd waste-classification-webapp- Install the required packages using the
requirements.txtfile:
pip install -r requirements.txt- Place your trained models (model.h5, model.tflite, model_pruned.tflite, model_quantized.tflite, model_pruned_quantized.tflite) in the project directory.
- Start the Streamlit web application:
streamlit run app.py-
Open the web application in your browser using the URL provided in the terminal.
-
Choose the desired model from the dropdown menu.
-
Take a photo using the webcam connected to the Khadas VIM2.
-
The application will classify the waste in the image into one of the 5 categories: cardboard, glass, metal, paper, or plastic.
- OpenAI for the GPT model that helped in generating parts of this README.
- Streamlit for the awesome web app framework.
- TensorFlow for the machine learning library used in this project.
- OpenCV for the image processing library used in this project.