Skip to content
Runs with the network off

Diagnose a leafwithout a signal.

Leafwise puts a 9.25 MB disease classifier inside the browser. 38 classes across 14 crops, about 11.9 ms per scan, no upload, no account, no server — because the places that need this most are the places with the worst connectivity.

  • Installable
  • No photo leaves the device
  • Accuracy measured on two datasets
  • MIT licensed
on-device · offline capable
Detected
Tomato · Late Blight
94.1% confidence11.9 ms
Act today. Can take a crop in under a week in cool wet weather. Bag affected leaves, stop overhead watering, re-check in 48 hours.
Model
9.25 MB
Classes
38
Crops
14

Illustration of a real result. Open the scanner for live inference on your own photo.

Measured

Two accuracy numbers, because one would be misleading

Almost every plant-disease demo quotes 99% and stops there. That figure comes from PlantVillage, where each leaf is photographed alone on a plain background. The number that matters is what happens on a photo taken in a field — so both are measured and published, on 0 and 200 images respectively.

Cross-dataset

PlantDoc · field photos

200 images

Leaves photographed in the field by other people, with clutter and uneven light. Predicts real-world behaviour.

Top-1
18.5%
Top-3
38.5%
Crop only
52%
Latency
11.9ms
Crop identification by crop
tomato52%

ONNX Runtime CPU, 2 threads, Intel i5-11400H · generated 2026-08-01 by tools/evaluate.py, which writes the JSON this page renders — nothing here is typed by hand. The sampled PlantDoc shard is tomato-dominated, so read the cross-dataset row as a tomato-weighted estimate rather than a balanced 38-class score.

Pipeline

Four steps, all of them local

  1. 01

    Capture

    The camera frame is centre-cropped to a square and resized to 224 px on a canvas. No image ever leaves the tab.

  2. 02

    Infer

    A 9.25 MB MobileNetV2 graph runs on ONNX Runtime Web (single-threaded WASM SIMD). Normalisation is baked into the graph, so the browser and the training pipeline cannot disagree.

  3. 03

    Explain

    The top three classes come back with probabilities, and each condition maps to field notes: how to confirm it by eye, what to do today, how it spreads.

  4. 04

    Keep

    Scans are written to IndexedDB with a thumbnail and exportable as CSV. The service worker caches the shell and the model, so the second visit needs no network at all.

Coverage

14 crops, 38 classes

AppleBell PepperBlueberryCherryCorn (Maize)GrapeOrangePeachPotatoRaspberrySoybeanSquashStrawberryTomato
Apple · Scab
Apple · Black Rot
Apple · Cedar Rust
Cherry · Powdery Mildew
Corn (Maize) · Cercospora and Gray Leaf Spot
Corn (Maize) · Common Rust
Corn (Maize) · Northern Leaf Blight
Grape · Black Rot
Grape · Esca (Black Measles)
Grape · Isariopsis Leaf Spot
Orange · Citrus Greening
Peach · Bacterial Spot

…and 14 more disease classes, plus healthy references for 12 crops.

Limits

What it cannot do

A tool that decides whether someone sprays their field should be honest about its edges.

  • Fourteen crops, 38 classes. Anything else still returns a confident-looking answer — that is how softmax works. The app flags anything under 45% as unknown rather than hiding it.

  • Trained on PlantVillage: single leaves on plain backgrounds. Field photos with clutter and mixed lighting are measurably harder, which is exactly why the cross-dataset number is published above.

  • One leaf per photo. Whole-plant shots and multiple leaves in frame dilute the prediction.

  • It is a classifier, not an agronomist. The guidance names no pesticide or dose — product choice depends on local regulation and crop stage.

Stack

No server to keep alive

Model
MobileNetV2 1.0 224 · 38 classes · 9.25 MB ONNX
Runtime
ONNX Runtime Web, WASM SIMD, single thread
App
Next.js 15 · TypeScript · Tailwind · static export
Storage
IndexedDB for history · Cache API for model and shell
Toolchain
PyTorch export, ONNX checker, parity test, parquet-based eval
Delivery
GitHub Actions · Vercel · installable PWA

Install it and turn off your data

Open the scanner once so the model caches, then add it to your home screen. It keeps working in a field with no bars.

Open scanner