mohanty/PlantVillage
Viewer β’ Updated β’ 163k β’ 5.11k β’ 13
How to use Sharmistha-catalyst/sick-greens-plant-disease with Keras:
# Available backend options are: "jax", "torch", "tensorflow".
import os
os.environ["KERAS_BACKEND"] = "jax"
import keras
model = keras.saving.load_model("hf://Sharmistha-catalyst/sick-greens-plant-disease")
A deep learning system for plant disease detection and progression tracking built on the PlantVillage dataset. Given a leaf image, the model identifies the disease, classifies its stage (healthy β early β mid β late), estimates days since infection, and computes a treatment urgency score.
Stage 0 β HealthyStage 1 β EarlyStage 2 β Mid-stageStage 3 β Late-stage| Task | Metric | Score |
|---|---|---|
| Disease Classification | Accuracy | 82.82% |
| Disease Classification | Weighted F1 | 0.8242 |
| Stage Classification | Accuracy | 80.93% |
| Stage Classification | Weighted F1 | 0.7998 |
| Days Estimation | MAE | 2.86 days |
| Days Estimation | RMSE | 4.16 days |
from huggingface_hub import hf_hub_download
from tensorflow import keras
import numpy as np
import json
# Download model and metadata
model_path = hf_hub_download(
repo_id="Sharmistha-catalyst/sick-greens-plant-disease",
filename="final_progression_model.h5"
)
metadata_path = hf_hub_download(
repo_id="Sharmistha-catalyst/sick-greens-plant-disease",
filename="metadata.json"
)
# Load model and metadata
model = keras.models.load_model(model_path)
with open(metadata_path) as f:
metadata = json.load(f)
# Preprocess and predict
image = np.expand_dims(your_image_array, axis=0) # (1, 224, 224, 3)
image = keras.applications.mobilenet_v2.preprocess_input(image)
disease_pred, stage_pred, days_pred = model.predict(image)
PlantVillage via TensorFlow Datasets (tfds.load('plant_village'))
Sharmistha-catalyst β Hugging Face Β· GitHub
Base model
Synaptics/MobileNetV2