Tomato Disease Detection
CNN classifier for tomato leaf diseases, deployed as a Streamlit app.

Overview
Upload a photo of a tomato leaf and the app predicts one of five classes — bacterial spot, early blight, late blight, leaf mold, or healthy — with a confidence score. The model is a small Keras CNN trained on the PlantVillage dataset from Kaggle, deployed as a Streamlit app.
How it's built
The training notebook builds a tf.data dataset at 256x256 from the PlantVillage tomato classes (7579 files across the 5 classes), splits it 80/10/10, and trains a Sequential CNN — resizing and rescaling layers, random-flip and random-rotation augmentation, six convolution/max-pooling blocks, a 64-unit dense layer, and a softmax head — for 69 epochs with 183,877 parameters total.
The Streamlit app loads the saved model, runs the prediction on the uploaded image, and shows the top class and confidence score, with an optional bar chart of all five class probabilities.
Results
From the training notebook's own recorded outputs: training accuracy reached 0.9859 and validation accuracy 0.9606 by the final epoch; evaluating the saved model against the held-out test split gives a loss of 0.0738 and an accuracy of 0.9723.
Status and limitations
Per the README: only 5 of the 10 tomato classes in the PlantVillage dataset are covered, and the app expects three-channel images, so RGBA PNGs will fail. No tests.
Links
- Live app (Streamlit)
- Demo video
Next project
Object Tracking — Tennis Game