Technical project
Waste Detection in the Built Environment
Automatic classification of waste in street-view images using a YOLO-based object detection pipeline.
- Machine Learning
- Python
- Computer Vision
Overview
This project addresses the automatic classification of waste using 10,000 street-view images. The objective is to build a machine learning pipeline that trains, validates, and tests on data to identify whether an image contains waste and classify it into five predefined categories.
Context
Waste detection in the built environment is crucial for maintaining a liveable urban environment. Traditional monitoring methods are labour-intensive, motivating the use of machine learning for automated detection.
Objective
To identify whether an image contains waste and classify it into five predefined categories: bulky waste, garbage bag, cardboard, litter, and other.
Method
-
01
Images were manually annotated in CVAT using five predefined classes, with bounding boxes assigned to visible waste objects
-
02
A temporal dataset split was used to prevent data leakage and simulate real-world deployment
-
03
The YOLO26n model was selected for its lightweight architecture and trained for 100 epochs with early stopping (patience = 20), image size 512 and batch size 8
-
04
Both classification and detection approaches were evaluated; the detection model was selected due to its ability to provide spatial localisation and multi-class predictions
-
05
Predictions were ranked based on highest confidence detection per image, and evaluation was conducted using Precision at 100 (P@100)
Data
- 10,000 street-view images split into training (2844), validation (3064), and testing (4092)
- Five annotated classes: bulky waste, garbage bag, cardboard, litter, and other
- Strong class imbalance with most images containing no waste objects
Visuals
Analysis
- The dataset exhibits strong class imbalance, leading to dominance of background samples during training
- This results in reduced recall and a bias toward predicting clean scenes
- Class-wise performance shows garbage bag achieving the highest performance (AP = 0.186), while cardboard and other remain near zero
- Precision remains stable at low recall but drops rapidly as recall increases
Results
- The model achieves low detection performance (mAP@50: 0.102 on test, mAP@50-95: 0.046)
- P@100 = 0.90, indicating strong performance in ranking images containing waste
- The model is effective for prioritisation tasks despite low detection accuracy
Reflection
- The dominant error type is false negatives due to class imbalance and low object frequency
- The model is recall-limited rather than precision-limited
- Labelling ambiguity affects evaluation, where correct detections may be penalised due to class mismatch
- Ranking-based evaluation (P@100) remains effective even when detection metrics are low