Views
No views yet
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 |
1from huggingface_hub import hf_hub_download
2from tensorflow import keras
3import numpy as np
4import json
5
6# Download model and metadata
7model_path = hf_hub_download(
8 repo_id="Sharmistha-catalyst/sick-greens-plant-disease",
9 filename="final_progression_model.h5"
10)
11metadata_path = hf_hub_download(
12 repo_id="Sharmistha-catalyst/sick-greens-plant-disease",
13 filename="metadata.json"
14)
15
16# Load model and metadata
17model = keras.models.load_model(model_path)
18with open(metadata_path) as f:
19 metadata = json.load(f)
20
21# Preprocess and predict
22image = np.expand_dims(your_image_array, axis=0) # (1, 224, 224, 3)
23image = keras.applications.mobilenet_v2.preprocess_input(image)
24
25disease_pred, stage_pred, days_pred = model.predict(image)tfds.load('plant_village'))