How shanelin0107/ba865_recycling-with-deep-learning works
Project type and purpose
• This is a machine-learning prototype for waste classification, implemented as a single notebook/script.
• Purpose: train and compare CNN architectures (custom and transfer-learning variants) to classify six waste categories, with the goal of embedding a model in a smart bin edge device.
File structure
• Top-level files:
– README.md (project overview, instructions, architecture description)
– final_notebook_ba865_group_project.py (monolithic training, evaluation, and visualization pipeline)
• No separate frontend, backend, or service directories – code lives in one script.
Extract architectural insights from README
• Data ingestion: custom image dataset, train/validation/test splits
• Preprocessing: resizing, normalization, augmentations (flip, rotation, zoom)
• Model training:
– Custom CNN pipeline
– Transfer learning via ResNet50
– Transfer learning via MobileNetV2 with CutMix
• Evaluation: accuracy and loss metrics, comparison of model variants
• Future deployment target: edge device (e.g., Raspberry Pi + OpenCV)
Main components
a. Data Storage & Ingestion
– Raw image dataset (JPEG, PNG, HEIC)
– Split into train/validation/test buckets
b. Preprocessing & Augmentation
– Resize to 224×224, scale pixels
– Augmentation pipeline (flip, rotation, zoom, CutMix)
c. Model Training & Selection
– Custom CNN branch
– ResNet50 branch (frozen backbone + custom head)
– MobileNetV2 + CutMix branch
d. Model Evaluation
– Compute accuracy, loss, confusion matrix
e. Deployment Target
– Edge inference layer (Raspberry Pi + OpenCV)
Relationships and data flow
• Raw dataset → preprocessing/augmentation module
• Preprocessed data → three parallel training modules (custom CNN, ResNet50, MobileNetV2+CutMix)
• Outputs of training modules → centralized evaluation module
• Best model → deployment packaging → edge inference component
Architectural patterns and design principles
• Modular pipeline: distinct stages for data prep, training, evaluation
• Parallel experiment branches to compare different architectures
• Reproducibility via notebook/script, environment isolation (Python 3.8+, TensorFlow 2.x, numpy, pandas, scikit-learn, matplotlib)