Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
GESTURAI_GESTURE_ACTION_MAP_PATH = 'gesture_map.json'
GESTURAI_DEFAULT_GESTURE_ACTION_MAP_PATH = 'default_gesture_map.json'
GESTURAI_GESTURE_INDEX_MAP_PATH = 'gesture_index_map.json'
GESTURAI_DEFAULT_GESTURE_INDEX_MAP_PATH = 'default_gesture_index_map.json'
GESTURAI_GESTURE_DATA_PATH = 'gesture_data/'
GESTURAI_DEFAULT_GESTURE_DATA_PATH = 'gesture_data/default/'
GESTURAI_GESTURE_MODEL_PATH = 'models/gesture_model.pth'
GESTURAI_DEFAULT_GESTURE_MODEL_PATH = 'models/gesture_model_default.pth'
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@ gesture_data.pkl
gesture_model.pth
label_map.pkl
__pycache__/
venv/
venv/
.env
66 changes: 18 additions & 48 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,15 @@ A real-time hand gesture recognition system using MediaPipe and PyTorch to contr
## 🔧 Features

- ✅ Real-time gesture recognition using webcam
- ✅ Context-aware gesture modes (`media_mode`, `word_mode`, `presentation_mode`)
- ✅ Context-specific gesture modes 🧠 (`media_mode`, `word_mode`, `presentation_mode`) - switch between modes using gestures!
- ✅ Customizable gesture-to-action mappings
- ✅ Streamlit UI for editing gesture mappings
- ✅ Create your own gestures!
- ✅ Streamlit UI for editing gestures and mappings
- ✅ Cross-platform (macOS, Linux, Windows)

---

## 📂 Project Structure
<!-- ## 📂 Project Structure

```
GesturAI/
Expand All @@ -33,44 +34,36 @@ GesturAI/
├── gesture_config.json # Saved gesture-action mappings
├── requirements.txt # All dependencies
└── README.md # Project overview
```
``` -->

---

## 🚀 Getting Started

### 1. Install Dependencies
### 1. 🧰 Install Dependencies

```bash
pip install -r requirements.txt
```

### 2. Collect Gesture Data

```bash
python collect_data.py
```
---

### 3. Train the Model
### 2. ⚙️ Customize Your Gestures and Map Gestures to Actions

```bash
python training.py
python -m streamlit run config.py
```

### 4. Map Gestures to Actions
Use the configuration app to:
- Add, rename, relearn, or delete gestures: the app will walk you through the process of collecting data for the new gesture and automatically retrains the gesture recognition model!
- Change the way gestures trigger system actions or context changes: add or remove mappings, and add, remove, or rename contexts!

```bash
# Option A: Streamlit UI
streamlit run gesture_ui_mapper.py

# Option B: CLI
python gesture_cli_mapper.py
```
---

### 5. Run Gesture Controller
### 3. 🔁 Run Gesture Controller

```bash
python run_gesture_control.py
python gesturai.py
```

---
Expand All @@ -89,32 +82,9 @@ python run_gesture_control.py

---

## 🧠 Context Modes

- `default`
- `word_mode`
- `media_mode`
- `presentation_mode`

You can switch between modes using trigger gestures like `three_fingers`, `peace_sign`, or `ok_sign`.

---

## 🔁 Customize Your Mappings

Use `gesture_ui_mapper.py` to:

- Add new gestures
- Map gestures to system actions
- Delete or reset mappings
- Save to `gesture_config.json`

---

## 📌 Future Ideas

- Record your own custom gestures
- Add voice feedback or sound effects
- Integrate with specific apps (Zoom, PowerPoint, etc.)
- Extend to take voice commands
- Add sound effects or feedback
- Integrate with popular apps (Zoom, PowerPoint, etc.)
- Cloud-hosted UI for remote gesture mapping

265 changes: 0 additions & 265 deletions actions.py

This file was deleted.

Loading