Home

Awesome

Octree-GS: Towards Consistent Real-time Rendering with LOD-Structured 3D Gaussians

Project Page | Paper | Viewers for Windows

Kerui Ren*, Lihan Jiang*, Tao Lu, Mulin Yu, Linning Xu, Zhangkai Ni, Bo Dai βœ‰οΈ <br />

News

[2024.09.25] 🎈We propose Octree-AnyGS, a general anchor-based framework that supports explicit Gaussians (2D-GS, 3D-GS) and neural Gaussians (Scaffold-GS). Additionally, Octree-GS has been adapted to the aforementioned Gaussian primitives, enabling Level-of-Detail representation for large-scale scenes. This framework holds potential for application to other Gaussian-based methods, with relevant SIBR visualizations forthcoming.(https://github.com/city-super/Octree-AnyGS)

[2024.05.30] πŸ‘€We update new mode (depth, normal, Gaussian distribution and LOD Bias) in the viewer for Octree-GS.

[2024.05.30] 🎈We release the checkpoints for the Mip-NeRF 360, Tanks&Temples, Deep Blending and MatrixCity Dataset.

[2024.04.08] 🎈We update the latest quantitative results on three datasets.

[2024.04.01] πŸŽˆπŸ‘€ The viewer for Octree-GS is available now.

[2024.04.01] We release the code.

Overview

<p align="center"> <img src="assets/pipeline.png" width=100% height=100% class="center"> </p>

Inspired by the Level-of-Detail (LOD) techniques, we introduce \modelname, featuring an LOD-structured 3D Gaussian approach supporting level-of-detail decomposition for scene representation that contributes to the final rendering results. Our model dynamically selects the appropriate level from the set of multi-resolution anchor points, ensuring consistent rendering performance with adaptive LOD adjustments while maintaining high-fidelity rendering results.

<p align="center"> <img src="assets/teaser_big.png" width=100% height=100% class="center"> </p>

Installation

We tested on a server configured with Ubuntu 18.04, cuda 11.6 and gcc 9.4.0. Other similar configurations should also work, but we have not verified each one individually.

  1. Clone this repo:
git clone https://github.com/city-super/Octree-GS --recursive
cd Octree-GS
  1. Install dependencies
SET DISTUTILS_USE_SDK=1 # Windows only
conda env create --file environment.yml
conda activate octree_gs

Data

First, create a data/ folder inside the project path by

mkdir data

The data structure will be organised as follows:

data/
β”œβ”€β”€ dataset_name
β”‚   β”œβ”€β”€ scene1/
β”‚   β”‚   β”œβ”€β”€ images
β”‚   β”‚   β”‚   β”œβ”€β”€ IMG_0.jpg
β”‚   β”‚   β”‚   β”œβ”€β”€ IMG_1.jpg
β”‚   β”‚   β”‚   β”œβ”€β”€ ...
β”‚   β”‚   β”œβ”€β”€ sparse/
β”‚   β”‚       └──0/
β”‚   β”œβ”€β”€ scene2/
β”‚   β”‚   β”œβ”€β”€ images
β”‚   β”‚   β”‚   β”œβ”€β”€ IMG_0.jpg
β”‚   β”‚   β”‚   β”œβ”€β”€ IMG_1.jpg
β”‚   β”‚   β”‚   β”œβ”€β”€ ...
β”‚   β”‚   β”œβ”€β”€ sparse/
β”‚   β”‚       └──0/
...

Public Data

Custom Data

For custom data, you should process the image sequences with Colmap to obtain the SfM points and camera poses. Then, place the results into data/ folder.

Training

Training multiple scenes

To train multiple scenes in parallel, we provide batch training scripts:

run them with

bash train_xxx.sh

Notice 1: Make sure you have enough GPU cards and memories to run these scenes at the same time.

Notice 2: Each process occupies many cpu cores, which may slow down the training process. Set torch.set_num_threads(32) accordingly in the train.py to alleviate it.

Training a single scene

For training a single scene, modify the path and configurations in single_train.sh accordingly and run it:

bash single_train.sh

For these public datasets, the configurations of 'voxel_size' and 'fork' can refer to the above batch training script.

This script will store the log (with running-time code) into outputs/dataset_name/scene_name/exp_name/cur_time automatically.

Evaluation

We've integrated the rendering and metrics calculation process into the training code. So, when completing training, the rendering results, fps and quality metrics will be printed automatically. And the rendering results will be save in the log dir. Mind that the fps is roughly estimated by

torch.cuda.synchronize();t_start=time.time()
rendering...
torch.cuda.synchronize();t_end=time.time()

which may differ somewhat from the original 3D-GS, but it does not affect the analysis.

Meanwhile, we keep the manual rendering function with a similar usage of the counterpart in 3D-GS, one can run it by

python render.py -m <path to trained model> # Generate renderings
python metrics.py -m <path to trained model> # Compute error metrics on renderings

Results

Mip-NeRF 360 Dataset

scenePSNRSSIMLPIPSGS(k)Mem(MB)
bicycle25.140.7530.238701252.07
garden27.690.860.1191344272.67
stump26.610.7630.265467145.50
room32.530.9370.171377118.00
counter30.300.9260.166457106.98
kitchen31.760.9330.115793105.16
bonsai33.410.9530.16947497.16
flowers21.470.5980.342726238.57
treehill23.190.6450.347545211.90
avg28.010.8190.215654172.00
paper27.730.8150.217686489.59
+0.28+0.004-0.002-4.66%-64.87%

Tanks and Temples Dataset

scenePSNRSSIMLPIPSGS(k)Mem(MB)
truck26.170.8920.12740184.42
train23.040.8370.18444684.45
avg24.610.8650.15642484.44
paper24.520.8660.153481410.48
+0.09-0.001+0.003-11.85%-79.43%

Deep Blending Dataset

scenePSNRSSIMLPIPSGS(k)Mem(MB)
drjohnson29.890.9110.234132132.43
playroom31.080.9140.2469353.94
avg30.490.9130.24011393.19
paper30.410.9130.238144254.87
+0.08-+0.002-21.52%-63.44%

MatrixCity Dataset

scenePSNRSSIMLPIPSGS(k)Mem(GB)
Block_All26.990.8330.2574532.36
paper26.410.8140.2826653.70
+0.59+0.019-0.025-31.87%-36.21%

Viewer

The viewers for Octree-GS is available now. Please follow the following format

<location>
|---point_cloud
|   |---point_cloud.ply
|   |---color_mlp.pt
|   |---cov_mlp.pt
|   |---opacity_mlp.pt
|   (|---embedding_appearance.pt)
|---cameras.json
|---cfg_args

or

<location>
|---point_cloud
|   |---iteration_{ITERATIONS}
|   |   |---point_cloud.ply
|   |   |---color_mlp.pt
|   |   |---cov_mlp.pt
|   |   |---opacity_mlp.pt
|   |   (|---embedding_appearance.pt)
|---cameras.json
|---cfg_args

Contact

Citation

If you find our work helpful, please consider citing:

@article{ren2024octree,
  title={Octree-gs: Towards consistent real-time rendering with lod-structured 3d gaussians},
  author={Ren, Kerui and Jiang, Lihan and Lu, Tao and Yu, Mulin and Xu, Linning and Ni, Zhangkai and Dai, Bo},
  journal={arXiv preprint arXiv:2403.17898},
  year={2024}
}

LICENSE

Please follow the LICENSE of 3D-GS.

Acknowledgement

We thank all authors from 3D-GS and Scaffold-GS for presenting such an excellent work.