# kzhang2/aoneus architecture

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

## Overview

AONeuS reconstructs 3D surfaces by jointly fitting imaging-sonar and optical observations with neural rendering. The documented demo starts from paired sensor data and configurations, runs the fusion training entry point (which can initialize the NeuS optical runner), then produces mesh and view-synthesis results. The sampled code supports the model, renderer, and runner relationships shown; README capabilities fill in the documented result branches. Detailed data-to-runner wiring is not fully visible in the excerpts.

Main entry points: [`run_sdf.py`](https://github.com/kzhang2/aoneus/blob/main/run_sdf.py) (Fusion runner), [`NeuS/exp_runner.py`](https://github.com/kzhang2/aoneus/blob/main/NeuS/exp_runner.py) (NeuS runner), [`models/fields.py`](https://github.com/kzhang2/aoneus/blob/main/models/fields.py) (Fusion fields), [`models/renderer.py`](https://github.com/kzhang2/aoneus/blob/main/models/renderer.py) (Sonar renderer)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["Run and configure"]
  node_fusion_runner["Fusion runner<br/>[run_sdf.py]"]
  node_sonar_config["Sonar config"]
  node_optical_config["Optical config"]
  node_optical_runner["NeuS runner<br/>[exp_runner.py]"]
end

subgraph group_sensors["Sensor inputs"]
  node_sonar_data["Sonar observations"]
  node_rgb_data["RGB observations"]
  node_sonar_loader["Sonar data loader<br/>[load_data.py]"]
  node_optical_dataset["Optical dataset<br/>[dataset.py]"]
end

subgraph group_models["Neural representations"]
  node_fusion_fields["Fusion fields<br/>[fields.py]"]
  node_optical_fields["NeuS fields<br/>[fields.py]"]
  node_fusion_embedder["Position encoding<br/>[embedder.py]"]
end

subgraph group_render["Rendering and results"]
  node_sonar_renderer["Sonar renderer<br/>[renderer.py]"]
  node_optical_renderer["Optical renderer<br/>[renderer.py]"]
  node_mesh["Surface mesh<br/>[renderer.py]"]
  node_views["Synthesized views<br/>[renderer.py]"]
end

node_user(("Researcher"))
node_wandb(("Weights &amp; Biases"))

node_user -->|"starts demo"| node_fusion_runner
node_sonar_config -->|"configures"| node_fusion_runner
node_optical_config -->|"configures"| node_fusion_runner
node_sonar_data -->|"reads"| node_sonar_loader
node_rgb_data -->|"loads"| node_optical_dataset
node_fusion_runner -->|"initializes"| node_optical_runner
node_fusion_runner -->|"trains"| node_fusion_fields
node_optical_runner -->|"constructs"| node_optical_fields
node_fusion_fields -->|"encodes inputs"| node_fusion_embedder
node_fusion_runner -->|"renders sonar"| node_sonar_renderer
node_optical_runner -->|"uses"| node_optical_renderer
node_sonar_renderer -->|"queries fields"| node_fusion_fields
node_optical_renderer -->|"queries fields"| node_optical_fields
node_fusion_runner -->|"exports mesh"| node_mesh
node_optical_runner -->|"renders views"| node_views
node_fusion_runner -.->|"logs metrics"| node_wandb

click node_fusion_runner "https://github.com/kzhang2/aoneus/blob/main/run_sdf.py"
click node_sonar_config "https://github.com/kzhang2/aoneus/blob/main/confs/turtle_reduced_baseline_0.6x_joint_sonar.conf"
click node_optical_config "https://github.com/kzhang2/aoneus/blob/main/confs/turtle_reduced_baseline_0.6x_joint_rgb.conf"
click node_sonar_data "https://github.com/kzhang2/aoneus/tree/main/data/reduced_baseline_0.6x_sonar"
click node_rgb_data "https://github.com/kzhang2/aoneus/tree/main/data/reduced_baseline_0.6x_rgb"
click node_sonar_loader "https://github.com/kzhang2/aoneus/blob/main/load_data.py"
click node_optical_dataset "https://github.com/kzhang2/aoneus/blob/main/NeuS/models/dataset.py"
click node_fusion_fields "https://github.com/kzhang2/aoneus/blob/main/models/fields.py"
click node_optical_fields "https://github.com/kzhang2/aoneus/blob/main/NeuS/models/fields.py"
click node_fusion_embedder "https://github.com/kzhang2/aoneus/blob/main/models/embedder.py"
click node_sonar_renderer "https://github.com/kzhang2/aoneus/blob/main/models/renderer.py"
click node_optical_renderer "https://github.com/kzhang2/aoneus/blob/main/NeuS/models/renderer.py"
click node_optical_runner "https://github.com/kzhang2/aoneus/blob/main/NeuS/exp_runner.py"
click node_mesh "https://github.com/kzhang2/aoneus/blob/main/models/renderer.py"
click node_views "https://github.com/kzhang2/aoneus/blob/main/NeuS/models/renderer.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_fusion_runner,node_sonar_config,node_optical_config,node_optical_runner toneBlue
class node_sonar_data,node_rgb_data,node_sonar_loader,node_optical_dataset toneAmber
class node_fusion_fields,node_optical_fields,node_fusion_embedder toneMint
class node_sonar_renderer,node_optical_renderer,node_mesh,node_views toneRose
class node_user,node_wandb toneIndigo
```

## Components

### Run and configure

- [Fusion runner](https://github.com/kzhang2/aoneus/blob/main/run_sdf.py): `run_sdf.py`
- [Sonar config](https://github.com/kzhang2/aoneus/blob/main/confs/turtle_reduced_baseline_0.6x_joint_sonar.conf): `confs/turtle_reduced_baseline_0.6x_joint_sonar.conf`
- [Optical config](https://github.com/kzhang2/aoneus/blob/main/confs/turtle_reduced_baseline_0.6x_joint_rgb.conf): `confs/turtle_reduced_baseline_0.6x_joint_rgb.conf`
- [NeuS runner](https://github.com/kzhang2/aoneus/blob/main/NeuS/exp_runner.py): `NeuS/exp_runner.py`

### Sensor inputs

- [Sonar observations](https://github.com/kzhang2/aoneus/tree/main/data/reduced_baseline_0.6x_sonar): `data/reduced_baseline_0.6x_sonar`
- [RGB observations](https://github.com/kzhang2/aoneus/tree/main/data/reduced_baseline_0.6x_rgb): `data/reduced_baseline_0.6x_rgb`
- [Sonar data loader](https://github.com/kzhang2/aoneus/blob/main/load_data.py): `load_data.py`
- [Optical dataset](https://github.com/kzhang2/aoneus/blob/main/NeuS/models/dataset.py): `NeuS/models/dataset.py`

### Neural representations

- [Fusion fields](https://github.com/kzhang2/aoneus/blob/main/models/fields.py): `models/fields.py`
- [NeuS fields](https://github.com/kzhang2/aoneus/blob/main/NeuS/models/fields.py): `NeuS/models/fields.py`
- [Position encoding](https://github.com/kzhang2/aoneus/blob/main/models/embedder.py): `models/embedder.py`

### Rendering and results

- [Sonar renderer](https://github.com/kzhang2/aoneus/blob/main/models/renderer.py): `models/renderer.py`
- [Optical renderer](https://github.com/kzhang2/aoneus/blob/main/NeuS/models/renderer.py): `NeuS/models/renderer.py`
- [Surface mesh](https://github.com/kzhang2/aoneus/blob/main/models/renderer.py): `models/renderer.py`
- [Synthesized views](https://github.com/kzhang2/aoneus/blob/main/NeuS/models/renderer.py): `NeuS/models/renderer.py`

### Other components

- **Researcher**
- **Weights & Biases**

## Connections

- Researcher → Fusion runner: starts demo
- Sonar config → Fusion runner: configures
- Optical config → Fusion runner: configures
- Sonar observations → Sonar data loader: reads
- RGB observations → Optical dataset: loads
- Fusion runner → NeuS runner: initializes
- Fusion runner → Fusion fields: trains
- NeuS runner → NeuS fields: constructs
- Fusion fields → Position encoding: encodes inputs
- Fusion runner → Sonar renderer: renders sonar
- NeuS runner → Optical renderer: uses
- Sonar renderer → Fusion fields: queries fields
- Optical renderer → NeuS fields: queries fields
- Fusion runner → Surface mesh: exports mesh
- NeuS runner → Synthesized views: renders views
- Fusion runner → Weights & Biases: logs metrics
