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.
- 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— HealthyStage 1— EarlyStage 2— Mid-stageStage 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
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
- 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
| Task | Metric |
|---|---|
| Disease Classification | Accuracy, Weighted F1 |
| Stage Classification | Accuracy, Weighted F1 |
| Days Estimation | MAE, RMSE |
- Python, TensorFlow / Keras
- TensorFlow Datasets
- MobileNetV2
- Pandas, NumPy
- Matplotlib, Seaborn, Plotly
- scikit-learn
- OpenCV, Pillow
Install all dependencies via:
pip install -r requirements.txtNote: If running on Google Colab, the notebook auto-installs all dependencies in its first cell — no manual setup needed.
Key requirements at a glance:
| Package | Version |
|---|---|
| tensorflow | ≥ 2.12.0 |
| tensorflow-datasets | ≥ 4.9.0 |
| keras | ≥ 2.12.0 |
| scikit-learn | ≥ 1.2.0 |
| opencv-python-headless | ≥ 4.7.0 |
| Pillow | ≥ 9.4.0 |
| numpy | ≥ 1.23.0 |
| pandas | ≥ 1.5.0 |
| matplotlib | ≥ 3.6.0 |
| seaborn | ≥ 0.12.0 |
| plotly | ≥ 5.14.0 |
See requirements.txt for the full pinned list.
-
Clone the repo:
git clone https://github.com/sharr-catalyst/Sick-greens.git cd Sick-greens -
(Optional — local run only) Install dependencies:
pip install -r requirements.txt
-
Open
YourGreensAreSick_v2.ipynbin Google Colab -
Run all cells: Runtime → Run all
The notebook will auto-install all dependencies in the first cell.
Sick-greens/
│
├── models/
│ ├── metadata.json # Contains training metrics, dataset sizes, and architecture data
│
│
├── outputs/ # 📊 Training visualization assets
│ ├── confusion_matrices.png
│ ├── limited_class_distribution.png
│ ├── progression_curve.png
│ ├── sample_images.png
│ ├── sample_predictions.png
│ └── training_history.png
│
├── README.md
├── app.py
├── requirements.txt
└── YourGreensAreSick_v2.ipynb
The trained model is hosted on Hugging Face:
To download programmatically:
from huggingface_hub import hf_hub_download
model_path = hf_hub_download(
repo_id="Sharmistha-catalyst/sick-greens-plant-disease",
filename="final_progression_model.h5"
)sharr-catalyst — GitHub