Downloads · 30 days
3
8% of all-time downloads
nabaouladyahich/ecodetect-waste-classifier
ecodetect-waste-classifier is a image classification model from nabaouladyahich. Use it when you need a label for an image. The card lists the license as apache-2.0.
Downloads · 30 days
3
8% of all-time downloads
All-time downloads
40
Public
Repo size
46.5 MB
Likes
0
Public
Click a slice to open those files.
.h546.5 MB · 100%
From the Hugging Face model README
This model classifies household waste into 6 categories to help with proper recycling and disposal.
import tensorflow as tf
from PIL import Image
import numpy as np
# Load model
model = tf.keras.models.load_model('ecodetect_model.h5')
# Preprocess image
image = Image.open('waste_image.jpg').resize((124, 124))
image_array = np.array(image) / 255.0
image_array = np.expand_dims(image_array, axis=0)
# Predict
predictions = model.predict(image_array)
classes = ['cardboard', 'glass', 'metal', 'paper', 'plastic', 'trash']
predicted_class = classes[np.argmax(predictions)]
This model helps users properly classify waste for recycling, contributing to environmental sustainability and waste reduction efforts.