A complete web application for sign language recognition and communication, built with React, Flask, Mediapipe, and TensorFlow.
- Landing Page:
- Create Profile or Continue with existing profile
- Choose from three roles:
- πΆ Child - Sign language user
- π§ Learner - Learning sign language
- β€ Caretaker - Supporting communication
- Live webcam feed with hand tracking
- Mediapipe hand-tracking with red dots on hand landmarks and green connecting lines
- Real-time gesture recognition using TensorFlow
- Text and voice output using Web Speech API
- Detected gestures are automatically spoken aloud
- Frontend: React + TailwindCSS
- Backend: Flask (Python) with Flask-RESTful
- Machine Learning: Mediapipe + TensorFlow
- Database: SQLite (for profiles and custom gestures)
- Communication: Flask-RESTful API + axios on frontend
- Voice: Web Speech API (text-to-speech)
- Python 3.8+
- Node.js 16+
- npm or yarn
-
Navigate to the project root directory:
cd gesture_connect -
Create and activate a virtual environment (recommended):
python -m venv venv # On Windows: venv\Scripts\activate # On macOS/Linux: source venv/bin/activate
-
Install Python dependencies:
pip install -r requirements.txt
This will install:
- flask
- flask-cors
- flask-restful
- mediapipe
- tensorflow
- opencv-python
- numpy
-
Start the Flask server:
cd server python app.pyThe backend will run on
http://localhost:5000
-
Navigate to the client directory:
cd client -
Install dependencies:
npm install
This will install:
- react
- react-dom
- react-router-dom
- axios
- tailwindcss
- postcss
- autoprefixer
-
Start the React development server:
npm start
The frontend will run on
http://localhost:3000
-
Start the backend server (from
server/directory):python app.py
-
Start the frontend (from
client/directory):npm start
-
Open your browser and navigate to
http://localhost:3000 -
Create a profile:
- Click "Create Profile"
- Enter your name
- Select your role (Child, Learner, or Caretaker)
- Click "Start"
-
For Child Dashboard:
- Click "Start Camera" to begin webcam feed
- Position your hand in front of the camera
- Make sign language gestures
- Red dots will show hand landmarks
- Green lines will connect the landmarks
- Detected gestures will be displayed and spoken aloud
gesture_connect/
βββ client/ # React frontend
β βββ public/
β β βββ index.html # HTML template with Mediapipe scripts
β βββ src/
β β βββ pages/
β β β βββ LandingPage.js # Landing page with role selection
β β β βββ ChildDashboard.js # Child dashboard with webcam
β β βββ App.js # Main app with routing
β β βββ index.js # React entry point
β βββ package.json # Frontend dependencies
β βββ tailwind.config.js # TailwindCSS configuration
βββ server/ # Flask backend
β βββ app.py # Flask app with API endpoints
β βββ gesture_service.py # Mediapipe and gesture recognition
βββ requirements.txt # Python dependencies
βββ README.md # This file
GET /api/profiles- Get all profilesGET /api/profiles/<id>- Get profile by IDPOST /api/profiles- Create a new profile{ "name": "John Doe", "role": "child" }
POST /api/process-gesture- Process hand landmarks and classify gesture{ "landmarks": [ [ {"x": 0.5, "y": 0.5, "z": 0.0}, ... ] ] }
The application currently recognizes the following gestures:
- OK - Thumb and index finger forming a circle
- Peace - Index and middle finger extended
- Thumbs Up - Thumb extended upward
- Hello - All fingers extended (open hand)
- Fist - All fingers closed
Note: The gesture recognition uses rule-based classification. For production, train a TensorFlow model with your own gesture dataset.
The application uses the browser's Web Speech API for text-to-speech. Detected gestures are automatically spoken aloud when recognized with sufficient confidence (>50%).
The application uses SQLite to store:
- Profiles - User profiles with name, role, and creation date
- Custom Gestures - Custom gesture definitions (for future implementation)
To add new gestures, modify the classify_gesture method in server/gesture_service.py:
def classify_gesture(self, landmarks: List[Dict]) -> Dict:
# Add your gesture recognition logic here
# Return: {'gesture': 'GestureName', 'text': 'Display Text', 'confidence': 0.0-1.0}- Collect gesture data (hand landmarks)
- Train a TensorFlow model
- Save the model to
server/models/gesture_model.h5 - Update
gesture_service.pyto load and use the trained model
- Ensure camera permissions are granted in your browser
- Check that no other application is using the camera
- Try using a different browser (Chrome recommended)
- Check your internet connection (Mediapipe loads from CDN)
- Clear browser cache and refresh
- Check browser console for errors
- Ensure Flask server is running on port 5000
- Check CORS settings if accessing from different origin
- Verify
flask-corsis installed
- Learner dashboard for practicing sign language
- Caretaker dashboard for monitoring and support
- Custom gesture training and recognition
- TensorFlow model training interface
- Multi-language support
- Gesture history and analytics
- Real-time communication between users
This project is open source and available under the MIT License.
Contributions are welcome! Please feel free to submit a Pull Request.
For issues and questions, please open an issue on the project repository.