# melantech/gola architecture

> Architecture diagram of the GitHub repository melantech/gola, 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/melantech/gola
- Repository: https://github.com/melantech/gola

## Overview

This repository implements GOLA, a parameter-efficient RGB-T visual-tracking research system. The main workflow prepares pretrained DINOv2 weights with SVD-based rank grouping, launches configurable training or evaluation through a shared runtime, consumes tracking datasets, and produces checkpoints, metrics, and tracking results for benchmark evaluation. Training-pair sampling and image augmentation, plus evaluation task scheduling and result collection, are distinct data stages. The graph combines documented capabilities with sampled call references; unsampled internals are represented at their existing directory paths, and their uncertain links are omitted.

Main entry points: [`trackit/core/runtime/application/default/builder.py`](https://github.com/melantech/gola/blob/main/trackit/core/runtime/application/default/builder.py) (Runtime application), [`trackit/core/boot/main.py`](https://github.com/melantech/gola/blob/main/trackit/core/boot/main.py) (CLI bootstrap), [`trackit/data/methods/siamese_tracker_train/worker.py`](https://github.com/melantech/gola/blob/main/trackit/data/methods/siamese_tracker_train/worker.py) (Training data worker), [`trackit/runner/training/default`](https://github.com/melantech/gola/tree/main/trackit/runner/training/default) (Training runner)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_startup["Startup and runtime"]
  node_boot["CLI bootstrap<br/>[main.py]"]
  node_config["Config loading<br/>[load_config.py]"]
  node_context["Global context"]
  node_app["Application setup"]
  node_runtime["Runtime application<br/>[builder.py]"]
  node_checkpoint["Checkpoint service<br/>[checkpoint.py]"]
end

subgraph group_learning["Model and training"]
  node_rankprep["Rank grouping"]
  node_model["GOLA tracker<br/>[gola.py]"]
  node_backbone["DINOv2 backbone<br/>[__init__.py]"]
  node_loss["Training criteria<br/>[builder.py]"]
  node_trainrunner["Training runner"]
end

subgraph group_datasets["Tracking data"]
  node_trainpairs["Pair sampling<br/>[worker.py]"]
  node_trainworker["Training data worker<br/>[worker.py]"]
  node_augmentation["Data augmentation<br/>[pipeline.py]"]
  node_dataset["Tracking datasets<br/>[MMOT.py]"]
end

subgraph group_assessment["Evaluation and results"]
  node_evaldata["Evaluation data worker<br/>[worker.py]"]
  node_scheduler["Task scheduler"]
  node_evalorchestrator["Evaluation orchestration<br/>[orchestration.py]"]
  node_collector["Result collection<br/>[collector.py]"]
  node_metrics["Benchmark metrics<br/>[ope_metrics.py]"]
end

node_user(("Researcher"))
node_benchmark[("RGB-T benchmarks")]

node_user -->|"launches"| node_boot
node_boot -->|"loads config"| node_config
node_boot -->|"initializes context"| node_context
node_boot -->|"prepares app"| node_app
node_app -->|"builds runtime"| node_runtime
node_user -->|"prepares weights"| node_rankprep
node_rankprep -.->|"groups model ranks"| node_model
node_runtime -.->|"runs tracker"| node_model
node_model -.->|"uses features"| node_backbone
node_runtime -->|"runs training"| node_trainrunner
node_trainrunner -.->|"optimizes with"| node_loss
node_trainrunner -.->|"requests batches"| node_trainworker
node_trainworker -->|"samples pairs"| node_trainpairs
node_trainworker -.->|"transforms samples"| node_augmentation
node_trainworker -->|"reads frames"| node_dataset
node_runtime -->|"runs evaluation"| node_evalorchestrator
node_evalorchestrator -->|"requests inputs"| node_evaldata
node_evaldata -->|"gets tasks"| node_scheduler
node_evaldata -->|"reads sequences"| node_dataset
node_evalorchestrator -.->|"collects results"| node_collector
node_collector -.->|"computes metrics"| node_metrics
node_runtime -->|"saves weights"| node_checkpoint
node_collector -->|"exports tracking results"| node_benchmark
node_benchmark -->|"reports scores"| node_user

click node_boot "https://github.com/melantech/gola/blob/main/trackit/core/boot/main.py"
click node_config "https://github.com/melantech/gola/blob/main/trackit/core/boot/funcs/main/load_config.py"
click node_context "https://github.com/melantech/gola/blob/main/trackit/core/boot/funcs/main/init_global_context.py"
click node_app "https://github.com/melantech/gola/blob/main/trackit/core/boot/funcs/main/init_application.py"
click node_runtime "https://github.com/melantech/gola/blob/main/trackit/core/runtime/application/default/builder.py"
click node_rankprep "https://github.com/melantech/gola/blob/main/pretrained_models/params_svd_grouping.py"
click node_model "https://github.com/melantech/gola/blob/main/trackit/models/methods/GOLA/gola.py"
click node_backbone "https://github.com/melantech/gola/blob/main/trackit/models/backbone/dinov2/__init__.py"
click node_loss "https://github.com/melantech/gola/blob/main/trackit/criteria/builder.py"
click node_trainrunner "https://github.com/melantech/gola/tree/main/trackit/runner/training/default"
click node_trainpairs "https://github.com/melantech/gola/blob/main/trackit/data/methods/siamese_tracker_train/siamese_training_pair_sampling/worker.py"
click node_trainworker "https://github.com/melantech/gola/blob/main/trackit/data/methods/siamese_tracker_train/worker.py"
click node_augmentation "https://github.com/melantech/gola/blob/main/trackit/data/methods/siamese_tracker_train/transform/default/augmentation/pipeline.py"
click node_dataset "https://github.com/melantech/gola/blob/main/trackit/data/source/dataset/MMOT.py"
click node_evaldata "https://github.com/melantech/gola/blob/main/trackit/data/methods/siamese_tracker_eval/worker.py"
click node_scheduler "https://github.com/melantech/gola/blob/main/trackit/data/sampling/per_frame/distributed_dynamic_eval_task_scheduling/distributed_evaluation_task_scheduler.py"
click node_evalorchestrator "https://github.com/melantech/gola/blob/main/trackit/data/methods/siamese_tracker_eval/orchestration.py"
click node_collector "https://github.com/melantech/gola/blob/main/trackit/data/components/result_collector/collector.py"
click node_metrics "https://github.com/melantech/gola/blob/main/trackit/data/components/result_collector/handler/one_pass_evaluation/ope_metrics.py"
click node_checkpoint "https://github.com/melantech/gola/blob/main/trackit/core/runtime/services/checkpoint.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_boot,node_config,node_context,node_app,node_runtime,node_checkpoint toneBlue
class node_rankprep,node_model,node_backbone,node_loss,node_trainrunner,node_benchmark toneAmber
class node_trainpairs,node_trainworker,node_augmentation,node_dataset toneMint
class node_evaldata,node_scheduler,node_evalorchestrator,node_collector,node_metrics toneRose
class node_user toneIndigo
```

## Components

### Startup and runtime

- [CLI bootstrap](https://github.com/melantech/gola/blob/main/trackit/core/boot/main.py): `trackit/core/boot/main.py`
- [Config loading](https://github.com/melantech/gola/blob/main/trackit/core/boot/funcs/main/load_config.py): `trackit/core/boot/funcs/main/load_config.py`
- [Global context](https://github.com/melantech/gola/blob/main/trackit/core/boot/funcs/main/init_global_context.py): `trackit/core/boot/funcs/main/init_global_context.py`
- [Application setup](https://github.com/melantech/gola/blob/main/trackit/core/boot/funcs/main/init_application.py): `trackit/core/boot/funcs/main/init_application.py`
- [Runtime application](https://github.com/melantech/gola/blob/main/trackit/core/runtime/application/default/builder.py): `trackit/core/runtime/application/default/builder.py`
- [Checkpoint service](https://github.com/melantech/gola/blob/main/trackit/core/runtime/services/checkpoint.py): `trackit/core/runtime/services/checkpoint.py`

### Model and training

- [Rank grouping](https://github.com/melantech/gola/blob/main/pretrained_models/params_svd_grouping.py): `pretrained_models/params_svd_grouping.py`
- [GOLA tracker](https://github.com/melantech/gola/blob/main/trackit/models/methods/GOLA/gola.py): `trackit/models/methods/GOLA/gola.py`
- [DINOv2 backbone](https://github.com/melantech/gola/blob/main/trackit/models/backbone/dinov2/__init__.py): `trackit/models/backbone/dinov2/__init__.py`
- [Training criteria](https://github.com/melantech/gola/blob/main/trackit/criteria/builder.py): `trackit/criteria/builder.py`
- [Training runner](https://github.com/melantech/gola/tree/main/trackit/runner/training/default): `trackit/runner/training/default`

### Tracking data

- [Pair sampling](https://github.com/melantech/gola/blob/main/trackit/data/methods/siamese_tracker_train/siamese_training_pair_sampling/worker.py): `trackit/data/methods/siamese_tracker_train/siamese_training_pair_sampling/worker.py`
- [Training data worker](https://github.com/melantech/gola/blob/main/trackit/data/methods/siamese_tracker_train/worker.py): `trackit/data/methods/siamese_tracker_train/worker.py`
- [Data augmentation](https://github.com/melantech/gola/blob/main/trackit/data/methods/siamese_tracker_train/transform/default/augmentation/pipeline.py): `trackit/data/methods/siamese_tracker_train/transform/default/augmentation/pipeline.py`
- [Tracking datasets](https://github.com/melantech/gola/blob/main/trackit/data/source/dataset/MMOT.py): `trackit/data/source/dataset/MMOT.py`

### Evaluation and results

- [Evaluation data worker](https://github.com/melantech/gola/blob/main/trackit/data/methods/siamese_tracker_eval/worker.py): `trackit/data/methods/siamese_tracker_eval/worker.py`
- [Task scheduler](https://github.com/melantech/gola/blob/main/trackit/data/sampling/per_frame/distributed_dynamic_eval_task_scheduling/distributed_evaluation_task_scheduler.py): `trackit/data/sampling/per_frame/distributed_dynamic_eval_task_scheduling/distributed_evaluation_task_scheduler.py`
- [Evaluation orchestration](https://github.com/melantech/gola/blob/main/trackit/data/methods/siamese_tracker_eval/orchestration.py): `trackit/data/methods/siamese_tracker_eval/orchestration.py`
- [Result collection](https://github.com/melantech/gola/blob/main/trackit/data/components/result_collector/collector.py): `trackit/data/components/result_collector/collector.py`
- [Benchmark metrics](https://github.com/melantech/gola/blob/main/trackit/data/components/result_collector/handler/one_pass_evaluation/ope_metrics.py): `trackit/data/components/result_collector/handler/one_pass_evaluation/ope_metrics.py`

### Other components

- **Researcher**
- **RGB-T benchmarks**

## Connections

- Researcher → CLI bootstrap: launches
- CLI bootstrap → Config loading: loads config (evidence: `trackit/core/boot/main.py`)
- CLI bootstrap → Global context: initializes context (evidence: `trackit/core/boot/main.py`)
- CLI bootstrap → Application setup: prepares app (evidence: `trackit/core/boot/main.py`)
- Application setup → Runtime application: builds runtime (evidence: `trackit/core/boot/funcs/main/init_application.py`)
- Researcher → Rank grouping: prepares weights
- Rank grouping → GOLA tracker: groups model ranks
- Runtime application → GOLA tracker: runs tracker
- GOLA tracker → DINOv2 backbone: uses features
- Runtime application → Training runner: runs training
- Training runner → Training criteria: optimizes with
- Training runner → Training data worker: requests batches
- Training data worker → Pair sampling: samples pairs (evidence: `trackit/data/methods/siamese_tracker_train/worker.py`)
- Training data worker → Data augmentation: transforms samples
- Training data worker → Tracking datasets: reads frames (evidence: `trackit/data/methods/siamese_tracker_train/worker.py`)
- Runtime application → Evaluation orchestration: runs evaluation
- Evaluation orchestration → Evaluation data worker: requests inputs (evidence: `trackit/data/methods/siamese_tracker_eval/orchestration.py`)
- Evaluation data worker → Task scheduler: gets tasks (evidence: `trackit/data/methods/siamese_tracker_eval/worker.py`)
- Evaluation data worker → Tracking datasets: reads sequences (evidence: `trackit/data/methods/siamese_tracker_eval/worker.py`)
- Evaluation orchestration → Result collection: collects results
- Result collection → Benchmark metrics: computes metrics
- Runtime application → Checkpoint service: saves weights
- Result collection → RGB-T benchmarks: exports tracking results
- RGB-T benchmarks → Researcher: reports scores
