A full-stack Sinhala Sign Language (SSL) learning platform with four integrated research components, built for children and beginner learners in Sri Lanka.
- Architecture Overview
- Prerequisites
- Project Structure
- Setup Guide
- Running the Application
- Component Details
- API Keys Configuration
- Troubleshooting
┌──────────────────────────────────────────────────────────┐
│ React Frontend (:3000) │
│ Home │ Translator │ Lip Reading │ Sign-to-Text │
│ │ │ │ (iframe) │
└────┬────┴──────┬───────┴───────┬───────┴────────┬────────┘
│ │ │ │
▼ ▼ ▼ ▼
┌────────────────────────────────────┐ ┌──────────────────┐
│ Flask Backend (:5001) │ │ FastAPI Backend │
│ • Text-to-SSL Translator │ │ (:8001) │
│ • Lip Reading │ │ • Sign-to-Text │
│ • Games & AI Hints │ │ • Visual Aid Gen │
│ • MongoDB (optional) │ │ • Prediction API │
└────────────────────────────────────┘ └──────────────────┘
| Component | Owner | Backend | Port |
|---|---|---|---|
| Text-to-SSL Translator | Component 2 | Flask | 5001 |
| Lip Reading Practice | Component 3 | Flask | 5001 |
| Learning Games & AI Hints | Component 4 | Flask | 5001 |
| Sign-to-Text Recognition | Component 1 | FastAPI | 8001 |
| Tool | Version | Download |
|---|---|---|
| Python | 3.11.x | python.org |
| Node.js | 18+ | nodejs.org |
| npm | 9+ | Comes with Node.js |
| Git | Latest | git-scm.com |
⚠️ Python 3.11 is required. Python 3.12+ may have compatibility issues with some ML libraries (TensorFlow, PyTorch, gensim). Python 3.14 is NOT supported.
ssl full/
├── Backend/ # All backend code
│ ├── app.py # Main Flask server (Components 2,3,4)
│ ├── requirements.txt # Python dependencies (Flask + ML)
│ ├── .env # API keys (Gemini)
│ ├── sinhala_lip_reading_model.h5 # Lip reading model
│ ├── practis_letters/ # Practice videos (L1-L9.mp4)
│ ├── text-to-sign/ # Text-to-SSL translator module
│ │ ├── SSL_model/ # Translator models (.pkl, .pth)
│ │ └── models/ # Word2Vec / NLP models
│ ├── core/ # MongoDB integration
│ ├── auth/ # Authentication module
│ ├── game-engine/ # Game logic
│ ├── templates/ # Flask HTML templates
│ ├── static/ # Static assets
│ └── sign_to_text/ # ★ Component 1 (FastAPI)
│ ├── main.py # FastAPI server
│ ├── model_loader.py # Model loading utilities
│ ├── landmark_utils.py # MediaPipe landmark preprocessing
│ ├── sinhala_translations.py # English ↔ Sinhala mappings
│ ├── prediction_enhancer.py # F1 masking + temperature scaling
│ ├── .env # API keys (Gemini + AICC)
│ ├── requirements.txt # Python dependencies (FastAPI + TF)
│ ├── best_sign_model_hands.keras # Trained Keras model (353 classes)
│ ├── class_labels_hands.txt # Class label definitions
│ ├── classification_report_hands.txt # F1 scores for enhancer
│ └── frontend/ # HTML/CSS/JS frontend
│ ├── index_new.html # Main UI
│ ├── app.js # Application logic
│ └── style.css # Styles
│
└── frontend/ # React frontend (all components)
├── package.json
├── src/
│ ├── App.jsx # Main router + navbar
│ ├── features/
│ │ ├── LipReading/ # Lip reading UI
│ │ ├── translator/ # Text-to-SSL UI
│ │ ├── games/ # Games UI (puzzle, sentence)
│ │ ├── analytics/ # AI analytics dashboard
│ │ ├── auth/ # Login / Register
│ │ └── SignToText/ # ★ Sign-to-text iframe wrapper
│ └── shared/ # Shared components & styles
└── public/
└── practis_letters/ # Practice videos (duplicated for frontend)
git clone <your-repo-url>
cd "ssl full"cd Backend
python -m venv .venvOn Windows, if
pythonpoints to a different version, use the full path:"C:\Users\<YourUser>\AppData\Local\Programs\Python\Python311\python.exe" -m venv .venv
# Windows (PowerShell)
.\.venv\Scripts\Activate.ps1
# Windows (CMD)
.\.venv\Scripts\activate.bat
# macOS / Linux
source .venv/bin/activatepip install -r requirements.txtpip install regex flask flask-cors python-dotenv google-genai numpy opencv-python pydantic uvicorn httpx Pillow torch tensorflow keras fastapipip install -r sign_to_text/requirements.txtcd ../frontend
npm installThe following files are required but may be too large for GitHub. If they are missing after cloning, obtain them from the team's shared drive:
| File | Location | Size | Description |
|---|---|---|---|
best_sign_model_hands.keras |
Backend/sign_to_text/ |
~99 MB | Trained Keras LSTM model (353 sign classes) |
class_labels_hands.txt |
Backend/sign_to_text/ |
~5 KB | Class label mapping |
classification_report_hands.txt |
Backend/sign_to_text/ |
~20 KB | F1 scores for prediction enhancer |
| File | Location | Size | Description |
|---|---|---|---|
model_ssl.pkl |
Backend/text-to-sign/SSL_model/ |
~1 MB | Translator metadata |
word_model.pth |
Backend/text-to-sign/SSL_model/ |
~15 MB | Word-level model |
sentence_model.pth |
Backend/text-to-sign/SSL_model/ |
~2.4 MB | Sentence-level model |
sinhala_sign_model.pth |
Backend/text-to-sign/SSL_model/ |
~1 MB | Game puzzle model |
word2vec_ssl.model |
Backend/text-to-sign/models/ |
~10 MB | Word2Vec embeddings |
Dataset - Original/ |
Backend/ |
~500 MB+ | Sign language video dataset |
| File | Location | Size | Description |
|---|---|---|---|
sinhala_lip_reading_model.h5 |
Backend/ |
~1.2 MB | Lip reading model |
L1.mp4 – L9.mp4 |
Backend/practis_letters/ |
~5 MB each | Practice letter videos |
L1.mp4 – L9.mp4 |
frontend/public/practis_letters/ |
~5 MB each | Same videos for frontend |
face_landmarker.task |
Backend/assets/ |
~3.6 MB | MediaPipe face model |
Terminal 1 — Both backends (Flask + FastAPI):
cd Backend
.\.venv\Scripts\python.exe app.pyThis single command starts:
- 🚀 Flask backend on http://localhost:5001 (Components 2, 3, 4)
- 🤟 FastAPI backend on http://localhost:8001 (Component 1 — Sign-to-Text)
Terminal 2 — React frontend:
cd frontend
npm startThis starts the React dev server on http://localhost:3000
Navigate to http://localhost:3000 to see the full application.
Real-time sign language recognition using webcam + MediaPipe hand/pose landmarks + LSTM deep learning model.
- Tech Stack: FastAPI, TensorFlow/Keras, MediaPipe (browser-side)
- Features:
- Real-time webcam sign capture (50-frame sequences)
- 353-class sign vocabulary
- Prediction enhancer (F1 masking + temperature sharpening)
- Multi-shot ensemble voting
- AI-powered visual learning guide (Gemini image generation with AICC fallback)
- English + Sinhala bilingual output
Type Sinhala text and see the corresponding sign language video.
- Tech Stack: Flask, PyTorch, Word2Vec
- Features: Sinhala text input → sign video lookup and playback
Practice Sinhala lip reading with live camera and guided exercises.
- Tech Stack: Flask, OpenCV, TensorFlow/Keras
- Features: Camera-based lip detection, letter practice videos, confidence scoring
Interactive games to reinforce sign language learning.
- Tech Stack: Flask, PyTorch, Google Gemini AI
- Features: Word puzzle game, sentence game, AI-generated hints, progress analytics
GEMINI_API_KEY=your_google_gemini_api_keyGet your key at: Google AI Studio
GEMINI_API_KEY=your_google_gemini_api_key
AICC_API_KEY=your_aicc_api_key- GEMINI_API_KEY: Same Google Gemini key (used for image generation)
- AICC_API_KEY: OpenAI-compatible proxy key from api.ai.cc (fallback when Gemini quota exhausted)
💡 The app works without API keys — only the Visual Aid image generation feature will be disabled.
[ WARN:0@51.083] global cap_msmf.cpp:1815 CvCapture_MSMF::grabFrame videoio(MSMF): can't grab frame
This is normal. The Lip Reading component's camera thread runs in the background. If no camera is connected or it's in use by another app, it prints these warnings but doesn't crash.
Install the missing package in the venv:
.\.venv\Scripts\python.exe -m pip install <package-name>The FastAPI server on port 8001 isn't running. Check that app.py started it (look for ✅ Sign-to-Text backend started in the console). If not, start it manually:
cd Backend/sign_to_text
..\.venv\Scripts\python.exe -m uvicorn main:app --host 127.0.0.1 --port 8001Make sure you ran npm install first:
cd frontend
npm install
npm start⚠️ MongoDB integration failed: No module named 'pymongo'
MongoDB is optional — the app works without it. To enable it:
pip install pymongo| Member | Component | Research Area |
|---|---|---|
| Member 1 | 🤟 Sign-to-Text | Real-time sign recognition & visual aid generation |
| Member 2 | ✨ Translator | Text-to-SSL video translation |
| Member 3 | 👄 Lip Reading | Lip reading practice system |
| Member 4 | 🎮 Games | Interactive learning games with AI hints |
This project is part of an academic research submission.