Skip to content

[CVPR2025] Code Release for "FlexGS: Train Once, Deploy Everywhere with Many-in-One Flexible 3D Gaussian Splatting"

License

Notifications You must be signed in to change notification settings

LiuHengyu321/FlexGS

Repository files navigation

FlexGS: Train Once, Deploy Everywhere with Many-in-One Flexible 3D Gaussian Splatting

Paper PDF

This repository contains the code release for the CVPR 2025 paper: "FlexGS: Train Once, Deploy Everywhere with Many-in-One Flexible 3D Gaussian Splatting", which first enables elastic inference for Gaussian Splatting and achieves deployment to meet model size budget.

Environmental Setup

git clone --recursive https://github.com/LiuHengyu321/FlexGS.git
cd FlexGS
git submodule update --init --recursive

conda create -n flexgs python=3.10
conda activate flexgs

pip install -r requirements.txt
pip install -e submodules/compress-diff-gaussian-rasterization
pip install -e submodules/simple-knn

We use pytorch=1.13.1+cu121 as our experiment environment.

Data Preparation

Our experiments are conducted on MipNeRF360, Zip-NeRF and Tank & Temple datasets.

Train

Train FlexGS with the following scripts:

python train.py \
    -s /path/to/dataset \
    -m /path/to/ouput_dir \
    --time_ratios 0.20 0.15 0.10 0.05 0.01 \
    --configs ./arguments/flex.py \
    --resolution 4 \
    --gumbel_weight 1.0 \
    --select_interval 1000 
  • -s: path to the source data
  • -m: output path
  • --time_ratios: the given elastic ratios for training
  • --configs: path to the config
  • --resolution: resolution downscale of each image
  • --gumbel_weight: weight of the Gumbel loss
  • --select_interval: interval for updating the Global Importance

Render and Eval

Render the image on the novel view at various elastic ratios.

python render.py \
    --configs ./arguments/flex.py \
    -m /path/to/ouput_dir \
    --time_ratios 0.15 0.10 0.05 0.01 \
  • -m: output path
  • --time_ratios: the given elastic ratios for rendering
  • --configs: path to the config
  • --skip_video: skip rendering the video
  • --skip_train: skip rendering the train views
  • --skip_test: skip rendering the novel views

Metrics calculation: calculating the PSNR, SSIM and LPIPS for rendering results under all the given elastic ratios.

python metrics.py \
    -m /path/to/ouput_dir \

Acknowledgements

Our code is based on the following awesome repositories:

We thank the authors for releasing their code!

BibTeX

If you find our work useful for your projects, please consider citing the paper:

@inproceedings{liu2025flexgs,
  title={FlexGS: Train Once, Deploy Everywhere with Many-in-One Flexible 3D Gaussian Splatting},
  author={Liu, Hengyu and Wang, Yuehao and Li, Chenxin and Cai, Ruisi and Wang, Kevin and Li, Wuyang and Molchanov, Pavlo and Wang, Peihao and Wang, Zhangyang},
  booktitle={Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition},
  year={2025}
}

About

[CVPR2025] Code Release for "FlexGS: Train Once, Deploy Everywhere with Many-in-One Flexible 3D Gaussian Splatting"

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages