Zar3y ("My Crop") is an end-to-end AI solution designed to empower Egyptian smallholder farmers in the Nile Delta and Upper Egypt. By leveraging computer vision, the system provides immediate diagnosis of crop diseases—such as those affecting tomatoes, potatoes, peppers, and corn—mitigating the heavy losses caused by delayed expert intervention.
# 🌱 Zar3y — Crop Disease Detection from Phone Photos
> **"Hassan, a smallholder farmer in Beheira, sees yellow spots on his tomato leaves. He takes a photo with his phone."**
Zar3y ("my crop") identifies crop leaf diseases from a single photo — returning a **plain-language diagnosis**, **confidence score**, and **Grad-CAM overlay**.
---
## Team (5 Members)
| Role | Member | Responsibilities |
|------|--------|-----------------|
| Data Engineer | Nourhan | Data prep, augmentation, OOD test set |
| ML Engineer (Train) | shahd | Transfer learning, training pipeline |
| ML Engineer (Eval) | menna | Evaluation, metrics, benchmarks |
| Backend Developer & team leader | Rahma | FastAPI, TFLite inference, quantization |
| Frontend Developer | tasneem | Streamlit demo, Grad-CAM UI, demo recording |
## Dataset
- **Source**: PlantVillage on Kaggle
- **Subset**: 10 locked classes (Tomato, Potato, Pepper, Corn)
- **Split**: Stratified 70/15/15, **seed=42**
### 10 Locked Classes
| # | Class | Crop |
|---|-------|------|
| 0 | Tomato___healthy | Tomato |
| 1 | Tomato___Early_blight | Tomato |
| 2 | Tomato___Late_blight | Tomato |
| 3 | Tomato___Leaf_Mold | Tomato |
| 4 | Potato___healthy | Potato |
| 5 | Potato___Early_blight | Potato |
| 6 | Potato___Late_blight | Potato |
| 7 | Pepper_bell___healthy | Pepper |
| 8 | Pepper_bell___Bacterial_spot | Pepper |
| 9 | Corn___Common_rust | Corn |
### Per-Class Distribution
| Class | Train | Validation | Test |
|---|---|---|---|
| Corn_(maize)___Common_rust_ | 834 | 179 | 179 |
| Pepper,_bell___Bacterial_spot | 697 | 150 | 150 |
| Pepper,_bell___healthy | 1034 | 222 | 222 |
| Potato___Early_blight | 700 | 150 | 150 |
| Potato___Late_blight | 700 | 150 | 150 |
| Potato___healthy | 106 | 23 | 23 |
| Tomato___Early_blight | 700 | 150 | 150 |
| Tomato___Late_blight | 1336 | 286 | 287 |
| Tomato___Leaf_Mold | 666 | 143 | 143 |
| Tomato___healthy | 1113 | 239 | 239 |
> Note: `Potato___healthy` contains fewer than 500 images. Class …