Upload README.md with huggingface_hub
Browse files
README.md
CHANGED
|
@@ -1,3 +1,44 @@
|
|
| 1 |
---
|
| 2 |
license: mit
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 3 |
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
---
|
| 2 |
license: mit
|
| 3 |
+
tags:
|
| 4 |
+
- trash-classification
|
| 5 |
+
- image-classification
|
| 6 |
+
- cnn
|
| 7 |
+
- svm
|
| 8 |
+
- knn
|
| 9 |
---
|
| 10 |
+
|
| 11 |
+
# Trash Classifier Models
|
| 12 |
+
|
| 13 |
+
This repository contains trained models for trash/material classification.
|
| 14 |
+
|
| 15 |
+
## Models Included
|
| 16 |
+
|
| 17 |
+
- **cnn_model.keras**: CNN model for feature extraction
|
| 18 |
+
- **svm_model.pkl**: SVM classifier
|
| 19 |
+
- **knn_model.pkl**: KNN classifier
|
| 20 |
+
- **scaler.pkl**: Feature scaler
|
| 21 |
+
- **class_mapping.pkl**: Class label mapping
|
| 22 |
+
- **config.json**: Model configuration
|
| 23 |
+
|
| 24 |
+
## Usage
|
| 25 |
+
```python
|
| 26 |
+
from huggingface_hub import hf_hub_download
|
| 27 |
+
import tensorflow as tf
|
| 28 |
+
import pickle
|
| 29 |
+
|
| 30 |
+
# Download and load CNN model
|
| 31 |
+
cnn_path = hf_hub_download(repo_id="moyasser20/trash-classifier-models", filename="cnn_model.keras")
|
| 32 |
+
cnn_model = tf.keras.models.load_model(cnn_path)
|
| 33 |
+
|
| 34 |
+
# Download and load SVM model
|
| 35 |
+
svm_path = hf_hub_download(repo_id="moyasser20/trash-classifier-models", filename="svm_model.pkl")
|
| 36 |
+
with open(svm_path, 'rb') as f:
|
| 37 |
+
svm_model = pickle.load(f)
|
| 38 |
+
|
| 39 |
+
# Download other files similarly
|
| 40 |
+
```
|
| 41 |
+
|
| 42 |
+
## Training Details
|
| 43 |
+
- Task: Material/Trash Classification
|
| 44 |
+
- Framework: TensorFlow + Scikit-learn
|