Skip to content

P/N 05Case studyEpoka University, AI course team project

Project overview poster: the twelve waste categories, the final model's confusion matrix and the recycling guidance

Garbage Classifier — Computer Vision

A computer vision model that classifies photos of waste by type. Built in a team for my AI course, my transfer-learning model was selected as the team's final model because it achieved the highest accuracy.

Role
Machine learning developer
Team
AI course team
Duration
One semester
Year
2025
Stack
Python · Streamlit · TensorFlow · Transfer learning · Computer vision · Kaggle dataset

Outcomes

  • #1

    Highest accuracy among the team's candidate models

  • ±97%

    Test-set accuracy of the final model

Problem

Sorting waste correctly is essential for recycling, yet items often end up in the wrong bin. The project explored whether a neural network could recognize the type of waste from a single photo, a building block for smarter sorting and recycling guidance and tips.

Constraints

An image dataset from Kaggle with uneven image quality, limited computing resources that made training slow, and a constant risk of overfitting on a modest dataset.

Architecture

A Python and TensorFlow pipeline: images are cleaned and preprocessed, then passed to a convolutional network pretrained on a large image collection, with a new classification head trained for the waste categories. Candidate models were compared on held-out data.

From raw image to prediction: cleaning, preprocessing, pretrained convolutional backbone, new classification head.

5 parts, 4 connections.

  • N01 — Kaggle images
  • N02 — Cleaning and preprocessing
  • N03 — Pretrained CNN
  • N04 — New classification head
  • N05 — Prediction
  • Kaggle images to Cleaning and preprocessing
  • Cleaning and preprocessing to Pretrained CNN
  • Pretrained CNN to New classification head
  • New classification head to Prediction

Key decisions

Transfer learning instead of training a network from scratch. A pretrained backbone reached higher accuracy with far less data and compute, which suited our limited resources.

Cleaning the data before training. Removing or fixing low-quality images meant the model learned from reliable examples.

Adjusting the model during training. When validation results showed signs of overfitting, I tuned the training setup rather than simply training longer.

Project overview poster: the twelve waste categories, the final model's confusion matrix and the recycling guidance
The project at a glance: twelve waste categories, the final model's results and the recycling guidance.

Results

My transfer-learning model achieved the highest accuracy of the team's candidates and was selected as the final model. That model reached ±97% accuracy in test dataset. We created a small web app which is helpful for everyday use, as an AI assistant for helping classifying garbage and acting as an environment-friendly citizen.

Sample images from the dataset across waste categories
The dataset: real photos of uneven quality.
Training and validation accuracy curves for the final model
Training curves for the transfer-learning model.
Test metrics, per-class precision and recall, and confusion matrix of the final model
Where the model is right, and where it confuses categories.
Streamlit web app classifying an uploaded photo, with confidence per category
The web app: upload a photo, get the category.
Accuracy of the team's candidate models compared on held-out data
The team's candidate models, compared on the same held-out data.

Reflection

I would track experiments systematically and report per-class precision and recall, not only overall accuracy. I would keep transfer learning as my default starting point for small image datasets.