back to projects
project

LeafScan AI

A web app that looks at a photo of a plant leaf and tells you exactly what disease it has - or if it's healthy. Drag in a photo, get the top 3 diagnoses in seconds.

2025Machine LearningPythonTensorFlowEfficientNetB0Computer VisionMachine Learning
99.9%
Validation accuracy
70,000+
Training images
38
Disease classes
14
Plant types
Demo
Walk-through video
Overview

What it is

LeafScan AI is a web app that can look at a photo of a plant leaf and tell you exactly what disease it has - or if it's healthy. You drag in a photo, it runs through a model I trained, and within seconds you get the top 3 most likely diagnoses with confidence scores. No technical knowledge needed, works on any device.

Problem

Why it exists

Most people can't tell what's wrong with their plants until it's already too late. Professional diagnosis isn't accessible to regular farmers or gardeners. LeafScan makes it as easy as taking a photo.

Flow

How it works

01
Upload a leaf photo

Drag a photo into the web interface - works from a phone, laptop, or tablet. No account, no install.

02
Preprocess

The image is resized and normalized so it matches the format the model was trained on.

03
Inference

EfficientNetB0 runs over the image and scores it against all 38 disease classes in one pass.

04
Top 3 results

You get the three most likely diagnoses, each with a confidence score and a healthy / diseased label.

Simulation

Inference, visualized

A loop that mirrors the live app - a leaf comes in, gets preprocessed, the model scores it against all 38 classes, and the top 3 predictions come back with confidence scores.

Tomato leafloading
Top 3 predictions
Tomato
Tomato - Early Blight
-
Tomato - Septoria Leaf Spot
-
Tomato - Healthy
-
Simulated - mirrors live app behavior
LeafScan AI - analyze your leaf tool screenshot
Upload
Analyze your leaf
LeafScan AI - supported diseases knowledge base
Knowledge base
Supported diseases
Features

What it can do

Behind the build

Challenges & learnings

Use cases

Where it fits

Early disease detection

Farmers can catch outbreaks from a phone photo before the damage spreads through a field.

Agricultural research

A fast classifier for field studies - researchers can label samples in seconds instead of sending them to a lab.

Smart farming foundation

Same model can plug into drone-based crop scanning or automated greenhouse monitoring systems.

Software

Tech stack

Model
PythonTensorFlowEfficientNetB0Google Colab (GPU)
Backend
FlaskGradioREST APIRender
Frontend
HTMLCSSJavaScriptVercel

Model trained in Google Colab on GPU, served via Flask on Render as a REST API. Frontend in plain HTML/CSS/JS deployed on Vercel - the two talk over a simple base64-encoded image endpoint.