This repo contains the official implementation for the paper "3D-HGS: 3D-HGS: 3D Half-Gaussian Splatting". Our work proposes to employ 3D Half-Gaussian(3D-HGS) kernels, which can be used as a plug-and-play kernel for Gaussian Splatting-related works. Our experiments demonstrate their capability to improve the performance of current 3D-GS related methods and achieve state-of-the-art rendering performance on various datasets without compromising rendering speed.
07/31/2024: there is a bug in ./scene/gaussian_splatting.py line 193, it will switch the network to finetune mode and decrease the performance if you train from scratch. We fix it today.
Video may comimg in the future
The repository contains submodules, thus please check it out with
# HTTPS
git clone https://github.com/lihaolin88/3D-Half-Gaussian-Splatting.git
The codebase has 2 main components:
- A PyTorch-based optimizer, this component generates a 3D half Gaussian model from Structure from Motion (SfM) inputs, most parameter settings align with those used in gaussian splatting.
- A half gaussain rasterizer, The half Gaussian rasterizer can be used as a plug-and-play core for Gaussian splatting tasks by adjusting the opacity to two values for each Gaussian and activating the normal in your Python code.
We provide conda install instructions in this repo:
conda env create --file environment.yml
conda activate half_gaussian_splatting
This environment will automatically use the half Gaussian rasterizer. If the rasterizer is not installed correctly, please manually install the half Gaussian rasterizer:
conda activate half_gaussian_splatting
pip install ./submodules/diff-gaussian-rasterization
pip install ./submodules/simple-knn
To Train with our code (you can directly use the dataset download from the link, but don't forget to split the train and test set by yourself):
python train.py -s /the/path/of/dataset
To test with our code and generate score:
python test_and_score.py -s /the/path/of/test_data -m /the/path/of/trained_result_folder
The inference will save the render and ground truth images, the code will also show the PSNR, SSIM and LPIPS for each scene
If you find our paper/project useful, please consider citing our paper:
@article{li20243d,
title={3D-HGS: 3D Half-Gaussian Splatting},
author={Li, Haolin and Liu, Jinyang and Sznaier, Mario and Camps, Octavia},
journal={arXiv preprint arXiv:2406.02720},
year={2024}
}