# vico-uoe/oddoneoutad architecture

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

- Interactive diagram: https://gitdiagram.com/vico-uoe/oddoneoutad
- Repository: https://github.com/vico-uoe/oddoneoutad

## Overview

Odd-One-Out is a multi-view 3D scene reconstruction and anomaly-detection system. Its documented workflow loads scene images and camera data, learns a feature volume and object correspondences in Stage 1, then trains or evaluates anomaly classification in Stage 2; demo inference also exposes reconstruction and classification outputs. The model’s encoder, volume decoder, matching transformer and volume renderers form the main internal layer. The README also documents scene visualizations and a browser-based data viewer. Some stage details and evaluation wiring are documented but their source was not sampled, so those links cite the README.

Main entry points: [`models/model.py`](https://github.com/vico-uoe/oddoneoutad/blob/main/models/model.py) (Odd-One-Out model), [`train.py`](https://github.com/vico-uoe/oddoneoutad/blob/main/train.py) (Training runner), [`demo.py`](https://github.com/vico-uoe/oddoneoutad/blob/main/demo.py) (Inference demo), [`utils/misc.py`](https://github.com/vico-uoe/oddoneoutad/blob/main/utils/misc.py) (Object and box analysis)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_workflow["Data and workflows"]
  node_scene_data["Scene dataset<br/>[dataset_e2e.py]"]
  node_configs["Model configs"]
  node_training["Training runner<br/>[train.py]"]
  node_stage1["3D correspondence<br/>[train.py]"]
  node_stage2["Anomaly training<br/>[train.py]"]
  node_evaluation["Model evaluation<br/>[test.py]"]
end

subgraph group_network["3D learning network"]
  node_model["Odd-One-Out model<br/>[model.py]"]
  node_encoder["2D feature encoder<br/>[encoder.py]"]
  node_decoder["3D volume decoder<br/>[decoder.py]"]
  node_layers["3D network layers<br/>[layers.py]"]
  node_matching["Feature matching<br/>[xformer.py]"]
  node_rendering["Volume render losses<br/>[render.py]"]
end

subgraph group_analysis["Scene analysis"]
  node_scene_analysis["Object and box analysis<br/>[misc.py]"]
  node_feature_pca["Feature visualization<br/>[pca.py]"]
end

subgraph group_presentation["Inference and visualization"]
  node_demo["Inference demo<br/>[demo.py]"]
  node_visualization["Scene data viewer<br/>[visualize_data.py]"]
  node_viewer_helpers["Viewer helpers<br/>[visualize_data.py]"]
end

node_user(("Researcher"))

node_user -->|"starts training"| node_training
node_user -->|"runs evaluation"| node_evaluation
node_user -->|"runs inference"| node_demo
node_user -->|"opens viewer"| node_visualization
node_training -->|"loads batches"| node_scene_data
node_training -->|"trains"| node_model
node_training -->|"reads config"| node_configs
node_training -->|"runs stage"| node_stage1
node_training -->|"runs stage"| node_stage2
node_stage1 -->|"provides checkpoint"| node_stage2
node_evaluation -->|"evaluates"| node_model
node_demo -->|"builds and calls"| node_model
node_model -->|"uses"| node_encoder
node_model -->|"uses"| node_decoder
node_model -->|"uses"| node_matching
node_model -->|"uses"| node_rendering
node_decoder -->|"uses"| node_layers
node_scene_data -->|"imports helpers"| node_scene_analysis
node_model -->|"uses"| node_scene_analysis
node_model -->|"uses"| node_feature_pca
node_demo -->|"produces scene analysis"| node_scene_analysis
node_demo -->|"visualizes features"| node_feature_pca
node_visualization -.->|"uses helpers"| node_viewer_helpers

click node_scene_data "https://github.com/vico-uoe/oddoneoutad/blob/main/data/dataset_e2e.py"
click node_configs "https://github.com/vico-uoe/oddoneoutad/tree/main/configs"
click node_training "https://github.com/vico-uoe/oddoneoutad/blob/main/train.py"
click node_stage1 "https://github.com/vico-uoe/oddoneoutad/blob/main/train.py"
click node_stage2 "https://github.com/vico-uoe/oddoneoutad/blob/main/train.py"
click node_evaluation "https://github.com/vico-uoe/oddoneoutad/blob/main/test.py"
click node_model "https://github.com/vico-uoe/oddoneoutad/blob/main/models/model.py"
click node_encoder "https://github.com/vico-uoe/oddoneoutad/blob/main/models/encoder.py"
click node_decoder "https://github.com/vico-uoe/oddoneoutad/blob/main/models/decoder.py"
click node_layers "https://github.com/vico-uoe/oddoneoutad/blob/main/models/layers.py"
click node_matching "https://github.com/vico-uoe/oddoneoutad/blob/main/models/xformer.py"
click node_rendering "https://github.com/vico-uoe/oddoneoutad/blob/main/models/render.py"
click node_scene_analysis "https://github.com/vico-uoe/oddoneoutad/blob/main/utils/misc.py"
click node_feature_pca "https://github.com/vico-uoe/oddoneoutad/blob/main/utils/pca.py"
click node_demo "https://github.com/vico-uoe/oddoneoutad/blob/main/demo.py"
click node_visualization "https://github.com/vico-uoe/oddoneoutad/blob/main/visualize_data.py"
click node_viewer_helpers "https://github.com/vico-uoe/oddoneoutad/blob/main/utils/visualize_data.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_scene_data,node_configs,node_training,node_stage1,node_stage2,node_evaluation toneBlue
class node_model,node_encoder,node_decoder,node_layers,node_matching,node_rendering toneAmber
class node_scene_analysis,node_feature_pca toneMint
class node_demo,node_visualization,node_viewer_helpers toneRose
class node_user toneIndigo
```

## Components

### Data and workflows

- [Scene dataset](https://github.com/vico-uoe/oddoneoutad/blob/main/data/dataset_e2e.py): `data/dataset_e2e.py`
- [Model configs](https://github.com/vico-uoe/oddoneoutad/tree/main/configs): `configs`
- [Training runner](https://github.com/vico-uoe/oddoneoutad/blob/main/train.py): `train.py`
- [3D correspondence](https://github.com/vico-uoe/oddoneoutad/blob/main/train.py): `train.py`
- [Anomaly training](https://github.com/vico-uoe/oddoneoutad/blob/main/train.py): `train.py`
- [Model evaluation](https://github.com/vico-uoe/oddoneoutad/blob/main/test.py): `test.py`

### 3D learning network

- [Odd-One-Out model](https://github.com/vico-uoe/oddoneoutad/blob/main/models/model.py): `models/model.py`
- [2D feature encoder](https://github.com/vico-uoe/oddoneoutad/blob/main/models/encoder.py): `models/encoder.py`
- [3D volume decoder](https://github.com/vico-uoe/oddoneoutad/blob/main/models/decoder.py): `models/decoder.py`
- [3D network layers](https://github.com/vico-uoe/oddoneoutad/blob/main/models/layers.py): `models/layers.py`
- [Feature matching](https://github.com/vico-uoe/oddoneoutad/blob/main/models/xformer.py): `models/xformer.py`
- [Volume render losses](https://github.com/vico-uoe/oddoneoutad/blob/main/models/render.py): `models/render.py`

### Scene analysis

- [Object and box analysis](https://github.com/vico-uoe/oddoneoutad/blob/main/utils/misc.py): `utils/misc.py`
- [Feature visualization](https://github.com/vico-uoe/oddoneoutad/blob/main/utils/pca.py): `utils/pca.py`

### Inference and visualization

- [Inference demo](https://github.com/vico-uoe/oddoneoutad/blob/main/demo.py): `demo.py`
- [Scene data viewer](https://github.com/vico-uoe/oddoneoutad/blob/main/visualize_data.py): `visualize_data.py`
- [Viewer helpers](https://github.com/vico-uoe/oddoneoutad/blob/main/utils/visualize_data.py): `utils/visualize_data.py`

### Other components

- **Researcher**

## Connections

- Researcher → Training runner: starts training (evidence: `README.md`)
- Researcher → Model evaluation: runs evaluation (evidence: `README.md`)
- Researcher → Inference demo: runs inference (evidence: `README.md`)
- Researcher → Scene data viewer: opens viewer (evidence: `README.md`)
- Training runner → Scene dataset: loads batches (evidence: `train.py`)
- Training runner → Odd-One-Out model: trains (evidence: `train.py`)
- Training runner → Model configs: reads config (evidence: `README.md`)
- Training runner → 3D correspondence: runs stage (evidence: `README.md`)
- Training runner → Anomaly training: runs stage (evidence: `README.md`)
- 3D correspondence → Anomaly training: provides checkpoint (evidence: `README.md`)
- Model evaluation → Odd-One-Out model: evaluates (evidence: `README.md`)
- Inference demo → Odd-One-Out model: builds and calls (evidence: `README.md`)
- Odd-One-Out model → 2D feature encoder: uses (evidence: `models/model.py`)
- Odd-One-Out model → 3D volume decoder: uses (evidence: `models/model.py`)
- Odd-One-Out model → Feature matching: uses (evidence: `models/model.py`)
- Odd-One-Out model → Volume render losses: uses (evidence: `models/model.py`)
- 3D volume decoder → 3D network layers: uses (evidence: `models/decoder.py`)
- Scene dataset → Object and box analysis: imports helpers (evidence: `data/dataset_e2e.py`)
- Odd-One-Out model → Object and box analysis: uses (evidence: `models/model.py`)
- Odd-One-Out model → Feature visualization: uses (evidence: `models/model.py`)
- Inference demo → Object and box analysis: produces scene analysis (evidence: `README.md`)
- Inference demo → Feature visualization: visualizes features (evidence: `README.md`)
- Scene data viewer → Viewer helpers: uses helpers
