Update
March 13, 2026 · View on GitHub
CG-SLAM: Efficient Dense RGB-D SLAM in a Consistent Uncertainty-aware 3D Gaussian Field
[ECCV 2024]
Jiarui Hu1†
·
Xianhao Chen1†
·
Boyin Feng1
·
Guanglin Li1
·
Liangjing Yang2
Hujun Bao1
·
Guofeng Zhang1
·
Zhaopeng Cui1*
1 State Key Lab of CAD&CG, Zhejiang University
2 ZJU-UIUC Institute, International Campus, Zhejiang University
* Corresponding author. † Equal contribution.
Project Page | Paper | Video
This repository contains the official implementation of CG-SLAM, a dense RGB-D SLAM system built on a consistent uncertainty-aware 3D Gaussian field. The project targets high-quality tracking, mapping, and rendering while keeping the system efficient enough for practical scene reconstruction experiments.
Table of Contents
Update
- Code for Diff-rasterization(w/pose --> 4✖️4 Transformation Matrix T)
- Our paper is accepted by ECCV 2024, and our code is coming soon!!!
- Code for RGBD-SLAM
- Code for Evaluation
Submodule
We have proposed a comprehensive mathematical theory on derivatives w.r.t. pose in 3D Gaussian splatting framework. Additionally, we have developed a specialized CUDA framework tailored for the SLAM task, decoupling the tracking and mapping components. For more details, please refer to the provided diff-gaussian-rasterization.
Installation
Requirements
- Linux
- Python 3.8
- CUDA-capable NVIDIA GPU
- PyTorch with a CUDA build compatible with your local toolkit
Recommended setup
git clone <your-release-url> CG-SLAM
cd CG-SLAM
git submodule update --init --recursive
conda create -n cg-slam python=3.8
conda activate cg-slam
Install PyTorch first. Pick the wheel that matches your CUDA environment. For example:
pip install torch torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/cu118
Install the remaining Python dependencies and local extensions:
pip install pyyaml scipy scikit-image opencv-python plyfile open3d tensorboard mathutils==2.81.2 tqdm trimesh imageio
pip install -e ./submodules/diff-gaussian-rasterization
pip install -e ./submodules/simple-knn
torch-scatter should be installed with a wheel that matches your PyTorch and CUDA versions. If it is not already available in your environment, install the matching build before running CG-SLAM.
Usage
Run
The provided YAML files under configs/ are examples for different datasets. Before running, either:
- edit
data.input_folderanddata.output_folderin the selected config file, or - override them from the command line with
--input_folderand--output_folder
Replica
python run.py \
--config ./configs/Replica/office0.yaml \
TUM RGB-D
python run.py \
--config ./configs/TUM/fr1_desk.yaml \
ScanNet
python run.py \
--config ./configs/ScanNet/scene0000.yaml \
Evaluation
ATE
For Replica scenes, you can evaluate the estimated trajectory with:
python tools/eval_ate.py --config ./configs/Replica/office0.yaml
For TUM RGB-D and ScanNet, the current script expects the corresponding ground-truth pose file to be available in the output directory as gt_pose.txt.
Acknowledgement
We sincerely thank the authors of the following projects:
Their excellent open-source work made this project possible.
Citation
@article{hu2024cg,
title={CG-SLAM: Efficient Dense RGB-D SLAM in a Consistent Uncertainty-aware 3D Gaussian Field},
author={Hu, Jiarui and Chen, Xianhao and Feng, Boyin and Li, Guanglin and Yang, Liangjing and Bao, Hujun and Zhang, Guofeng and Cui, Zhaopeng},
journal={arXiv preprint arXiv:2403.16095},
year={2024}
}