🧠

The ResNet50 Model

Transfer learning from ImageNet, fine-tuned for plant disease detection

πŸ–ΌοΈ
Input Image
224 Γ— 224 Γ— 3 RGB
β†’
πŸ”„
Preprocessing
Resize β†’ Normalize (ImageNet)
β†’
🧠
ResNet50 Backbone
Pre-trained on ImageNet
β†’
βš™οΈ
Custom FC Head
2048→512→ReLU→Dropout→38
β†’
πŸ“Š
Softmax
Top-3 Predictions
The model uses a ResNet50 backbone pre-trained on ImageNet with a custom fully connected head: Linear(2048β†’512) β†’ ReLU β†’ Dropout(0.3) β†’ Linear(512β†’38). Transfer learning allows the model to leverage features learned from millions of images for accurate plant disease classification.
πŸ“Š

Model Performance

Evaluation metrics from the test dataset

🎯
~99.5%
Accuracy
Overall prediction accuracy
πŸ”¬
ResNet50
Architecture
Transfer learning from ImageNet
πŸ“¦
38
Classes
Disease classes detected
⚑
<2s
Inference
Per-image prediction time

Model Comparison

Model Architecture Accuracy Status
Custom CNN 3-layer CNN from scratch ~98.8% Baseline
ResNet50 Transfer Learning + Fine-tuning ~99.5% βœ… Deployed
πŸ“‚

Training Dataset

The foundation of our model

54,305 Total Images
14 Plant Species
38 Disease Classes
80/20 Train/Test Split

Dataset Source

PlantVillage Dataset from Kaggle - a curated collection of plant leaf images captured under controlled conditions, covering 14 plant species with both healthy and diseased samples.

View on Kaggle β†’
βš™οΈ

Training Pipeline

How the model was trained

1

Data Augmentation

RandomHorizontalFlip, RandomRotation, ColorJitter to increase training diversity and prevent overfitting.

2

Transfer Learning

Loaded ResNet50 pre-trained on ImageNet (1M+ images). Replaced the final FC layer with a custom classifier head.

3

Fine-tuning

Trained with Adam optimizer and CrossEntropyLoss. Batch size 32, learning rate scheduling for optimal convergence.

4

Evaluation

Compared Custom CNN vs ResNet50. Selected ResNet50 for deployment based on superior ~99.5% test accuracy.

🌿

Disease Coverage

All 38 classes organized by plant species

Apple

Apple Scab Black Rot Cedar Apple Rust Healthy

Blueberry

Healthy

Cherry (including sour)

Powdery Mildew Healthy

Corn (maize)

Cercospora Leaf Spot Gray Leaf Spot Common Rust Northern Leaf Blight Healthy

Grape

Black Rot Esca (Black Measles) Leaf Blight (Isariopsis Leaf Spot) Healthy

Orange

Haunglongbing (Citrus Greening)

Peach

Bacterial Spot Healthy

Pepper, bell

Bacterial Spot Healthy

Potato

Early Blight Late Blight Healthy

Raspberry

Healthy

Soybean

Healthy

Squash

Powdery Mildew

Strawberry

Leaf Scorch Healthy

Tomato

Bacterial Spot Early Blight Late Blight Leaf Mold Septoria Leaf Spot Spider Mites Two-spotted Spider Mite Target Spot Tomato Yellow Leaf Curl Virus Tomato Mosaic Virus Healthy

Ready to Try the Model?

Upload a leaf image and see the AI in action with real-time predictions

πŸ”¬ Start Diagnosis