Skip to content

STAC-USC/3DGS_Compression_Adaptive_Voxelization

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

87 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Adaptive Voxelization for Transform coding of 3D Gaussian splatting data

Chenjunjie Wang*, Shashank N. Sridhara*, Eduardo Pavez*, Antonio Ortega*, Cheng Chang†
*University of Southern California, Los Angeles, CA, †Meta, Menlo Park, CA

3DGS Demo

Abstract

We present a novel compression framework for 3D Gaussian splatting (3DGS) data that leverages transform coding tools originally developed for point clouds. Contrary to existing 3DGS compression methods, our approach can produce compressed 3DGS models at multiple bitrates in a computationally efficient way. Point cloud voxelization is a discretization technique that point cloud codecs use to improve coding efficiency while enabling the use of fast transform coding algorithms. We propose an adaptive voxelization algorithm tailored to 3DGS data, to avoid the inefficiencies introduced by uniform voxelization used in point cloud codecs. We ensure the positions of larger volume Gaussians are represented at high resolution, as these significantly impact rendering quality. Meanwhile, a low-resolution representation is used for dense regions with smaller Gaussians, which have a relatively lower impact on rendering quality. This adaptive voxelization approach significantly reduces the number of Gaussians and the bitrate required to encode the 3DGS data. After voxelization, many Gaussians are moved or eliminated. Thus, we propose to fine-tune/recolor the remaining 3DGS attributes with an initialization that can reduce the amount of retraining required. Experimental results on pre-trained datasets show that our proposed compression framework outperforms existing methods.


Installation

πŸ› οΈ Requirements

Standard Folder Structure

πŸ“ project_root/

