Plant Disease Classification Model
This repository contains a PyTorch model for classifying diseases in various plants. The model is based on a pre-trained EfficientNet-B2 architecture with a custom classifier head.
Model Details
- Architecture: EfficientNet-B2 backbone with a custom attention mechanism and classifier head.
- Dataset: Trained on a subset of the Plant Village dataset.
- Classes: 29 classes, combining plant type and disease.
- Input Size: 224x224 RGB images.
How to Use
Install the required dependencies:
pip install -r requirements.txt
You can use the PlantDiseasePredictor
class from the notebook to load the model and make predictions.
# Save the PlantDiseasePredictor class to a file named predictor.py
from predictor import PlantDiseasePredictor
# Load the model from the Hub
predictor = PlantDiseasePredictor.from_hub("Abuzaid01/plant_detector")
# Predict a single image
results = predictor.predict('path/to/your/image.jpg')
print(results)