How sambitji/krishidrishti works
KrishiDrishti AI is a farmer-facing crop-disease screening and incident-triage system. Farmers submit a leaf image or case report through the web UI/API; the API routes diagnosis through crop-specific inference, optionally adds satellite screening, and combines evidence into an explainable risk score before case management and guidance. WhatsApp and voice provide additional farmer communication paths. The README documents expert review and follow-up as case capabilities, but their exact implementation links are not fully shown in the excerpts; those links are therefore omitted. Edges reflect excerpted source references or explicit README descriptions.
Main entry points: api.py FastAPI routes · inference.py Leaf inference · farmer_flow.py Farmer conversation flow · webhook.py WhatsApp webhook
Components 25
Farmer access
- Farmer web UI
src/krishidrishti_ai/static/index.html - WhatsApp demo UI
src/krishidrishti_ai/static/whatsapp.html - FastAPI routes
src/krishidrishti_ai/api.py
Leaf diagnosis
- Crop registry
src/krishidrishti_ai/services/registry.py - Leaf inference
src/krishidrishti_ai/services/inference.py - Image quality gate
src/krishidrishti_ai/services/quality.py - Classifier models
src/krishidrishti_ai/models/classifier.py - Image transforms
src/krishidrishti_ai/data/transforms.py - Confidence calibration
src/krishidrishti_ai/calibration.py - Prediction metrics
src/krishidrishti_ai/metrics.py - Disease knowledge
src/krishidrishti_ai/services/knowledge.py
Field risk
- Satellite screening
src/krishidrishti_ai/services/satellite.py - Earth Engine adapter
src/krishidrishti_ai/gee_api.py - Risk fusion
src/krishidrishti_ai/services/fusion.py
Case workflow
- Case workflow
src/krishidrishti_ai/services/cases.py - WhatsApp case store
src/krishidrishti_ai/communication/case_store.py - Notifications
src/krishidrishti_ai/services/notifications.py
Farmer communications
- WhatsApp webhook
src/krishidrishti_ai/communication/webhook.py - Farmer conversation flow
src/krishidrishti_ai/communication/farmer_flow.py - Voice processing
src/krishidrishti_ai/communication/voice_service.py - WhatsApp client
src/krishidrishti_ai/communication/whatsapp_client.py
Other components
- Farmer
- KVK expert
- Google Earth Engine
- Meta WhatsApp API
Connections 28
- Farmer → Farmer web UI: submits photo
README.md - Farmer web UI → FastAPI routes: sends requests
README.md - Farmer → FastAPI routes: reports case
README.md - FastAPI routes → Crop registry: routes crop
src/krishidrishti_ai/api.py - Crop registry → Leaf inference: provides service
src/krishidrishti_ai/services/registry.py - Leaf inference → Image quality gate: checks image
src/krishidrishti_ai/services/inference.py - Leaf inference → Classifier models: runs model
src/krishidrishti_ai/services/inference.py - Leaf inference → Image transforms: transforms image
src/krishidrishti_ai/services/inference.py - Leaf inference → Confidence calibration: calibrates scores
src/krishidrishti_ai/services/inference.py - Leaf inference → Prediction metrics: uses uncertainty
src/krishidrishti_ai/services/inference.py - Leaf inference → Disease knowledge: gets display names
src/krishidrishti_ai/services/inference.py - FastAPI routes → Disease knowledge: gets advice
src/krishidrishti_ai/api.py - FastAPI routes → Satellite screening: requests screening
src/krishidrishti_ai/api.py - Satellite screening → Earth Engine adapter: delegates analysis
src/krishidrishti_ai/services/satellite.py - Earth Engine adapter → Google Earth Engine: queries imagery
- FastAPI routes → Risk fusion: combines evidence
README.md - FastAPI routes → Case workflow: creates case
src/krishidrishti_ai/api.py - FastAPI routes → Leaf inference: diagnoses photo
src/krishidrishti_ai/api.py - FastAPI routes → WhatsApp webhook: exposes routes
src/krishidrishti_ai/api.py - WhatsApp webhook → Farmer conversation flow: dispatches message
src/krishidrishti_ai/communication/webhook.py - Farmer conversation flow → WhatsApp case store: uses case data
src/krishidrishti_ai/communication/farmer_flow.py - Farmer conversation flow → Voice processing: processes voice
src/krishidrishti_ai/communication/farmer_flow.py - Farmer conversation flow → WhatsApp client: sends replies
src/krishidrishti_ai/communication/farmer_flow.py - WhatsApp webhook → WhatsApp client: checks provider
src/krishidrishti_ai/communication/webhook.py - WhatsApp client → Meta WhatsApp API: sends messages
- Farmer → WhatsApp demo UI: opens channel
- FastAPI routes → Notifications: dispatches alerts
src/krishidrishti_ai/api.py - KVK expert → Case workflow: reviews cases
README.md