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
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.
# 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
Identify diseases across multiple plant species and disease categories from leaf images.
Compare performance across custom CNNs, ResNet, VGG, and other architectures.
Detailed accuracy, precision, recall, and F1-score reporting for model evaluation.
Architectures
Designed from scratch with convolutional blocks, pooling, and dropout layers.
Deep residual learning with skip connections for training deeper networks.
Very deep convolutional networks with small receptive fields.
Fine-tuned pre-trained models for domain-specific disease classification.
Full source code, model architectures, and training pipelines available on GitHub.
View on GitHub