How nvlabs/gaussianstorm works
1. What this repo is
- STORM is a research codebase for feed-forward dynamic scene reconstruction in large outdoor environments.
- The core output is a 3D Gaussian scene representation plus scene flow, enabling rendering and motion reasoning from sparse multi-view video.
2. Top-level execution entry points
- main_storm.py is the main training / evaluation launcher.
- inference.py is the single-run demo / playback path for running a checkpoint on a sequence.
- engine_storm.py likely contains the shared training/evaluation loop orchestration used by main_storm.py.
- preprocess.py and extract_sky.py are supporting scripts for dataset preparation and auxiliary label extraction.
3. Data preparation boundary
- Raw data is not consumed directly by the model. The repo expects a preprocessed dataset layout.
- preproc/waymo_download.py and preproc/waymo_preprocess.py handle Waymo Open Dataset acquisition and conversion.
- docs/WAYMO.md and docs/example_data/ show the expected input format and sample scene metadata.
- data/dataset_scene_list/*.txt defines the scene splits used by training/validation.
4. Dataset subsystem
- storm/dataset/storm_dataset.py is the central dataset implementation.
- storm/dataset/data_utils.py, constants.py, and samplers.py support frame/sequence assembly, coordinate or metadata constants, and sampling strategy.
- This layer is the main boundary between preprocessed scene files and the model’s batched tensors.
5. Model subsystem
- storm/models/storm.py is the main model definition.
- Supporting model pieces are split by role:
- embedders.py for token / feature embedding
- layers.py for reusable neural blocks
- decoder.py for predicting outputs from latent features
- vit.py for vision-transformer-style image encoding
- The model is likely built to fuse multi-view appearance, motion tokens, and optional auxiliary inputs like depth/flow/ground/sky.
6. Geometry and rendering-oriented design
- The README emphasizes joint learning of 3D Gaussians and scene flow, so the model is not just frame reconstruction—it also learns temporal motion structure.
- gsplat is an important external dependency because it provides batch-wise Gaussian rendering support.
- That means the architecture has an implicit split between:
- feature prediction / scene parameter prediction
- differentiable rendering / reconstruction supervision
7. Auxiliary pretrained perception backbone
- third_party/depth_anything_v2/ vendors a Depth Anything V2 implementation.
- This is a separate dependency boundary, likely used for depth-related supervision or initialization rather than being the core STORM model itself.
- The presence of extract_sky.py, load_depth, load_flow, and load_ground options in the README suggests the pipeline can ingest several auxiliary geometric/semantic signals.
8. Training and distributed execution
- storm/utils/distributed.py provides the multi-GPU / multi-process glue used by torchrun.
- storm/utils/losses.py, lpips.py, and lpips_loss.py indicate a training objective that mixes photometric, perceptual, and task-specific regularization terms.
- storm/utils/logging.py and misc.py handle experiment bookkeeping, reproducibility, and general helpers.
- Training outputs are stored under work_dirs/<project>/<exp_name> per the README.
9. Inference and evaluation flow
- inference.py is the lightweight path for loading a checkpoint and rendering a scene without running full training.
- Evaluation is driven through the same main entrypoint as training, but with an --evaluate switch, so training and evaluation share model code and dataset handling.
- This suggests a single unified model stack with different runtime modes rather than separate training and inference implementations.
10. Visualization subsystem
- storm/visualization/annotation.py, layout.py, video_maker.py, and visualization_tools.py are dedicated to rendering results for qualitative inspection.
- This layer likely consumes model outputs and turns them into annotated images/videos, separating visualization from core training logic.
- The README’s mention of a future “viewer” aligns with this module’s current role as an offline visualization pipeline.
11. Where the main data flows go
- Raw Waymo scenes → preprocessing scripts → preprocessed scene artifacts and split lists.
- Prepared dataset files → StormDataset → batched tensors via samplers/collation.
- Batched inputs → STORM model → predicted scene representation, flow, and auxiliary outputs.
- Predictions + labels → losses during training, or renderings/videos during inference/visualization.
12. External dependencies that matter architecturally
- Waymo Open Dataset is the primary data source.
- PyTorch is the runtime and model training framework.
- CUDA / multi-GPU torchrun is the intended execution mode for training.
- gsplat is a required rendering backend for Gaussian splatting.
- Depth Anything V2 is vendored as a third-party module for depth-related functionality.
13. How to think about repo boundaries in a diagram
- One boundary is data preparation vs. model runtime.
- Another is core STORM model code vs. third-party perception/rendering dependencies.
- A third is training/evaluation logic vs. visualization/export logic.
- The repo is organized so that the training engine and inference path both depend on the same dataset/model stack, while preprocessing is mostly upstream and visualization is mostly downstream.
Main entry points: storm.py STORM · storm_dataset.py StormDataset · engine_storm.py engine_storm.py · visualization_tools.py visual tools
Components 25
Entry points
Training, evaluation, inference, and preprocessing launchers.
- main_storm.py · Primary entry point for training and evaluation runs.
main_storm.py - engine_storm.py · Shared orchestration for training and evaluation.
engine_storm.py - inference.py · Loads a checkpoint and runs scene playback or demo inference.
inference.py - preprocess.py · Top-level preprocessing helper script.
preprocess.py - extract_sky.py · Auxiliary script for extracting sky-related inputs or labels.
extract_sky.py
Data prep
Waymo acquisition, conversion, and dataset split assets.
- waymo_download.py · Downloads Waymo data for preprocessing.
preproc/waymo_download.py - waymo_preprocess.py · Converts Waymo scenes into the repository's preprocessed format.
preproc/waymo_preprocess.py - WAYMO.md · Documents the expected Waymo input and scene layout.
docs/WAYMO.md - scene lists · Training and validation scene split definitions.
data/dataset_scene_list
Core STORM
Dataset, model, rendering-aware prediction, and shared utilities.
- StormDataset · Main dataset implementation mapping preprocessed scenes to batched tensors.
storm/dataset/storm_dataset.py - data utils · Frame assembly, metadata handling, and sequence utilities.
storm/dataset/data_utils.py - samplers · Sampling strategy for sequences and frames.
storm/dataset/samplers.py - STORM · Main model predicting 3D Gaussians, scene flow, and auxiliary outputs.
storm/models/storm.py - embedders · Token and feature embedding modules.
storm/models/embedders.py - layers · Reusable model blocks and internal components.
storm/models/layers.py - decoder · Maps latent features to scene predictions.
storm/models/decoder.py - ViT encoder · Vision-transformer style multi-view image encoding.
storm/models/vit.py - losses · Photometric, perceptual, and task-specific loss terms.
storm/utils/losses.py - distributed · Distributed training and process coordination utilities.
storm/utils/distributed.py - logging · Run bookkeeping and experiment logging.
storm/utils/logging.py
Visualization
Offline qualitative inspection and video generation.
- visual tools · High-level visualization helpers for qualitative outputs.
storm/visualization/visualization_tools.py - video maker · Builds annotated result videos from model outputs.
storm/visualization/video_maker.py - annotation · Adds labels and overlays to rendered outputs.
storm/visualization/annotation.py - layout · Arranges panels and visualization layouts.
storm/visualization/layout.py
Vendor deps
Third-party perception backbone used alongside the main model.
- Depth Anything V2 · Vendored depth perception backbone used for auxiliary geometric signals.
third_party/depth_anything_v2
Connections 26
- main_storm.py → engine_storm.py: uses · Training and evaluation execution is orchestrated through the shared engine.
- main_storm.py → StormDataset: loads data · Main runs consume preprocessed scenes through the dataset layer.
- main_storm.py → STORM: trains/evals · Launcher instantiates and runs the core STORM model.
- engine_storm.py → losses: optimizes · The engine applies the training objectives during optimization.
- engine_storm.py → distributed: distributed · Multi-GPU and multi-process execution are coordinated here.
- engine_storm.py → logging: records · Training and evaluation runs emit logs and experiment state.
- inference.py → StormDataset: loads data · Inference uses the same prepared dataset boundary.
- inference.py → STORM: renders · Checkpoint loading and prediction reuse the core model stack.
- preprocess.py → waymo_download.py: downloads · Top-level preprocessing can fetch Waymo sources.
- preprocess.py → waymo_preprocess.py: converts · Top-level preprocessing converts raw data into repo format.
- waymo_download.py → waymo_preprocess.py: feeds · Downloaded Waymo data is handed to preprocessing.
- waymo_preprocess.py → scene lists: writes · Converted scenes align with train/val split manifests.
- StormDataset → data utils: assembles · Dataset assembly relies on shared frame and metadata utilities.
- StormDataset → samplers: samples · Sampling policy controls which sequences and frames are batched.
- scene lists → StormDataset: drives splits · Scene split manifests determine which samples are loaded.
- STORM → ViT encoder: encodes · Multi-view imagery is encoded through a ViT-style backbone.
- STORM → embedders: embeds · Inputs and latent tokens are transformed by embedding modules.
- STORM → layers: builds from · Reusable blocks compose the internal model architecture.
- STORM → decoder: predicts · Latent features are decoded into scene parameters and outputs.
- STORM → Depth Anything V2: aux depth · Vendored depth backbone supports auxiliary geometric inputs or supervision.
- STORM → losses: supervised by · Predictions are compared against targets with mixed objectives.
- STORM → visual tools: exports · Model outputs can be passed into visualization and rendering helpers.
- visual tools → annotation: annotates · Visualization pipelines add text and overlays.
- visual tools → layout: formats · Panels and scenes are arranged for inspection.
- visual tools → video maker: packages · Outputs can be assembled into qualitative videos.
- video maker → annotation: uses · Video export reuses annotation overlays.