Field Diagnosis Notebook · Built for Ugandan smallholders
🌱 New Farmer

AgriDoc AI

Photograph a sick leaf. Get a diagnosis, a treatment, and the biology behind it — in seconds, on the phone already in your pocket.

📷 Point the camera at a leaf
Examining the leaf…

Bundles all your real diagnoses (photos + AI reasoning) into a spreadsheet and photo folder, ready to send to an agronomist for review. Sample/demo entries are excluded automatically.

No internet needed. Work through each crop's Plant Doctor path — five short lessons, then a quick test to certify you know it.

Two quick checks — a photo and a feel-test you do with your hands — combine into a soil health snapshot. No internet needed for this one.

Dig about 10cm down (topsoil only tells half the story), lay a handful on a flat surface in daylight, and photograph it like the leaf photo.

Tap to photograph soil
flat handful, daylight, no shadow

Wet the soil slightly and answer honestly — this simplified version of the standard extension-officer "ribbon test" takes under a minute.

Quick setup covers the basics. This deeper profile is optional, but the more it knows about your farm, the more specific every diagnosis, soil check, and recommendation becomes.

Irrigation access
Years farming this land
Preferred language for results
How do you usually treat crop problems?
Major crop problems you've faced before (optional)
Have you had a lab soil test before?
✅ Profile saved — future diagnoses and soil checks will use this.

If set, diagnoses use Google's direct Gemini API first (faster, no shared storage limit) before falling back to the built-in AI service. Leave blank to use the default behavior. Stored only on this device.

✅ Saved.

Removes your farm profile, field journal, and lesson progress from this device, and deletes your diagnosis records from the shared database where possible.

● low concern ● rising ● high concern bubble size = report volume

In Uganda, agricultural extension officers — the trained staff who normally help farmers identify crop problems — are stretched far too thin to reach most smallholder farms regularly. By the time a farmer can get expert eyes on a sick plant, a treatable problem can already be spreading. Most farmers, even in remote areas, now carry a basic smartphone — that camera is the fastest expert access point available.

AgriDoc AI does not run a single black-box guess. Each diagnosis goes through several layers: (1) an independent pixel-level color analysis runs in the browser — no AI, just HSV color-space thresholding — to measure what % of the leaf is green, yellowing, or necrotic; (2) that measurement, plus a small curated reference set of the major documented diseases for that crop (summarized from published Uganda-focused agricultural research), is fed into the prompt for a multimodal AI model (Gemini 3.5 Flash) as cross-checks against its own visual read, with automatic retries if the connection drops mid-request; (3) if that first read comes back with low confidence, a second, stronger model (Gemini 3.1 Pro) automatically reviews the same photo — most diagnoses stay fast on the first model alone, but genuinely uncertain cases get a real second opinion instead of just a warning label. The model is instructed to say plainly when a case doesn't match anything in the curated reference set, rather than forcing a fit. When the two models disagree, that disagreement is shown honestly rather than silently resolved. This is an honest design choice: it doesn't replace a properly trained, validated classifier, but it's a real multi-signal, partially-grounded check rather than trusting one raw model guess with no cross-reference.

A confidence score only means something if it's calibrated — if "90% confident" is actually right about 90% of the time, not just a number the model feels like saying. Below is a real measurement, not a claim: every diagnosis a farmer marks ✅ or ❌ gets bucketed by the confidence it was given, across every AgriDoc user, and this shows what fraction in each bucket actually turned out correct.

  1. Explains why a disease happens, not just its name — this is the educational core of the app.
  2. Shows its reasoning ("what we saw") and an independent pixel-color measurement, so a farmer can sanity-check the diagnosis against their own eyes and the numbers.
  3. Retries automatically on a dropped connection instead of failing outright.
  4. Works in three languages, and reads results aloud for low-literacy users.
  5. Compresses photos before sending, so it's usable on limited mobile data.
  6. Tracks real farmer-confirmed accuracy over time (Field Journal tab) — not a claimed number, an actual running tally from outcome feedback.
  1. Confidence scores are still ultimately model self-assessment, not a lab-calibrated statistic — treat anything under 60% as a starting guess, not a verdict.
  2. The pixel-color analysis is a coarse heuristic (HSV thresholding) — it can be fooled by soil, glare, or background foliage in the frame, which is why it's shown as a cross-check, not a standalone verdict.
  3. It hasn't yet been validated against a large labelled dataset or by a trained agronomist — that's the most important next step before any real-money treatment decisions should be based on it.
  4. It depends on an internet connection per diagnosis; the Learn Library is the offline fallback by design.

Validation against confirmed cases with local agricultural officers, an SMS/USSD channel for farmers without smartphones, and a feedback loop where farmers report whether a diagnosis turned out correct — turning every use of the app into a small piece of real-world accuracy data.