File size: 5,295 Bytes
9a99a91 ce69c1b 9a99a91 7831a2a 5e61621 9a99a91 ce69c1b 9a99a91 ce69c1b 9a99a91 7831a2a 9a99a91 7831a2a 9a99a91 7831a2a | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 | ---
title: Sign Language Detector Pro
emoji: π
colorFrom: red
colorTo: yellow
sdk: streamlit
app_file: src/streamlit_app.py
app_port: 8501
tags:
- streamlit
pinned: false
short_description: Streamlit template space
license: mit
---
# Sign Language Detector Pro
An advanced Python application for detecting and interpreting sign language gestures from images and videos. Features cutting-edge computer vision using MediaPipe for hand landmark detection, AI-powered gesture classification via OpenAI API, and a modern web interface for professional analysis and reporting.
## β¨ Enhanced Features
### π― Core Functionality
- **Advanced Hand Detection**: MediaPipe-powered 21-point hand landmark detection
- **AI Gesture Classification**: OpenAI API integration for accurate sign language interpretation
- **Batch File Processing**: Support for multiple images and videos simultaneously
- **Professional Analytics**: Interactive charts, confidence metrics, and detailed analysis
### π¨ Modern Web Interface
- **Professional Design**: Modern, responsive UI with gradient themes and animations
- **Interactive Visualizations**: 3D hand landmark plots, confidence charts, and timeline analysis
- **Multiple Export Formats**: JSON, CSV, and PDF report generation
- **Real-time Progress Tracking**: Enhanced progress indicators and status updates
### π Advanced Analytics
- **Confidence Scoring**: Detailed confidence metrics for all detections
- **3D Visualization**: Interactive 3D plots of hand landmarks
- **Timeline Analysis**: Frame-by-frame video processing with visual timelines
- **Comparison Views**: Side-by-side before/after image comparisons
## Setup
1. Clone the repository
2. Create a virtual environment:
```bash
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
```
3. Install dependencies:
```bash
pip install -r requirements.txt
```
4. Set up environment variables:
```bash
cp .env.example .env
# Edit .env and add your OpenAI API key
```
## Usage
### Enhanced Command Line Interface
```bash
# File processing mode (camera functionality removed)
python3 main.py --input path/to/video.mp4
# Batch processing with output directory
python3 main.py --input path/to/directory --output results/
# Disable speech output
python3 main.py --input path/to/image.jpg --no-speech
```
### Professional Web Interface
```bash
streamlit run app.py
```
**Features:**
- Drag-and-drop file upload
- Batch processing with progress tracking
- Interactive 3D visualizations
- Multiple export formats (JSON, CSV, PDF)
- Real-time analytics dashboard
### Demo Mode (No API Key Required)
```bash
python3 demo.py
```
## Project Structure
- `main.py` - Main application entry point
- `app.py` - Streamlit GUI application
- `src/` - Source code modules
- `hand_detector.py` - Hand landmark detection
- `gesture_extractor.py` - Gesture feature extraction
- `openai_classifier.py` - OpenAI API integration
- `camera_handler.py` - Real-time camera processing
- `file_handler.py` - File input processing
- `output_handler.py` - Text and speech output
- `tests/` - Unit tests
- `examples/` - Example videos and images
## Requirements
- Python 3.8+
- OpenAI API key (for gesture classification)
- Webcam (for real-time mode)
## Quick Start
1. **Test without API key (Demo mode):**
```bash
python3 demo.py
```
This will show hand detection and gesture analysis without requiring an OpenAI API key.
2. **Set up OpenAI API key:**
```bash
cp .env.example .env
# Edit .env and add: OPENAI_API_KEY=your_key_here
```
3. **Run real-time detection:**
```bash
python3 main.py --mode realtime
```
4. **Process a video file:**
```bash
python3 main.py --mode file --input examples/sample_video.mp4
```
5. **Launch web interface:**
```bash
streamlit run app.py
```
## π Enhanced Features Delivered
### β
Core Processing
- **Advanced Hand Detection** - MediaPipe 21-point landmark detection with enhanced visualization
- **AI-Powered Classification** - OpenAI API integration with confidence scoring
- **Batch File Processing** - Simultaneous processing of multiple images and videos
- **Professional Analytics** - Comprehensive metrics and statistical analysis
### β
Modern Web Interface
- **Responsive Design** - Professional UI with gradient themes and animations
- **Interactive Visualizations** - 3D hand plots, confidence charts, timeline analysis
- **Multiple Export Formats** - JSON, CSV, and PDF report generation
- **Real-time Progress** - Enhanced progress tracking with detailed status updates
### β
Advanced Analytics
- **3D Visualization** - Interactive 3D hand landmark plots
- **Timeline Analysis** - Frame-by-frame video processing visualization
- **Confidence Metrics** - Detailed confidence scoring and analysis
- **Comparison Views** - Side-by-side before/after image comparisons
- **Summary Reports** - Comprehensive processing statistics and insights
### β
User Experience
- **Drag-and-Drop Upload** - Intuitive file upload with visual feedback
- **Settings Panel** - Configurable detection parameters
- **Error Handling** - User-friendly error messages and recovery
- **Export Functionality** - Multiple format options for results |