# kpjadhav30/gesture_x architecture

> Architecture diagram of the GitHub repository kpjadhav30/gesture_x, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-10). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/kpjadhav30/gesture_x
- Repository: https://github.com/kpjadhav30/gesture_x

## Overview

GestureX is a webcam-based application with two user-facing modes: sign recognition and gesture-driven Windows control. The documented runtime flow turns hand landmarks into model predictions, then presents a character or performs an action. The graph also preserves the separate dataset-preparation and model-training capabilities visible in sampled source. The README documents the overall inference flow; sampled source shows parts of the UI, training, and prediction implementations, but not all wiring between them.

Main entry points: [`ui/app.py`](https://github.com/kpjadhav30/gesture_x/blob/master/ui/app.py) (Streamlit app), [`src/sign_recognition/realtime_prediction.py`](https://github.com/kpjadhav30/gesture_x/blob/master/src/sign_recognition/realtime_prediction.py) (Sign prediction), [`src/gesture_control/gesture_pridiction.py`](https://github.com/kpjadhav30/gesture_x/blob/master/src/gesture_control/gesture_pridiction.py) (Gesture prediction), [`src/hand_tracking/landmark_extractor.py`](https://github.com/kpjadhav30/gesture_x/blob/master/src/hand_tracking/landmark_extractor.py) (Landmark extraction)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_runtime["Real-time interaction"]
  node_ui["Streamlit app<br/>[app.py]"]
  node_hand_tracking["Hand tracking<br/>[hand_detection.py]"]
  node_landmarks["Landmark extraction"]
end

subgraph group_sign["Sign recognition"]
  node_sign_runtime["Sign prediction"]
  node_sign_model["Sign models"]
end

subgraph group_control["Gesture control"]
  node_gesture_runtime["Gesture prediction"]
  node_gesture_model["Gesture models"]
end

subgraph group_training["Data and training"]
  node_sign_prep["Sign preprocessing"]
  node_gesture_train["Gesture model builder"]
  node_gesture_prep["Gesture preprocessing"]
  node_sign_data[("Sign data")]
  node_gesture_data[("Gesture data")]
end

node_user(("User"))
node_webcam["Webcam"]
node_windows["Windows input"]

node_user -->|"selects mode"| node_ui
node_webcam -->|"streams frames"| node_ui
node_ui -.->|"detects hands"| node_hand_tracking
node_hand_tracking -.->|"extracts landmarks"| node_landmarks
node_landmarks -.->|"provides features"| node_sign_runtime
node_landmarks -.->|"provides features"| node_gesture_runtime
node_sign_runtime -->|"predicts signs"| node_sign_model
node_sign_runtime -->|"shows character"| node_ui
node_gesture_runtime -->|"shows prediction"| node_ui
node_gesture_runtime -->|"triggers actions"| node_windows
node_user -->|"collects gestures"| node_gesture_train
node_gesture_train -->|"writes samples"| node_gesture_data
node_gesture_data -.->|"prepares features"| node_gesture_prep
node_gesture_prep -.->|"trains models"| node_gesture_model
node_gesture_model -.->|"supplies classifier"| node_gesture_runtime
node_sign_data -->|"prepares features"| node_sign_prep
node_sign_prep -.->|"trains classifiers"| node_sign_model
node_sign_model -.->|"supplies classifier"| node_sign_runtime

click node_ui "https://github.com/kpjadhav30/gesture_x/blob/master/ui/app.py"
click node_hand_tracking "https://github.com/kpjadhav30/gesture_x/blob/master/src/hand_tracking/hand_detection.py"
click node_landmarks "https://github.com/kpjadhav30/gesture_x/blob/master/src/hand_tracking/landmark_extractor.py"
click node_sign_runtime "https://github.com/kpjadhav30/gesture_x/blob/master/src/sign_recognition/realtime_prediction.py"
click node_sign_model "https://github.com/kpjadhav30/gesture_x/blob/master/models/sign_language_model.py"
click node_sign_prep "https://github.com/kpjadhav30/gesture_x/blob/master/src/datasets/dataset_preprocess_sign.py"
click node_gesture_runtime "https://github.com/kpjadhav30/gesture_x/blob/master/src/gesture_control/gesture_pridiction.py"
click node_gesture_train "https://github.com/kpjadhav30/gesture_x/blob/master/src/gesture_control/build_gesture_model.py"
click node_gesture_model "https://github.com/kpjadhav30/gesture_x/blob/master/models/gesture_control_model.py"
click node_gesture_prep "https://github.com/kpjadhav30/gesture_x/blob/master/src/datasets/dataset_preprcess_gesture.py"
click node_sign_data "https://github.com/kpjadhav30/gesture_x/tree/master/outputs/preprocessed_signs"
click node_gesture_data "https://github.com/kpjadhav30/gesture_x/blob/master/outputs/gesture_control_dataset.csv"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_ui,node_hand_tracking,node_landmarks,node_user toneBlue
class node_sign_runtime,node_sign_model toneAmber
class node_gesture_runtime,node_gesture_model toneMint
class node_sign_prep,node_gesture_train,node_gesture_prep,node_sign_data,node_gesture_data toneRose
class node_webcam,node_windows toneIndigo
```

## Components

### Real-time interaction

- [Streamlit app](https://github.com/kpjadhav30/gesture_x/blob/master/ui/app.py): `ui/app.py`
- [Hand tracking](https://github.com/kpjadhav30/gesture_x/blob/master/src/hand_tracking/hand_detection.py): `src/hand_tracking/hand_detection.py`
- [Landmark extraction](https://github.com/kpjadhav30/gesture_x/blob/master/src/hand_tracking/landmark_extractor.py): `src/hand_tracking/landmark_extractor.py`

### Sign recognition

- [Sign prediction](https://github.com/kpjadhav30/gesture_x/blob/master/src/sign_recognition/realtime_prediction.py): `src/sign_recognition/realtime_prediction.py`
- [Sign models](https://github.com/kpjadhav30/gesture_x/blob/master/models/sign_language_model.py): `models/sign_language_model.py`

### Gesture control

- [Gesture prediction](https://github.com/kpjadhav30/gesture_x/blob/master/src/gesture_control/gesture_pridiction.py): `src/gesture_control/gesture_pridiction.py`
- [Gesture models](https://github.com/kpjadhav30/gesture_x/blob/master/models/gesture_control_model.py): `models/gesture_control_model.py`

### Data and training

- [Sign preprocessing](https://github.com/kpjadhav30/gesture_x/blob/master/src/datasets/dataset_preprocess_sign.py): `src/datasets/dataset_preprocess_sign.py`
- [Gesture model builder](https://github.com/kpjadhav30/gesture_x/blob/master/src/gesture_control/build_gesture_model.py): `src/gesture_control/build_gesture_model.py`
- [Gesture preprocessing](https://github.com/kpjadhav30/gesture_x/blob/master/src/datasets/dataset_preprcess_gesture.py): `src/datasets/dataset_preprcess_gesture.py`
- [Sign data](https://github.com/kpjadhav30/gesture_x/tree/master/outputs/preprocessed_signs): `outputs/preprocessed_signs`
- [Gesture data](https://github.com/kpjadhav30/gesture_x/blob/master/outputs/gesture_control_dataset.csv): `outputs/gesture_control_dataset.csv`

### Other components

- **User**
- **Webcam**
- **Windows input**

## Connections

- User → Streamlit app: selects mode (evidence: `README.md`)
- Webcam → Streamlit app: streams frames (evidence: `README.md`)
- Streamlit app → Hand tracking: detects hands
- Hand tracking → Landmark extraction: extracts landmarks
- Landmark extraction → Sign prediction: provides features
- Landmark extraction → Gesture prediction: provides features
- Sign prediction → Sign models: predicts signs (evidence: `README.md`)
- Sign prediction → Streamlit app: shows character (evidence: `README.md`)
- Gesture prediction → Streamlit app: shows prediction (evidence: `ui/app.py`)
- Gesture prediction → Windows input: triggers actions (evidence: `README.md`)
- User → Gesture model builder: collects gestures (evidence: `src/gesture_control/build_gesture_model.py`)
- Gesture model builder → Gesture data: writes samples (evidence: `src/gesture_control/build_gesture_model.py`)
- Gesture data → Gesture preprocessing: prepares features
- Gesture preprocessing → Gesture models: trains models
- Gesture models → Gesture prediction: supplies classifier
- Sign data → Sign preprocessing: prepares features (evidence: `src/datasets/dataset_preprocess_sign.py`)
- Sign preprocessing → Sign models: trains classifiers
- Sign models → Sign prediction: supplies classifier
