Skip to content
Deep Learning — Computer Vision

Plant Disease Detection
& Classification

Deep learning computer vision architectures built with PyTorch for automated identification of plant diseases from leaf images. Enabling early detection for better crop management.

PyTorch

Deep Learning Framework

CNN Architectures

ResNet, VGG, Custom

Transfer Learning

Pre-trained Models

Image Processing

OpenCV & Augmentation

About the Project

AI-powered plant pathology

This project implements multiple deep learning architectures to classify plant diseases from leaf images. Using PyTorch, it explores various CNN architectures including custom designs, ResNet, and VGG with transfer learning to achieve accurate disease identification across multiple plant species.

  • Multi-architecture CNN implementations in PyTorch
  • Transfer learning with pre-trained models
  • Image preprocessing and augmentation pipeline
  • Classification across multiple disease categories
  • Performance benchmarking and visualization
Model Architecture
# Custom CNN Classifier
class PlantDiseaseCNN(nn.Module):
  def __init__(self, num_classes):
    super().__init__()
    self.conv1 = nn.Conv2d(3, 32, 3, padding=1)
    self.conv2 = nn.Conv2d(32, 64, 3, padding=1)
    self.conv3 = nn.Conv2d(64, 128, 3, padding=1)
    self.pool = nn.MaxPool2d(2, 2)
    self.fc1 = nn.Linear(128 * 28 * 28, 256)
    self.fc2 = nn.Linear(256, num_classes)
    self.dropout = nn.Dropout(0.3)

  def forward(self, x):
    x = self.pool(F.relu(self.conv1(x)))
    x = self.pool(F.relu(self.conv2(x)))
    x = self.pool(F.relu(self.conv3(x)))
    x = x.view(-1, 128 * 28 * 28)
    x = F.relu(self.fc1(x))
    x = self.dropout(x)
    x = self.fc2(x)
    return x

Capabilities

What the model can do

Multi-Class Classification

Identify diseases across multiple plant species and disease categories from leaf images.

Multiple Architectures

Compare performance across custom CNNs, ResNet, VGG, and other architectures.

Performance Metrics

Detailed accuracy, precision, recall, and F1-score reporting for model evaluation.

Architectures

Explored architectures

Custom CNN

Designed from scratch with convolutional blocks, pooling, and dropout layers.

ResNet

Deep residual learning with skip connections for training deeper networks.

VGG

Very deep convolutional networks with small receptive fields.

Transfer Learning

Fine-tuned pre-trained models for domain-specific disease classification.

Explore the code

Full source code, model architectures, and training pipelines available on GitHub.

View on GitHub