A Convolutional Neural Network trained to classify garbage images into 7 categories:
Helps automate waste sorting for better recycling. Great for demos, PoC apps, or smart bin integration.
from tensorflow.keras.models import load_model
from PIL import Image
import numpy as np
model = load_model("GarbageMLModel_CS549.h5")
img = Image.open("example.jpg").resize((224, 224))
img_array = np.expand_dims(np.array(img) / 255.0, axis=0)
pred = model.predict(img_array)
classes = ['cardboard', 'glass', 'metal', 'paper', 'plastic', 'trash', 'biodegradable']
print("Prediction:", classes[np.argmax(pred)])
GarbageMLModel_CS549.h5 – Trained modellabel_map.json – Label mappingVincent Huynh
📧 vintendohuynh@gmail.com
🔗 LinkedIn | 🔗 GitHub