Instructions to use rishabh914/leaf-disease-detection with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Keras
How to use rishabh914/leaf-disease-detection with Keras:
# Available backend options are: "jax", "torch", "tensorflow". import os os.environ["KERAS_BACKEND"] = "jax" import keras model = keras.saving.load_model("hf://rishabh914/leaf-disease-detection") - Notebooks
- Google Colab
- Kaggle
Leaf Disease Detection Model
This model can detect diseases in plant leaves using EfficientNetB3 architecture.
Usage
from huggingface_hub import hf_hub_download
import tensorflow as tf
import json
# Download model and class indices
model_path = hf_hub_download(repo_id="Rvish-glitch/leaf-disease-detection", filename="final_model.h5")
indices_path = hf_hub_download(repo_id="Rvish-glitch/leaf-disease-detection", filename="class_indices.json")
# Load model
model = tf.keras.models.load_model(model_path)
# Load class indices
with open(indices_path, 'r') as f:
class_indices = json.load(f)
Classes
The model can detect various plant diseases across different crops including tomato, potato, apple, and corn.