Built to order

Waste Classification using CNN

An eco-AI system that classifies waste items — recyclable, organic, hazardous, e-waste — from photos using a CNN trained on a TrashNet-style dataset. The SortSmart app gives instant sorting guidance with the correct bin colour and a disposal tip, and supports a live webcam mode. An optional Arduino extension drives servo flaps that physically drop items into the right bin compartment. Suitable for B.E./B.Tech final-year projects in AI, Computer Science and Environmental Engineering.

AI & Machine Learning Computer VisionDeep LearningCNNTensorFlowOpenCVMobileNetV2Transfer learningSoftware
Waste classification web app interface showing CNN sorting predictions
More project photos (3)

The problem

Recycling only works if waste is sorted correctly, and most of it is not. A single greasy pizza box in a paper bale, a battery in general waste, an e-waste item in a landfill — contamination like this downgrades whole batches and sends recoverable material to landfill. Manual sorting at scale is slow, unpleasant and inconsistent, while the rules themselves confuse people: coated paper, plastic films and multi-layer packaging defeat guesswork. The visual differences between waste categories are exactly the kind of pattern a convolutional network learns well, and a camera is the cheapest sensor available. This project trains a CNN on waste images to classify items into recyclable, organic, hazardous and e-waste streams, serves it through an app that tells the user which bin to use, and optionally drives a small servo-based sorter that drops items into the right compartment — the full loop from photo to physical action.

SYSTEM FLOW

7 components 8 connections

Live flow
Drag to explore
100%
userUser

Photographs the waste item in the app or points the live webcam at it.

Follow the working sequence

How it works

  1. A waste item photo is captured via upload or the live webcam in the SortSmart app.
  2. Preprocessing: the image is resized to the model input size, normalized and enhanced for lighting variation.
  3. The fine-tuned CNN (MobileNetV2/EfficientNet backbone) outputs class probabilities.
  4. The top class and confidence are mapped to a bin colour (blue/green/red) plus a disposal tip.
  5. If confidence is below the threshold, the app suggests manual sorting instead of guessing.
  6. In the hardware extension, the predicted class is sent over serial to an Arduino, which rotates servo flaps to drop the item into the correct bin compartment.
  7. Every classification is logged; the dashboard aggregates class distribution and per-class accuracy.

Project features

  • Four-class waste classification: recyclable, organic, hazardous, e-waste
  • Transfer learning on MobileNetV2/EfficientNet, fine-tuned on a TrashNet-style dataset
  • Real-time webcam mode: hold an item up and get instant sorting guidance
  • SortSmart Flask app: photo upload, prediction card, bin-colour guidance, disposal tips
  • Per-class precision bars and confusion matrix computed on a held-out test set
  • Optional Arduino servo sorter: model output drives flaps that drop items into the right bin
  • Data augmentation pipeline (rotation, flip, brightness, background variation) for robustness
  • Confidence thresholding: low-confidence items routed to a "manual sort" suggestion
  • Batch evaluation script that scores the model on a folder of waste photos
  • Class-wise training analytics: sample counts, accuracy curves, misclassification examples

What is included

  • Complete, commented Python source code (training, evaluation, app, Arduino sketch for the sorter)
  • Trained CNN model weights ready to load and demo
  • SortSmart Flask web application
  • Project report PDF (literature survey, methodology, dataset analysis, per-class results)
  • PPT presentation
  • Viva Q&A document (transfer learning, augmentation, confusion matrix, hardware integration)
  • Setup guide (environment, dependencies, dataset download steps)

