Upload README.md with huggingface_hub
Browse files
README.md
ADDED
|
@@ -0,0 +1,44 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: mit
|
| 3 |
+
language: en
|
| 4 |
+
library_name: pytorch
|
| 5 |
+
tags:
|
| 6 |
+
- image-classification
|
| 7 |
+
- plant-disease
|
| 8 |
+
- pytorch
|
| 9 |
+
- efficientnet
|
| 10 |
+
datasets:
|
| 11 |
+
- plant-village
|
| 12 |
+
---
|
| 13 |
+
|
| 14 |
+
# Plant Disease Classification Model
|
| 15 |
+
|
| 16 |
+
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.
|
| 17 |
+
|
| 18 |
+
## Model Details
|
| 19 |
+
|
| 20 |
+
- **Architecture:** EfficientNet-B2 backbone with a custom attention mechanism and classifier head.
|
| 21 |
+
- **Dataset:** Trained on a subset of the Plant Village dataset.
|
| 22 |
+
- **Classes:** 29 classes, combining plant type and disease.
|
| 23 |
+
- **Input Size:** 224x224 RGB images.
|
| 24 |
+
|
| 25 |
+
## How to Use
|
| 26 |
+
|
| 27 |
+
Install the required dependencies:
|
| 28 |
+
```bash
|
| 29 |
+
pip install -r requirements.txt
|
| 30 |
+
```
|
| 31 |
+
|
| 32 |
+
You can use the `PlantDiseasePredictor` class from the notebook to load the model and make predictions.
|
| 33 |
+
|
| 34 |
+
```python
|
| 35 |
+
# Save the PlantDiseasePredictor class to a file named predictor.py
|
| 36 |
+
from predictor import PlantDiseasePredictor
|
| 37 |
+
|
| 38 |
+
# Load the model from the Hub
|
| 39 |
+
predictor = PlantDiseasePredictor.from_hub("Abuzaid01/plant_detector")
|
| 40 |
+
|
| 41 |
+
# Predict a single image
|
| 42 |
+
results = predictor.predict('path/to/your/image.jpg')
|
| 43 |
+
print(results)
|
| 44 |
+
```
|