# Leaf Disease ID > Free, in-browser plant leaf disease identifier. One leaf photo in; the likely crop and condition with top-3 confidence, a symptom and management card, a discolouration map and an out-of-distribution warning out. Runs on the visitor's device; nothing is uploaded, no sign-in, no credits. An optional paid Expert check sends the framed leaf and the local top 3 to an OpenAI vision model for a second opinion. URL: https://leaf-disease-id.skillsafe.ai/ ## What it does - Input: choose, take (phone camera), drag in or paste one photo; drag a square onto the leaf and zoom. - Optional "What plant is it?" picker (14 crops or "Something else"); picking a crop limits answers to that crop. - Output: a verdict (confident, probably, not sure, unfamiliar photo, not a leaf), the top 3 of 38 conditions with confidence, and a card for the chosen condition: cause, what to look for, easily confused with, what to do, when to act. - Colour map: share of the leaf area that is yellowing, brown/dead or pale/powdery, with an overlay. - Exports: copy report, download Markdown, print. Recent checks are kept in this browser only. - Seven bundled examples (six leaves and one non-leaf) show a recorded result instantly; "Run on this device" re-runs them live. ## Expert check (optional, paid) - Signed-in users only; uses SkillSafe credits. The page shows the estimate as "up to $X reserved" before the run and the charged amount after. - Sends the square the user framed (JPEG, at most 768 px, no EXIF), the local top 3, the local verdict, the colour-map shares, the chosen plant and an optional note. - Model: gpt-terra (OpenAI, via SkillSafe). Reply contract: one JSON object with photo status (ok, poor, too_blurry, not_leaf), summary, crop, problem (category disease, pest, nutrient, abiotic, healthy or unknown; cause; confidence), visible evidence, 2-3 alternatives with how to tell them apart, management (cultural steps first, then product groups, never doses), when to contact a local extension service, and agreement with the local result. - The page parses that JSON, recovers a cut-off reply where it can, and compares the answer with the local top 3 itself (agrees, matches #2 or #3, same crop only, differs; flags crops and problem types the local model cannot know). - Not limited to the 14 crops; covers pests, nutrient problems and weather or chemical damage. Still a first opinion from a photo, not a diagnosis. - Saved example answers for four bundled photos are free to view. Past expert checks are saved to the user's account. - API: POST https://api.skillsafe.ai/v1/app-api/run with {"task":"expert_check","crop_hint":"","local_verdict":"","local_top3":"[...JSON...]","colour_map":"","note":"","$files":["fil_..."]} after uploading the image to /v1/app-api/files. Full docs with cURL, Python and JavaScript: https://leaf-disease-id.skillsafe.ai/api.html ## Crops and conditions Apple (scab, black rot, cedar apple rust, healthy); blueberry (healthy); cherry (powdery mildew, healthy); corn (gray leaf spot, common rust, northern leaf blight, healthy); grape (black rot, esca, leaf blight, healthy); citrus (huanglongbing); peach (bacterial spot, healthy); bell pepper (bacterial spot, healthy); potato (early blight, late blight, healthy); raspberry, soybean (healthy); squash (powdery mildew); strawberry (leaf scorch, healthy); tomato (bacterial spot, early blight, late blight, leaf mould, septoria leaf spot, two-spotted spider mite, target spot, yellow leaf curl virus, mosaic virus, healthy). ## Accuracy (held-out photos) Clean single-leaf photos (PlantVillage, 1,890 photos of leaves never seen in training): 95% right first time, 99% in the top 3. Field photos (PlantDoc test set minus near-duplicates of training photos, 225 photos): 69% right first time, 89% in the top 3, 79% right first time when the plant is picked. ## How it works ViT-base/16 (ImageNet) in onnxruntime-web 1.27, WebGPU when available, otherwise WebAssembly. Model file from SkillSafe's model host, verified by SHA-256, kept in Cache Storage. A multinomial logistic regression over the 1000 ImageNet logits scores the 38 conditions. Out-of-distribution check: distance to the nearest condition centre after whitening the within-condition spread (128 directions); above the 99th percentile of test leaves the photo is marked unfamiliar. A not-a-leaf check uses the backbone's own ImageNet guess. ## Limits The free check knows only the 38 conditions above. Does not detect nutrient deficiencies, most insect damage, herbicide injury or diseases of other crops. A first opinion, not a diagnosis: confirm with a local extension service or plant clinic. ## Credits ViT-base/16: Google, Apache-2.0 (ONNX export by Xenova). Leaf-condition layer trained for this app on PlantVillage (Hughes and Salathe; CC BY-SA 3.0) and PlantDoc (Singh et al.; CC BY 4.0); the layer (head.json) is shared under CC BY-SA 4.0. Example leaf photos: PlantVillage, CC BY-SA 3.0. Bus photo: Wikimedia Commons, CC0. Runtime: onnxruntime-web, MIT. Expert check: OpenAI vision model served by SkillSafe.