Spaces:
Sleeping
Sleeping
Update README.md
Browse files
README.md
CHANGED
|
@@ -1,20 +1,102 @@
|
|
| 1 |
---
|
| 2 |
title: Rice Classifier ResNet50
|
| 3 |
-
emoji:
|
| 4 |
-
colorFrom:
|
| 5 |
-
colorTo:
|
| 6 |
-
sdk:
|
| 7 |
-
|
| 8 |
-
tags:
|
| 9 |
-
- streamlit
|
| 10 |
pinned: false
|
| 11 |
short_description: CNN-based rice image classifier with ResNet50.
|
| 12 |
license: mit
|
| 13 |
---
|
| 14 |
|
| 15 |
-
#
|
| 16 |
|
| 17 |
-
|
|
|
|
| 18 |
|
| 19 |
-
|
| 20 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
---
|
| 2 |
title: Rice Classifier ResNet50
|
| 3 |
+
emoji: πΎ
|
| 4 |
+
colorFrom: green
|
| 5 |
+
colorTo: yellow
|
| 6 |
+
sdk: streamlit
|
| 7 |
+
app_file: src/streamlit_app.py
|
|
|
|
|
|
|
| 8 |
pinned: false
|
| 9 |
short_description: CNN-based rice image classifier with ResNet50.
|
| 10 |
license: mit
|
| 11 |
---
|
| 12 |
|
| 13 |
+
# πΎ Rice Classification with ResNet50 (Transfer Learning)
|
| 14 |
|
| 15 |
+
**Author:** Enes Yamac
|
| 16 |
+
This app uses a deep learning model to classify rice grain images into different rice types.
|
| 17 |
|
| 18 |
+
The model is based on **ResNet50 (Transfer Learning)** and reaches very high accuracy.
|
| 19 |
+
|
| 20 |
+
---
|
| 21 |
+
|
| 22 |
+
## π What does this app do?
|
| 23 |
+
|
| 24 |
+
This app can:
|
| 25 |
+
|
| 26 |
+
β
Classify rice grain images
|
| 27 |
+
β
Detect the rice type automatically
|
| 28 |
+
β
Show the predicted class with confidence
|
| 29 |
+
β
Use a strong AI model trained with transfer learning
|
| 30 |
+
|
| 31 |
+
---
|
| 32 |
+
|
| 33 |
+
## π§ Model Information
|
| 34 |
+
|
| 35 |
+
- **Model:** ResNet50 (pre-trained on ImageNet)
|
| 36 |
+
- **Task:** Image Classification
|
| 37 |
+
- **Number of Classes:** 5
|
| 38 |
+
- **Image Size:** 224 Γ 224
|
| 39 |
+
- **Accuracy:** **99.29%**
|
| 40 |
+
- **Top-3 Accuracy:** **100%**
|
| 41 |
+
|
| 42 |
+
---
|
| 43 |
+
|
| 44 |
+
## πΎ Rice Classes
|
| 45 |
+
|
| 46 |
+
The model can classify the following rice types:
|
| 47 |
+
|
| 48 |
+
- Arborio
|
| 49 |
+
- Basmati
|
| 50 |
+
- Ipsala
|
| 51 |
+
- Jasmine
|
| 52 |
+
- Karacadag
|
| 53 |
+
|
| 54 |
+
---
|
| 55 |
+
|
| 56 |
+
## πΌοΈ How to use the app
|
| 57 |
+
|
| 58 |
+
1. Upload a rice image (JPG or PNG)
|
| 59 |
+
2. The model analyzes the image
|
| 60 |
+
3. The predicted rice type is shown
|
| 61 |
+
4. You also see the confidence score
|
| 62 |
+
|
| 63 |
+
---
|
| 64 |
+
|
| 65 |
+
## π Model Performance
|
| 66 |
+
|
| 67 |
+
- Very high accuracy on the validation set
|
| 68 |
+
- Only a few misclassifications
|
| 69 |
+
- Most errors happen between visually similar rice types
|
| 70 |
+
|
| 71 |
+
The model is **stable and reliable**.
|
| 72 |
+
|
| 73 |
+
---
|
| 74 |
+
|
| 75 |
+
## π§ͺ Training Summary
|
| 76 |
+
|
| 77 |
+
- **Base Model:** ResNet50
|
| 78 |
+
- **Transfer Learning:** Yes
|
| 79 |
+
- **Data Augmentation:** Yes
|
| 80 |
+
- **Optimizer:** Adam
|
| 81 |
+
- **Loss Function:** Sparse Categorical Crossentropy
|
| 82 |
+
- **Batch Size:** 16
|
| 83 |
+
|
| 84 |
+
---
|
| 85 |
+
|
| 86 |
+
## π Files in this Space
|
| 87 |
+
|
| 88 |
+
- `app.py` β Streamlit App
|
| 89 |
+
- `best_rice_resnet50.keras` β Trained Model
|
| 90 |
+
- `README.md` β This file
|
| 91 |
+
|
| 92 |
+
---
|
| 93 |
+
|
| 94 |
+
## βοΈ Author
|
| 95 |
+
|
| 96 |
+
**Enes Yamac**
|
| 97 |
+
Deep Learning & Computer Vision Student
|
| 98 |
+
|
| 99 |
+
---
|
| 100 |
+
|
| 101 |
+
β
Enjoy testing the rice classifier!
|
| 102 |
+
Upload an image and let the AI predict the rice type πΎπ€
|