Skip to content
All projects

Machine learning, 2025

Plant disease prediction

A convolutional neural network that identifies 38 plant diseases from a photo of a leaf, served through a live web app.

Class

Apple, black rot

ModelCNN
Classes38
Val. accuracy87.5%
disease classes
38disease classes
validation accuracy
87.5%validation accuracy

Overview

Crop diseases are often spotted too late. This app lets a farmer or gardener upload a photo of a leaf and get an instant diagnosis with confidence scores.

The problem

Telling diseases apart by eye takes expertise most growers don't have, and waiting for an expert can cost a harvest.

What I did

  1. 1.Trained on the PlantVillage dataset, covering 38 classes of healthy and diseased leaves across many crops.
  2. 2.Preprocessed images with Keras generators (resizing and normalizing) and split them into training and validation sets.
  3. 3.Built and trained a CNN in TensorFlow with convolution and pooling layers feeding dense layers, using Adam and categorical cross-entropy.
  4. 4.Deployed the trained model behind a Streamlit app that shows the predicted disease and confidence for each upload.

Results

  • 87.5% validation accuracy after five epochs of training.
  • A live app anyone can try with their own leaf photos.

Next project

Smart ATS