# jingyuangao0919/physir-splat architecture

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

- Interactive diagram: https://gitdiagram.com/jingyuangao0919/physir-splat
- Repository: https://github.com/jingyuangao0919/physir-splat

## Overview

PhysIR-Splat trains physically informed 3D Gaussian scenes from thermal or RGB-plus-thermal views, then renders and evaluates novel views. Its documented physical rendering models include passband Planck radiance, environmental reflection, atmospheric transmittance, and radiometric response. Training and the renderer are visible in the tree, but excerpts do not expose their complete call wiring. VGGT-IR is described in the README, but no corresponding implementation path appears in the supplied tree, so it is not represented as a runtime component.

Main entry points: [`train.py`](https://github.com/jingyuangao0919/physir-splat/blob/main/train.py) (Training loop), [`gaussian_renderer/__init__.py`](https://github.com/jingyuangao0919/physir-splat/blob/main/gaussian_renderer/__init__.py) (Gaussian renderer), [`render.py`](https://github.com/jingyuangao0919/physir-splat/blob/main/render.py) (Render command), [`scene/dataset_readers.py`](https://github.com/jingyuangao0919/physir-splat/blob/main/scene/dataset_readers.py) (Dataset readers)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_data["Scene data"]
  node_views["Input views"]
  node_reader["Dataset readers<br/>[dataset_readers.py]"]
  node_cameras["Camera models<br/>[cameras.py]"]
end

subgraph group_model["Thermal scene model"]
  node_gaussians["Gaussian primitives<br/>[gaussian_model.py]"]
  node_appearance["Appearance model"]
  node_geometry["Geometry model<br/>[geometry_model.py]"]
  node_atmosphere["Atmospheric transfer"]
  node_planck["Planck radiance<br/>[planck_model.py]"]
  node_radiometry["Radiometric response"]
  node_pose["Pose model<br/>[pose_model.py]"]
end

subgraph group_render["Rendering and evaluation"]
  node_renderer["Gaussian renderer<br/>[__init__.py]"]
  node_rasterizer["CUDA rasterizer<br/>[__init__.py]"]
  node_render_cmd["Render command<br/>[render.py]"]
  node_metrics["Image metrics<br/>[metrics.py]"]
  node_artifacts["Rendered outputs"]
end

subgraph group_train["Training workflow"]
  node_trainer["Training loop<br/>[train.py]"]
  node_training_outputs["Model checkpoints"]
end

subgraph group_correction["Residual correction"]
  node_rgbt_corrector["RGBT correction"]
  node_temporal_corrector["Temporal correction"]
  node_affine_corrector["Affine correction"]
end

node_user(("Researcher"))

node_user -->|"starts training"| node_trainer
node_user -->|"requests renders"| node_render_cmd
node_user -->|"requests evaluation"| node_metrics
node_views -->|"provides views"| node_reader
node_reader -->|"builds cameras"| node_cameras
node_trainer -->|"loads scene"| node_reader
node_trainer -->|"optimizes primitives"| node_gaussians
node_trainer -->|"renders training views"| node_renderer
node_renderer -->|"rasterizes primitives"| node_rasterizer
node_renderer -->|"reads scene attributes"| node_gaussians
node_trainer -->|"saves checkpoints"| node_training_outputs
node_render_cmd -->|"loads scene model"| node_gaussians
node_render_cmd -->|"renders views"| node_renderer
node_render_cmd -->|"writes images"| node_artifacts
node_metrics -->|"reads images"| node_artifacts
node_rgbt_corrector -->|"reads renders"| node_artifacts
node_temporal_corrector -->|"reads renders"| node_artifacts
node_affine_corrector -->|"reads renders"| node_artifacts
node_trainer -->|"updates appearance"| node_appearance
node_trainer -->|"updates geometry"| node_geometry
node_trainer -->|"uses pose refinement"| node_pose
node_renderer -->|"uses transfer model"| node_atmosphere
node_renderer -->|"uses radiance model"| node_planck
node_renderer -->|"uses response model"| node_radiometry

click node_reader "https://github.com/jingyuangao0919/physir-splat/blob/main/scene/dataset_readers.py"
click node_cameras "https://github.com/jingyuangao0919/physir-splat/blob/main/scene/cameras.py"
click node_gaussians "https://github.com/jingyuangao0919/physir-splat/blob/main/scene/gaussian_model.py"
click node_appearance "https://github.com/jingyuangao0919/physir-splat/blob/main/scene/appearance_model.py"
click node_geometry "https://github.com/jingyuangao0919/physir-splat/blob/main/scene/geometry_model.py"
click node_atmosphere "https://github.com/jingyuangao0919/physir-splat/blob/main/scene/atmospheric_model.py"
click node_planck "https://github.com/jingyuangao0919/physir-splat/blob/main/scene/planck_model.py"
click node_radiometry "https://github.com/jingyuangao0919/physir-splat/blob/main/scene/radiometric_model.py"
click node_pose "https://github.com/jingyuangao0919/physir-splat/blob/main/scene/pose_model.py"
click node_trainer "https://github.com/jingyuangao0919/physir-splat/blob/main/train.py"
click node_renderer "https://github.com/jingyuangao0919/physir-splat/blob/main/gaussian_renderer/__init__.py"
click node_rasterizer "https://github.com/jingyuangao0919/physir-splat/blob/main/submodules/diff-gaussian-rasterization-extentions/diff_gaussian_rasterization/__init__.py"
click node_render_cmd "https://github.com/jingyuangao0919/physir-splat/blob/main/render.py"
click node_metrics "https://github.com/jingyuangao0919/physir-splat/blob/main/metrics.py"
click node_rgbt_corrector "https://github.com/jingyuangao0919/physir-splat/blob/main/tools/rgbt_thermal_residual_corrector.py"
click node_temporal_corrector "https://github.com/jingyuangao0919/physir-splat/blob/main/tools/temporal_residual_corrector.py"
click node_affine_corrector "https://github.com/jingyuangao0919/physir-splat/blob/main/tools/temporal_affine_residual_corrector.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_views,node_reader,node_cameras toneBlue
class node_gaussians,node_appearance,node_geometry,node_atmosphere,node_planck,node_radiometry,node_pose toneAmber
class node_renderer,node_rasterizer,node_render_cmd,node_metrics,node_artifacts toneMint
class node_trainer,node_training_outputs toneRose
class node_rgbt_corrector,node_temporal_corrector,node_affine_corrector,node_user toneIndigo
```

## Components

### Scene data

- **Input views**
- [Dataset readers](https://github.com/jingyuangao0919/physir-splat/blob/main/scene/dataset_readers.py): `scene/dataset_readers.py`
- [Camera models](https://github.com/jingyuangao0919/physir-splat/blob/main/scene/cameras.py): `scene/cameras.py`

### Thermal scene model

- [Gaussian primitives](https://github.com/jingyuangao0919/physir-splat/blob/main/scene/gaussian_model.py): `scene/gaussian_model.py`
- [Appearance model](https://github.com/jingyuangao0919/physir-splat/blob/main/scene/appearance_model.py): `scene/appearance_model.py`
- [Geometry model](https://github.com/jingyuangao0919/physir-splat/blob/main/scene/geometry_model.py): `scene/geometry_model.py`
- [Atmospheric transfer](https://github.com/jingyuangao0919/physir-splat/blob/main/scene/atmospheric_model.py): `scene/atmospheric_model.py`
- [Planck radiance](https://github.com/jingyuangao0919/physir-splat/blob/main/scene/planck_model.py): `scene/planck_model.py`
- [Radiometric response](https://github.com/jingyuangao0919/physir-splat/blob/main/scene/radiometric_model.py): `scene/radiometric_model.py`
- [Pose model](https://github.com/jingyuangao0919/physir-splat/blob/main/scene/pose_model.py): `scene/pose_model.py`

### Rendering and evaluation

- [Gaussian renderer](https://github.com/jingyuangao0919/physir-splat/blob/main/gaussian_renderer/__init__.py): `gaussian_renderer/__init__.py`
- [CUDA rasterizer](https://github.com/jingyuangao0919/physir-splat/blob/main/submodules/diff-gaussian-rasterization-extentions/diff_gaussian_rasterization/__init__.py): `submodules/diff-gaussian-rasterization-extentions/diff_gaussian_rasterization/__init__.py`
- [Render command](https://github.com/jingyuangao0919/physir-splat/blob/main/render.py): `render.py`
- [Image metrics](https://github.com/jingyuangao0919/physir-splat/blob/main/metrics.py): `metrics.py`
- **Rendered outputs**

### Training workflow

- [Training loop](https://github.com/jingyuangao0919/physir-splat/blob/main/train.py): `train.py`
- **Model checkpoints**

### Residual correction

- [RGBT correction](https://github.com/jingyuangao0919/physir-splat/blob/main/tools/rgbt_thermal_residual_corrector.py): `tools/rgbt_thermal_residual_corrector.py`
- [Temporal correction](https://github.com/jingyuangao0919/physir-splat/blob/main/tools/temporal_residual_corrector.py): `tools/temporal_residual_corrector.py`
- [Affine correction](https://github.com/jingyuangao0919/physir-splat/blob/main/tools/temporal_affine_residual_corrector.py): `tools/temporal_affine_residual_corrector.py`

### Other components

- **Researcher**

## Connections

- Researcher → Training loop: starts training
- Researcher → Render command: requests renders
- Researcher → Image metrics: requests evaluation
- Input views → Dataset readers: provides views
- Dataset readers → Camera models: builds cameras
- Training loop → Dataset readers: loads scene
- Training loop → Gaussian primitives: optimizes primitives
- Training loop → Gaussian renderer: renders training views
- Gaussian renderer → CUDA rasterizer: rasterizes primitives
- Gaussian renderer → Gaussian primitives: reads scene attributes
- Training loop → Model checkpoints: saves checkpoints
- Render command → Gaussian primitives: loads scene model
- Render command → Gaussian renderer: renders views
- Render command → Rendered outputs: writes images
- Image metrics → Rendered outputs: reads images
- RGBT correction → Rendered outputs: reads renders
- Temporal correction → Rendered outputs: reads renders
- Affine correction → Rendered outputs: reads renders
- Training loop → Appearance model: updates appearance
- Training loop → Geometry model: updates geometry
- Training loop → Pose model: uses pose refinement
- Gaussian renderer → Atmospheric transfer: uses transfer model
- Gaussian renderer → Planck radiance: uses radiance model
- Gaussian renderer → Radiometric response: uses response model
