Skip to content

About

๐ŸคŸ Real-time Indian Sign Language (ISL) & Hand Gesture AI Translator powered by PyTorch Deep CNN, OpenCV, bilingual TTS, and interactive web dashboard.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

ย 

History

2 Commits

Folders and files

Repository files navigation

๐ŸคŸ ISLCraft โ€” Indian Sign Language & Gesture AI Translator

Python PyTorch OpenCV Flask Docker License

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.


โœจ Key Features

  • ๐Ÿง  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.
  • ๐Ÿ—ฃ๏ธ Bilingual Speech Synthesis (TTS):
    • English & Hindi audio voice output with one-click language toggle.
    • Hotkey support (S to speak detected gesture aloud, Space to 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.

๐Ÿ–๏ธ Supported 9 Gesture Classes

# 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! ๐Ÿ‘‹" เคจเคฎเคธเฅเคคเฅ‡ เคฎเคฟเคคเฅเคฐ! ๐Ÿ‘‹

๐Ÿ›๏ธ Architecture Overview

 โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
 โ”‚                           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     โ”‚  โ”‚
 โ”‚  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜  โ”‚
 โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

๐Ÿš€ Quick Start

1. Clone & Install Dependencies

# 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.txt

2. Run the Web Application

python app.py

Visit http://localhost:5000 in your browser to launch the web dashboard!


๐Ÿงช Running Automated Tests

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 Deployment

Using Docker Compose

docker-compose up -d --build

Using Docker CLI

docker build -t isl-translator-app .
docker run -p 5000:5000 isl-translator-app

โ˜๏ธ Deploy to Render / Railway

  1. Push your code to your GitHub repository.
  2. In Render, create a new Web Service and connect this repository.
  3. Render will auto-detect .render.yaml and deploy with Gunicorn!

๐Ÿ“‚ Project Structure

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

๐Ÿ“œ License

This project is open source and available under the MIT License.


Made with โค๏ธ by Harsh Nerkar

About

๐ŸคŸ Real-time Indian Sign Language (ISL) & Hand Gesture AI Translator powered by PyTorch Deep CNN, OpenCV, bilingual TTS, and interactive web dashboard.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages