Skip to content

Add post-training splat compression - #133

Open
92401 wants to merge 2 commits into
harry7557558:masterfrom
92401:splat-compression-upstream
Open

92401 wants to merge 2 commits into
harry7557558:masterfrom
92401:splat-compression-upstream

Conversation

@92401

@92401 92401 commented Oct 1, 2026 •

Copy link
Copy Markdown

Motivation

Spirula Studio makes it practical to train detailed Gaussian models, including
on relatively modest hardware. As the splat count grows, however, the resulting
models can become costly to store, transfer, and browse interactively on
devices with tighter VRAM and rendering budgets.

This PR focuses on the post-training workflow. It provides a reproducible way
to derive a smaller model from a completed checkpoint, measure the rendering
change introduced by compression, and evaluate the compressed model against
the source images before choosing a deployment trade-off.

Method

The compression workflow combines several simple and interpretable operations.

  1. Contribution-based pruning

    The model is rendered from a representative set of training cameras. Each
    splat accumulates its alpha- and transmittance-weighted rendering
    contribution, and only the highest-scoring splats are retained.

  2. Spherical-harmonics reduction

    Higher-order view-dependent colour coefficients are removed while preserving
    the geometry and lower-order appearance representation.

  3. Opacity-threshold pruning

    Nearly transparent splats can be removed as a lightweight standalone
    pruning method or as an additional filter.

The commands operate directly on existing checkpoints and derived PLY files;
they do not require retraining.

CLI

This PR currently adds a command-line interface only; a GUI integration is
left for follow-up work.

splat prune

  • Contribution-based pruning with --keep-fraction
  • Opacity-threshold pruning with --min-opacity
  • Spherical-harmonics degree reduction with --sh-degree

splat compare

  • Renders the original and compressed models from identical dataset cameras
  • Reports L1, PSNR, and SSIM to quantify compression-induced render drift

splat evaluate

  • Renders a model at dataset camera poses and compares it against source images
  • Reports raw and colour-corrected L1, PSNR, and SSIM

Model replay supports 3dgs, mip, and 3dgut. For standalone PLY files, the
--primitive option can override the primitive saved in config.json.
3DGUT is validated with a 3,000-step half-resolution Garden / pinhole smoke run. With the same 60% contribution pruning and degree-3 to degree-2 SH reduction, the model changed from 105.7 MB / 446,978 splats to 41.9 MB / 268,187 splats. On 20 source cameras, source-image PSNR dropped by 0.0774 dB and SSIM by 0.007129; original-versus-compressed renders measured 37.5592 dB PSNR and 0.987195 SSIM.

Benchmark

All compressed models retain 60% of contribution-ranked splats and reduce
degree-3 spherical harmonics to degree 2. Each result uses 20 source cameras.

Dataset / camera Primitive Original Compressed PSNR drop SSIM drop
Garden / pinhole Mip 248.0 MB 98.4 MB 0.5289 dB 0.013090
indoor6k / equirectangular 3DGS 682.2 MB 270.7 MB 0.5678 dB 0.006574
indoor6k / dual fisheye 3DGS 743.6 MB 295.0 MB 0.0803 dB 0.001781
Garden / pinhole 3DGUT (3k steps, 1/2 resolution) 105.7 MB 41.9 MB 0.0774 dB 0.007129

The indoor6k data was captured with an Insta360 X6. The dual-fisheye result
uses frames extracted from the original, unstitched INSV files, while the
equirectangular result uses frames extracted from an MP4 exported by Insta360
Studio. These private datasets are used only for evaluation and are not
included in this PR.

Validation

Tested on the latest upstream master commit:

  • CUDA build completed successfully.
  • Vulkan build completed successfully.
  • splat_prune_test passed on both CUDA and Vulkan backends.
  • Generated kernel instantiations were checked with
    python tools/codegen/generate_kernel_instantiation.py --check.
  • Private-path and i18n checks passed.
  • git diff --check upstream/master...HEAD reported no whitespace errors.

@92401
92401 force-pushed the splat-compression-upstream branch from def2c3a to 4fbc614 Compare October 6, 2026 03:13
@92401
92401 force-pushed the splat-compression-upstream branch from 4fbc614 to 07740f8 Compare October 6, 2026 03:31

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant