# 0llrayll0/hand-and-head-track architecture

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

- Interactive diagram: https://gitdiagram.com/0llrayll0/hand-and-head-track
- Repository: https://github.com/0llrayll0/hand-and-head-track

## Overview

This small Python script captures webcam frames, detects faces and hand landmarks, draws the results on both the camera image and a virtual-avatar canvas, and displays two windows until the user quits. The sampled source shows all runtime behavior; the README gives no additional product capabilities.

Main entry points: [`hand and head track.py`](https://github.com/0llrayll0/hand-and-head-track/blob/main/hand%20and%20head%20track.py) (Tracking loop)

## Diagram (Mermaid)

```mermaid
flowchart TD

node_user(("User"))
node_app["Tracking loop"]
node_camera["Webcam"]
node_face["Face detection"]
node_hands["Hand landmarks"]
node_avatar["Avatar rendering"]
node_windows["Display windows"]

node_user -->|"starts and quits"| node_app
node_app -->|"reads frames"| node_camera
node_app -->|"detects faces"| node_face
node_app -->|"detects landmarks"| node_hands
node_face -->|"returns detections"| node_app
node_hands -->|"returns landmarks"| node_app
node_app -->|"draws detections"| node_avatar
node_app -->|"displays images"| node_windows

click node_app "https://github.com/0llrayll0/hand-and-head-track/blob/main/hand%20and%20head%20track.py"
click node_face "https://github.com/0llrayll0/hand-and-head-track/blob/main/hand%20and%20head%20track.py"
click node_hands "https://github.com/0llrayll0/hand-and-head-track/blob/main/hand%20and%20head%20track.py"
click node_avatar "https://github.com/0llrayll0/hand-and-head-track/blob/main/hand%20and%20head%20track.py"
click node_windows "https://github.com/0llrayll0/hand-and-head-track/blob/main/hand%20and%20head%20track.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_user toneBlue
class node_app,node_face,node_hands,node_avatar,node_windows toneTeal
class node_camera toneIndigo
```

## Components

### Other components

- **User**
- [Tracking loop](https://github.com/0llrayll0/hand-and-head-track/blob/main/hand%20and%20head%20track.py): `hand and head track.py`
- **Webcam**
- [Face detection](https://github.com/0llrayll0/hand-and-head-track/blob/main/hand%20and%20head%20track.py): `hand and head track.py`
- [Hand landmarks](https://github.com/0llrayll0/hand-and-head-track/blob/main/hand%20and%20head%20track.py): `hand and head track.py`
- [Avatar rendering](https://github.com/0llrayll0/hand-and-head-track/blob/main/hand%20and%20head%20track.py): `hand and head track.py`
- [Display windows](https://github.com/0llrayll0/hand-and-head-track/blob/main/hand%20and%20head%20track.py): `hand and head track.py`

## Connections

- User → Tracking loop: starts and quits (evidence: `hand and head track.py`)
- Tracking loop → Webcam: reads frames (evidence: `hand and head track.py`)
- Tracking loop → Face detection: detects faces (evidence: `hand and head track.py`)
- Tracking loop → Hand landmarks: detects landmarks (evidence: `hand and head track.py`)
- Face detection → Tracking loop: returns detections (evidence: `hand and head track.py`)
- Hand landmarks → Tracking loop: returns landmarks (evidence: `hand and head track.py`)
- Tracking loop → Avatar rendering: draws detections (evidence: `hand and head track.py`)
- Tracking loop → Display windows: displays images (evidence: `hand and head track.py`)
