EnYa32 commited on
Commit
b48bfd3
Β·
verified Β·
1 Parent(s): 18b37d3

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +28 -26
README.md CHANGED
@@ -1,36 +1,36 @@
1
  ---
2
- title: GrapeVineClassification
3
  emoji: πŸ‡
4
  colorFrom: red
5
  colorTo: red
6
  sdk: streamlit
7
  app_file: src/streamlit_app.py
8
  pinned: false
9
- short_description: Custom CNN model for grapevine leaf disease classification.
10
  license: mit
11
  ---
12
 
13
- # πŸ‡ Grapevine Leaf Disease Classifier (CNN – No Transfer Learning)
14
 
15
- This web app demonstrates a **Convolutional Neural Network (CNN) model trained from scratch (without Transfer Learning)** 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 deployed via **Streamlit**. It processes images and predicts the most likely disease with a probability score.
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 class
32
  - πŸ“Š Confidence score
33
- - πŸ“ˆ Full probability distribution across all classes
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 (no Transfer Learning) |
42
- | Input Image Size | 160 Γ— 160 pixels |
 
43
  | Loss Function | `categorical_crossentropy` |
44
  | Optimizer | Adam |
45
  | Metrics | Accuracy, Precision, Recall |
46
  | Framework | TensorFlow / Keras |
47
- | Deployment | Streamlit with Docker (HuggingFace Spaces) |
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
- β”‚ └── app.py # Streamlit application
56
- β”œβ”€β”€ cnn_model.keras # Final saved model
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: 47.54%
80
  Probability per Class:
81
 
82
- Black Rot β†’ 17.49%
83
 
84
- Esca (Black Measles) β†’ 47.54%
85
 
86
- Leaf Blight β†’ 17.49%
87
 
88
- Healthy β†’ 17.49%
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 architectures for agricultural image classification.
99
 
100
  ---
101
 
@@ -107,16 +108,17 @@ This project is released under the **MIT License**.
107
 
108
  ## πŸ’‘ Notes
109
 
110
- - This version uses a **pure CNN trained from scratch**, without any pre-trained ImageNet models.
111
- - A second version using **Transfer Learning (ResNet50)** is available as a separate Space.
112
 
113
  ---
114
 
115
  ## πŸ”— Related Projects
116
 
117
- πŸ”Ή *Upcoming*: **Grapevine Disease Classifier – Transfer Learning (ResNet50)**
 
118
 
119
  ---
120
 
121
- ✨ *Thank you for visiting this Space!*
122
- Feel free to test the app and provide feedback.
 
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!