Instructions to use kolkela/simple-cnn-classifier with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Keras
How to use kolkela/simple-cnn-classifier with Keras:
# Available backend options are: "jax", "torch", "tensorflow". import os os.environ["KERAS_BACKEND"] = "jax" import keras model = keras.saving.load_model("hf://kolkela/simple-cnn-classifier") - Notebooks
- Google Colab
- Kaggle
Upload 4 files
Browse files- accuracy.png +0 -0
- evaluation.json +84 -0
- loss.png +0 -0
- metadata.json +29 -0
accuracy.png
ADDED
|
evaluation.json
ADDED
|
@@ -0,0 +1,84 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"classification_report": {
|
| 3 |
+
"glass": {
|
| 4 |
+
"precision": 0.6923076923076923,
|
| 5 |
+
"recall": 0.6428571428571429,
|
| 6 |
+
"f1-score": 0.6666666666666666,
|
| 7 |
+
"support": 42.0
|
| 8 |
+
},
|
| 9 |
+
"metal": {
|
| 10 |
+
"precision": 0.6195652173913043,
|
| 11 |
+
"recall": 0.7215189873417721,
|
| 12 |
+
"f1-score": 0.6666666666666666,
|
| 13 |
+
"support": 79.0
|
| 14 |
+
},
|
| 15 |
+
"organic": {
|
| 16 |
+
"precision": 0.7613636363636364,
|
| 17 |
+
"recall": 0.7790697674418605,
|
| 18 |
+
"f1-score": 0.7701149425287356,
|
| 19 |
+
"support": 86.0
|
| 20 |
+
},
|
| 21 |
+
"paper": {
|
| 22 |
+
"precision": 0.7586206896551724,
|
| 23 |
+
"recall": 0.6804123711340206,
|
| 24 |
+
"f1-score": 0.717391304347826,
|
| 25 |
+
"support": 97.0
|
| 26 |
+
},
|
| 27 |
+
"plastic": {
|
| 28 |
+
"precision": 0.6483516483516484,
|
| 29 |
+
"recall": 0.6344086021505376,
|
| 30 |
+
"f1-score": 0.6413043478260869,
|
| 31 |
+
"support": 93.0
|
| 32 |
+
},
|
| 33 |
+
"accuracy": 0.6952141057934509,
|
| 34 |
+
"macro avg": {
|
| 35 |
+
"precision": 0.6960417768138908,
|
| 36 |
+
"recall": 0.6916533741850668,
|
| 37 |
+
"f1-score": 0.6924287856071965,
|
| 38 |
+
"support": 397.0
|
| 39 |
+
},
|
| 40 |
+
"weighted avg": {
|
| 41 |
+
"precision": 0.6986971238573397,
|
| 42 |
+
"recall": 0.6952141057934509,
|
| 43 |
+
"f1-score": 0.6955284951982446,
|
| 44 |
+
"support": 397.0
|
| 45 |
+
}
|
| 46 |
+
},
|
| 47 |
+
"confusion_matrix": [
|
| 48 |
+
[
|
| 49 |
+
27,
|
| 50 |
+
5,
|
| 51 |
+
2,
|
| 52 |
+
4,
|
| 53 |
+
4
|
| 54 |
+
],
|
| 55 |
+
[
|
| 56 |
+
3,
|
| 57 |
+
57,
|
| 58 |
+
7,
|
| 59 |
+
7,
|
| 60 |
+
5
|
| 61 |
+
],
|
| 62 |
+
[
|
| 63 |
+
0,
|
| 64 |
+
5,
|
| 65 |
+
67,
|
| 66 |
+
1,
|
| 67 |
+
13
|
| 68 |
+
],
|
| 69 |
+
[
|
| 70 |
+
5,
|
| 71 |
+
10,
|
| 72 |
+
6,
|
| 73 |
+
66,
|
| 74 |
+
10
|
| 75 |
+
],
|
| 76 |
+
[
|
| 77 |
+
4,
|
| 78 |
+
15,
|
| 79 |
+
6,
|
| 80 |
+
9,
|
| 81 |
+
59
|
| 82 |
+
]
|
| 83 |
+
]
|
| 84 |
+
}
|
loss.png
ADDED
|
metadata.json
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"version": 1,
|
| 3 |
+
"classes": [
|
| 4 |
+
"glass",
|
| 5 |
+
"metal",
|
| 6 |
+
"organic",
|
| 7 |
+
"paper",
|
| 8 |
+
"plastic"
|
| 9 |
+
],
|
| 10 |
+
"image_size": 224,
|
| 11 |
+
"model_type": "baseline_cnn",
|
| 12 |
+
"batch_size": 32,
|
| 13 |
+
"seed": 123,
|
| 14 |
+
"epochs_ran": 24,
|
| 15 |
+
"best_val_accuracy": 0.6768447756767273,
|
| 16 |
+
"best_val_loss": 0.8843007683753967,
|
| 17 |
+
"test_loss": 0.8580112457275391,
|
| 18 |
+
"test_accuracy": 0.6952140927314758,
|
| 19 |
+
"test_precision_macro": 0.6960417768138908,
|
| 20 |
+
"test_recall_macro": 0.6916533741850668,
|
| 21 |
+
"test_f1_macro": 0.6924287856071965,
|
| 22 |
+
"preprocessing": "PIL RGB resize to 224x224; model contains Rescaling(1/255)",
|
| 23 |
+
"augmentation": [
|
| 24 |
+
"RandomFlip(horizontal)",
|
| 25 |
+
"RandomRotation(0.1)",
|
| 26 |
+
"RandomZoom(0.1)",
|
| 27 |
+
"RandomContrast(0.1)"
|
| 28 |
+
]
|
| 29 |
+
}
|