File size: 2,096 Bytes
818c12f
b3c7cc4
0667803
 
 
 
 
818c12f
b3c7cc4
 
818c12f
 
0667803
818c12f
0667803
 
818c12f
0667803
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
912075c
704be32
 
 
85da105
0667803
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
---
title: Rice Classifier ResNet50
emoji: 🌾
colorFrom: green
colorTo: yellow
sdk: streamlit
app_file: src/streamlit_app.py
pinned: false
short_description: CNN-based rice image classifier with ResNet50.
license: mit
---

# 🌾 Rice Classification with ResNet50 (Transfer Learning)

**Author:** Enes Yamac  
This app uses a deep learning model to classify rice grain images into different rice types.

The model is based on **ResNet50 (Transfer Learning)** and reaches very high accuracy.

---

## πŸš€ What does this app do?

This app can:

βœ… Classify rice grain images  
βœ… Detect the rice type automatically  
βœ… Show the predicted class with confidence  
βœ… Use a strong AI model trained with transfer learning  

---

## 🧠 Model Information

- **Model:** ResNet50 (pre-trained on ImageNet)
- **Task:** Image Classification
- **Number of Classes:** 5  
- **Image Size:** 224 Γ— 224  
- **Accuracy:** **99.29%**  
- **Top-3 Accuracy:** **100%**

---

## 🌾 Rice Classes

The model can classify the following rice types:

- Arborio  
- Basmati  
- Ipsala  
- Jasmine  
- Karacadag  

---

## πŸ–ΌοΈ How to use the app

1. Upload a rice image (JPG or PNG)
2. The model analyzes the image
3. The predicted rice type is shown
4. You also see the confidence score

---

## πŸ“Š Model Performance

- Very high accuracy on the validation set  
- Only a few misclassifications  
- Most errors happen between visually similar rice types  

The model is **stable and reliable**.

---

## πŸ§ͺ Training Summary

- **Base Model:** ResNet50
- **Transfer Learning:** Yes
- **Data Augmentation:** Yes
- **Optimizer:** Adam
- **Loss Function:** Sparse Categorical Crossentropy
- **Batch Size:** 16

---

## πŸ“ Files in this Space

- `app.py` β†’ Streamlit App  
- `best_rice_resnet50.keras` β†’ Trained Model  
- `README.md` β†’ This file  

---

## πŸ‘€ Author

**Name:** Enes Yamac  
**Date:** 05.12.2025  
**Project Type:** Deep Learning – CNN Image Classification with ResNet50

---

βœ… Enjoy testing the rice classifier!  
Upload an image and let the AI predict the rice type πŸŒΎπŸ€–