Skip to content

🚀 [ARXIV 2024] Pytorch implementation of 'Fast Feedforward 3D Gaussian Splatting Compression'

License

Notifications You must be signed in to change notification settings

YihangChen-ee/FCGS

Repository files navigation

[ARXIV'24] FCGS

Official Pytorch implementation of Fast Feedforward 3D Gaussian Splatting Compression.

Compress existing 3DGS rapidly in seconds without optimization!

Yihang Chen, Qianyi Wu, Mengyao Li, Weiyao Lin, Mehrtash Harandi, Jianfei Cai

[Arxiv] [Project] [Github]

Links

Welcome to check a series of works from our group on 3D radiance field representation compression as listed below:

  • 🎉 CNC [CVPR'24] is now released for efficient NeRF compression! [Paper] [Arxiv] [Project]
  • 🏠 HAC [ECCV'24] is now released for efficient 3DGS compression! [Paper] Arxiv] [Project]
  • 🚀 FCGS [ARXIV'24] is now released for fast optimization-free 3DGS compression! [Arxiv] [Project]

Overview

Although various compression techniques have been proposed, previous art suffers from a common limitation: for any existing 3DGS, per-scene optimization is needed to achieve compression, making the compression sluggish and slow. To address this issue, we introduce Fast Compression of 3D Gaussian Splatting (FCGS), an optimization-free model that can compress 3DGS representations rapidly in a single feed-forward pass, which significantly reduces compression time from minutes to seconds.

Performance

While all the other approaches are optimization-based compression which have natural advantages for a better RD performance, we still outperform most of them in an optimization-free manner for fast compression. Our compression time is only 1/10 compared to others!

Installation

We tested our code on a server with Ubuntu 20.04.1, cuda 11.8, gcc 9.4.0. We use NVIDIA L40s GPU (48G).

  1. Clone our code
git clone git@github.com:YihangChen-ee/FCGS.git --recursive
  1. Install environment
conda env create --file environment.yml
conda activate FCGS_env
  1. Install tmc3 (for GPCC)
  • Please refer to tmc3 github for installation.
  • Don't forget to add tmc3 to your environment variable, otherwise you must manually specify its location in our code by searching change tmc3 path (2 places in total).
  • Tips: tmc3 is commonly located at PATH/TO/mpeg-pcc-tmc13/build/tmc3.

Run

FCGS can directly compress any existing 3DGS representations to bitstreams. The input should be a .ply file following the 3DGS format.

To compress a .ply file to bitstreams, run:

python encode_single_scene.py --lmd A_lambda --ply_path_from PATH/TO/LOAD/point_cloud.ply --bit_path_to PATH/TO/SAVE/BITSTREAMS --determ 1
  • lmd: the trade-off parameter for size and fidelity. Chosen in [1e-4, 2e-4, 4e-4, 8e-4, 16e-4].
  • ply_path_from: A .ply file. Path to load the source .ply file.
  • bit_path_to: A directory. Path to save the compressed bitstreams.
  • determ: see atomic statement

To decompress a .ply file from bitstreams, run:

python decode_single_scene.py --lmd A_lambda --bit_path_from PATH/TO/LOAD/BITSTREAMS --ply_path_to PATH/TO/SAVE/point_cloud.ply
  • lmd: the trade-off parameter for size and fidelity. Chosen in [1e-4, 2e-4, 4e-4, 8e-4, 16e-4].
  • bit_path_from: A directory. Path to load the compressed bitstreams.
  • ply_path_to: A .ply file. Path to save the decompressed .ply file.

To decompress a .ply file from bitstreams and validate fidelity of the decompressed 3DGS, run:

python decode_single_scene_validate.py --lmd A_lambda --bit_path_from PATH/TO/LOAD/BITSTREAMS --ply_path_to PATH/TO/SAVE/point_cloud.ply --source_path PATH/TO/SOURCE/SCENES
  • source_path: A directory. Path to load the source scene images for validation.

Tips

FCGS is compatible with pruning-based techniques such as Mini-Splatting and Trimming the fat. You can directly apply FCGS to the .ply file output by these two approaches to further boost the compression performance.

CUDA accelerated arithmetic codec

We alongside publish a CUDA-based arithmetic codec implementation, you can find it in arithmetic and its usage here.

Contact

Citation

If you find our work helpful, please consider citing:

@article{fcgs2024,
  title={Fast Feedforward 3D Gaussian Splatting Compression},
  author={Chen, Yihang and Wu, Qianyi and Li, Mengyao and Lin, Weiyao and Harandi, Mehrtash and Cai, Jianfei},
  journal={arXiv preprint arXiv:2410.08017},
  year={2024}
}

Acknowledgement

  • We thank all authors from 3D-GS for presenting such an excellent work.
  • We thank Xiangrui's help on GPCC codec.