Back to Blog
Machine Learning Agriculture Python 2026

Crop Disease Detector

Building an AI that identifies plant diseases from a single leaf photo, the problem, the process, and the lessons learned.

Author
Muhammad Rafi Arsya
Year
2026
Read Time
~22 min
Status
Live
Diseased leaf, crop disease detection
Leaf sample showing visible disease symptoms
Why I Built This

It started with a simple question: how can a farmer with a smartphone tell if their crop has a disease before it spreads to the entire field?

Plant diseases are responsible for significant agricultural losses worldwide. Early detection is critical, but most farmers don't have access to agronomists or lab testing. A mobile-friendly AI that can identify diseases from a single photo could genuinely help.

What if you could just take a photo of a leaf and instantly know what's wrong with your crop?

That's the problem I set out to solve, building a deep learning model that classifies plant diseases from leaf images, deployed as a live web app anyone can access.

Healthy leaf close-up
Healthy leaf, what the model learns to distinguish from diseased samples
Input and Output
What the app returns for the diseased sample
What the app returns for the diseased sample
And for the healthy one
And for the healthy one
Class distribution across the training set
Class distribution across the training set
Training and validation curves
Training and validation curves
How a photo becomes a prediction, end to end
How a photo becomes a prediction, end to end
On the blog
This is the short version

The full write-up — architecture decisions, the parts that broke, and what I'd do differently — lives on ThoughtLog, my personal blog.

Read the full post on ThoughtLog