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
Illustration of a real result. Open the scanner for live inference on your own photo.
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.
PlantDoc · field photos
Leaves photographed in the field by other people, with clutter and uneven light. Predicts real-world behaviour.
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.
Four steps, all of them local
- 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.
- 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.
- 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.
- 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.
14 crops, 38 classes
…and 14 more disease classes, plus healthy references for 12 crops.
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.
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.