# one-ear/ucdlcode architecture

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

- Interactive diagram: https://gitdiagram.com/one-ear/ucdlcode
- Repository: https://github.com/one-ear/ucdlcode

## Overview

This repository implements a research workflow for classifying gait-related movement and affect from skeleton sequences. The principal path is to load paired pose/movement features and labels, prepare batches, classify them with a graph-temporal neural network, and train/evaluate the model. The excerpts support the feeder, graph, model, and training entry point; wiring for some configured features is inferred only where the entry-point/config names make it explicit.

Main entry points: [`main_diff_combine_double_fagg.py`](https://github.com/one-ear/ucdlcode/blob/master/main_diff_combine_double_fagg.py) (Train and evaluate), [`model/agcn_diff_combine_score_fagg.py`](https://github.com/one-ear/ucdlcode/blob/master/model/agcn_diff_combine_score_fagg.py) (FAGG classifier), [`feeders/feeder_same_combine.py`](https://github.com/one-ear/ucdlcode/blob/master/feeders/feeder_same_combine.py) (Paired data feeder), [`config/EGait_journal/train_diff_combine_double_score_fagg.yaml`](https://github.com/one-ear/ucdlcode/blob/master/config/EGait_journal/train_diff_combine_double_score_fagg.yaml) (Run configuration)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_workflow["Training workflow"]
  node_run_config["Run configuration"]
  node_trainer["Train and evaluate"]
  node_optimizer["Optimization loop"]
end

subgraph group_data["Sequence data"]
  node_input_data["Skeleton data"]
  node_feeder["Paired data feeder"]
  node_augment["Sequence transforms<br/>[tools.py]"]
end

subgraph group_network["Graph model"]
  node_topology["EGait topology<br/>[EGait.py]"]
  node_graph_tools["Adjacency builder<br/>[tools.py]"]
  node_classifier["FAGG classifier"]
  node_loss["Training losses<br/>[loss.py]"]
end

subgraph group_results["Training results"]
  node_checkpoint[("Model checkpoint<br/>[best_acc.pt]")]
  node_run_logs["Run logs<br/>[log.txt]"]
  node_tensorboard["Training summaries"]
  node_predictions["Class and affect scores"]
end

node_researcher(("Researcher"))

node_researcher -->|"starts run"| node_trainer
node_researcher -->|"sets parameters"| node_run_config
node_run_config -->|"configures"| node_trainer
node_input_data -->|"loads samples"| node_feeder
node_trainer -->|"creates batches"| node_feeder
node_feeder -->|"transforms sequences"| node_augment
node_trainer -->|"runs model"| node_classifier
node_classifier -->|"loads graph"| node_topology
node_topology -->|"builds adjacency"| node_graph_tools
node_trainer -->|"computes objective"| node_loss
node_trainer -->|"updates weights"| node_optimizer
node_optimizer -->|"updates parameters"| node_classifier
node_trainer -->|"saves weights"| node_checkpoint
node_trainer -->|"writes logs"| node_run_logs
node_trainer -->|"writes summaries"| node_tensorboard
node_classifier -->|"returns scores"| node_predictions

click node_run_config "https://github.com/one-ear/ucdlcode/blob/master/config/EGait_journal/train_diff_combine_double_score_fagg.yaml"
click node_trainer "https://github.com/one-ear/ucdlcode/blob/master/main_diff_combine_double_fagg.py"
click node_feeder "https://github.com/one-ear/ucdlcode/blob/master/feeders/feeder_same_combine.py"
click node_augment "https://github.com/one-ear/ucdlcode/blob/master/feeders/tools.py"
click node_topology "https://github.com/one-ear/ucdlcode/blob/master/graph/EGait.py"
click node_graph_tools "https://github.com/one-ear/ucdlcode/blob/master/graph/tools.py"
click node_classifier "https://github.com/one-ear/ucdlcode/blob/master/model/agcn_diff_combine_score_fagg.py"
click node_loss "https://github.com/one-ear/ucdlcode/blob/master/model/loss.py"
click node_optimizer "https://github.com/one-ear/ucdlcode/blob/master/main_diff_combine_double_fagg.py"
click node_checkpoint "https://github.com/one-ear/ucdlcode/blob/master/output_pAST/egait_runs/runs_diff_combine_fagg/fagg_att_cascade_st/best_acc.pt"
click node_run_logs "https://github.com/one-ear/ucdlcode/blob/master/output_pAST/egait_runs/work_diff_combine_fagg/fagg_att_cascade_st/log.txt"
click node_tensorboard "https://github.com/one-ear/ucdlcode/tree/master/output_pAST/egait_runs/runs_diff_combine_fagg/fagg_att_cascade_st/train"

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_run_config,node_trainer,node_optimizer toneBlue
class node_input_data,node_feeder,node_augment toneAmber
class node_topology,node_graph_tools,node_classifier,node_loss toneMint
class node_checkpoint,node_run_logs,node_tensorboard,node_predictions toneRose
class node_researcher toneIndigo
```

## Components

### Training workflow

- [Run configuration](https://github.com/one-ear/ucdlcode/blob/master/config/EGait_journal/train_diff_combine_double_score_fagg.yaml): `config/EGait_journal/train_diff_combine_double_score_fagg.yaml`
- [Train and evaluate](https://github.com/one-ear/ucdlcode/blob/master/main_diff_combine_double_fagg.py): `main_diff_combine_double_fagg.py`
- [Optimization loop](https://github.com/one-ear/ucdlcode/blob/master/main_diff_combine_double_fagg.py): `main_diff_combine_double_fagg.py`

### Sequence data

- **Skeleton data**
- [Paired data feeder](https://github.com/one-ear/ucdlcode/blob/master/feeders/feeder_same_combine.py): `feeders/feeder_same_combine.py`
- [Sequence transforms](https://github.com/one-ear/ucdlcode/blob/master/feeders/tools.py): `feeders/tools.py`

### Graph model

- [EGait topology](https://github.com/one-ear/ucdlcode/blob/master/graph/EGait.py): `graph/EGait.py`
- [Adjacency builder](https://github.com/one-ear/ucdlcode/blob/master/graph/tools.py): `graph/tools.py`
- [FAGG classifier](https://github.com/one-ear/ucdlcode/blob/master/model/agcn_diff_combine_score_fagg.py): `model/agcn_diff_combine_score_fagg.py`
- [Training losses](https://github.com/one-ear/ucdlcode/blob/master/model/loss.py): `model/loss.py`

### Training results

- [Model checkpoint](https://github.com/one-ear/ucdlcode/blob/master/output_pAST/egait_runs/runs_diff_combine_fagg/fagg_att_cascade_st/best_acc.pt): `output_pAST/egait_runs/runs_diff_combine_fagg/fagg_att_cascade_st/best_acc.pt`
- [Run logs](https://github.com/one-ear/ucdlcode/blob/master/output_pAST/egait_runs/work_diff_combine_fagg/fagg_att_cascade_st/log.txt): `output_pAST/egait_runs/work_diff_combine_fagg/fagg_att_cascade_st/log.txt`
- [Training summaries](https://github.com/one-ear/ucdlcode/tree/master/output_pAST/egait_runs/runs_diff_combine_fagg/fagg_att_cascade_st/train): `output_pAST/egait_runs/runs_diff_combine_fagg/fagg_att_cascade_st/train`
- **Class and affect scores**

### Other components

- **Researcher**

## Connections

- Researcher → Train and evaluate: starts run
- Researcher → Run configuration: sets parameters
- Run configuration → Train and evaluate: configures
- Skeleton data → Paired data feeder: loads samples
- Train and evaluate → Paired data feeder: creates batches
- Paired data feeder → Sequence transforms: transforms sequences
- Train and evaluate → FAGG classifier: runs model
- FAGG classifier → EGait topology: loads graph
- EGait topology → Adjacency builder: builds adjacency
- Train and evaluate → Training losses: computes objective
- Train and evaluate → Optimization loop: updates weights
- Optimization loop → FAGG classifier: updates parameters
- Train and evaluate → Model checkpoint: saves weights
- Train and evaluate → Run logs: writes logs
- Train and evaluate → Training summaries: writes summaries
- FAGG classifier → Class and affect scores: returns scores
