Home

Awesome

GaussianOcc

Project Page | Arxiv | Data

GaussianOcc: Fully Self-supervised and Efficient 3D Occupancy Estimation with Gaussian Splatting <br> Wanshui Gan*, Fang Liu*, Hongbin Xu, Ningkai Mo, Naoto Yokoya<br> πŸ“– δΈ­ζ–‡θ§£θ―»οΌˆη¬¬δΈ‰ζ–ΉοΌ‰: θ‡ͺεŠ¨ι©Ύι©ΆδΉ‹εΏƒ

Updates:

πŸ•Ή Demos

Demos are a little bit large; please wait a moment to load them.

3D Occupancy and Render Depth:

nuScenes:

<p align='center'> <img src="./assets/nuscenes.gif" width="480px"> <img src="./assets/bar.png" width="480px"> </p>

DDAD:

<p align='center'> <img src="./assets/ddad.gif" width="480px"> <img src="./assets/bar.png" width="480px"> <!-- nuScenes --> </p>

πŸ“ Introduction

We introduce GaussianOcc, a systematic method that investigates the two usages of Gaussian splatting for fully self-supervised and efficient 3D occupancy estimation in surround views. First, traditional methods for self-supervised 3D occupancy estimation still require ground truth 6D poses from sensors during training. To address this limitation, we propose Gaussian Splatting for Projection (GSP) module to provide accurate scale information for fully self-supervised training from adjacent view projection. Additionally, existing methods rely on volume rendering for final 3D voxel representation learning using 2D signals (depth maps, semantic maps), which is both time-consuming and less effective. We propose Gaussian Splatting from Voxel space (GSV) to leverage the fast rendering properties of Gaussian splatting. As a result, the proposed GaussianOcc method enables fully self-supervised (no ground truth pose) 3D occupancy estimation in competitive performance with low computational cost (2.7 times faster in training and 5 times faster in rendering).

πŸ’‘ Method

Method Overview:

<p align='center'> <img src="./assets/overview.png" width="720px"> </p>

πŸ”§ Installation

Clone this repo and install the dependencies:

git clone --recurse-submodules https://github.com/GANWANSHUI/GaussianOcc.git
cd GaussianOcc
conda create -n gsocc python=3.8
conda activate gsocc
conda install pytorch==1.9.1 torchvision==0.10.1 cudatoolkit=11.3 -c pytorch -c conda-forge
pip install -r requirements.txt

cd submodule/diff-gaussian-rasterization-confidence
pip install .

cd submodule/diff-gaussian-rasterization-confidence-semantic
pip install .

cd submodule/simple-knn
pip install .

Our code is tested with Python 3.8, PyTorch 1.9.1 and CUDA 11.3 and can be adapted to other versions of PyTorch and CUDA with minor modifications.

πŸ— Dataset Preparation

<details> <summary> Click for more </summary> You can add the softlink if you already had the related dataset, such as:
ln -s  path_to_nuscenes GaussianOcc/data

ln -s  path_to_ddad GaussianOcc/data

nuScenes

  1. Download nuScenes V1.0 full dataset data from nuScenes and link the data folder to ./data/nuscenes/nuscenes/.

  2. Download the ground truth occupancy labels from Occ3d and unzip the gts.tar.gz to ./data/nuscenes/gts. Note that we only use the 3d occupancy labels for validation.

  3. Generate the ground truth depth maps for validation:

    python tools/export_gt_depth_nusc.py
    
  4. Download the generated 2D semantic labels from semantic_labels and extract the data to ./data/nuscenes/. We recommend that you use pigz to speed up the process.

  5. Download the pretrained weights of our model from Google or η™ΎεΊ¦, the password is 778c, and move them to ./ckpts/.

  6. (Optional) If you want to generate the 2D semantic labels by yourself, please refer to the README.md in GroundedSAM_OccNeRF. The dataset index pickle file nuscenes_infos_train.pkl is from SurroundOcc and should be placed under ./data/nuscenes/.

DDAD

cd tools
python export_gt_depth_ddad.py val

The Final folder structure should be like:

GaussianOcc/
β”œβ”€β”€ ckpts/
β”‚   β”œβ”€β”€ ddad-sem-gs/
β”‚   β”œβ”€β”€ nusc-sem-gs/
β”‚   β”œβ”€β”€ stage1_pose_nusc/
β”‚   β”œβ”€β”€ stage1_pose_ddad/
β”œβ”€β”€ data/
β”‚   β”œβ”€β”€ nuscenes/
β”‚   β”‚   β”œβ”€β”€ nuscenes/
β”‚   β”‚   β”‚   β”œβ”€β”€ maps/
β”‚   β”‚   β”‚   β”œβ”€β”€ samples/
β”‚   β”‚   β”‚   β”œβ”€β”€ sweeps/
β”‚   β”‚   β”‚   β”œβ”€β”€ v1.0-trainval/
β”‚   β”‚   β”œβ”€β”€ gts/
β”‚   β”‚   β”œβ”€β”€ nuscenes_depth/
β”‚   β”‚   β”œβ”€β”€ nuscenes_semantic/
β”‚   β”‚   β”œβ”€β”€ nuscenes_infos_train.pkl
β”‚   β”œβ”€β”€ ddad/
β”‚   β”‚   │── raw_data/
β”‚   β”‚   β”‚   │── 000000
|   |   |   |── ...
|   |   |── depth/
β”‚   β”‚   β”‚   │── 000000
|   |   |   |── ...
|   |   |── mask/
β”‚   β”‚   β”‚   │── 000000
|   |   |   |── ...
|   |   |── ddad_semantic/
β”‚   β”‚   β”‚   │── 000000
|   |   |   |── ...
</details>

πŸš€ Quick Start

Training and Evaluation

<!-- Train GaussianOcc with semantic supervision: -->
sh run_gs_occ.sh

Visualization

Visualize the semantic occupancy prediction:

python tools/export_vis_data.py  # You can modify this file to choose scenes you want to visualize. Otherwise, all validation scenes will be visualized.

sh run_vis.sh

python gen_scene_video.py scene_folder_generated_by_the_above_command --sem_only

πŸ™ Acknowledgement

Many thanks to these excellent projects:

Recent related works:

πŸ“ƒ Bibtex

If you find this repository/work helpful in your research, welcome to cite our papers and give a ⭐.

@article{gan2024gaussianocc,
  title={GaussianOcc: Fully Self-supervised and Efficient 3D Occupancy Estimation with Gaussian Splatting},
  author={Gan, Wanshui and Liu, Fang and Xu, Hongbin and Mo, Ningkai and Yokoya, Naoto},
  journal={arXiv preprint arXiv:2408.11447},
  year={2024}
}

@article{gan2024comprehensive,
  title={A Comprehensive Framework for 3D Occupancy Estimation in Autonomous Driving},
  author={Gan, Wanshui and Mo, Ningkai and Xu, Hongbin and Yokoya, Naoto},
  journal={IEEE Transactions on Intelligent Vehicles},
  year={2024},
  publisher={IEEE}
}