Leaffliction
Leaf-disease classification over 8 apple and grape classes with a PyTorch CNN, with preprocessing and augmentation to balance the classes.
- ROLE
- Team of 2 · École 42 · AI projects
- STACK
- Python · PyTorch · OpenCV · matplotlib
- RESULT
- 94.1 % accuracy on 152 held-out test images.
- READING TIME
- 1 min read
1
Data
Leaf images from the École 42 subject: 8 apple and grape disease classes.
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
- Split grouped by source image
- Augmented copies of one leaf never land on both sides of 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