Understand the SPAG-4D project structure
mainThe project is organized into two main functional areas:
spag4d/ (Core Conversion Pipeline)
Contains the orchestrator (core.py) and various generator implementations:
- Depth-based generators:
da360_model.py(default),dap_model.py, andpager_model.py. - ML-based generators:
sharp360.pyandunisharp360.py(viaunisharp_adapter.py). - Utilities:
spag_converter.py(Depth $\rightarrow$ Gaussian projection),ply_writer.py(PLY export),spherical_grid.py(coordinate math), andcli.py(CLI interface). - Adapters:
seedvr2.pyfor Windows SeedVR2 upscaling.
spag4d/refine/ (Refinement Pipeline)
Handles post-processing and distillation:
pipeline_v2.py: OmniRoam v2 distillation.geometric/: A multi-stage geometric refinement pipeline (depth-align $\rightarrow$ hole-filter $\rightarrow$ consistency $\rightarrow$ aggregate $\rightarrow$ inject).- Adapters:
omniroam_adapter.py(WSL2 wrapper) andcamera_rig.py(novel-view camera extraction).
Other Directories
api.py: FastAPI server providing/api/convertand/api/refine_v2endpoints.static/: Web UI assets.scripts/: Setup scripts (e.g.,setup_omniroam_wsl.sh).