# cyens/vilma architecture

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

- Interactive diagram: https://gitdiagram.com/cyens/vilma
- Repository: https://github.com/cyens/vilma

## Overview

VILMA is a multimodal manipulation-data collection and dataset-generation framework. Operators collect synchronized camera, microphone, and tracker recordings, associate video files with session metadata, process and enrich recordings, then create and organize an HDF5 dataset. Separate utilities support finger-distance calibration, depth-map extraction, compression, face blurring, statistics, and dataset inspection. The graph also shows the sampled depth-model layers. Most pipeline links are documented in the README; unsampled scripts are represented only at their evidenced paths.

Main entry points: [`data_collection/vilma_collect_data.py`](https://github.com/cyens/vilma/blob/main/data_collection/vilma_collect_data.py) (Data collection), [`dataset_creation/vilma_create_hdf5_dataset.py`](https://github.com/cyens/vilma/blob/main/dataset_creation/vilma_create_hdf5_dataset.py) (HDF5 generation), [`data_processing/vilma_process_data.py`](https://github.com/cyens/vilma/blob/main/data_processing/vilma_process_data.py) (Recording processing), [`data_processing/Depth-Anything-V2/run_video.py`](https://github.com/cyens/vilma/blob/main/data_processing/Depth-Anything-V2/run_video.py) (Depth extraction)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_collection["Data collection"]
  node_tracker["VIVE tracking<br/>[triad_openvr.py]"]
  node_collect["Data collection"]
  node_calibrate["Finger calibration"]
end

subgraph group_processing["Data processing"]
  node_associate["Video association"]
  node_process["Recording processing"]
  node_compress["Video compression"]
end

subgraph group_depth["Depth estimation"]
  node_depthrun["Depth extraction<br/>[run_video.py]"]
  node_dpt["Depth model head<br/>[dpt.py]"]
  node_dino["DINOv2 encoder<br/>[dinov2.py]"]
  node_dinolayers["Transformer layers<br/>[block.py]"]
  node_pointcloud["Depth point clouds"]
end

subgraph group_dataset["Dataset creation"]
  node_blur["Face blurring"]
  node_stats["Dataset statistics"]
  node_hdf5create["HDF5 generation"]
  node_organize["Video organization"]
  node_inspect["Dataset inspection"]
end

node_operator(("Operator"))
node_sensors["Recording hardware"]
node_recordings["Recordings"]
node_sessions["Session metadata"]
node_openai["OpenAI transcription"]
node_hdf5[("HDF5 dataset")]

node_operator -->|"starts capture"| node_collect
node_sensors -->|"provides streams"| node_collect
node_collect -->|"reads tracking"| node_tracker
node_collect -->|"writes recordings"| node_recordings
node_collect -->|"writes paths"| node_sessions
node_operator -->|"runs calibration"| node_calibrate
node_operator -->|"runs association"| node_associate
node_associate -->|"updates association"| node_sessions
node_operator -->|"runs processing"| node_process
node_process -->|"trims and optimizes"| node_recordings
node_process -->|"transcribes speech"| node_openai
node_operator -->|"runs depth extraction"| node_depthrun
node_depthrun -->|"reads sessions"| node_sessions
node_depthrun -->|"invokes model"| node_dpt
node_dpt -->|"uses encoder"| node_dino
node_dino -->|"builds blocks"| node_dinolayers
node_operator -->|"runs compression"| node_compress
node_compress -->|"rewrites videos"| node_recordings
node_operator -->|"runs anonymization"| node_blur
node_operator -->|"runs statistics"| node_stats
node_stats -->|"reads sessions"| node_sessions
node_operator -->|"creates dataset"| node_hdf5create
node_hdf5create -->|"reads session data"| node_sessions
node_hdf5create -->|"reads media"| node_recordings
node_hdf5create -->|"writes hierarchy"| node_hdf5
node_operator -->|"runs organization"| node_organize
node_organize -->|"reads hierarchy"| node_hdf5
node_organize -->|"organizes videos"| node_recordings
node_operator -->|"prints contents"| node_inspect
node_inspect -->|"reads contents"| node_hdf5
node_operator -.->|"runs conversion"| node_pointcloud

click node_tracker "https://github.com/cyens/vilma/blob/main/data_collection/triad_openvr/triad_openvr.py"
click node_collect "https://github.com/cyens/vilma/blob/main/data_collection/vilma_collect_data.py"
click node_calibrate "https://github.com/cyens/vilma/blob/main/data_collection/vilma_fingers_distance_calibration.py"
click node_associate "https://github.com/cyens/vilma/blob/main/data_processing/vilma_associate_videos.py"
click node_process "https://github.com/cyens/vilma/blob/main/data_processing/vilma_process_data.py"
click node_depthrun "https://github.com/cyens/vilma/blob/main/data_processing/Depth-Anything-V2/run_video.py"
click node_dpt "https://github.com/cyens/vilma/blob/main/data_processing/Depth-Anything-V2/depth_anything_v2/dpt.py"
click node_dino "https://github.com/cyens/vilma/blob/main/data_processing/Depth-Anything-V2/depth_anything_v2/dinov2.py"
click node_dinolayers "https://github.com/cyens/vilma/blob/main/data_processing/Depth-Anything-V2/depth_anything_v2/dinov2_layers/block.py"
click node_compress "https://github.com/cyens/vilma/blob/main/data_processing/vilma_compress_videos.py"
click node_blur "https://github.com/cyens/vilma/blob/main/dataset_creation/vilma_blur_faces.py"
click node_stats "https://github.com/cyens/vilma/blob/main/dataset_creation/vilma_calculate_statistics.py"
click node_hdf5create "https://github.com/cyens/vilma/blob/main/dataset_creation/vilma_create_hdf5_dataset.py"
click node_organize "https://github.com/cyens/vilma/blob/main/dataset_creation/vilma_organize_videos_by_hdf5.py"
click node_inspect "https://github.com/cyens/vilma/blob/main/dataset_creation/vilma_print_hdf5_contents.py"
click node_pointcloud "https://github.com/cyens/vilma/blob/main/data_processing/Depth-Anything-V2/metric_depth/depth_to_pointcloud.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_tracker,node_collect,node_calibrate toneBlue
class node_associate,node_process,node_compress,node_hdf5 toneAmber
class node_depthrun,node_dpt,node_dino,node_dinolayers,node_pointcloud toneMint
class node_blur,node_stats,node_hdf5create,node_organize,node_inspect toneRose
class node_operator,node_sensors,node_recordings,node_sessions,node_openai toneIndigo
```

## Components

### Data collection

- [VIVE tracking](https://github.com/cyens/vilma/blob/main/data_collection/triad_openvr/triad_openvr.py): `data_collection/triad_openvr/triad_openvr.py`
- [Data collection](https://github.com/cyens/vilma/blob/main/data_collection/vilma_collect_data.py): `data_collection/vilma_collect_data.py`
- [Finger calibration](https://github.com/cyens/vilma/blob/main/data_collection/vilma_fingers_distance_calibration.py): `data_collection/vilma_fingers_distance_calibration.py`

### Data processing

- [Video association](https://github.com/cyens/vilma/blob/main/data_processing/vilma_associate_videos.py): `data_processing/vilma_associate_videos.py`
- [Recording processing](https://github.com/cyens/vilma/blob/main/data_processing/vilma_process_data.py): `data_processing/vilma_process_data.py`
- [Video compression](https://github.com/cyens/vilma/blob/main/data_processing/vilma_compress_videos.py): `data_processing/vilma_compress_videos.py`

### Depth estimation

- [Depth extraction](https://github.com/cyens/vilma/blob/main/data_processing/Depth-Anything-V2/run_video.py): `data_processing/Depth-Anything-V2/run_video.py`
- [Depth model head](https://github.com/cyens/vilma/blob/main/data_processing/Depth-Anything-V2/depth_anything_v2/dpt.py): `data_processing/Depth-Anything-V2/depth_anything_v2/dpt.py`
- [DINOv2 encoder](https://github.com/cyens/vilma/blob/main/data_processing/Depth-Anything-V2/depth_anything_v2/dinov2.py): `data_processing/Depth-Anything-V2/depth_anything_v2/dinov2.py`
- [Transformer layers](https://github.com/cyens/vilma/blob/main/data_processing/Depth-Anything-V2/depth_anything_v2/dinov2_layers/block.py): `data_processing/Depth-Anything-V2/depth_anything_v2/dinov2_layers/block.py`
- [Depth point clouds](https://github.com/cyens/vilma/blob/main/data_processing/Depth-Anything-V2/metric_depth/depth_to_pointcloud.py): `data_processing/Depth-Anything-V2/metric_depth/depth_to_pointcloud.py`

### Dataset creation

- [Face blurring](https://github.com/cyens/vilma/blob/main/dataset_creation/vilma_blur_faces.py): `dataset_creation/vilma_blur_faces.py`
- [Dataset statistics](https://github.com/cyens/vilma/blob/main/dataset_creation/vilma_calculate_statistics.py): `dataset_creation/vilma_calculate_statistics.py`
- [HDF5 generation](https://github.com/cyens/vilma/blob/main/dataset_creation/vilma_create_hdf5_dataset.py): `dataset_creation/vilma_create_hdf5_dataset.py`
- [Video organization](https://github.com/cyens/vilma/blob/main/dataset_creation/vilma_organize_videos_by_hdf5.py): `dataset_creation/vilma_organize_videos_by_hdf5.py`
- [Dataset inspection](https://github.com/cyens/vilma/blob/main/dataset_creation/vilma_print_hdf5_contents.py): `dataset_creation/vilma_print_hdf5_contents.py`

### Other components

- **Operator**
- **Recording hardware**
- **Recordings**
- **Session metadata**
- **OpenAI transcription**
- **HDF5 dataset**

## Connections

- Operator → Data collection: starts capture (evidence: `README.md`)
- Recording hardware → Data collection: provides streams (evidence: `README.md`)
- Data collection → VIVE tracking: reads tracking (evidence: `data_collection/vilma_collect_data.py`)
- Data collection → Recordings: writes recordings (evidence: `README.md`)
- Data collection → Session metadata: writes paths (evidence: `README.md`)
- Operator → Finger calibration: runs calibration (evidence: `README.md`)
- Operator → Video association: runs association (evidence: `README.md`)
- Video association → Session metadata: updates association (evidence: `README.md`)
- Operator → Recording processing: runs processing (evidence: `README.md`)
- Recording processing → Recordings: trims and optimizes (evidence: `README.md`)
- Recording processing → OpenAI transcription: transcribes speech (evidence: `README.md`)
- Operator → Depth extraction: runs depth extraction (evidence: `README.md`)
- Depth extraction → Session metadata: reads sessions (evidence: `README.md`)
- Depth extraction → Depth model head: invokes model
- Depth model head → DINOv2 encoder: uses encoder (evidence: `data_processing/Depth-Anything-V2/depth_anything_v2/dpt.py`)
- DINOv2 encoder → Transformer layers: builds blocks (evidence: `data_processing/Depth-Anything-V2/depth_anything_v2/dinov2.py`)
- Operator → Video compression: runs compression (evidence: `README.md`)
- Video compression → Recordings: rewrites videos (evidence: `README.md`)
- Operator → Face blurring: runs anonymization (evidence: `README.md`)
- Operator → Dataset statistics: runs statistics (evidence: `README.md`)
- Dataset statistics → Session metadata: reads sessions (evidence: `README.md`)
- Operator → HDF5 generation: creates dataset (evidence: `README.md`)
- HDF5 generation → Session metadata: reads session data (evidence: `README.md`)
- HDF5 generation → Recordings: reads media (evidence: `README.md`)
- HDF5 generation → HDF5 dataset: writes hierarchy (evidence: `README.md`)
- Operator → Video organization: runs organization (evidence: `README.md`)
- Video organization → HDF5 dataset: reads hierarchy (evidence: `README.md`)
- Video organization → Recordings: organizes videos (evidence: `README.md`)
- Operator → Dataset inspection: prints contents (evidence: `README.md`)
- Dataset inspection → HDF5 dataset: reads contents (evidence: `README.md`)
- Operator → Depth point clouds: runs conversion
