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.
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.
Recycling efficiency is low due to βwish-cyclingβ, where users incorrectly dispose of waste due to lack of knowledge about materials and recycling rules.
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
β Core Features (MVP)
Real-time webcam-based waste detection
Classification into:
Plastic
Paper
Metal
Glass
Instruction overlay for proper disposal
OCR-based resin code detection (1β7)
Smart recycling instructions based on material
Confidence-based filtering for reliable predictions
πΉ Frontend
HTML, CSS, JavaScript
πΉ Backend
Python Flask (for web integration)
πΉ AI / ML
TensorFlow / Keras EfficientNetB0 (Transfer Learning)
πΉ Computer Vision
OpenCV
πΉ OCR Tesseract OCR / pytesseract
To achieve high accuracy, we experimented with multiple deep learning models: ResNet50 MobileNetV2 EfficientNetB0 (Best Performing)
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.
Training: 1389 images
Validation: 297 images
Test: 301 images
Classes: 4 (plastic, paper, metal, glass)
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
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%
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
π 94% on test dataset
Paper classification is near-perfect
Minor confusion observed between:
Glass β Plastic
Metal β Glass
Model performs well in real-world conditions due to mixed dataset