Comparing different image classification models for sorting common household waste (cardboard, glass, metal, paper, plastic, trash).
- Multiple CNN architectures (ResNet, ConvNeXt, EfficientNet, MobileNet)
- Training on multiple datasets (TrashNet, Garbage Classification v2)
- Training scripts, experiments and live demo
- Python 3.8+
- A GPU or Apple Silicon (MPS) is recommended but not required
git clone <your-repo-url>
cd project-final
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
pip install -r requirements.txtTrashNet (6 classes):
wget https://github.com/garythung/trashnet/raw/master/data/dataset-resized.zip
unzip dataset-resized.zip -d data/Garbage Classification v2 (10 classes): download from Kaggle and place the folders under data/garbage-classification-v2/ following the existing class subfolder structure.
- Verify data and visualizations
python -m scripts.verify_data- Train on TrashNet (6 classes)
python -m scripts.train_universal --dataset trashnet --architecture resnet50- Train on Garbage Classification v2 (10 classes)
python -m scripts.train_universal --dataset garbage_v2 --architecture resnet50- Live demo with webcam (requires a trained checkpoint)
python -m scripts.live_demo \
--checkpoint outputs/.../best_model.pth \
--dataset trashnet \
--architecture resnet50For more experiments (architecture comparisons, CLIP, SAM), see the scripts in the scripts/ folder.