# justuspb04/unlock-holmes architecture

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

- Interactive diagram: https://gitdiagram.com/justuspb04/unlock-holmes
- Repository: https://github.com/justuspb04/unlock-holmes

## Overview

Unlock-Holmes is a command-line pilot that processes a user-supplied video into fingertip tracking outputs; its docstring explicitly says it does not infer unlock patterns. The single substantial source file owns the full workflow, so the graph separates its meaningful stages without implying a larger application. Edges are supported by the excerpt; the model asset is loaded by the script, while the documented download endpoint is represented as an external service.

Main entry points: [`finger_trajectory_pilot.py`](https://github.com/justuspb04/unlock-holmes/blob/main/finger_trajectory_pilot.py) (CLI and setup), [`hand_landmarker.task`](https://github.com/justuspb04/unlock-holmes/blob/main/hand_landmarker.task) (Landmarker model)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_workflow["Video tracking workflow"]
  node_cli["CLI and setup"]
  node_model["Model loading"]
  node_model_asset["Landmarker model"]
  node_download["Model download"]
  node_video_input["Input video"]
  node_video_access["Video access"]
  node_tracking["Frame tracking"]
end

subgraph group_outputs["Tracking outputs"]
  node_annotation["Frame annotation"]
  node_tracked_video["Tracked MP4"]
  node_trajectory_data["Trajectory rows"]
  node_csv_output["Fingertip CSV"]
  node_plot["Trajectory plot"]
  node_png_output["Trajectory PNG"]
end

node_user(("Video user"))

node_user -->|"provides video"| node_cli
node_cli -->|"loads model"| node_model
node_model -->|"reads bytes"| node_model_asset
node_model -->|"downloads if missing"| node_download
node_cli -->|"opens input"| node_video_access
node_video_access -->|"reads frames"| node_video_input
node_cli -->|"runs tracking"| node_tracking
node_model -->|"configures detector"| node_tracking
node_video_access -->|"supplies frames"| node_tracking
node_tracking -->|"annotates frames"| node_annotation
node_annotation -->|"writes MP4"| node_tracked_video
node_tracking -->|"records coordinates"| node_trajectory_data
node_cli -->|"writes CSV"| node_csv_output
node_trajectory_data -->|"serializes rows"| node_csv_output
node_cli -->|"plots trajectory"| node_plot
node_trajectory_data -->|"provides rows"| node_plot
node_plot -->|"saves PNG"| node_png_output

click node_cli "https://github.com/justuspb04/unlock-holmes/blob/main/finger_trajectory_pilot.py"
click node_model "https://github.com/justuspb04/unlock-holmes/blob/main/finger_trajectory_pilot.py"
click node_model_asset "https://github.com/justuspb04/unlock-holmes/blob/main/hand_landmarker.task"
click node_video_access "https://github.com/justuspb04/unlock-holmes/blob/main/finger_trajectory_pilot.py"
click node_tracking "https://github.com/justuspb04/unlock-holmes/blob/main/finger_trajectory_pilot.py"
click node_annotation "https://github.com/justuspb04/unlock-holmes/blob/main/finger_trajectory_pilot.py"
click node_trajectory_data "https://github.com/justuspb04/unlock-holmes/blob/main/finger_trajectory_pilot.py"
click node_plot "https://github.com/justuspb04/unlock-holmes/blob/main/finger_trajectory_pilot.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_cli,node_model,node_model_asset,node_download,node_video_input,node_video_access,node_tracking,node_user toneBlue
class node_annotation,node_tracked_video,node_trajectory_data,node_csv_output,node_plot,node_png_output toneAmber
```

## Components

### Video tracking workflow

- [CLI and setup](https://github.com/justuspb04/unlock-holmes/blob/main/finger_trajectory_pilot.py): `finger_trajectory_pilot.py`
- [Model loading](https://github.com/justuspb04/unlock-holmes/blob/main/finger_trajectory_pilot.py): `finger_trajectory_pilot.py`
- [Landmarker model](https://github.com/justuspb04/unlock-holmes/blob/main/hand_landmarker.task): `hand_landmarker.task`
- **Model download**
- **Input video**
- [Video access](https://github.com/justuspb04/unlock-holmes/blob/main/finger_trajectory_pilot.py): `finger_trajectory_pilot.py`
- [Frame tracking](https://github.com/justuspb04/unlock-holmes/blob/main/finger_trajectory_pilot.py): `finger_trajectory_pilot.py`

### Tracking outputs

- [Frame annotation](https://github.com/justuspb04/unlock-holmes/blob/main/finger_trajectory_pilot.py): `finger_trajectory_pilot.py`
- **Tracked MP4**
- [Trajectory rows](https://github.com/justuspb04/unlock-holmes/blob/main/finger_trajectory_pilot.py): `finger_trajectory_pilot.py`
- **Fingertip CSV**
- [Trajectory plot](https://github.com/justuspb04/unlock-holmes/blob/main/finger_trajectory_pilot.py): `finger_trajectory_pilot.py`
- **Trajectory PNG**

### Other components

- **Video user**

## Connections

- Video user → CLI and setup: provides video (evidence: `finger_trajectory_pilot.py`)
- CLI and setup → Model loading: loads model (evidence: `finger_trajectory_pilot.py`)
- Model loading → Landmarker model: reads bytes (evidence: `finger_trajectory_pilot.py`)
- Model loading → Model download: downloads if missing (evidence: `finger_trajectory_pilot.py`)
- CLI and setup → Video access: opens input (evidence: `finger_trajectory_pilot.py`)
- Video access → Input video: reads frames (evidence: `finger_trajectory_pilot.py`)
- CLI and setup → Frame tracking: runs tracking (evidence: `finger_trajectory_pilot.py`)
- Model loading → Frame tracking: configures detector (evidence: `finger_trajectory_pilot.py`)
- Video access → Frame tracking: supplies frames (evidence: `finger_trajectory_pilot.py`)
- Frame tracking → Frame annotation: annotates frames (evidence: `finger_trajectory_pilot.py`)
- Frame annotation → Tracked MP4: writes MP4 (evidence: `finger_trajectory_pilot.py`)
- Frame tracking → Trajectory rows: records coordinates (evidence: `finger_trajectory_pilot.py`)
- CLI and setup → Fingertip CSV: writes CSV (evidence: `finger_trajectory_pilot.py`)
- Trajectory rows → Fingertip CSV: serializes rows (evidence: `finger_trajectory_pilot.py`)
- CLI and setup → Trajectory plot: plots trajectory (evidence: `finger_trajectory_pilot.py`)
- Trajectory rows → Trajectory plot: provides rows (evidence: `finger_trajectory_pilot.py`)
- Trajectory plot → Trajectory PNG: saves PNG (evidence: `finger_trajectory_pilot.py`)
