CleanCity Waste Classifier
Waste classification model for the CleanCity application.
Model Description
This is a Keras/TensorFlow model trained to classify different types of waste:
- Organic
- Plastic
- Paper
- Metal
- Glass
- Cardboard
Usage
from tensorflow import keras
import numpy as np
from PIL import Image
# Load model
model = keras.models.load_model('waste_classifier_best.h5')
# Prepare image
img = Image.open('waste_image.jpg').resize((224, 224))
img_array = np.array(img) / 255.0
img_array = np.expand_dims(img_array, axis=0)
# Predict
prediction = model.predict(img_array)
categories = ['organic', 'plastic', 'paper', 'metal', 'glass', 'cardboard']
result = categories[np.argmax(prediction)]
print(f"Predicted: {result}")
Model Details
- Framework: TensorFlow/Keras
- Input Size: 224x224
- Output: 6 classes
- Format: .h5 (Keras)
Application
This model is used in the CleanCity civic waste reporting application.
Repository: CleanCity-AI
- Downloads last month
- -