luka.gouvea
← projects
Academic project · UFV · 03/2025 – 07/2025

Leaf disease classifier

Fine-tuning pretrained CNNs to classify leaf diseases; 95% validation accuracy.

Data

The dataset is PlantVillage, in the version with the background removed: 54,306 leaf photos in 38 classes, each one a species paired with a disease, or the healthy leaf. There are 14 species; tomato alone has 10 classes.

Tomato
HealthyHealthyEarly blightEarly blightLate blightLate blightSeptoria leaf spotSeptoria leaf spotYellow leaf curlYellow leaf curlMosaic virusMosaic virus
Other species
Apple · healthyApple · healthyApple · scabApple · scabGrape · escaGrape · escaCorn · common rustCorn · common rustOrange · greeningOrange · greeningPotato · late blightPotato · late blight
Samples from PlantVillage. Within one species, several diseases show up as similar spots or yellowing.

The classes are imbalanced, ranging from 152 images (healthy potato) to 5,507 (orange with greening). I split 80% for training and 20% for validation, and sampled training images with weights inversely proportional to class frequency.

What I did

Result

95% accuracy on the validation set.

Stack

PyTorch · NumPy · CNN · Transfer learning