An intelligent, real-time Indian Sign Language (ISL) and hand gesture recognition platform built with PyTorch Deep CNN, OpenCV, and Flask. Features live browser webcam recognition with target ROI tracking, bilingual speech synthesis (English & Hindi), an interactive Sentence Builder, and a 1-Click Test Gallery for instant gesture recognition without requiring a webcam.
- ๐ง PyTorch Deep CNN Architecture: 4 convolutional blocks with Batch Normalization, Dropout regularization, and Cosine Annealing learning rate schedule trained on 3,600 gesture samples.
- ๐น Dual Webcam Modes:
- Client-Side HTML5 Camera: Captures video frames directly in the browser via Canvas ROI extraction and posts to
/predict_frame(zero lag and 100% cloud deployment compatibility on Render/Heroku). - Server-Side OpenCV Stream: Fallback MJPEG video stream with bounding ROI box.
- Client-Side HTML5 Camera: Captures video frames directly in the browser via Canvas ROI extraction and posts to
- ๐ฃ๏ธ Bilingual Speech Synthesis (TTS):
- English & Hindi audio voice output with one-click language toggle.
- Hotkey support (
Sto speak detected gesture aloud,Spaceto append to sentence).
- ๐ Interactive Sentence Builder:
- Real-time sentence composition bar accumulating sequential gestures.
- Actions: Speak Sentence, Copy Text, Undo, and Clear.
- โก 1-Click Sample Gesture Gallery: Instant one-click test cards for all 9 gesture classes for quick testing on devices without physical webcams.
- ๐ ISL Library & Reference Modal: Gesture meanings, cultural context, and bilingual translations.
- ๐งช 100% Automated Test Coverage: Comprehensive PyTorch model & API test suite with
pytest. - ๐ณ Containerized & Cloud Ready: Complete with
Dockerfile,docker-compose.yml,Procfile, and.render.yaml.
| # | Gesture | Emoji | Meaning | English Response | Hindi Translation |
|---|---|---|---|---|---|
| 1 | Thumbs Up | ๐ | Approval, agreement, success | "You're doing great! Approved!" | เคธเคฌ เคฌเคขเคผเคฟเคฏเคพ เคนเฅ! |
| 2 | Thumbs Down | ๐ | Disapproval, negative | "Not cool! Try again!" | เคเฅเค เคเคกเคผเคฌเคกเคผ เคนเฅ! ๐ |
| 3 | Victory / Peace | โ๏ธ | Peace, victory, celebration | "Victory is yours! โ๏ธ" | เคเฅเคค เคเคชเคเฅ เคนเฅ! โ๏ธ |
| 4 | Okay Sign | ๐ | Perfect, confirmation | "Alright then, perfect! ๐" | เคธเคฌ เค เฅเค เคนเฅ! ๐ |
| 5 | Finger Snap | ๐ซฐ | Snappy rhythm, recognition | "Snap magic! Smooth! โจ" | เคเฅเคเคเฅ เคฎเฅเค เคนเฅ เคเคฏเคพ! โจ |
| 6 | Finger Gun | ๐ | Pointing, target locked | "Gotcha! Target locked! ๐ฏ" | เคจเคฟเคถเคพเคจเคพ เคธเคเฅเค เคนเฅ! ๐ฏ |
| 7 | Salute | ๐ซก | Respect, duty, acknowledgment | "At your service, captain! ๐ซก" | เคธเคพเคฆเคฐ เคชเฅเคฐเคฃเคพเคฎ! ๐ซก |
| 8 | Crossed Fingers | ๐ค | Good luck, hope | "Fingers crossed! Best of luck! ๐ค" | เคถเฅเคญเคเคพเคฎเคจเคพเคเค! ๐ค |
| 9 | Waving Hand | ๐ | Hello, greeting, farewell | "Hello! Hey there buddy! ๐" | เคจเคฎเคธเฅเคคเฅ เคฎเคฟเคคเฅเคฐ! ๐ |
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Client-Side Web UI โ
โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ HTML5 Webcam Canvas โ โ Interactive Sentence โ โ
โ โ Target Zone (ROI) โ โ Builder โ โ
โ โโโโโโโโโโโโโฌโโโโโโโโโโโโ โโโโโโโโโโโโโโโฒโโโโโโโโโโโโโโ โ
โโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโ
โ (Base64 JPEG POST) โ
โผ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโดโโโโโโโโโโโโโโโโโโ
โ Flask Backend (/predict_frame) โ
โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ Image Preprocessing Pipeline โ โ
โ โ Grayscale Conversion โ Resize (64x64) โ Normalized Float32 โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ (1, 1, 64, 64) Tensor โ
โ โผ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ PyTorch 4-Block Deep CNN Classifier โ โ
โ โ Conv2D + BatchNorm + MaxPool + Dropout โ Linear Classification โ โ
โ โ (Trained Weights: gesture_model.pt) โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ Softmax Class Probabilities โ
โ โผ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ Bilingual Translation & Confidence Score Metadata Engine โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
# Clone the repository
git clone https://github.com/harshrameshnerkar/ISL-Translator.git
cd ISL-Translator
# Create and activate virtual environment
python -m venv .venv
source .venv/bin/activate # On Windows: .venv\Scripts\activate
# Install requirements
pip install -r requirements.txtpython app.pyVisit http://localhost:5000 in your browser to launch the web dashboard!
Run the full automated test suite using pytest:
pytest -v tests/All 9 tests verify PyTorch model tensor output dimensions, image normalization, confidence score calculations, and Flask REST endpoints.
docker-compose up -d --builddocker build -t isl-translator-app .
docker run -p 5000:5000 isl-translator-app- Push your code to your GitHub repository.
- In Render, create a new Web Service and connect this repository.
- Render will auto-detect
.render.yamland deploy with Gunicorn!
7_ISL_translator/
โโโ app.py # Flask backend + PyTorch CNN inference & REST API
โโโ train_torch_model.py # PyTorch training pipeline script
โโโ models/
โ โโโ gesture_model.pt # Trained 4-block CNN weights (5.9MB)
โโโ templates/
โ โโโ index.html # Glassmorphic Web Dashboard
โโโ static/
โ โโโ css/
โ โ โโโ style.css # Glassmorphism design system & responsiveness
โ โโโ js/
โ โ โโโ script.js # Client-side camera, Canvas ROI, TTS, & Sentence Builder
โ โโโ samples/ # 9 pre-rendered sample gesture images
โ โโโ uploads/ # Directory for user-uploaded test photos
โโโ tests/
โ โโโ __init__.py
โ โโโ test_model.py # PyTorch & Flask automated test suite
โโโ .gitignore # Excludes large raw datasets (*.npz), uploads, caches
โโโ Dockerfile # Container definition
โโโ docker-compose.yml # 1-command Docker setup
โโโ Procfile # Cloud process runner
โโโ .render.yaml # Render cloud deployment blueprint
โโโ requirements.txt # Dependencies
โโโ LICENSE # MIT License
โโโ README.md # Documentation
This project is open source and available under the MIT License.
Made with โค๏ธ by Harsh Nerkar