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:
# !pip install -U keras tensorflow huggingface_hub # Keras needs TensorFlow installed to read "hf://" paths, so the tensorflow backend is selected here; # "jax" and "torch" also work for computation once TensorFlow is installed. import os os.environ["KERAS_BACKEND"] = "tensorflow" import keras model = keras.saving.load_model("hf://kolkela/simple-cnn-classifier") - Notebooks
- Google Colab
- Kaggle
Download metadata.json from kolkela/simple-cnn-classifier: direct link, hf CLI and curl.
- Browser
- Download file 738 Bytes
-
https://huggingface.co/kolkela/simple-cnn-classifier/resolve/main/metadata.json
- Command line
-
hf download hf://kolkela/simple-cnn-classifier/metadata.json
-
curl -L -o metadata.json https://huggingface.co/kolkela/simple-cnn-classifier/resolve/main/metadata.json
738 Bytes
| { | |
| "version": 1, | |
| "classes": [ | |
| "glass", | |
| "metal", | |
| "organic", | |
| "paper", | |
| "plastic" | |
| ], | |
| "image_size": 224, | |
| "model_type": "baseline_cnn", | |
| "batch_size": 32, | |
| "seed": 123, | |
| "epochs_ran": 24, | |
| "best_val_accuracy": 0.6768447756767273, | |
| "best_val_loss": 0.8843007683753967, | |
| "test_loss": 0.8580112457275391, | |
| "test_accuracy": 0.6952140927314758, | |
| "test_precision_macro": 0.6960417768138908, | |
| "test_recall_macro": 0.6916533741850668, | |
| "test_f1_macro": 0.6924287856071965, | |
| "preprocessing": "PIL RGB resize to 224x224; model contains Rescaling(1/255)", | |
| "augmentation": [ | |
| "RandomFlip(horizontal)", | |
| "RandomRotation(0.1)", | |
| "RandomZoom(0.1)", | |
| "RandomContrast(0.1)" | |
| ] | |
| } |