๐ฑ Plant Disease Detection
A deep learning-based project aimed at detecting plant diseases from images using PyTorch models. This project is part of GirlScript Summer of Code (GSSoCโ25) contributions.
๐ฏ Aim
The goal of this project is to help farmers and agricultural researchers by providing an AI-powered solution for detecting plant diseases early, thereby improving crop health and productivity.
๐ Project Contents
plant-disease-model.pth & plant-disease-model-complete.pth โ Pre-trained PyTorch models for disease classification
test/ โ Sample test images (healthy & diseased plants)
Screenshot 2025-06-19 175549.png, Screenshot 2025-06-19 175613.png, Screenshot 2025-06-19 175628.png โ Example model prediction screenshots
๐ ๏ธ Steps Involved
- Collecting and preprocessing plant disease dataset
- Training deep learning models (PyTorch CNNs)
- Saving trained models for inference
- Testing using sample images
- Visualizing model outputs with prediction screenshots
๐ค Model Used
- Pre-trained PyTorch CNN models (saved as
.pth files)
๐ Libraries Required
torch
torchvision
numpy
pandas
matplotlib
PIL
๐ Usage
Example inference code:
import torch
from PIL import Image
from torchvision import transforms
# Load model
model = torch.load('plant-disease-model.pth')
model.eval()
# Preprocess input
transform = transforms.Compose([
transforms.Resize((224,224)),
transforms.ToTensor(),
])
img = Image.open("test/sample_leaf.jpg")
input_tensor = transform(img).unsqueeze(0)
# Prediction
with torch.no_grad():
output = model(input_tensor)
predicted_class = output.argmax(dim=1).item()
print("Predicted Class:", predicted_class)
๐ธ Output Snapshots
- Example predictions shown in:
โ
Conclusion
The project demonstrates how deep learning can be applied to agriculture by providing an automated method to classify plant diseases.
๐ฑ Plant Disease Detection
A deep learning-based project aimed at detecting plant diseases from images using PyTorch models. This project is part of GirlScript Summer of Code (GSSoCโ25) contributions.
๐ฏ Aim
The goal of this project is to help farmers and agricultural researchers by providing an AI-powered solution for detecting plant diseases early, thereby improving crop health and productivity.
๐ Project Contents
plant-disease-model.pth&plant-disease-model-complete.pthโ Pre-trained PyTorch models for disease classificationtest/โ Sample test images (healthy & diseased plants)Screenshot 2025-06-19 175549.png,Screenshot 2025-06-19 175613.png,Screenshot 2025-06-19 175628.pngโ Example model prediction screenshots๐ ๏ธ Steps Involved
๐ค Model Used
.pthfiles)๐ Libraries Required
torchtorchvisionnumpypandasmatplotlibPIL๐ Usage
Example inference code:
๐ธ Output Snapshots
โ Conclusion
The project demonstrates how deep learning can be applied to agriculture by providing an automated method to classify plant diseases.