Skip to content

Latest commit

Β 

History

6 Commits

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 

Repository files navigation

🌱 AI Smart Bin Assistant

AI Smart Bin Assistant is a computer vision system that classifies waste (plastic, paper, metal, glass) in real time using a webcam. It provides disposal instructions and uses OCR to detect resin codes on plastics, enabling accurate and smarter recycling decisions.

πŸš€ Overview

The AI Smart Bin Assistant is a sustainability-focused application that classifies waste in real time using a webcam. It detects items such as plastic, paper, metal, and glass, and provides instant disposal instructions. The system also integrates OCR to detect resin codes on plastic items for more accurate recycling guidance.

🎯 Problem Statement

Recycling efficiency is low due to β€œwish-cycling”, where users incorrectly dispose of waste due to lack of knowledge about materials and recycling rules.

πŸ’‘ Solution

This project solves the problem by: Identifying waste items using AI Providing real-time disposal instructions Detecting resin codes using OCR for plastic items Promoting correct recycling behavior

🧠 Features

βœ… Core Features (MVP)

Real-time webcam-based waste detection

Classification into:

Plastic

Paper

Metal

Glass

Instruction overlay for proper disposal

πŸš€ Advanced Features

OCR-based resin code detection (1–7)

Smart recycling instructions based on material

Confidence-based filtering for reliable predictions

βš™οΈ Tech Stack

πŸ”Ή Frontend

HTML, CSS, JavaScript

πŸ”Ή Backend

Python Flask (for web integration)

πŸ”Ή AI / ML

TensorFlow / Keras EfficientNetB0 (Transfer Learning)

πŸ”Ή Computer Vision

OpenCV

πŸ”Ή OCR Tesseract OCR / pytesseract

πŸ“Š Model Details & Training

To achieve high accuracy, we experimented with multiple deep learning models: ResNet50 MobileNetV2 EfficientNetB0 (Best Performing)

πŸ“‚ Dataset

The model was trained on a hybrid dataset consisting of:

πŸ—‚οΈ Public dataset: TrashNet

πŸ“± Custom dataset: Images captured using mobile phones

This combination helped improve real-world performance and robustness.

Dataset Size

Training: 1389 images

Validation: 297 images

Test: 301 images

Classes: 4 (plastic, paper, metal, glass)

πŸ”§ Image Preprocessing

To improve model performance and OCR accuracy, multiple preprocessing techniques were applied during both training and inference.

πŸ“· For Waste Classification Model

Before feeding images into the deep learning model, the following preprocessing steps were applied:

Resizing

All images were resized to 224 Γ— 224 to match the input size of EfficientNetB0.

Color Conversion

Images were converted from BGR to RGB to align with deep learning model expectations.

Normalization

Pixel values were scaled appropriately based on the model requirements.

Data Augmentation (Training Phase)

To improve generalization and robustness:

Rotation

Zoom

Width & Height Shift

Horizontal Flip

Brightness Adjustment

πŸ“ˆ Training Performance (EfficientNetB0)

Epoch 1 β†’ Accuracy: 73.0% β†’ Val Accuracy: 86.5%

Epoch 3 β†’ Accuracy: 90.0% β†’ Val Accuracy: 91.9%

Epoch 6 β†’ Accuracy: 93.7% β†’ Val Accuracy: 93.27% (Best)

Epoch 10 β†’ Accuracy: 95.9% β†’ Val Accuracy: ~91.9%

πŸ† Final Model Performance (EfficientNetB0)

Confusion Matrix

[68 4 0 4]

[ 3 55 0 4]

[ 0 0 89 1]

[ 2 1 0 70]

Classification Report

Class Precision Recall F1-score

Glass 0.93 0.89 0.91

Metal 0.92 0.89 0.90

Paper 1.00 0.99 0.99

Plastic 0.89 0.96 0.92

πŸ“Š Overall Accuracy

πŸ‘‰ 94% on test dataset

πŸ” Observations

Paper classification is near-perfect

Minor confusion observed between:

Glass ↔ Plastic

Metal ↔ Glass

Model performs well in real-world conditions due to mixed dataset

About

AI Smart Bin Assistant is a computer vision system that classifies waste (plastic, paper, metal, glass) in real time using a webcam. It provides disposal instructions and uses OCR to detect resin codes on plastics, enabling accurate and smarter recycling decisions.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors