Tathagat Agrawal

Crop disease detection

A convolutional network that classifies photos of crop leaves into 38 healthy and diseased categories from the PlantVillage dataset.

December 2022 · Complete · Source on GitHub

Result: 98.28% accuracy on the validation images, with precision, recall and F1 all above 98%.

The problem

Spotting plant diseases early matters for yields, and a photo of a leaf is often enough for an expert. The question was how well a convolutional network trained from scratch can do the same across 38 categories of healthy and diseased leaves from 14 crops in the PlantVillage dataset.

What I built

Result

After 10 epochs the model reached 98.28% accuracy on the validation images, with precision 98.30%, recall 98.28% and F1 98.27%.

Line chart of training and validation loss and accuracy over 10 epochs. Validation accuracy climbs above 0.95 by epoch 3 and ends near 0.98; validation loss stays below training loss.
Figure 1. Training and validation loss and accuracy over 10 epochs.

Limits

The same validation split was used to choose the checkpoint and for the final scores, so the numbers are slightly optimistic; a separate test split would give a cleaner estimate. PlantVillage photos are taken against plain backgrounds, so accuracy on photos taken in a field would be lower.

Built with

Computer vision (CNNs, segmentation), PyTorch, Visualisation (Matplotlib, Seaborn, Power BI), Python