PROJECT 02Deep Learning & Computer VisionPyTorch & ViT

WASTENET

Computer vision waste classification system comparing Deep CNNs and Vision Transformers.

WASTENET // COMPUTER VISION CLASSIFICATION BENCHMARK (CNN VS. VIT)
PYTORCH 2.0 • TORCHSCRIPT
BASELINE CONVNET
Custom 4-Layer CNN

Standard convolutional kernels extracting localized textures and edge spatial features. Fast inference.

TRANSFER BACKBONES
ResNet-50 & MobileNet

Deep residual connections eliminating vanishing gradients across diverse ecological waste samples.

TRANSFORMER ATTENTION
Vision Transformer (ViT-B/16)

16x16 image patch projections with multi-head self-attention capturing global object context under reflections.

TECH STACK • CORE RUNTIME
PythonPyTorchCNNVision TransformerFlaskOpenCV
DOMAIN DISCIPLINE
AI / Computer Vision
Author: Martin Wassim
VERIFIED INTERFACE ARTIFACTS & ARCHITECTURAL DIAGRAMS
2 visual assets
WASTENET screenshot 1
Figure 1: WASTENET — Visual EvidenceVerified Production Asset
WASTENET screenshot 2
Figure 2: WASTENET — Visual EvidenceVerified Production Asset
01 / THE PROBLEM BEING SOLVED

Operational & Technical Friction

Municipal and domestic recycling pipelines fail due to manual sorting errors and varying real-world lighting, reflections, and angles.

02 / THE ARCHITECTED SOLUTION

Systemized Implementation

Trained and fine-tuned deep visual classifiers capable of differentiating complex recyclable materials with sub-second inference and high generalization.

03 / ACTUAL IMPLEMENTATION & WORKFLOW

How It Operates in Production

Constructed a modular training and evaluation harness in PyTorch. Trained a custom convolutional baseline, fine-tuned pretrained ResNet-50 and MobileNetV2 backbones, and evaluated a Vision Transformer (ViT-B/16) utilizing self-attention across image patches.

Implemented custom PyTorch Dataset loaders, learning rate schedulers, and confusion matrix visualizers to diagnose cross-class ambiguities.

04 / SYSTEM ARCHITECTURE EXPLANATION

Data Flow & Infrastructure

Images enter through an OpenCV preprocessing pipeline, undergo normalization, and pass into TorchScript-serialized model weights. The Flask microservice exposes a lightweight REST endpoint returning category probabilities, inference timestamps, and class confidence intervals.

Architectural Highlight: Benchmarked baseline CNNs against Vision Transformers (ViT) to quantify spatial attention vs. localized convolution on diverse lighting conditions.
05 / KEY ENGINEERING DECISIONS
Benchmark methodology: Evaluated models on identical validation splits using precision, recall, F1-score, and per-class confusion matrices rather than top-1 accuracy alone.
Data augmentation pipeline: Employed random perspective transforms, color jitter, and Gaussian blur to simulate real-world conveyor and sorting facility conditions.
Model pruning for inference: Quantized weights to INT8 to enable responsive real-time inference on edge devices without requiring dedicated data center GPUs.
06 / CHALLENGES & MITIGATIONS
•High intra-class variance and visual overlap between clear plastic bottles and transparent glass containers.
•Imbalanced training distributions across rare trash categories requiring focal loss weighting.
•Minimizing inference latency for continuous live webcam feeds.
07 / VERIFIED CAPABILITIES
Six-category ecological waste classification (Cardboard, Glass, Metal, Paper, Plastic, Trash)
Rigorous comparative benchmark (CNN vs. Transfer Learning vs. ViT)
Automated image pre-processing and dynamic tensor augmentations
Local inference REST microservice built with Flask and TorchScript
Interactive evaluation dashboard with confusion matrix & confidence scores