How 3dagentworld/horizonstream works
HorizonStream is an online RGB-video and image-sequence reconstruction system. The principal workflow loads and preprocesses frames, performs windowed streaming model inference, and exports camera poses, depth, confidence, and point clouds; optional loop closure and trajectory evaluation extend the results. The graph also preserves documented conversion, depth-fusion, and demo capabilities. Connections use the excerpts, SOURCE INDEX references, and README; several peripheral tools are documented but their implementation was not sampled.
Main entry points: core/infer.py Inference Orchestrator · infer.py Inference CLI · online_loop_reinfer.py Loop Re-inference · run_pipeline.py Pipeline Runner
Components 22
Entry and Input
- Video or Images
- Inference CLI
infer.py - Pipeline Runner
run_pipeline.py - Sequence Loader
horizonstream/data/dataloader.py
Streaming Reconstruction
- Model Wrapper
horizonstream/core/model.py - HorizonStream Model
horizonstream/models/horizonstream.py - Streaming Network
horizonstream/runtime/models/horizonstream.py - Window Aggregator
horizonstream/runtime/models/aggregator.py - Attention Blocks
horizonstream/runtime/layers/block.py - Camera Head
horizonstream/runtime/heads/camera_head.py
Results and Evaluation
- Inference Orchestrator
horizonstream/core/infer.py - Motion Averaging
horizonstream/runtime/motion_averaging.py - Pose Export
horizonstream/io/save_poses_txt.py - Point Cloud Export
horizonstream/io/save_points.py - Image Export
horizonstream/io/save_images.py - Trajectory Evaluation
horizonstream/eval/trajectory.py
Loop Closure
- Loop Re-inference
horizonstream/loop/online_loop_reinfer.py - Loop Detection and Optimization
horizonstream/loop/runtime.py
Utilities and Demos
- Interactive Demos
demo_gradio_viser.py - Dataset Converters
scripts/kitti_to_generalizable.py - Depth Fusion
scripts/post_depthfusion.py
Other components
- User
Connections 25
- User → Inference CLI: runs inference
- Video or Images → Inference CLI: provides frames
- Inference CLI → Inference Orchestrator: starts inference
infer.py - Inference CLI → Loop Re-inference: runs optional loop
infer.py - Pipeline Runner → Inference Orchestrator: runs inference
run_pipeline.py - Pipeline Runner → Trajectory Evaluation: evaluates results
run_pipeline.py - Pipeline Runner → Loop Re-inference: runs optional loop
run_pipeline.py - Inference Orchestrator → Sequence Loader: loads sequences
horizonstream/core/infer.py - Inference Orchestrator → Model Wrapper: invokes model
horizonstream/core/infer.py - Model Wrapper → HorizonStream Model: constructs model
horizonstream/core/model.py - HorizonStream Model → Camera Head: decodes cameras
horizonstream/models/horizonstream.py - HorizonStream Model → Streaming Network: uses network
horizonstream/models/horizonstream.py - Streaming Network → Window Aggregator: aggregates features
horizonstream/runtime/models/horizonstream.py - Window Aggregator → Attention Blocks: uses blocks
horizonstream/runtime/models/aggregator.py - Inference Orchestrator → Motion Averaging: averages poses
horizonstream/core/infer.py - Inference Orchestrator → Pose Export: writes poses
horizonstream/core/infer.py - Inference Orchestrator → Point Cloud Export: writes point clouds
horizonstream/core/infer.py - Inference Orchestrator → Image Export: writes images
horizonstream/core/infer.py - Loop Re-inference → Loop Detection and Optimization: detects and optimizes
horizonstream/loop/online_loop_reinfer.py - Loop Re-inference → Point Cloud Export: writes loop clouds
horizonstream/loop/online_loop_reinfer.py - Trajectory Evaluation → Loop Detection and Optimization: reads loop results
horizonstream/eval/trajectory.py - Interactive Demos → Video or Images: visualizes reconstruction
- User → Interactive Demos: opens demo
- User → Dataset Converters: converts datasets
- Point Cloud Export → Depth Fusion: supplies point data