Lukas Radl*,
Michael Steiner*,
Mathias Parger,
Alexander Weinrauch,
Bernhard Kerbl,
Markus Steinberger
* denotes equal contribution
| Webpage
| Full Paper
| Video
| T&T+DB COLMAP (650MB)
| Pre-trained Models (18.13 GB)
This repository contains the official authors implementation associated with the paper "StopThePop: Sorted Gaussian Splatting for View-Consistent Real-time Rendering", which can be found here.
Abstract: Gaussian Splatting has emerged as a prominent model for constructing 3D representations from images across diverse domains. However, the efficiency of the 3D Gaussian Splatting rendering pipeline relies on several simplifications. Notably, reducing Gaussian to 2D splats with a single view-space depth introduces popping and blending artifacts during view rotation. Addressing this issue requires accurate per-pixel depth computation, yet a full per-pixel sort proves excessively costly compared to a global sort operation. In this paper, we present a novel hierarchical rasterization approach that systematically resorts and culls splats with minimal processing overhead. Our software rasterizer effectively eliminates popping artifacts and view inconsistencies, as demonstrated through both quantitative and qualitative measurements. Simultaneously, our method mitigates the potential for cheating view-dependent effects with popping, ensuring a more authentic representation. Despite the elimination of cheating, our approach achieves comparable quantitative results for test images, while increasing the consistency for novel view synthesis in motion. Due to its design, our hierarchical approach is only 4% slower on average than the original Gaussian Splatting. Notably, enforcing consistency enables a reduction in the number of Gaussians by approximately half with nearly identical quality and view-consistency. Consequently, rendering performance is nearly doubled, making our approach 1.6x faster than the original Gaussian Splatting, with a 50% reduction in memory requirements.
@article{radl2024stopthepop,
author = {Radl, Lukas and Steiner, Michael and Parger, Mathias and Weinrauch, Alexander and Kerbl, Bernhard and Steinberger, Markus},
title = {{StopThePop: Sorted Gaussian Splatting for View-Consistent Real-time Rendering}},
journal = {ACM Transactions on Graphics},
number = {4},
volume = {43},
articleno = {64},
year = {2024},
}
Our repository is built on 3D Gaussian Splatting: For a full breakdown on how to get the code running, please consider 3DGS's Readme.
The project is split into submodules, each maintained in a separate github repository:
The majority of the projects is licensed under the "Gaussian-Splatting License", with the exception of:
There are also several changes in the original source code. If you use any of our additional functionalities, please cite our paper and link to this repository.
The repository contains submodules, thus please check it out with
# HTTPS
git clone https://github.com/r4dl/StopThePop --recursive
Our default, provided install method is based on Conda package and environment management:
SET DISTUTILS_USE_SDK=1 # Windows only
conda env create --file environment.yml
conda activate stopthepop
Note: This process assumes that you have CUDA SDK 11 installed. Optionally, you can use CUDA 12 and Pytorch 2.1, by using
environment_cuda12.yml
instead ofenvironment.yml
.
Subsequently, install the CUDA rasterizer:
pip install submodules/diff-gaussian-rasterization
Note: This can take several minutes. If you experience unreasonably long build times, consider using our fast build mode.
Our implementation includes 4 flavors of Gaussian Splatting:
Fast | View-Consistent | |
3DGS | ✅ | ❌ |
Full Sort | 🐢 | ✅ |
KBuffer | ✅ | ✅ |
Ours (recommended) | ✅ | ✅ |
Note: Our hierarchical rasterizer is both faster and more view-consistent compared to the naïve KBuffer method.
The train.py
script takes a .json
config file as the argument --splatting_config
, which should contain the following information (this example is also the default config.json
, if none is provided):
{
"sort_settings":
{
"sort_mode": 0, // Global (0), Per-Pixel Full (1), Per-Pixel K-Buffer (2), Hierarchical (3)
"sort_order": 0, /* Viewspace Z-Depth (0), Worldspace Distance (1),
Per-Tile Depth at Tile Center (2), Per-Tile Depth at Max Contrib. Pos. (3) */
"queue_sizes":
{
"per_pixel": 4, // Used for: Per-Pixel K-Buffer and Hierarchical
"tile_2x2": 8, // Used only for Hierarchical
"tile_4x4": 64 // Used only for Hierarchical
}
},
"culling_settings":
{
"rect_bounding": false, // Bound 2D Gaussians with a rectangle (instead of a square)
"tight_opacity_bounding": false, // Bound 2D Gaussians by considering their opacity value
"tile_based_culling": false, /* Cull Tiles where the max. contribution is below the alpha threshold;
Recommended to be used together with Load Balancing*/
"hierarchical_4x4_culling": false, // Used only for Hierarchical
},
"load_balancing": false, // Use load balancing for per-tile calculations (culling, depth, and duplication)
"proper_ewa_scaling": false, /* Proper dilation of opacity, as proposed by Yu et al. ("Mip-Splatting");
Model also needs to be trained with this setting */
}
These values can be overwritten through the command line.
Call python train.py --help
to see all available options.
At the start of training, the provided arguments will be written into the output directory.
The render.py
script uses the config.json
in the model directory per default, with the option to overwrite through the command line.
To train different example models (see the corresponding config files for the used settings), run:
# Our Hierarchical Rasterizer, as proposed in StopThePop
python train.py --splatting_config configs/hierarchical.json -s <path to COLMAP or NeRF Synthetic dataset>
# Vanilla 3DGS
python train.py --splatting_config configs/vanilla.json -s <path to COLMAP or NeRF Synthetic dataset>
# Per-Pixel K-Buffer Sort (Queue Size 16)
python train.py --splatting_config configs/kbuffer.json -s <path to COLMAP or NeRF Synthetic dataset>
By default, the trained models use all available images in the dataset.
To train them while withholding a test set for evaluation, use the --eval
flag.
This way, you can render training/test sets and produce error metrics as follows:
python train.py -s <path to COLMAP or NeRF Synthetic dataset> --eval # Train with train/test split
python render.py -m <path to trained model> # Generate renderings and gaussian count
python metrics.py -m <path to trained model> # Compute error metrics on renderings
Our repository additionally permits rendering of Depth, visualized with the Turbo colormap. To render depth, run
python render.py -m <path to trained model> --render_depth
We further provide the full_eval.py
script.
This script specifies the routine used in our evaluation and demonstrates the use of some additional parameters, e.g., --images (-i)
to define alternative image directories within COLMAP data sets.
If you have downloaded and extracted all the training data, you can run it like this:
python full_eval.py -m360 <mipnerf360 folder> -tat <tanks and temples folder> -db <deep blending folder> --config <splatting config file>
If you want to evaluate our pre-trained models, you have to download the source datsets and indicate their location to render.py
, just as done here:
python render.py -m <path to pre-trained model> -s <path to COLMAP dataset>
Alternatively, you can modify the source_path
with the cfg_args
-file and manually insert the correct path.
Note: We included our models for StopThePop and 3DGS, which were used in our evaluation: to minimize file size, we only include the final checkpoint. We also include the final, rendered images, hence you can reproduce our results easily.
Deep Blending | Mip-NeRF 360 Indoor | Mip-NeRF 360 Outdoor | Tanks & Temples | |||||||||||||
PSNR | SSIM | LPIPS | ꟻLIP | PSNR | SSIM | LPIPS | ꟻLIP | PSNR | SSIM | LPIPS | ꟻLIP | PSNR | SSIM | LPIPS | ꟻLIP | Ours | 29.86 | 0.904 | 0.234 | 0.127 | 30.62 | 0.921 | 0.186 | 0.099 | 24.60 | 0.728 | 0.235 | 0.167 | 23.21 | 0.843 | 0.173 | 0.216 |
3DGS | 29.46 | 0.900 | 0.247 | 0.131 | 30.98 | 0.922 | 0.189 | 0.094 | 24.59 | 0.727 | 0.240 | 0.167 | 23.71 | 0.845 | 0.178 | 0.199 |
Our proposed optimization imply a significant performance improvement, even for vanilla 3DGS. Here is a framerate comparison for two exemplary scenes in Full HD resolution, run on an NVIDIA RTX 4090 with CUDA 11.8.
Bicycle | Train | |||
3DGS | Ours | 3DGS | Ours | |
Vanilla | 90 | 20 | 159 | 43 |
w/ Rect Culling | 168 | 42 | 277 | 81 |
w/ Opacity Culling | 205 | 54 | 341 | 97 |
w/ Load Balancing | 216 | 61 | 360 | 120 |
w/ Tile-based Culling | 240 | 76 | 425 | 145 |
w/ 4x4 Tile Culling | - | 119 | - | 213 |
Note: For 3DGS, 4x4 Tile Culling is not an option.
Following 3DGS, we provide interactive viewers for our method: remote and real-time.
Our viewing solutions are based on the SIBR framework, developed by the GRAPHDECO group for several novel-view synthesis projects.
Our modified viewer contains additional debug modes, and options to disable several of our proposed optimizations.
The settings on startup are based on the config.json
file in the model directory (if it exists).
The implementation is hosted here.
Hardware requirements and setup steps are identical to 3DGS, hence, refer to the corresponding README for details.
If you cloned with submodules (e.g., using --recursive
), the source code for the viewers is found in SIBR_viewers
.
CMake should take care of your dependencies.
cd SIBR_viewers
cmake -Bbuild .
cmake --build build --target install --config RelWithDebInfo
You may specify a different configuration, e.g. Debug
if you need more control during development.
You will need to install a few dependencies before running the project setup.
# Dependencies
sudo apt install -y libglew-dev libassimp-dev libboost-all-dev libgtk-3-dev libopencv-dev libglfw3-dev libavdevice-dev libavcodec-dev libeigen3-dev libxxf86vm-dev libembree-dev
# Project setup
cd SIBR_viewers
cmake -Bbuild . -DCMAKE_BUILD_TYPE=Release # add -G Ninja to build faster
cmake --build build -j24 --target install
For performance reasons, we use templates for several of our options, causing very long compile times for our submodule and SIBR.
Hence, we provide a STOPTHEPOP_FASTBUILD
option in submodules/diff-gaussian-rasterization/cuda_rasterizer/rasterizer.h
.
Simply uncomment
// #define STOPTHEPOP_FASTBUILD
This solely compiles the default options for our method, which should be sufficient.
If you further want to reduce the compile time, simply specify the exact CUDA_ARCHITECTURE
in the submodules/diff-gaussian-rasterization/CMakeLists.txt
.
Note: For
SIBR
, the correspondingCMakeLists.txt
is located inSIBR_viewers/extlibs/CudaRasterizer/CudaRasterizer/CMakeLists.txt
, andrasterizer.h
is located inSIBR_viewers/extlibs/CudaRasterizer/CudaRasterizer/cuda_rasterizer/rasterizer.h
https://github.com/r4dl/StopThePop/assets/45897040/5e763600-c0d9-4055-b664-0b9ea342a248
@misc{sibr2020,
author = {Bonopera, Sebastien and Esnault, Jerome and Prakash, Siddhant and Rodriguez, Simon and Thonat, Theo and Benadel, Mehdi and Chaurasia, Gaurav and Philip, Julien and Drettakis, George},
title = {sibr: A System for Image Based Rendering},
year = {2020},
url = {https://gitlab.inria.fr/sibr/sibr_core}
}
Our popping detection method is a self-contained module, hosted here, and is included as a submodule.
For more information on how to run the method, consult the submodules README.
Please consider 3DGS's FAQ, contained in their README. In addition, several issues are also covered on 3DGS's issues page. We will update this FAQ as issues arise.