Project guide · Computer vision

Waste classification using deep learning

A waste classification project trains an image model to sort a photo of rubbish into classes such as glass, paper, cardboard, plastic, metal and trash. The usual starting data is TrashNet, with 2,527 images in six classes. Because that is small, the standard method is transfer learning from a network pre-trained on ImageNet.

Last updated

Topic idea · the project in one look
Problem
Mixed waste cannot be recycled, and sorting it by hand is slow, unpleasant and often skipped.
Output
A model that names the material in a photo, running on a phone, a webcam or a small board that opens the right bin.
Dataset
TrashNet, 2,527 images in six classes
Level
Diploma, B.Tech mini or major, M.Tech with an extension

This guide gives the dataset with its class counts, the transfer-learning steps, the metrics, the gap between lab photos and real bins, and what to add at each level, including a hardware version.

Key points
  • Dataset: TrashNet has 2,527 photos in six classes, taken on a white background.
  • Use transfer learning. About 2,500 images are too few to train a deep network from scratch.
  • The classes are uneven: 594 paper photos against 137 of trash, so report macro-F1 and each class’s recall.
  • Test on your own photos. The honest result is how the model does away from the white background.
  • It extends to hardware: a camera, a small board and a servo make a smart bin.

Which dataset should you use for waste classification?

Start with TrashNet. Each photo shows one object on white posterboard, and the dataset is released under an MIT licence.

TrashNet images per class
ClassImagesNote
Paper594The largest class
Glass501Reflective and transparent, so lighting matters
Plastic482Check how often it is confused with glass
Metal410Shiny surfaces, so watch for glare
Cardboard403Check how often it is confused with paper
Trash137The smallest class; give it a class weight

Counts are from the TrashNet repository and total 2,527. For litter photographed outdoors, with segmentation masks, see the TACO dataset.

How do you build a waste classifier step by step?

  1. Split by class. Keep the same class shares in the training, validation and test sets.
  2. Augment the training images only: flips, small rotations, brightness and zoom.
  3. Load a pre-trained network. MobileNetV2 or EfficientNet-B0 with ImageNet weights, and a new six-class output layer.
  4. Train in two phases. First the new layer with the base frozen, then unfreeze the top layers at a low learning rate.
  5. Weight the classes, so the 137 trash photos are not ignored.
  6. Evaluate, then photograph 50 to 100 items yourself and test again.
  7. Deploy. Convert the model to TensorFlow Lite for a phone or a Raspberry Pi, or serve it behind a webcam page.

Want hardware? A Raspberry Pi with a camera, or an ESP32-CAM sending frames to a laptop, can drive a servo that opens the matching bin. Our IoT projects for final year name boards and parts for builds like this.

Which metrics should a waste classification project report?

  • A confusion matrix, which shows the pairs the model mixes up.
  • Precision and recall for each class, and macro-F1, so the small trash class counts as much as paper.
  • Accuracy on your own photos beside accuracy on the TrashNet test set.
  • Model size and time per image on the device you demo on.

What mistakes cost marks in a waste classification project?

  • Training from scratch on a dataset this small.
  • Augmenting before the split, so near-copies of test images appear in training.
  • Reporting one accuracy figure and no per-class results.
  • Claiming it works in real bins after testing only on white-background photos.
  • A demo that needs the internet when the hall’s Wi-Fi fails. Run the model on the device.

How does the scope change for Diploma, B.Tech and M.Tech?

Waste classification scope by level
LevelScopeWhat to show
DiplomaMobileNetV2 with transfer learning on the six classesA webcam demo, or a servo-driven bin lid for a hardware project
B.Tech / B.E.Three backbones compared, your own test photos and an on-device modelAn Android or Raspberry Pi demo with speed and size measured
M.Tech / M.E.Detection or segmentation of several items per image on TACO, adapting from lab photos to field photos, or quantised models with measured latencyA base paper reproduced, one measured extension and a paper in IEEE format

A delivered M.E. project of ours used the same recipe on skin photos: EfficientNet-B0 trained in two phases and run in the browser. For polytechnic scope, see Diploma projects.

What goes in the report, and which viva questions come up?

Include the problem, a short survey, the dataset table above, the network and training settings, the results and the test on your own photos. Our report and PPT help covers the black book and slides. Prepare these:

  • What is transfer learning, and why did you freeze layers first?
  • Why MobileNet and not a larger network?
  • Which two classes are confused most, and why?
  • How did you deal with the small trash class?
  • Why is accuracy lower on your own photos?

Related vision guides: defect detection using deep learning and AI-generated image detection.

A topic idea, not a delivered project

This guide is a plan to discuss with your guide, and the figures in it come from the linked dataset pages and papers, not from our own work. Our 8 delivered case studies are M.Tech and M.E. projects, each shown with its real paper pages, screens and results.

Frequently asked questions

Which dataset is used for waste classification?

TrashNet is the usual choice: 2,527 photos in six classes, which are glass, paper, cardboard, plastic, metal and trash, taken against a white background and released under an MIT licence. For litter in real outdoor scenes, the TACO dataset provides photos with segmentation masks.

Which model is best for waste classification?

With about 2,500 images, a small pre-trained network such as MobileNetV2 or EfficientNet-B0 with transfer learning is the sensible choice. It trains quickly, runs on a phone or a Raspberry Pi and is easier to justify than a large model the data cannot support.

Can a waste classification project include hardware?

Yes. Run the model on a Raspberry Pi with a camera, or send photos from an ESP32-CAM to a laptop, and let the prediction drive a servo that opens the right bin. That turns a software mini project into a full Diploma or B.Tech build.

Why does my waste classifier fail on real photos?

TrashNet photos show one clean object on a white board. Real bins have clutter, dirt, poor light and several objects together. Collect a small test set of your own photos, report the drop honestly and reduce it with augmentation or fine-tuning.

Can The Ultimate Project World help with a waste classification project?

Yes. In the free consultation, tell us your level, whether you want hardware, and your review dates. We will tell you exactly which parts we can take on, such as the model, the app, the report, the PPT and viva preparation.

Chosen this topic? Let’s scope the project.

Tell us the topic, your branch and your review dates. You get a written plan and a fixed quote, and the consultation is free.

Diploma · B.Tech · B.E. · M.Tech · Code · Report · PPT · Viva

WhatsApp Free consultation