Sharath Girish, Kamal Gupta, Abhinav Shrivastava
Official implementation of the paper "EAGLES: Efficient Accelerated 3D Gaussians with Lightweight EncodingS"
Abstract: Recently, 3D Gaussian splatting (3D-GS) has gained popularity in novel-view scene synthesis. It addresses the challenges of lengthy training times and slow rendering speeds associated with Neural Radiance Fields (NeRFs). Through rapid, differentiable rasterization of 3D Gaussians, 3D-GS achieves real-time rendering and accelerated training. They, however, demand substantial memory resources for both training and storage, as they require millions of Gaussians in their point cloud representation for each scene. We present a technique utilizing quantized embeddings to significantly reduce per-point memory storage requirements and a coarse-to-fine training strategy for a faster and more stable optimization of the Gaussian point clouds. Our approach develops a pruning stage which results in scene representations with fewer Gaussians, leading to faster training times and rendering speeds for real-time rendering of high resolution scenes. We reduce storage memory by more than an order of magnitude all while preserving the reconstruction quality. We validate the effectiveness of our approach on a variety of datasets and scenes preserving the visual quality while consuming 10-20x less memory and faster training/inference speed.
The codebase is built off of the codebase of 3D-Gaussian Splatting (3D-GS) here by Kerbl et. al. The setup instructions are similar to their codebase with small changes in the libraries. The repository contains submodules
# SSH
git clone git@github.com:Sharath-girish/efficientgaussian.git --recursive
or
# HTTPS
git clone https://github.com/Sharath-girish/efficientgaussian.git --recursive
On Linux, it can be set up as
conda env create --file environment.yml
conda activate gaussian_splatting
The different components for the codebase have similar hardware and software requirements as 3D-GS but with an updated environment.yml
as provided. The config files corresponding to different experiments are provided in the configs
folder as yaml files. These files override the default arguments at arguments/__init__.py
. They can be further overridden with command-line arguments. The model with compressible gaussians is provided at scene/gaussians_sq.py
with the latent decoders at compress/decoders.py
The main training and evaluation script is train_eval.py
with the different training modes controllable using the CLI arguments as
--skip_train
and --skip_test
accordingly.
The final compressed object is stored as a pickle file at point_cloud_best/point_cloud_compressed.pkl
within the experiment log directory.
We use PyTorch version 1.12.1 along with CUDA version 11.3 as we find this configuration to work for running our experiments. Prior or subsequent versions might work but are not tested. Training and evaluation requires a CUDA compatible GPU with Compute Capability 7.0+ and will likely consume less than 12 GB RAM for scenes in the MiP-NeRF360 dataset but can go up when also evaluating or if more Gaussians are created based on the densification interval.
To run the training optimizer, simply use
python train_eval.py --config configs/efficient-3dgs.yaml -s <path to COLMAP or NeRF Synthetic dataset> -m <path to log directory>
The train_eval.py
script also consists of additional arguments for hyperparameters of the latent quantization.
Each hyperparameter is a list of 6 attributes: position (xyz
), rotation(rotation
), scaling(scaling
), opacity(opacity
), base SH component for color(features_dc
), remaining components(features_rest
).
As explained in the paper, we compress rotation, opacity and features_rest as they consume bulk of the memory and are easily compressible. Changing the hyperparameter for each attribute can then be done as
--{attribute_name}_{hyperparameter_name}
. The default hyperparameters used are provided in the configs file
configs/efficient-3dgs.yaml
. The list of hyperparameter name arguments for any given attribute_name
is given below
Images with width greater than 1600 pixels are automatically resized to 1600 as in 3D-GS. This can be avoided by explicitly specifying resolution -r 1
.
The datasets can be obtained from the links provided in the 3D-GS repository: MipNeRF360, Tanks&Temples and Deep Blending
Evaluation executes the same script train_eval.py
with the --skip_train
option to skip retraining and jump to evaluation.
python train_eval.py --config --config configs/efficient-3dgs.yaml -s <path to COLMAP or NeRF Synthetic dataset> -m <path to log directory of saved model> --skip_train
The --save_images
option uses the render_sets function to render images in the train set (unless --skip_train
is specified) and test set and saves them to disk. The rendering FPS is calculated as well.
Metrics are then evaluated using the evaluate function.
A 360 degree video of the scene can be created by running the render_360.py
script by specifying the dataset flag -s
and the model directory -m
.