Instructions to use faiz4320/beans-resnet50 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Keras
How to use faiz4320/beans-resnet50 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://faiz4320/beans-resnet50") - Notebooks
- Google Colab
- Kaggle
Beans ResNet50
What it is
A three-class bean-leaf disease classifier built with tf.keras.applications.ResNet50(include_top=False) and a global-average-pooling, dense, dropout and softmax classification head. The ResNet50 weights are licensed under MIT.
Training
Transfer learning: ImageNet weights ported by Keras Applications, base frozen, new head trained, no fine-tuning.
Dataset and split
Beans with 1,034 training, 133 validation and 128 test images. Dataset source credit: Makerere AI Lab; source and licence details are to be verified.
Preprocessing and input
Input is 224×224 RGB. tf.keras.applications.resnet50.preprocess_input is embedded in the saved model.
Result
Test accuracy: 94.53% — from saved notebook output, not re-run.
Loading
import keras
model = keras.saving.load_model("beans_resnet50.keras")
Limitations
This is coursework and was not re-run offline for this model card. The Beans test split is small at 128 images, so the reported result has limited statistical coverage. This model is not for production use.
Repository: https://github.com/faiz-sheikh/Deep-Learning
- Downloads last month
- 14