# mr-homeless/waldo architecture

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

- Interactive diagram: https://gitdiagram.com/mr-homeless/waldo
- Repository: https://github.com/mr-homeless/waldo

## Overview

Waldo is a local CS2 gameplay cheat-detection application. Its primary workflow takes uploaded footage, extracts killshot clips, trains or fine-tunes a user-labeled model, analyzes selected clips, and presents persistent scores and frame-level evidence for review and export. The graph combines README-described product capabilities with sampled Flask, dataset, engine, and model code; unsampled route wiring and storage details are represented conservatively.

Main entry points: [`main.py`](https://github.com/mr-homeless/waldo/blob/main/main.py) (Web application), [`deepcheat/VideoMAEv2/train_cheater_pred.py`](https://github.com/mr-homeless/waldo/blob/main/deepcheat/VideoMAEv2/train_cheater_pred.py) (Training entrypoints), [`deepcheat/VideoMAEv2/dataset/datasets.py`](https://github.com/mr-homeless/waldo/blob/main/deepcheat/VideoMAEv2/dataset/datasets.py) (Labeled clips), [`deepcheat/utils/autoedit/autoedit_improved.py`](https://github.com/mr-homeless/waldo/blob/main/deepcheat/utils/autoedit/autoedit_improved.py) (Audio clipper)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["Application workflow"]
  node_web["Web application<br/>[main.py]"]
  node_results["Saved results<br/>[main.py]"]
end

subgraph group_processing["Footage processing"]
  node_audio_clipper["Audio clipper"]
  node_video_crop["Video cropping<br/>[new_crop.py]"]
  node_killshot["Killshot detection"]
  node_feature_extract["Feature extraction"]
end

subgraph group_learning["Model training"]
  node_labeled_clips["Labeled clips<br/>[datasets.py]"]
  node_dataset_build["Dataset assembly<br/>[build.py]"]
  node_pretrain_model["Masked video model"]
  node_pretrain_engine["Pretraining engine"]
  node_finetune_model["Classifier model"]
  node_finetune_engine["Fine-tuning engine"]
  node_train_entry["Training entrypoints"]
end

subgraph group_analysis["Clip analysis"]
  node_clip_dataset["Clip inference data<br/>[datasets.py]"]
  node_inference["Clip scoring<br/>[eval_mae.py]"]
  node_killshot_eval["Killshot evaluation"]
end

node_user(("Local user"))
node_video["Gameplay footage"]
node_model_files["Trained models"]

node_user -->|"uploads and selects"| node_web
node_web -->|"dispatches processing"| node_audio_clipper
node_audio_clipper -->|"reads audio/video"| node_video
node_audio_clipper -->|"extracts clips"| node_labeled_clips
node_web -->|"dispatches cropping"| node_video_crop
node_video_crop -->|"writes processed clips"| node_labeled_clips
node_web -->|"starts training"| node_train_entry
node_train_entry -->|"builds training data"| node_dataset_build
node_dataset_build -->|"loads labeled clips"| node_labeled_clips
node_train_entry -->|"runs pretraining"| node_pretrain_engine
node_pretrain_engine -->|"optimizes"| node_pretrain_model
node_train_entry -->|"runs fine-tuning"| node_finetune_engine
node_finetune_engine -->|"optimizes"| node_finetune_model
node_finetune_model -->|"saves checkpoints"| node_model_files
node_user -->|"requests analysis"| node_web
node_web -->|"dispatches killshot analysis"| node_killshot
node_killshot -->|"reads gameplay"| node_video
node_web -->|"selects clips"| node_clip_dataset
node_clip_dataset -->|"loads frames and labels"| node_labeled_clips
node_web -->|"dispatches scoring"| node_inference
node_inference -->|"reads clip batches"| node_clip_dataset
node_inference -->|"loads model"| node_finetune_model
node_web -->|"saves analysis"| node_results
node_user -->|"reviews and exports"| node_results

click node_web "https://github.com/mr-homeless/waldo/blob/main/main.py"
click node_results "https://github.com/mr-homeless/waldo/blob/main/main.py"
click node_audio_clipper "https://github.com/mr-homeless/waldo/blob/main/deepcheat/utils/autoedit/autoedit_improved.py"
click node_video_crop "https://github.com/mr-homeless/waldo/blob/main/deepcheat/utils/new_crop.py"
click node_killshot "https://github.com/mr-homeless/waldo/blob/main/deepcheat/VideoMAEv2/eval_killshot_pred.py"
click node_feature_extract "https://github.com/mr-homeless/waldo/blob/main/deepcheat/VideoMAEv2/extract_tad_feature.py"
click node_labeled_clips "https://github.com/mr-homeless/waldo/blob/main/deepcheat/VideoMAEv2/dataset/datasets.py"
click node_dataset_build "https://github.com/mr-homeless/waldo/blob/main/deepcheat/VideoMAEv2/dataset/build.py"
click node_pretrain_model "https://github.com/mr-homeless/waldo/blob/main/deepcheat/VideoMAEv2/models/modeling_pretrain.py"
click node_pretrain_engine "https://github.com/mr-homeless/waldo/blob/main/deepcheat/VideoMAEv2/engine_for_pretraining.py"
click node_finetune_model "https://github.com/mr-homeless/waldo/blob/main/deepcheat/VideoMAEv2/models/modeling_finetune.py"
click node_finetune_engine "https://github.com/mr-homeless/waldo/blob/main/deepcheat/VideoMAEv2/engine_for_finetuning.py"
click node_train_entry "https://github.com/mr-homeless/waldo/blob/main/deepcheat/VideoMAEv2/train_cheater_pred.py"
click node_clip_dataset "https://github.com/mr-homeless/waldo/blob/main/deepcheat/VideoMAEv2/dataset/datasets.py"
click node_inference "https://github.com/mr-homeless/waldo/blob/main/deepcheat/VideoMAEv2/eval_mae.py"
click node_killshot_eval "https://github.com/mr-homeless/waldo/blob/main/deepcheat/VideoMAEv2/eval_killshot_pred.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_web,node_results,node_user toneBlue
class node_audio_clipper,node_video_crop,node_killshot,node_feature_extract toneAmber
class node_labeled_clips,node_dataset_build,node_pretrain_model,node_pretrain_engine,node_finetune_model,node_finetune_engine,node_train_entry toneMint
class node_clip_dataset,node_inference,node_killshot_eval toneRose
class node_video,node_model_files toneIndigo
```

## Components

### Application workflow

- [Web application](https://github.com/mr-homeless/waldo/blob/main/main.py): `main.py`
- [Saved results](https://github.com/mr-homeless/waldo/blob/main/main.py): `main.py`

### Footage processing

- [Audio clipper](https://github.com/mr-homeless/waldo/blob/main/deepcheat/utils/autoedit/autoedit_improved.py): `deepcheat/utils/autoedit/autoedit_improved.py`
- [Video cropping](https://github.com/mr-homeless/waldo/blob/main/deepcheat/utils/new_crop.py): `deepcheat/utils/new_crop.py`
- [Killshot detection](https://github.com/mr-homeless/waldo/blob/main/deepcheat/VideoMAEv2/eval_killshot_pred.py): `deepcheat/VideoMAEv2/eval_killshot_pred.py`
- [Feature extraction](https://github.com/mr-homeless/waldo/blob/main/deepcheat/VideoMAEv2/extract_tad_feature.py): `deepcheat/VideoMAEv2/extract_tad_feature.py`

### Model training

- [Labeled clips](https://github.com/mr-homeless/waldo/blob/main/deepcheat/VideoMAEv2/dataset/datasets.py): `deepcheat/VideoMAEv2/dataset/datasets.py`
- [Dataset assembly](https://github.com/mr-homeless/waldo/blob/main/deepcheat/VideoMAEv2/dataset/build.py): `deepcheat/VideoMAEv2/dataset/build.py`
- [Masked video model](https://github.com/mr-homeless/waldo/blob/main/deepcheat/VideoMAEv2/models/modeling_pretrain.py): `deepcheat/VideoMAEv2/models/modeling_pretrain.py`
- [Pretraining engine](https://github.com/mr-homeless/waldo/blob/main/deepcheat/VideoMAEv2/engine_for_pretraining.py): `deepcheat/VideoMAEv2/engine_for_pretraining.py`
- [Classifier model](https://github.com/mr-homeless/waldo/blob/main/deepcheat/VideoMAEv2/models/modeling_finetune.py): `deepcheat/VideoMAEv2/models/modeling_finetune.py`
- [Fine-tuning engine](https://github.com/mr-homeless/waldo/blob/main/deepcheat/VideoMAEv2/engine_for_finetuning.py): `deepcheat/VideoMAEv2/engine_for_finetuning.py`
- [Training entrypoints](https://github.com/mr-homeless/waldo/blob/main/deepcheat/VideoMAEv2/train_cheater_pred.py): `deepcheat/VideoMAEv2/train_cheater_pred.py`

### Clip analysis

- [Clip inference data](https://github.com/mr-homeless/waldo/blob/main/deepcheat/VideoMAEv2/dataset/datasets.py): `deepcheat/VideoMAEv2/dataset/datasets.py`
- [Clip scoring](https://github.com/mr-homeless/waldo/blob/main/deepcheat/VideoMAEv2/eval_mae.py): `deepcheat/VideoMAEv2/eval_mae.py`
- [Killshot evaluation](https://github.com/mr-homeless/waldo/blob/main/deepcheat/VideoMAEv2/eval_killshot_pred.py): `deepcheat/VideoMAEv2/eval_killshot_pred.py`

### Other components

- **Local user**
- **Gameplay footage**
- **Trained models**

## Connections

- Local user → Web application: uploads and selects
- Web application → Audio clipper: dispatches processing
- Audio clipper → Gameplay footage: reads audio/video
- Audio clipper → Labeled clips: extracts clips
- Web application → Video cropping: dispatches cropping
- Video cropping → Labeled clips: writes processed clips
- Web application → Training entrypoints: starts training
- Training entrypoints → Dataset assembly: builds training data
- Dataset assembly → Labeled clips: loads labeled clips
- Training entrypoints → Pretraining engine: runs pretraining
- Pretraining engine → Masked video model: optimizes
- Training entrypoints → Fine-tuning engine: runs fine-tuning
- Fine-tuning engine → Classifier model: optimizes
- Classifier model → Trained models: saves checkpoints
- Local user → Web application: requests analysis
- Web application → Killshot detection: dispatches killshot analysis
- Killshot detection → Gameplay footage: reads gameplay
- Web application → Clip inference data: selects clips
- Clip inference data → Labeled clips: loads frames and labels
- Web application → Clip scoring: dispatches scoring
- Clip scoring → Clip inference data: reads clip batches
- Clip scoring → Classifier model: loads model
- Web application → Saved results: saves analysis
- Local user → Saved results: reviews and exports
