Instructions to use moyasser20/trash-classifier-models with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Keras
How to use moyasser20/trash-classifier-models with Keras:
# Available backend options are: "jax", "torch", "tensorflow". import os os.environ["KERAS_BACKEND"] = "jax" import keras model = keras.saving.load_model("hf://moyasser20/trash-classifier-models") - Notebooks
- Google Colab
- Kaggle
Trash Classifier Models
This repository contains trained models for trash/material classification.
Models Included
- cnn_model.keras: CNN model for feature extraction
- svm_model.pkl: SVM classifier
- knn_model.pkl: KNN classifier
- scaler.pkl: Feature scaler
- class_mapping.pkl: Class label mapping
- config.json: Model configuration
Usage
from huggingface_hub import hf_hub_download
import tensorflow as tf
import pickle
# Download and load CNN model
cnn_path = hf_hub_download(repo_id="moyasser20/trash-classifier-models", filename="cnn_model.keras")
cnn_model = tf.keras.models.load_model(cnn_path)
# Download and load SVM model
svm_path = hf_hub_download(repo_id="moyasser20/trash-classifier-models", filename="svm_model.pkl")
with open(svm_path, 'rb') as f:
svm_model = pickle.load(f)
# Download other files similarly
Training Details
- Task: Material/Trash Classification
- Framework: TensorFlow + Scikit-learn
- Downloads last month
- 3