Spaces:
Sleeping
Sleeping
Update README.md
Browse files
README.md
CHANGED
|
@@ -12,24 +12,71 @@ license: mit
|
|
| 12 |
|
| 13 |
# 🤟 Sign Language Classification (CNN)
|
| 14 |
|
| 15 |
-
This project
|
|
|
|
| 16 |
|
| 17 |
-
|
| 18 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 19 |
|
| 20 |
-
|
| 21 |
-
|
| 22 |
-
|
| 23 |
-
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 24 |
|
| 25 |
-
|
| 26 |
-
|
| 27 |
-
|
| 28 |
-
|
| 29 |
-
|
| 30 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 31 |
|
| 32 |
-
## Run
|
| 33 |
```bash
|
| 34 |
pip install -r requirements.txt
|
| 35 |
streamlit run app.py
|
|
|
|
| 12 |
|
| 13 |
# 🤟 Sign Language Classification (CNN)
|
| 14 |
|
| 15 |
+
This project demonstrates a Convolutional Neural Network (CNN) for classifying sign language hand gestures from images.
|
| 16 |
+
A lightweight CNN was trained on grayscale images and deployed as a Streamlit web application.
|
| 17 |
|
| 18 |
+
---
|
| 19 |
+
|
| 20 |
+
## 🚀 Demo
|
| 21 |
+
Upload an image of a hand sign (JPG/PNG), and the model predicts the corresponding class along with a confidence score and top predictions.
|
| 22 |
+
|
| 23 |
+
---
|
| 24 |
+
|
| 25 |
+
## 📊 Dataset
|
| 26 |
+
- Grayscale images with a resolution of **28×28 pixels**
|
| 27 |
+
- Images are provided in **CSV format** (pixel values + labels)
|
| 28 |
+
- Some dataset versions contain **non-continuous label indices**
|
| 29 |
+
- An additional **"Unknown"** class is used to ensure consistency between labels and model outputs
|
| 30 |
+
|
| 31 |
+
---
|
| 32 |
+
|
| 33 |
+
## 🧠 Model
|
| 34 |
+
- Framework: **TensorFlow / Keras**
|
| 35 |
+
- Architecture: **Sequential CNN**
|
| 36 |
+
- Convolution + Batch Normalization + MaxPooling layers
|
| 37 |
+
- Fully connected layers with Dropout
|
| 38 |
+
- Loss: `sparse_categorical_crossentropy`
|
| 39 |
+
- Optimizer: Adam
|
| 40 |
+
- Training without GPU acceleration
|
| 41 |
+
|
| 42 |
+
---
|
| 43 |
+
|
| 44 |
+
## 📈 Results
|
| 45 |
+
- Test Accuracy: **~94%**
|
| 46 |
+
- Strong performance across most classes
|
| 47 |
+
- Confusion matrix shows only minor misclassifications between visually similar hand gestures
|
| 48 |
|
| 49 |
+
---
|
| 50 |
+
|
| 51 |
+
## ⚠️ Limitations
|
| 52 |
+
Predictions may vary for real-world images due to background noise, lighting conditions, and differences from the training data, which mainly contains centered and cropped hand images.
|
| 53 |
+
|
| 54 |
+
---
|
| 55 |
+
|
| 56 |
+
## 🖥️ Streamlit App
|
| 57 |
+
The Streamlit app allows users to:
|
| 58 |
+
- Upload an image (JPG/PNG)
|
| 59 |
+
- View the input image
|
| 60 |
+
- See the predicted class and confidence score
|
| 61 |
+
- Inspect the top prediction probabilities
|
| 62 |
|
| 63 |
+
---
|
| 64 |
+
|
| 65 |
+
## 📁 Project Files
|
| 66 |
+
The following files are required in the repository root:
|
| 67 |
+
|
| 68 |
+
app.py
|
| 69 |
+
signlanguage_cnn.keras
|
| 70 |
+
label_map.json
|
| 71 |
+
requirements.txt
|
| 72 |
+
README.md
|
| 73 |
+
|
| 74 |
+
yaml
|
| 75 |
+
Code kopieren
|
| 76 |
+
|
| 77 |
+
---
|
| 78 |
|
| 79 |
+
## ▶️ Run Locally
|
| 80 |
```bash
|
| 81 |
pip install -r requirements.txt
|
| 82 |
streamlit run app.py
|