Web Application
GreenDoc — AI-Powered Crop Disease Detection for African Farmers
# GreenDoc — AI-Powered Crop Disease Detection
## What I Built
GreenDoc is a mobile-first web application that lets any farmer take a photo
of a diseased crop leaf and receive an instant AI diagnosis — the disease name,
severity level, and exact treatment recommendation.
## The Problem
Nigeria loses $3.6 billion annually to agricultural losses. Crop diseases go
undetected until it's too late. The nearest agricultural extension officer is
40km away.
## Tech Stack
- **Model:** EfficientNetB0 with transfer learning (PyTorch)
- **Dataset:** 35,000+ images across 19 disease classes
- **Backend:** FastAPI deployed on Railway
- **Frontend:** React + Tailwind CSS deployed on Vercel
- **Model Format:** ONNX for optimized inference
## Model Performance
- Round 1: 95.79% validation accuracy
- Round 2: 99.43% validation accuracy, 100% F1 score on all 19 classes
## Code Example
```python
model = models.efficientnet_b0(weights="IMAGENET1K_V1")
for param in model.parameters():
param.requires_grad = False
model.classifier[1] = nn.Linear(
model.classifier[1].in_features, 19
)
```
## Results
- 19 crop disease classes detected
- 99.43% validation accuracy after fine-tuning
- Live on mobile at https://cropdoc-frontend-ldld.vercel.app
## Challenges
- Domain gap between lab training images and real farm photos
- ONNX model size limitations on free hosting
- Confident misclassifications on Mosaic Virus and Septoria
## What's Next
- Retrain with real field condition images
- Google login and Paystack payments
- Android APK for full offline use
Python
PyTorch
EfficientNetB0
FastAPI
React
Tailwind CSS
ONNX
Railway
Vercel