Spaces:
Sleeping
Sleeping
File size: 2,102 Bytes
82b9fde 704940b 5e9813e 82b9fde 5e9813e 82b9fde 704940b 82b9fde 5e9813e 82b9fde 394fedc 82b9fde 394fedc 5e9813e 394fedc 5e9813e 394fedc 5e9813e 394fedc 5e9813e | 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 | ---
title: SignLanguageClassification
emoji: π€
colorFrom: red
colorTo: red
sdk: streamlit
app_file: src/streamlit_app.py
pinned: false
short_description: Upload a hand sign image and the CNN predicts
license: mit
---
# π€ Sign Language Classification (CNN)
This project demonstrates a Convolutional Neural Network (CNN) for classifying sign language hand gestures from images.
A lightweight CNN was trained on grayscale images and deployed as a Streamlit web application.
---
## π Demo
Upload an image of a hand sign (JPG/PNG), and the model predicts the corresponding class along with a confidence score and top predictions.
---
## π Dataset
- Grayscale images with a resolution of **28Γ28 pixels**
- Images are provided in **CSV format** (pixel values + labels)
- Some dataset versions contain **non-continuous label indices**
- An additional **"Unknown"** class is used to ensure consistency between labels and model outputs
---
## π§ Model
- Framework: **TensorFlow / Keras**
- Architecture: **Sequential CNN**
- Convolution + Batch Normalization + MaxPooling layers
- Fully connected layers with Dropout
- Loss: `sparse_categorical_crossentropy`
- Optimizer: Adam
- Training without GPU acceleration
---
## π Results
- Test Accuracy: **~94%**
- Strong performance across most classes
- Confusion matrix shows only minor misclassifications between visually similar hand gestures
---
## β οΈ Limitations
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.
---
## π₯οΈ Streamlit App
The Streamlit app allows users to:
- Upload an image (JPG/PNG)
- View the input image
- See the predicted class and confidence score
- Inspect the top prediction probabilities
---
## π Project Files
The following files are required in the repository root:
app.py
signlanguage_cnn.keras
label_map.json
requirements.txt
README.md
yaml
Code kopieren
---
## βΆοΈ Run Locally
```bash
pip install -r requirements.txt
streamlit run app.py |