# junyuandeng/nerf-loam architecture

> Architecture diagram of the GitHub repository junyuandeng/nerf-loam, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-11). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/junyuandeng/nerf-loam
- Repository: https://github.com/junyuandeng/nerf-loam

## Overview

NeRF-LOAM incrementally estimates LiDAR poses while building a neural SDF map, then reconstructs a mesh. The documented run starts with a dataset-specific YAML config and `demo/run.py`; dataset loading, tracking, keyframe mapping, and mesh extraction are distinct stages. The source index supports the core tracking/mapping dependencies and utility calls shown below. `demo/run.py` and some runtime wiring were not excerpted, so those links are documented or marked unverified rather than inferred from folder names.

Main entry points: [`src/mapping.py`](https://github.com/junyuandeng/nerf-loam/blob/master/src/mapping.py) (Keyframe Mapping), [`src/tracking.py`](https://github.com/junyuandeng/nerf-loam/blob/master/src/tracking.py) (Neural Tracking), [`src/nerfloam.py`](https://github.com/junyuandeng/nerf-loam/blob/master/src/nerfloam.py) (Pipeline Controller), [`src/variations/render_helpers.py`](https://github.com/junyuandeng/nerf-loam/blob/master/src/variations/render_helpers.py) (Ray Rendering)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_input["Inputs"]
  node_configs["Dataset Configs"]
  node_runner["Demo Runner<br/>[run.py]"]
  node_dataset_factory["Dataset Factory<br/>[import_util.py]"]
  node_kitti["KITTI Loader<br/>[kitti.py]"]
  node_maicity["MaiCity Loader<br/>[maicity.py]"]
  node_ncd["NCD Loader<br/>[ncd.py]"]
end

subgraph group_odometry["Odometry"]
  node_frame["LiDAR Frame<br/>[lidarFrame.py]"]
  node_pose["Pose Model<br/>[se3pose.py]"]
  node_tracking["Neural Tracking<br/>[tracking.py]"]
end

subgraph group_mapping["Neural Mapping"]
  node_loss["SDF Criterion<br/>[criterion.py]"]
  node_renderer["Ray Rendering<br/>[render_helpers.py]"]
  node_voxel["Voxel Operations<br/>[voxel_helpers.py]"]
  node_decoder["SDF Decoder<br/>[lidar.py]"]
  node_mapping_core["Keyframe Mapping<br/>[mapping.py]"]
end

subgraph group_output["Results"]
  node_mesh["Mesh Extraction<br/>[mesh_util.py]"]
  node_logger["Run Logger<br/>[loggers.py]"]
  node_orchestrator["Pipeline Controller<br/>[nerfloam.py]"]
  node_shared["Shared State<br/>[share.py]"]
  node_profiler["Profiler<br/>[profile_util.py]"]
end

node_operator(("Operator"))

node_operator -->|"runs"| node_runner
node_operator -->|"selects"| node_configs
node_configs -->|"configures"| node_runner
node_runner -.->|"starts"| node_orchestrator
node_orchestrator -->|"starts"| node_tracking
node_orchestrator -->|"starts"| node_mapping_core
node_orchestrator -->|"creates"| node_logger
node_orchestrator -->|"shares state"| node_shared
node_dataset_factory -->|"loads dynamically"| node_kitti
node_dataset_factory -->|"loads dynamically"| node_maicity
node_dataset_factory -->|"loads dynamically"| node_ncd
node_tracking -->|"creates frames"| node_frame
node_frame -->|"uses"| node_pose
node_tracking -->|"tracks with"| node_renderer
node_tracking -->|"computes loss"| node_loss
node_tracking -->|"optimizes"| node_pose
node_mapping_core -->|"optimizes with"| node_loss
node_mapping_core -->|"maps with"| node_renderer
node_mapping_core -->|"creates dynamically"| node_decoder
node_renderer -->|"intersects and samples"| node_voxel
node_mapping_core -->|"extracts mesh"| node_mesh
node_mesh -->|"evaluates field"| node_renderer
node_mapping_core -.->|"saves results"| node_logger
node_tracking -->|"profiles"| node_profiler
node_mapping_core -->|"profiles"| node_profiler

click node_configs "https://github.com/junyuandeng/nerf-loam/tree/master/configs"
click node_runner "https://github.com/junyuandeng/nerf-loam/blob/master/demo/run.py"
click node_dataset_factory "https://github.com/junyuandeng/nerf-loam/blob/master/src/utils/import_util.py"
click node_kitti "https://github.com/junyuandeng/nerf-loam/blob/master/src/dataset/kitti.py"
click node_maicity "https://github.com/junyuandeng/nerf-loam/blob/master/src/dataset/maicity.py"
click node_ncd "https://github.com/junyuandeng/nerf-loam/blob/master/src/dataset/ncd.py"
click node_frame "https://github.com/junyuandeng/nerf-loam/blob/master/src/lidarFrame.py"
click node_pose "https://github.com/junyuandeng/nerf-loam/blob/master/src/se3pose.py"
click node_tracking "https://github.com/junyuandeng/nerf-loam/blob/master/src/tracking.py"
click node_loss "https://github.com/junyuandeng/nerf-loam/blob/master/src/criterion.py"
click node_renderer "https://github.com/junyuandeng/nerf-loam/blob/master/src/variations/render_helpers.py"
click node_voxel "https://github.com/junyuandeng/nerf-loam/blob/master/src/variations/voxel_helpers.py"
click node_decoder "https://github.com/junyuandeng/nerf-loam/blob/master/src/variations/lidar.py"
click node_mapping_core "https://github.com/junyuandeng/nerf-loam/blob/master/src/mapping.py"
click node_mesh "https://github.com/junyuandeng/nerf-loam/blob/master/src/utils/mesh_util.py"
click node_logger "https://github.com/junyuandeng/nerf-loam/blob/master/src/loggers.py"
click node_orchestrator "https://github.com/junyuandeng/nerf-loam/blob/master/src/nerfloam.py"
click node_shared "https://github.com/junyuandeng/nerf-loam/blob/master/src/share.py"
click node_profiler "https://github.com/junyuandeng/nerf-loam/blob/master/src/utils/profile_util.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_configs,node_runner,node_dataset_factory,node_kitti,node_maicity,node_ncd toneBlue
class node_frame,node_pose,node_tracking toneAmber
class node_loss,node_renderer,node_voxel,node_decoder,node_mapping_core toneMint
class node_mesh,node_logger,node_orchestrator,node_shared,node_profiler toneRose
class node_operator toneIndigo
```

## Components

### Inputs

- [Dataset Configs](https://github.com/junyuandeng/nerf-loam/tree/master/configs): `configs`
- [Demo Runner](https://github.com/junyuandeng/nerf-loam/blob/master/demo/run.py): `demo/run.py`
- [Dataset Factory](https://github.com/junyuandeng/nerf-loam/blob/master/src/utils/import_util.py): `src/utils/import_util.py`
- [KITTI Loader](https://github.com/junyuandeng/nerf-loam/blob/master/src/dataset/kitti.py): `src/dataset/kitti.py`
- [MaiCity Loader](https://github.com/junyuandeng/nerf-loam/blob/master/src/dataset/maicity.py): `src/dataset/maicity.py`
- [NCD Loader](https://github.com/junyuandeng/nerf-loam/blob/master/src/dataset/ncd.py): `src/dataset/ncd.py`

### Odometry

- [LiDAR Frame](https://github.com/junyuandeng/nerf-loam/blob/master/src/lidarFrame.py): `src/lidarFrame.py`
- [Pose Model](https://github.com/junyuandeng/nerf-loam/blob/master/src/se3pose.py): `src/se3pose.py`
- [Neural Tracking](https://github.com/junyuandeng/nerf-loam/blob/master/src/tracking.py): `src/tracking.py`

### Neural Mapping

- [SDF Criterion](https://github.com/junyuandeng/nerf-loam/blob/master/src/criterion.py): `src/criterion.py`
- [Ray Rendering](https://github.com/junyuandeng/nerf-loam/blob/master/src/variations/render_helpers.py): `src/variations/render_helpers.py`
- [Voxel Operations](https://github.com/junyuandeng/nerf-loam/blob/master/src/variations/voxel_helpers.py): `src/variations/voxel_helpers.py`
- [SDF Decoder](https://github.com/junyuandeng/nerf-loam/blob/master/src/variations/lidar.py): `src/variations/lidar.py`
- [Keyframe Mapping](https://github.com/junyuandeng/nerf-loam/blob/master/src/mapping.py): `src/mapping.py`

### Results

- [Mesh Extraction](https://github.com/junyuandeng/nerf-loam/blob/master/src/utils/mesh_util.py): `src/utils/mesh_util.py`
- [Run Logger](https://github.com/junyuandeng/nerf-loam/blob/master/src/loggers.py): `src/loggers.py`
- [Pipeline Controller](https://github.com/junyuandeng/nerf-loam/blob/master/src/nerfloam.py): `src/nerfloam.py`
- [Shared State](https://github.com/junyuandeng/nerf-loam/blob/master/src/share.py): `src/share.py`
- [Profiler](https://github.com/junyuandeng/nerf-loam/blob/master/src/utils/profile_util.py): `src/utils/profile_util.py`

### Other components

- **Operator**

## Connections

- Operator → Demo Runner: runs (evidence: `Readme.md`)
- Operator → Dataset Configs: selects (evidence: `Readme.md`)
- Dataset Configs → Demo Runner: configures (evidence: `Readme.md`)
- Demo Runner → Pipeline Controller: starts
- Pipeline Controller → Neural Tracking: starts (evidence: `src/nerfloam.py`)
- Pipeline Controller → Keyframe Mapping: starts (evidence: `src/nerfloam.py`)
- Pipeline Controller → Run Logger: creates (evidence: `src/nerfloam.py`)
- Pipeline Controller → Shared State: shares state (evidence: `src/nerfloam.py`)
- Dataset Factory → KITTI Loader: loads dynamically (evidence: `src/utils/import_util.py`)
- Dataset Factory → MaiCity Loader: loads dynamically (evidence: `src/utils/import_util.py`)
- Dataset Factory → NCD Loader: loads dynamically (evidence: `src/utils/import_util.py`)
- Neural Tracking → LiDAR Frame: creates frames (evidence: `src/tracking.py`)
- LiDAR Frame → Pose Model: uses (evidence: `src/lidarFrame.py`)
- Neural Tracking → Ray Rendering: tracks with (evidence: `src/tracking.py`)
- Neural Tracking → SDF Criterion: computes loss (evidence: `src/tracking.py`)
- Neural Tracking → Pose Model: optimizes (evidence: `src/tracking.py`)
- Keyframe Mapping → SDF Criterion: optimizes with (evidence: `src/mapping.py`)
- Keyframe Mapping → Ray Rendering: maps with (evidence: `src/mapping.py`)
- Keyframe Mapping → SDF Decoder: creates dynamically
- Ray Rendering → Voxel Operations: intersects and samples (evidence: `src/variations/render_helpers.py`)
- Keyframe Mapping → Mesh Extraction: extracts mesh (evidence: `src/mapping.py`)
- Mesh Extraction → Ray Rendering: evaluates field (evidence: `src/utils/mesh_util.py`)
- Keyframe Mapping → Run Logger: saves results (evidence: `src/mapping.py`)
- Neural Tracking → Profiler: profiles (evidence: `src/tracking.py`)
- Keyframe Mapping → Profiler: profiles (evidence: `src/mapping.py`)
