Downloads · 30 days
46
11% of all-time downloads
tahzaya/trash-sorter-ai
trash-sorter-ai is a image classification model from tahzaya. Use it when you need a label for an image. It is set up for keras. The card lists the license as apache-2.0.
Classifies waste as Organic or Recyclable with 93.37% accuracy.
Downloads · 30 days
46
11% of all-time downloads
All-time downloads
437
Public
Repo size
18.5 MB
Likes
0
Public
Click a slice to open those files.
.keras9.6 MB · 52%
From the Hugging Face model README
Classifies waste as Organic or Recyclable with 93.37% accuracy.
# 1. Install
!pip install tensorflow
# 2. Load model
from huggingface_hub import hf_hub_download
from tensorflow import keras
model_path = hf_hub_download(
repo_id="tahazyan/trash-sorter-ai",
filename="trash_sorter.keras"
)
model = keras.models.load_model(model_path)
# 3. Use
import cv2
import numpy as np
def classify_waste(image_path):
img = cv2.imread(image_path)
img = cv2.resize(img, (224, 224))
img = img / 255.0
img = np.expand_dims(img, axis=0)
prediction = model.predict(img)[0]
classes = ["Organic", "Recyclable"]
return classes[np.argmax(prediction)]
Architecture: MobileNetV2 + Custom layers
Input: 224×224 RGB images
Output: 2 classes (Organic, Recyclable)
Accuracy: 93.37% on validation set
Training data: 22,564 images
Training time: ~6 hours on Colab GPU
| Organic Waste | Recyclable Waste |
|---|---|
| Food scraps | Plastic bottles |
| Yard waste | Glass jars |
| Paper towels | Aluminum cans |
This model was created as part of an AI waste management project to help reduce improper waste disposal.
Apache 2.0 - Free for personal and commercial use.