# jirrrr77/video_sychronazation architecture

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

- Interactive diagram: https://gitdiagram.com/jirrrr77/video_sychronazation
- Repository: https://github.com/jirrrr77/video_sychronazation

## Overview

This thesis repository experiments with synchronizing frames from two video perspectives. The documented workflow tries two alternative matching approaches, applies a person-focused background mask, then evaluates alignment with Sampson distance. The README says these experiments did not work reliably and that the author moved toward optical flow; no optical-flow implementation is visible in the supplied tree. Notebook internals were not sampled, so links below reflect documented composition rather than verified function calls.

Main entry points: [`code/loFTR_mrcnn_sampson.ipynb`](https://github.com/jirrrr77/video_sychronazation/blob/master/code/loFTR_mrcnn_sampson.ipynb) (LoFTR experiment), [`code/denseMatching_mrcnn_sampson.ipynb`](https://github.com/jirrrr77/video_sychronazation/blob/master/code/denseMatching_mrcnn_sampson.ipynb) (Dense matching experiment), [`code/background_mask.py`](https://github.com/jirrrr77/video_sychronazation/blob/master/code/background_mask.py) (Person background mask), [`code/utils/utils.py`](https://github.com/jirrrr77/video_sychronazation/blob/master/code/utils/utils.py) (Sampson distance)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_experiments["Matching Experiments"]
  node_loftr["LoFTR experiment"]
  node_dense["Dense matching experiment"]
end

subgraph group_preprocessing["Frame Preprocessing"]
  node_mask["Person background mask<br/>[background_mask.py]"]
end

subgraph group_geometry["Geometry Utilities"]
  node_sampson["Sampson distance<br/>[utils.py]"]
end

node_researcher(("Researcher"))
node_video_frames["Two-view frames"]
node_calibration["Camera calibration"]

node_researcher -->|"provides"| node_video_frames
node_video_frames -->|"aligns frames"| node_loftr
node_video_frames -->|"aligns frames"| node_dense
node_loftr -->|"uses masking"| node_mask
node_loftr -->|"evaluates matches"| node_sampson
node_dense -->|"uses masking"| node_mask
node_dense -->|"evaluates matches"| node_sampson

click node_loftr "https://github.com/jirrrr77/video_sychronazation/blob/master/code/loFTR_mrcnn_sampson.ipynb"
click node_dense "https://github.com/jirrrr77/video_sychronazation/blob/master/code/denseMatching_mrcnn_sampson.ipynb"
click node_mask "https://github.com/jirrrr77/video_sychronazation/blob/master/code/background_mask.py"
click node_sampson "https://github.com/jirrrr77/video_sychronazation/blob/master/code/utils/utils.py"
click node_calibration "https://github.com/jirrrr77/video_sychronazation/blob/master/data/calibration_150821_dance5.json"

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_loftr,node_dense,node_video_frames toneBlue
class node_mask toneAmber
class node_sampson toneMint
class node_researcher toneIndigo
class node_calibration toneTeal
```

## Components

### Matching Experiments

- [LoFTR experiment](https://github.com/jirrrr77/video_sychronazation/blob/master/code/loFTR_mrcnn_sampson.ipynb): `code/loFTR_mrcnn_sampson.ipynb`
- [Dense matching experiment](https://github.com/jirrrr77/video_sychronazation/blob/master/code/denseMatching_mrcnn_sampson.ipynb): `code/denseMatching_mrcnn_sampson.ipynb`

### Frame Preprocessing

- [Person background mask](https://github.com/jirrrr77/video_sychronazation/blob/master/code/background_mask.py): `code/background_mask.py`

### Geometry Utilities

- [Sampson distance](https://github.com/jirrrr77/video_sychronazation/blob/master/code/utils/utils.py): `code/utils/utils.py`

### Other components

- **Researcher**
- **Two-view frames**
- [Camera calibration](https://github.com/jirrrr77/video_sychronazation/blob/master/data/calibration_150821_dance5.json): `data/calibration_150821_dance5.json`

## Connections

- Researcher → Two-view frames: provides
- Two-view frames → LoFTR experiment: aligns frames
- Two-view frames → Dense matching experiment: aligns frames
- LoFTR experiment → Person background mask: uses masking
- LoFTR experiment → Sampson distance: evaluates matches
- Dense matching experiment → Person background mask: uses masking
- Dense matching experiment → Sampson distance: evaluates matches
