Leaffliction
Classifies apple and grape leaf photos into 8 classes (6 diseases, 2 healthy) with a PyTorch CNN; augmentation balances the classes before training.
- ROLE
- Team of 2
- CONTEXT
- École 42 · AI projects
- STATUS
- Done
- RESULT
- 94.1 % accuracy on 152 held-out test images.
- LAST UPDATED
- 26 Sep 2026
1
Data
Leaf images from the École 42 subject: 8 classes, 6 apple and grape diseases and 2 healthy.
2
What I built
Team of 2
- About 80 % of the code by git blame.
- The image transformations module.
- The CNN, prediction, the command-line tool and plotting.
- Most of the training pipeline.
3
Key choices
- Augment only after the split
- The split happens on the original leaves; augmentation runs on the train side only, so no leaf's augmented copies cross the split.
- Balanced classes
- Augmentation evens out the class counts before training.
- A compact CNN
- 422,632 parameters.
4
Results
94.1 % accuracy on 152 held-out test images.
5
Limits
- Trained on half of the training data.
- The validation score also selected the checkpoint; the 152-image test set is the only independent number.
- The evaluation log is not committed.
- The Hugging Face demo sleeps when idle and takes a moment to wake up.
Questions about this project? → Email me