Indian Sign Language (ISL) real-time translator — webcam se hand gestures detect karke text + voice (TTS) mein convert karta hai.
Built with MediaPipe + 1D-CNN/BiLSTM. Runs live on laptop CPU — no GPU required.
📹 Demo GIF yahan aayega —
demo.giffile ko repo mein daal ke niche replace karo:

Demo kaise banao (5 min):
python realtime_translator.pyrun karo- Windows Game Bar kholo (
Win + G) → Record dabao - 3-4 gestures karke dikhao (namaste, thank_you, yes...)
- Record khatam karo, phir video ko ezgif.com pe upload karke GIF banao
- GIF ko repo mein
demo.gifnaam se daal do, upar wali line uncomment karo
- 9 gestures: background, help, hey, namaste, please, sorry, thank_you, water, yes
- Real-time detection (~1.2–1.5 sec) — confidence threshold (0.80) + history smoothing, fake detection filter
- Text-to-Speech (pyttsx3, threaded — app hang nahi hota)
- ~96% test accuracy (10-class benchmark: 9 gestures + background)
- Feature engineering: wrist-origin normalization + velocity features (168 features/frame)
- Data augmentation: jitter, scale, shift, frame-drop, time-warp
- Smart buffer: 30-frame sliding window + no-hand (background) handling
| Component | Library |
|---|---|
| Hand tracking | MediaPipe 0.10.21 (21 landmarks × 2 hands) |
| Model | TensorFlow 2.19.1 — Conv1D + BatchNorm + BiLSTM |
| Vision | OpenCV 4.11.0 |
| TTS | pyttsx3 |
| Metrics | scikit-learn |
isl_translator/
├── models/ # Trained artifacts
│ ├── isl_model.keras # Trained model (~1.5MB)
│ ├── label_map.json # Gesture → index mapping
│ └── index_to_label.json # Model output → label
├── dataset/ # (NOT committed — ~4GB, self-recorded)
│ └── <gesture_name>/ # har gesture ka folder: sample_000.npy ...
├── record_data.py # Basic data recorder (30 samples/gesture)
├── record_data_v2.py # Advanced recorder (variation phases, 50 samples)
├── check_data.py # Recorded samples verify karo
├── extract_landmarks.py # Raw frames → normalized landmarks (.npy)
├── train_model.py # Model train karo (augmentation + BiLSTM)
├── realtime_translator.py # LIVE app — webcam + text + voice
├── requirements.txt # Exact tested dependencies
└── README.md
# Python 3.11 recommended
python -m venv isl_env
isl_env\Scripts\activate
pip install -r requirements.txtStep 1 — Record data (har gesture ke liye alag folder, dataset/ ke andar):
python record_data_v2.py
# Gesture name poochega (e.g. namaste), then 50 samples record karoStep 2 — Extract landmarks:
python extract_landmarks.pyStep 3 — Train:
python train_model.pyStep 4 — Run live:
python realtime_translator.py
# Q dabao quit karne ke liyeNote:
dataset/folder intentionally not committed (bahut bada). Har machine pe apna data record karo. Naya gesture add karna ho toh basdataset/mein naya folder banao — pipeline automatically pick up karega.
Dataset khud record kiya hai — 270 samples, 9 gestures (30 samples per gesture, 60 frames each, 320×240 webcam).
Kyun Kaggle dataset use nahi kiya:
- Public ISL datasets (jaise ISLHTD) mostly isolated word images hain — continuous video sequence ke liye nahi
- ISL regional variations hain — kisi aur region ka dataset hamare use-case se match nahi karta
- Self-recorded dataset = apna data engineering skill ka proof — interview mein "dataset kahan se aaya?" ka answer: "Maine khud record kiya — model exactly mere target environment (laptop webcam) pe trained hai"
Ye intentionally ek feature hai, limitation nahi. Naya gesture add karna = bas naya folder banana.
| Version | Gestures | Accuracy |
|---|---|---|
| v1 (2 gestures, basic CNN) | 2 | 83.33% |
| v2 (8 gestures, BiLSTM + augmentation) | 8 | 91.67% |
| v3 (normalization + velocity features) | 8 | 95.83% |
v4 (with hey) |
9 | ~96% |
Per-gesture detail (v4): background/please/sorry/thank_you/yes 100%, water 91%, namaste 91%, help 86%, hey f1 0.91.
- TFLite conversion → Android app
- .exe build (PyInstaller)
- Reverse mode: speech → ISL (Vosk)
- GUI dashboard
- 50+ samples per gesture → 95%+ live accuracy
MIT