# remyc0des/gestify architecture

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

- Interactive diagram: https://gitdiagram.com/remyc0des/gestify
- Repository: https://github.com/remyc0des/gestify

## Overview

Gestify is a webcam-based hand-gesture controller for Spotify, with a separate data-preparation and model-training workflow. The main runtime captures frames, recognizes gestures, visualizes landmarks and confidence, applies a cooldown, and dispatches Spotify commands. The repository also contains landmark extraction and a training script. The README documents the runtime behavior; source excerpts show the recognition, command, extraction, and training implementations. The extraction script references video files under a path not present in the supplied tree, so that input is not represented as a repository node.

Main entry points: [`main.py`](https://github.com/remyc0des/gestify/blob/master/main.py) (Frame Capture), [`extract_landmarks.py`](https://github.com/remyc0des/gestify/blob/master/extract_landmarks.py) (Landmark Extraction), [`modelbuild.py`](https://github.com/remyc0des/gestify/blob/master/modelbuild.py) (ResNet Training), [`Annot_List.txt`](https://github.com/remyc0des/gestify/blob/master/Annot_List.txt) (Gesture Annotations)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_runtime["Live Gesture Control"]
  node_capture["Frame Capture<br/>[main.py]"]
  node_recognition["Gesture Recognition<br/>[main.py]"]
  node_visualization["Landmark Display<br/>[main.py]"]
  node_cooldown["Cooldown Gate<br/>[main.py]"]
  node_command["Gesture Commands<br/>[main.py]"]
end

subgraph group_data["Gesture Data"]
  node_annotation["Gesture Annotations<br/>[Annot_List.txt]"]
  node_extract["Landmark Extraction"]
end

subgraph group_training["Model Training"]
  node_clips[("IPN Gesture Clips")]
  node_train["ResNet Training<br/>[modelbuild.py]"]
end

node_user(("User"))
node_webcam["Webcam"]
node_spotify["Spotify"]

node_user -->|"starts"| node_capture
node_webcam -->|"provides frames"| node_capture
node_capture -->|"submits frames"| node_recognition
node_recognition -->|"provides results"| node_visualization
node_visualization -->|"checks gesture"| node_cooldown
node_cooldown -->|"permits command"| node_command
node_command -->|"sends AppleScript"| node_spotify
node_user -->|"runs extraction"| node_extract
node_annotation -->|"labels videos"| node_extract
node_user -.->|"runs training"| node_train
node_clips -->|"loads images"| node_train

click node_capture "https://github.com/remyc0des/gestify/blob/master/main.py"
click node_recognition "https://github.com/remyc0des/gestify/blob/master/main.py"
click node_visualization "https://github.com/remyc0des/gestify/blob/master/main.py"
click node_cooldown "https://github.com/remyc0des/gestify/blob/master/main.py"
click node_command "https://github.com/remyc0des/gestify/blob/master/main.py"
click node_annotation "https://github.com/remyc0des/gestify/blob/master/Annot_List.txt"
click node_extract "https://github.com/remyc0des/gestify/blob/master/extract_landmarks.py"
click node_clips "https://github.com/remyc0des/gestify/tree/master/IPN_dataset"
click node_train "https://github.com/remyc0des/gestify/blob/master/modelbuild.py"

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_capture,node_recognition,node_visualization,node_cooldown,node_command,node_user toneBlue
class node_annotation,node_extract toneAmber
class node_clips,node_train toneMint
class node_webcam,node_spotify toneIndigo
```

## Components

### Live Gesture Control

- [Frame Capture](https://github.com/remyc0des/gestify/blob/master/main.py): `main.py`
- [Gesture Recognition](https://github.com/remyc0des/gestify/blob/master/main.py): `main.py`
- [Landmark Display](https://github.com/remyc0des/gestify/blob/master/main.py): `main.py`
- [Cooldown Gate](https://github.com/remyc0des/gestify/blob/master/main.py): `main.py`
- [Gesture Commands](https://github.com/remyc0des/gestify/blob/master/main.py): `main.py`

### Gesture Data

- [Gesture Annotations](https://github.com/remyc0des/gestify/blob/master/Annot_List.txt): `Annot_List.txt`
- [Landmark Extraction](https://github.com/remyc0des/gestify/blob/master/extract_landmarks.py): `extract_landmarks.py`

### Model Training

- [IPN Gesture Clips](https://github.com/remyc0des/gestify/tree/master/IPN_dataset): `IPN_dataset`
- [ResNet Training](https://github.com/remyc0des/gestify/blob/master/modelbuild.py): `modelbuild.py`

### Other components

- **User**
- **Webcam**
- **Spotify**

## Connections

- User → Frame Capture: starts
- Webcam → Frame Capture: provides frames (evidence: `main.py`)
- Frame Capture → Gesture Recognition: submits frames (evidence: `main.py`)
- Gesture Recognition → Landmark Display: provides results (evidence: `main.py`)
- Landmark Display → Cooldown Gate: checks gesture (evidence: `main.py`)
- Cooldown Gate → Gesture Commands: permits command (evidence: `main.py`)
- Gesture Commands → Spotify: sends AppleScript (evidence: `main.py`)
- User → Landmark Extraction: runs extraction
- Gesture Annotations → Landmark Extraction: labels videos (evidence: `extract_landmarks.py`)
- User → ResNet Training: runs training
- IPN Gesture Clips → ResNet Training: loads images (evidence: `modelbuild.py`)
