← Return to Homepage
Applied AI & Computer Vision

Waste Classification
with CNNs

A computer vision project comparing three convolutional neural network architectures for automated waste-image classification, using multiple datasets and both scratch training and transfer learning.

Python PyTorch CNN MobileNetV2 ResNet18 VGG16 Transfer Learning Grad-CAM t-SNE
01 — Project Overview

Waste Image Classification

This project investigates how Convolutional Neural Networks (CNNs) can be used to automatically classify waste images into different categories.

The study compares three CNN architectures — MobileNetV2, ResNet18, and VGG16 — across three waste-image datasets with different numbers of classes and dataset sizes.

Each architecture was evaluated using both training from scratch and transfer learning to investigate how model architecture and pre-trained knowledge affect classification performance.

02 — Model Comparison

Comparing CNN Architectures

Three CNN architectures were evaluated under the same experimental framework. MobileNetV2 focuses on computational efficiency, ResNet18 uses residual connections to support deeper learning, while VGG16 provides a substantially larger and more parameter-heavy architecture.

The experiments show that model performance depends strongly on the dataset. On the six-class dataset, for example, ResNet18 achieved 84.21% test accuracy , while VGG16 achieved only 60.53%.

Transfer learning also produced significant improvements. MobileNetV2 increased from 89.39% to 97.04% on the 12-class dataset.

// Test Accuracy — CNN Architecture Comparison
Test Accuracy Comparison
// Scratch Model Results
Architecture Drinking Waste Garbage 6 Garbage 12
MobileNetV2 97.64% 81.84% 89.39%
ResNet18 98.06% 84.21% 88.45%
VGG16 96.25% 60.53% 87.50%
03 — Model Analysis

Understanding Model Decisions

Accuracy alone does not explain how a CNN makes its predictions. To examine the model's behavior, the project uses Grad-CAM to visualize which regions of an image contribute most strongly to the model's prediction.

The comparison between scratch training and transfer learning provides a visual perspective on how the learned representations differ. The highlighted regions indicate the areas the model relies on when identifying the waste category.

// Grad-CAM — Scratch vs Transfer Learning
Scratch Training
Grad-CAM Scratch Model
Transfer Learning
Grad-CAM Transfer Learning Model
04 — Conclusion

Key Takeaway

The experiments demonstrate that both CNN architecture and transfer learning have a significant impact on waste classification performance.

Overall, transfer learning improved classification accuracy, while the comparison between architectures showed that model performance can vary substantially depending on the dataset and number of classes.

The project also demonstrates how Grad-CAM can provide additional insight into model behavior beyond accuracy alone.

← Back to Homepage