β”œβ”€β”€ πŸ“ attributes_compressed/
β”œβ”€β”€ πŸ“ code_Adaptive/
β”‚   β”œβ”€β”€ πŸ“ Lossless_covar/
β”‚   β”‚   β”œβ”€β”€ extract_all_pq.py
β”‚   β”‚   β”œβ”€β”€ postprocess.py
β”‚   β”‚   β”œβ”€β”€ encoder.py
β”‚   β”‚   β”œβ”€β”€ decoder.py
β”‚   β”‚   └── codec.py
β”‚   β”œβ”€β”€ πŸ“ Lossless_covar/
β”‚   β”‚   β”œβ”€β”€ extract_all_pq.py
β”‚   β”‚   β”œβ”€β”€ postprocess.py
β”‚   β”‚   β”œβ”€β”€ encoder.py
β”‚   β”‚   β”œβ”€β”€ decoder.py
β”‚   β”‚   └── codec.py
β”‚   β”œβ”€β”€ πŸ“ Retrain_3DGS/
β”‚   β”‚   β”œβ”€β”€ train.py
β”‚   β”‚   β”œβ”€β”€ render.py
β”‚   β”‚   β”œβ”€β”€ metrics.py
β”‚   β”‚   └── adapt_voxel_recolor.py
β”‚   β”œβ”€β”€ πŸ“ Retrain_PC/
β”‚   β”‚   β”œβ”€β”€ train.py
β”‚   β”‚   β”œβ”€β”€ render.py
β”‚   β”‚   └── metrics.py
β”‚   β”œβ”€β”€ πŸ“ VQ_script/
β”‚   β”‚   β”œβ”€β”€ compress.py
β”‚   β”‚   β”œβ”€β”€ render.py
β”‚   β”‚   └── metrics.py
β”‚   β”œβ”€β”€ plot_RD.py
β”‚   └── voxelization.py
β”œβ”€β”€ πŸ“ colmap_dataset/
β”‚   β”œβ”€β”€ πŸ“ bicycle/
β”‚   β”œβ”€β”€ πŸ“ bonsai/
β”‚   β”œβ”€β”€ πŸ“ counter/
β”‚   β”œβ”€β”€ πŸ“ drjohnson/
β”‚   β”œβ”€β”€ πŸ“ flowers/
β”‚   β”œβ”€β”€ πŸ“ garden/
β”‚   β”œβ”€β”€ πŸ“ kitchen/
β”‚   β”œβ”€β”€ πŸ“ playroom/
β”‚   β”œβ”€β”€ πŸ“ room/
β”‚   β”œβ”€β”€ πŸ“ stump/
β”‚   β”œβ”€β”€ πŸ“ train/
β”‚   β”œβ”€β”€ πŸ“ treehill/
β”‚   └── πŸ“ truck/
β”œβ”€β”€ πŸ“ original_model/
β”‚   β”œβ”€β”€ πŸ“ bicycle/
β”‚   β”œβ”€β”€ πŸ“ bonsai/
β”‚   β”œβ”€β”€ πŸ“ counter/
β”‚   β”œβ”€β”€ πŸ“ drjohnson/
β”‚   β”œβ”€β”€ πŸ“ flowers/
β”‚   β”œβ”€β”€ πŸ“ garden/
β”‚   β”œβ”€β”€ πŸ“ kitchen/
β”‚   β”œβ”€β”€ πŸ“ playroom/
β”‚   β”œβ”€β”€ πŸ“ room/
β”‚   β”œβ”€β”€ πŸ“ stump/
β”‚   β”œβ”€β”€ πŸ“ train/
β”‚   β”œβ”€β”€ πŸ“ treehill/
β”‚   └── πŸ“ truck/
β”œβ”€β”€ πŸ“ test_model/
β”‚   β”œβ”€β”€ πŸ“ bicycle/
β”‚   β”œβ”€β”€ πŸ“ bonsai/
β”‚   β”œβ”€β”€ πŸ“ counter/
β”‚   β”œβ”€β”€ πŸ“ drjohnson/
β”‚   β”œβ”€β”€ πŸ“ flowers/
β”‚   β”œβ”€β”€ πŸ“ garden/
β”‚   β”œβ”€β”€ πŸ“ kitchen/
β”‚   β”œβ”€β”€ πŸ“ playroom/
β”‚   β”œβ”€β”€ πŸ“ room/
β”‚   β”œβ”€β”€ πŸ“ stump/
β”‚   β”œβ”€β”€ πŸ“ train/
β”‚   β”œβ”€β”€ πŸ“ treehill/
β”‚   └── πŸ“ truck/
β”œβ”€β”€ πŸ“ RDO/
β”‚   β”œβ”€β”€ πŸ“ bpp/
β”‚   β”œβ”€β”€ πŸ“ Meta_data/
β”‚   β”œβ”€β”€ πŸ“ PSNR/
β”‚   └── πŸ“ PSNR_per_view/
β”œβ”€β”€ πŸ“ reconstructed_3DGS/
β”œβ”€β”€ πŸ“ retrain_model/
β”œβ”€β”€ πŸ“ voxelized_adapt/
β”œβ”€β”€ πŸ“ VQ_model/
└── README.md

πŸ“˜ Instruction

Step 1. Configure Conda Environments

Set up two Conda environments:

  • gaussian_splatting: used for retraining the 3DGS model and rendering
  • c3dgs: used for lossy covariance compression

Step 2. Install the GPCC Codec

Clone and compile the GPCC codec (TMC13) from the official repo:

πŸ”— https://github.com/MPEGGroup/mpeg-pcc-tmc13

We compiled it using Visual Studio 2019 on Windows 10.
The compiled binary (tmc3.exe) is located in: /build/tmc3/Release/tmc3.exe


Step 3. Prepare the Folder Structure

Download the pre-trained 3D Gaussian Splatting models and COLMAP dataset from the official repository:

πŸ”— https://github.com/graphdeco-inria/gaussian-splatting?tab=readme-ov-file

  • Download the "Pre-trained Models (14 GB)" from the repository.
    Place two copies in your project_root directory:

    • Rename the first copy to original_model
    • Rename the second copy to test_model
  • Download the "Evaluation Images (7 GB)" and place them in the project_root directory.
    Rename the folder to colmap_dataset.


