Skip to content

shindesimantini6/TrashBestie

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

47 Commits
 
 
 
 
 
 
 
 

Repository files navigation

trashbestie_black

An app used to sort waste at home.

Sorting waste, also at home, can be tricky. For example a toothbrush which is suppose to be thrown away in the black bin is easily confused and thrown into the yellow bin or the pizza boxes with oil all over the box is thrown into blue but belongs in the black bin. Such mistakes, mean the garbage is incinerated at the garbage sorting stations, as sorting waste is time-consuming and expensive. Hence it is very important to sort garbage correctly at home.

The version 1 of TrashBestie is a custom Yolov8 model trained to detect aluminium cans, pens, toothbrushes and batteries and deployed on to a Streamlit Web app. The user can scan the images or upload the images into the app. All predictions are with a minimum level 50% confidence.

The waste sorting currently is based on the waste segregation system in Germany.

Method

  1. We identified most confusing waste categories, and picked 4 most common for our version 1.
  2. We obtained the data in two ways:
    a. Open Data Source
    b. Took images ourselves with the garbage from home. This step was taken to improve the accuracy of our model as garbage looks different in different countries and the open source has garbage not necessarily from Germany.
  3. We annotated, preprocessed and augmented all images in Roboflow.
  4. Trained a YOLOv8 model for all images with 4 classes (aluminium-cans, pen, toothbrushes and battery). More information on training a custom YOLOv8 model with data augmented and preprocessed in Roboflow here.
  5. Created a Streamlit web app with the Webcam and Image Detection feature. More information on with YOLOv8 streamlit detection here.

Usage

  • Run streamlit run Home.py to open the web app.
  • The app should open in a new browser window.

Webcam Detection

  1. Change the source of your webcam in settings.py at
# Webcam
WEBCAM_PATH = {path to webcam}
  1. The predicted class will be displayed, as the model detects the objects, along with where the garbage is to be disposed and an explanation for why the garbage is to be diposed in that bin.

Image Detection

  1. Upload an image by clicking on the "Browse files" button.
  2. The uploaded image with the detected objects will be displayed on the page, along with the predicted garbage class, where the garbage is to be disposed and an explanation for why the garbage is to be diposed in that bin.
  3. Click the "Download Image" button to download the image.

Demo of the model

Screenshot from 2023-08-23 12-03-35_cropped

Demo of the Web App

demo_video.mp4

Requirements

  • Python 3.6+
  • YOLOv8
  • Streamlit
  • OpenCV
  • Tensorflow

Collaborators

About

An app used to sort waste at home!!!

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •  

Languages