FAQs

  1. Why is waste classification a good deep-learning topic? It pairs a transfer-learning CNN with honest per-class metrics on a messy real-world problem, plus an optional physical sorting demo — the sustainability framing gives the report a clear purpose.
  2. Which dataset is used? A TrashNet-style waste image dataset of 2,500+ labelled photos across four classes, expanded with augmentation; the report documents class counts and the train/test split.
  3. Is a GPU needed? Not for the demo — the delivered model classifies an image on CPU in under a second. Fine-tuning during development used free Kaggle/Colab GPUs.
  4. Is the Arduino sorting bin part of the build? The Arduino control sketch, wiring diagram and serial protocol are included, and the app talks to the bin out of the box; the bin itself is built from standard servos and cardboard or plywood following the build notes.
  5. Can it be demoed live? Yes — hold items up to the webcam and the app classifies them live with a bin-colour card; with the sorter attached, items drop into the correct compartment.
  6. What are the natural extensions? Instance segmentation for mixed waste piles, a smart-bin fill-level sensor with pickup alerts, or a campus waste-audit dashboard.

Advantages

  • Four-class waste classification — recyclable, organic, hazardous, e-waste — from a single photo, using transfer learning (MobileNetV2/EfficientNet fine-tuned on a TrashNet-style dataset).
  • Real-time webcam mode: hold an item up and get instant sorting guidance, alongside the SortSmart Flask app with photo upload, prediction card, correct bin colour and a disposal tip.
  • Honest evaluation built in: per-class precision bars and a confusion matrix computed on a held-out test set, plus class-wise training analytics (sample counts, accuracy curves, misclassification examples).
  • Confidence thresholding routes low-confidence items to a 'manual sort' suggestion instead of a wrong-bin guess.
  • Robustness pipeline: data augmentation (rotation, flip, brightness, background variation) and a batch evaluation script that scores the model on a folder of waste photos; an optional Arduino servo sorter physically drops items into the right bin compartment.

Disadvantages

  • Crushed, dirty or partially occluded items classify less reliably — real bin waste is messier than dataset photos.
  • Hazardous and e-waste classes have fewer training samples; per-class accuracy is lower there and documented honestly.
  • Similar-looking materials (e.g. coated paper vs plastic film) are the most common confusion pairs.
  • The servo sorter is a demo-scale mechanism — it proves the concept but is not a municipal-grade sorting line.

Limitations & prerequisites

  • Crushed, dirty or partially occluded items classify less reliably — real bin waste is messier than dataset photos.
  • Hazardous and e-waste classes have fewer training samples; per-class accuracy is lower there and documented honestly.
  • Similar-looking materials (e.g. coated paper vs plastic film) are the most common confusion pairs.
  • The servo sorter is a demo-scale mechanism — it proves the concept but is not a municipal-grade sorting line.
Components & software requirements
  • Python 3.9+ (NumPy, Pandas, scikit-learn)
  • TensorFlow/Keras (MobileNetV2/EfficientNet transfer learning)
  • OpenCV (capture, preprocessing)
  • Flask + HTML/CSS/JS (SortSmart web app)
  • Arduino (optional servo-based sorting bin)
  • Matplotlib/Seaborn (confusion matrix, per-class metrics)

Specifications

Parameter Value
Classes Recyclable, organic, hazardous, e-waste (extensible)
Dataset TrashNet-style waste image dataset (~2,500+ images, expanded with augmentation)
Model MobileNetV2/EfficientNet backbone, transfer learning + fine-tuning
Input Photos (JPG/PNG) or live webcam frames
Test accuracy ~85–92% on held-out test set; documented per class
Inference speed <1 s per image on CPU; real-time on webcam
Confidence threshold Adjustable (default 0.7); below-threshold items flagged "manual sort"
Hardware extension Arduino + servos; serial link from app to sorting-bin flaps
Web app Flask; upload, live camera, prediction card, log viewer
Bin mapping Recyclable→blue, organic→green, hazardous→red, e-waste→separate bin
Download free synopsis (PDF)

Enter your name and WhatsApp number — the synopsis PDF downloads immediately. We may send occasional project updates on WhatsApp; no spam.

Focus-RCNet: a lightweight recyclable waste classification algorithm based on focus and knowledge distillation, Visual Computing for Industry, Biomedicine, and Art (Springer, 2023)

Get a quotation