Step 4. Voxelization

Run voxelization and configure retraining parameters:

conda activate gaussian_splatting
cd code_Adaptive
python voxelization.py --depth_start 15 --voxel_thr 30 --dataset_name train --retrain_mode 3DGS --use_adaptive false --iterations 15000
conda deactivate

Step 5. Compression

Quantization parameters are defined inside encoder.py and decoder.py scripts for both lossless and lossy compression pipeline

Default QP combination is what we used in our paper at ICIP2025:

(f_rest_qp, f_dc_qp, opacity_qp) = 
        (40, 4, 16), (40, 4, 34), (40, 4, 40),
        (40, 16, 16), (40, 16, 34), (40, 16, 40),
        (40, 20, 16), (40, 20, 34), (40, 20, 40),
        (40, 24, 16), (40, 24, 34), (40, 24, 40),
        (40, 28, 16), (40, 28, 34), (40, 28, 40),
	(38, 4, 4), (38, 16, 4),
        (34, 4, 4), (34, 16, 4),
        (31, 4, 4), (31, 16, 4),
        (28, 4, 4), (28, 16, 4),
        (38, 4, 16), (38, 16, 16),
        (34, 4, 16), (34, 16, 16),
        (31, 4, 16), (31, 16, 16),
        (28, 4, 16), (28, 16, 16),
        (38, 4, 28), (38, 16, 28),
        (34, 4, 28), (34, 16, 28),
        (31, 4, 28), (31, 16, 28),
        (28, 4, 28), (28, 16, 28),
        (16, 4, 4), (16, 16, 4),
        (4, 4, 4), (4, 16, 4),
        (16, 4, 16), (4, 4, 16),

Step 5a. Lossy Compression

For a voxelized 3DGS model, launch the compression pipeline using the lossy codec.

conda activate c3dgs
cd code_Adaptive/Lossy_covar
python codec.py --depth_start 15 --voxel_thr 30 --dataset_name train --retrain_mode 3DGS --use_adaptive false
conda deactivate

Step 5b. Lossless Compression

For a voxelized 3DGS model, launch the compression pipeline using the lossless codec.

Quantization parameters are defined inside encoder.py and decoder.py scripts

conda activate gaussian_splatting
cd code_Adaptive/Lossless_covar
python codec.py --depth_start 15 --voxel_thr 30 --dataset_name train --retrain_mode 3DGS --use_adaptive false
conda deactivate

Step 6. Rendering and Rate-Distortion Analysis

Render the compressed 3DGS and evaluate rate-distortion performance under different compression ratios:

conda activate gaussian_splatting
cd code_Adaptive
python plot_RD.py --depth_start 15 --voxel_thr 30 --dataset_name train --retrain_mode 3DGS --use_adaptive false --comp_mode lossless
conda deactivate

πŸ“„ Preprint

This work has been submitted to ICIP 2025 and is available as a preprint on arXiv:

πŸ”— arxiv.org/abs/2506.00271

πŸ“š Citation

If you find this work useful in your research, please cite it using the following BibTeX:

@INPROCEEDINGS{11084522,
  author={Wang, Chenjunjie and Sridhara, Shashank N. and Pavez, Eduardo and Ortega, Antonio and Chang, Cheng},
  booktitle={2025 IEEE International Conference on Image Processing (ICIP)},
  title={Adaptive Voxelization for Transform Coding of 3D Gaussian Splatting Data},
  year={2025},
  volume={},
  number={},
  pages={2414-2419},
  keywords={Point cloud compression;Image coding;Three-dimensional displays;Codecs;Vector quantization;Bit rate;Transform coding;Streaming media;Rendering (computer graphics);Spatial resolution;3D Gaussian Splatting;Adaptive Voxelization;3D Data Compression;Point Cloud Compression},
  doi={10.1109/ICIP55913.2025.11084522}}

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •