Keras
English
resnet50
How to use from the
Use from the
Keras library
# Available backend options are: "jax", "torch", "tensorflow".
import os
os.environ["KERAS_BACKEND"] = "jax"

import keras

model = keras.saving.load_model("hf://Stefaron/trash-classifier")

Trash Classifier Model

This model is a fine-tuned ResNet50 for classifying trash images into categories such as plastic, paper, glass, metal, and others.

Dataset

  • Dataset: TrashNet
  • Number of Classes: 6 (Plastic, Metal, Paper, Glass, Cardboard, Trash)

Model Details

  • Base Model: ResNet50 (pretrained on ImageNet)
  • Fine-tuning: Input layer adjusted for 6 classes.
  • Input Shape: (384, 384, 3)
  • Learning Rate: 0.0001
  • Optimizer: Adam

Performance

  • Accuracy F1-Scores: 92%

How to Use

Load the model and use it for inference:

import tensorflow as tf
model = tf.keras.models.load_model("Stefaron/trash-classifier/best_model.keras")
Downloads last month
23
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Dataset used to train Stefaron/trash-classifier