An offline AI crop disease advisor for smallholder farmers in Ghana — runs entirely on-device without internet, providing disease diagnosis, treatment, and prevention advice for maize, pepper, and tomato.
# RK AgriDig
**Offline Crop Disease AI for African Farmers**
An on-device crop disease diagnostic and advisory system for smallholder farmers in Ghana and West Africa. Runs entirely offline on commodity 8GB laptops — no internet, no API costs, no cloud dependency.
## 🌍 The Problem
Smallholder farmers across sub-Saharan Africa lack reliable access to crop disease expertise. When pests or diseases strike, farmers often:
- Cannot diagnose the problem without expert knowledge
- Lack access to actionable treatment advice
- Have no internet to reach cloud-based AI services
- Cannot afford subscription costs ($20+/month API fees)
**Result:** Entire harvests lost to preventable diseases.
## 🚀 The Solution
**RK AgriDig** brings AI-powered crop disease diagnosis directly to farmers' laptops — offline, free, and farmer-friendly.
**Features:**
- 🧐 **Disease Identification** — "What's affecting my crop?"
- 🛠️ **Treatment Advice** — "What can I do to fix it?"
- 🛡️ **Prevention Guidance** — "How do I prevent this next season?"
- 🌐 **Bilingual** — English + Twi (Ghanaian language)
- 📱 **Simple UI** — Gradio web interface, no technical knowledge required
- ⚡ **Fast** — Real-time diagnosis on 8GB RAM hardware
## 📊 Dataset
Built on **GhanaAgricVQA** — a visual question-answering dataset from Ghana with:
- **2,361 Q&A pairs** (train: 2,010 | test: 351)
- **787 images** from real Ghanaian farms (RAIL dataset)
- **3 crops:** Maize, Pepper, Tomato
- **26 disease classes** with expert annotations
- **English + Twi** translations for accessibility
View dataset on HuggingFace
## 🛠️ Technical Stack
| Component | Technology | Notes |
|-----------|-----------|-------|
| **Model** | Phi-3-mini (3.8B) | Quantized to Q4_K_M GGUF |
| **Inference** | llama.cpp + Ollama | CPU-only, memory-mapped loading |
| **UI** | Gradio | Simple, farmer-friendly web interface |
| **Framework** | Python 3.11+ | Minimal dependencies |
| **Target Hardware** | 8GB DDR4 RAM, integrated GPU | Ubuntu 22.04 …