Skip to main content
← All projects

Rice Leaf Classifier

Classifying rice-leaf disease with a CNN.

  • Preprocessing
  • Research
  • 2024

The problem

Early disease identification in crops is valuable but needs accurate, automatable classification.

What it does

Trains a ResNet18 classifier on a multi-class Kaggle rice-leaf-disease dataset, with preprocessing, a training loop and prediction visualization.

Stack

  • Python
  • PyTorch
  • ResNet18
  • torchvision

My role

  • Preprocessing
  • Model selection
  • Training loop
  • Visualization

Transfer learning

Fine-tunes a pretrained ResNet18 instead of training from scratch, getting strong accuracy on a small set.

Visualized predictions

Outputs predicted disease classes alongside the input leaves for quick sanity checks.

How Rice Leaf Classifier works: Kaggle dataset → torchvision preprocessing → ResNet18 train/val loop → loss curves + predictions
How it works
Sample rice-leaf images across the disease classes
The disease classes
Train and validation loss curves
Train / validation loss
Grid of predictions vs ground truth on test leaves
Predictions vs. ground truth
Single prediction on a rice-leaf image
A single prediction