Update README.md
Browse files
README.md
CHANGED
|
@@ -1,36 +1,36 @@
|
|
| 1 |
---
|
| 2 |
-
title:
|
| 3 |
emoji: π
|
| 4 |
colorFrom: red
|
| 5 |
colorTo: red
|
| 6 |
sdk: streamlit
|
| 7 |
app_file: src/streamlit_app.py
|
| 8 |
pinned: false
|
| 9 |
-
short_description:
|
| 10 |
license: mit
|
| 11 |
---
|
| 12 |
|
| 13 |
-
# π Grapevine Leaf Disease Classifier (CNN β
|
| 14 |
|
| 15 |
-
This web app demonstrates a **Convolutional Neural Network
|
| 16 |
|
| 17 |
- **Black Rot**
|
| 18 |
- **Esca (Black Measles)**
|
| 19 |
- **Leaf Blight (Isariopsis Leaf Spot)**
|
| 20 |
- **Healthy**
|
| 21 |
|
| 22 |
-
The model was developed using **TensorFlow/Keras** and deployed via **Streamlit
|
| 23 |
|
| 24 |
---
|
| 25 |
|
| 26 |
## π How to Use
|
| 27 |
|
| 28 |
1. Upload a grapevine leaf image (`.jpg`, `.jpeg`, `.png`)
|
| 29 |
-
2. Click **
|
| 30 |
3. The app will display:
|
| 31 |
-
-
|
| 32 |
- π Confidence score
|
| 33 |
-
- π
|
| 34 |
|
| 35 |
---
|
| 36 |
|
|
@@ -38,13 +38,14 @@ The model was developed using **TensorFlow/Keras** and deployed via **Streamlit*
|
|
| 38 |
|
| 39 |
| **Attribute** | **Value** |
|
| 40 |
|--------------------|-----------|
|
| 41 |
-
| Model Type | CNN
|
| 42 |
-
|
|
|
|
|
| 43 |
| Loss Function | `categorical_crossentropy` |
|
| 44 |
| Optimizer | Adam |
|
| 45 |
| Metrics | Accuracy, Precision, Recall |
|
| 46 |
| Framework | TensorFlow / Keras |
|
| 47 |
-
| Deployment | Streamlit
|
| 48 |
| Classes | 4 total |
|
| 49 |
|
| 50 |
---
|
|
@@ -52,9 +53,9 @@ The model was developed using **TensorFlow/Keras** and deployed via **Streamlit*
|
|
| 52 |
## π File Structure
|
| 53 |
|
| 54 |
βββ src/
|
| 55 |
-
β βββ
|
| 56 |
-
βββ
|
| 57 |
-
βββ grape_training_history.pkl# Training history
|
| 58 |
βββ README.md # Project documentation
|
| 59 |
βββ requirements.txt # Python dependencies
|
| 60 |
|
|
@@ -67,25 +68,25 @@ Code kopieren
|
|
| 67 |
|
| 68 |
- **Python**
|
| 69 |
- **TensorFlow / Keras**
|
|
|
|
| 70 |
- **NumPy, PIL**
|
| 71 |
- **Streamlit**
|
| 72 |
-
- **Docker (for deployment on HuggingFace)**
|
| 73 |
|
| 74 |
---
|
| 75 |
|
| 76 |
## π Example Output
|
| 77 |
|
| 78 |
Predicted Disease: Esca (Black Measles)
|
| 79 |
-
Confidence:
|
| 80 |
Probability per Class:
|
| 81 |
|
| 82 |
-
Black Rot β 17.
|
| 83 |
|
| 84 |
-
Esca (Black Measles) β
|
| 85 |
|
| 86 |
-
Leaf Blight β 17.
|
| 87 |
|
| 88 |
-
Healthy β
|
| 89 |
|
| 90 |
yaml
|
| 91 |
Code kopieren
|
|
@@ -95,7 +96,7 @@ Code kopieren
|
|
| 95 |
## π€ Author
|
| 96 |
|
| 97 |
Developed by **Enes Yamac (EnYa32)**
|
| 98 |
-
as part of a Deep Learning project involving custom CNNs and Transfer Learning
|
| 99 |
|
| 100 |
---
|
| 101 |
|
|
@@ -107,16 +108,17 @@ This project is released under the **MIT License**.
|
|
| 107 |
|
| 108 |
## π‘ Notes
|
| 109 |
|
| 110 |
-
- This version uses
|
| 111 |
-
- A
|
| 112 |
|
| 113 |
---
|
| 114 |
|
| 115 |
## π Related Projects
|
| 116 |
|
| 117 |
-
πΉ *
|
|
|
|
| 118 |
|
| 119 |
---
|
| 120 |
|
| 121 |
-
β¨ *Thank you for
|
| 122 |
-
|
|
|
|
| 1 |
---
|
| 2 |
+
title: GrapeVineClassification_TL
|
| 3 |
emoji: π
|
| 4 |
colorFrom: red
|
| 5 |
colorTo: red
|
| 6 |
sdk: streamlit
|
| 7 |
app_file: src/streamlit_app.py
|
| 8 |
pinned: false
|
| 9 |
+
short_description: Transfer Learning model for grape leaf disease.
|
| 10 |
license: mit
|
| 11 |
---
|
| 12 |
|
| 13 |
+
# π Grapevine Leaf Disease Classifier (CNN β Transfer Learning with ResNet50)
|
| 14 |
|
| 15 |
+
This web app demonstrates a **Convolutional Neural Network using Transfer Learning (ResNet50 pretrained on ImageNet)** to classify grapevine leaf images into one of the following four disease categories:
|
| 16 |
|
| 17 |
- **Black Rot**
|
| 18 |
- **Esca (Black Measles)**
|
| 19 |
- **Leaf Blight (Isariopsis Leaf Spot)**
|
| 20 |
- **Healthy**
|
| 21 |
|
| 22 |
+
The model was developed using **TensorFlow/Keras** and fine-tuned on a custom grapevine leaf dataset. It is deployed via **Streamlit on HuggingFace Spaces** and predicts disease labels with class probabilities.
|
| 23 |
|
| 24 |
---
|
| 25 |
|
| 26 |
## π How to Use
|
| 27 |
|
| 28 |
1. Upload a grapevine leaf image (`.jpg`, `.jpeg`, `.png`)
|
| 29 |
+
2. Click **βPredict Diseaseβ**
|
| 30 |
3. The app will display:
|
| 31 |
+
- π Predicted disease
|
| 32 |
- π Confidence score
|
| 33 |
+
- π Probability distribution across all classes
|
| 34 |
|
| 35 |
---
|
| 36 |
|
|
|
|
| 38 |
|
| 39 |
| **Attribute** | **Value** |
|
| 40 |
|--------------------|-----------|
|
| 41 |
+
| Model Type | CNN with Transfer Learning (ResNet50) |
|
| 42 |
+
| Pretrained Weights | ImageNet |
|
| 43 |
+
| Input Image Size | 160 Γ 160 pixels (adapted for ResNet) |
|
| 44 |
| Loss Function | `categorical_crossentropy` |
|
| 45 |
| Optimizer | Adam |
|
| 46 |
| Metrics | Accuracy, Precision, Recall |
|
| 47 |
| Framework | TensorFlow / Keras |
|
| 48 |
+
| Deployment | Streamlit (HuggingFace Spaces) |
|
| 49 |
| Classes | 4 total |
|
| 50 |
|
| 51 |
---
|
|
|
|
| 53 |
## π File Structure
|
| 54 |
|
| 55 |
βββ src/
|
| 56 |
+
β βββ streamlit_app.py # Streamlit web app
|
| 57 |
+
βββ grape_cnn_TL_ResNet50_final.keras # Final saved model
|
| 58 |
+
βββ grape_training_history.pkl # Training history
|
| 59 |
βββ README.md # Project documentation
|
| 60 |
βββ requirements.txt # Python dependencies
|
| 61 |
|
|
|
|
| 68 |
|
| 69 |
- **Python**
|
| 70 |
- **TensorFlow / Keras**
|
| 71 |
+
- **ResNet50 (Transfer Learning)**
|
| 72 |
- **NumPy, PIL**
|
| 73 |
- **Streamlit**
|
|
|
|
| 74 |
|
| 75 |
---
|
| 76 |
|
| 77 |
## π Example Output
|
| 78 |
|
| 79 |
Predicted Disease: Esca (Black Measles)
|
| 80 |
+
Confidence: 45.25%
|
| 81 |
Probability per Class:
|
| 82 |
|
| 83 |
+
Black Rot β 17.96%
|
| 84 |
|
| 85 |
+
Esca (Black Measles) β 18.90%
|
| 86 |
|
| 87 |
+
Leaf Blight β 17.89%
|
| 88 |
|
| 89 |
+
Healthy β 45.25%
|
| 90 |
|
| 91 |
yaml
|
| 92 |
Code kopieren
|
|
|
|
| 96 |
## π€ Author
|
| 97 |
|
| 98 |
Developed by **Enes Yamac (EnYa32)**
|
| 99 |
+
as part of a Deep Learning project involving custom CNNs and Transfer Learning techniques for agricultural image classification.
|
| 100 |
|
| 101 |
---
|
| 102 |
|
|
|
|
| 108 |
|
| 109 |
## π‘ Notes
|
| 110 |
|
| 111 |
+
- This version uses **Transfer Learning with ResNet50**.
|
| 112 |
+
- A separate version using a **pure CNN (trained from scratch)** is available as another Space.
|
| 113 |
|
| 114 |
---
|
| 115 |
|
| 116 |
## π Related Projects
|
| 117 |
|
| 118 |
+
πΉ **Grapevine Disease Classifier β CNN (No Transfer Learning)**
|
| 119 |
+
πΉ Future enhancements: Grad-CAM integration & model comparison
|
| 120 |
|
| 121 |
---
|
| 122 |
|
| 123 |
+
β¨ *Thank you for testing this Transfer Learning version!*
|
| 124 |
+
Your feedback is appreciated!
|