🌿 Sick-greens

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.


What It Does

  • Disease Classification β€” identifies plant disease across 38 classes (e.g. Apple Scab, Tomato Late Blight, Potato Early Blight)
  • Stage Classification β€” maps each disease to one of 4 progression stages:
    • Stage 0 β€” Healthy
    • Stage 1 β€” Early
    • Stage 2 β€” Mid-stage
    • Stage 3 β€” Late-stage
  • Days Estimation β€” regression head estimates days since infection onset
  • Urgency Scoring β€” outputs a 0–10 urgency score with action recommendations (Low / Moderate / High / Critical)
  • Temporal Tracking β€” tracks disease progression across multiple images over time and plots stage & urgency curves

Evaluation Results

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

Usage

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)

Dataset

PlantVillage via TensorFlow Datasets (tfds.load('plant_village'))

  • 38 disease/healthy classes across crops including Tomato, Potato, Apple, Grape, Corn, Peach, Pepper, Strawberry, and more
  • Capped at ~100–102 images per class for balanced training
  • Split: 70% train / 15% validation / 15% test

Model Architecture

  • Backbone: MobileNetV2 (pretrained on ImageNet, fine-tuned)
  • Heads:
    • Disease classification head (38-class softmax)
    • Stage classification head (4-class softmax)
    • Days regression head (single neuron)
  • Class weights applied to handle imbalance

Tech Stack

  • Python, TensorFlow / Keras
  • TensorFlow Datasets
  • MobileNetV2
  • Pandas, NumPy
  • Matplotlib, Seaborn, Plotly
  • scikit-learn
  • OpenCV, Pillow

Links


Author

Sharmistha-catalyst β€” Hugging Face Β· GitHub

Downloads last month
-
Inference Providers NEW
This model isn't deployed by any Inference Provider. πŸ™‹ Ask for provider support

Model tree for Sharmistha-catalyst/sick-greens-plant-disease

Finetuned
(2)
this model

Dataset used to train Sharmistha-catalyst/sick-greens-plant-disease

Evaluation results