• Stars
    star
    1,634
  • Rank 27,514 (Top 0.6 %)
  • Language
    Jupyter Notebook
  • License
    Other
  • Created 7 months ago
  • Updated 24 days ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

[CVPR 2024] 4D Gaussian Splatting for Real-Time Dynamic Scene Rendering

4D Gaussian Splatting for Real-Time Dynamic Scene Rendering

ArXiv Preprint

Project Page| arXiv Paper

Guanjun Wu1*, Taoran Yi2*, Jiemin Fang3‑, Lingxi Xie3,
Xiaopeng Zhang3, Wei Wei1,Wenyu Liu2, Qi Tian3 , Xinggang Wang2β€‘βœ‰

1School of CS, HUST   2School of EIC, HUST   3Huawei Inc.  

* Equal Contributions. $\ddagger$ Project Lead. βœ‰ Corresponding Author.


block
Our method converges very quickly and achieves real-time rendering speed.

Colab demo:Open In Colab (Thanks camenduru.)

Light Gaussian implementation: This link (Thanks pablodawson)

Environmental Setups

Please follow the 3D-GS to install the relative packages.

git clone https://github.com/hustvl/4DGaussians
cd 4DGaussians
git submodule update --init --recursive
conda create -n Gaussians4D python=3.7 
conda activate Gaussians4D

pip install -r requirements.txt
pip install -e submodules/depth-diff-gaussian-rasterization
pip install -e submodules/simple-knn

In our environment, we use pytorch=1.13.1+cu116.

Data Preparation

For synthetic scenes:
The dataset provided in D-NeRF is used. You can download the dataset from dropbox.

For real dynamic scenes:
The dataset provided in HyperNeRF is used. You can download scenes from Hypernerf Dataset and organize them as Nerfies. Meanwhile, Plenoptic Dataset could be downloaded from their official websites. To save the memory, you should extract the frames of each video and then organize your dataset as follows.

β”œβ”€β”€ data
β”‚   | dnerf 
β”‚     β”œβ”€β”€ mutant
β”‚     β”œβ”€β”€ standup 
β”‚     β”œβ”€β”€ ...
β”‚   | hypernerf
β”‚     β”œβ”€β”€ interp
β”‚     β”œβ”€β”€ misc
β”‚     β”œβ”€β”€ virg
β”‚   | dynerf
β”‚     β”œβ”€β”€ cook_spinach
β”‚       β”œβ”€β”€ cam00
β”‚           β”œβ”€β”€ images
β”‚               β”œβ”€β”€ 0000.png
β”‚               β”œβ”€β”€ 0001.png
β”‚               β”œβ”€β”€ 0002.png
β”‚               β”œβ”€β”€ ...
β”‚       β”œβ”€β”€ cam01
β”‚           β”œβ”€β”€ images
β”‚               β”œβ”€β”€ 0000.png
β”‚               β”œβ”€β”€ 0001.png
β”‚               β”œβ”€β”€ ...
β”‚     β”œβ”€β”€ cut_roasted_beef
|     β”œβ”€β”€ ...

Training

For training synthetic scenes such as bouncingballs, run

python train.py -s data/dnerf/bouncingballs --port 6017 --expname "dnerf/bouncingballs" --configs arguments/dnerf/bouncingballs.py 

You can customize your training config through the config files.

Checkpoint

Also, you can training your model with checkpoint.

python train.py -s data/dnerf/bouncingballs --port 6017 --expname "dnerf/bouncingballs" --configs arguments/dnerf/bouncingballs.py --checkpoint_iterations 200 # change it.

Then load checkpoint with:

python train.py -s data/dnerf/bouncingballs --port 6017 --expname "dnerf/bouncingballs" --configs arguments/dnerf/bouncingballs.py --start_checkpoint "output/dnerf/bouncingballs/chkpnt_coarse_200.pth"
# finestage: --start_checkpoint "output/dnerf/bouncingballs/chkpnt_fine_200.pth"

Rendering

Run the following script to render the images.

python render.py --model_path "output/dnerf/bouncingballs/"  --skip_train --configs arguments/dnerf/bouncingballs.py  &

Evaluation

You can just run the following script to evaluate the model.

python metrics.py --model_path "output/dnerf/bouncingballs/" 

Custom Datasets

Install nerfstudio and follow their colmap pipeline.

pip install nerfstudio
ns-process-data images --data data/your-data --output-dir data/your-ns-data
python train.py -s data/your-ns-data --port 6017 --expname "custom" --configs arguments/hypernerf/default.py 

Scripts

There are some helpful scripts in , please feel free to use them.

vis_point.py: get all points clouds at each timestamps.

usage:

export exp_name="hypernerf"
python vis_point.py --model_path output/$exp_name/interp/aleks-teapot --configs arguments/$exp_name/default.py 

weight_visualization.ipynb:

visualize the weight of Multi-resolution HexPlane module.

merge_many_4dgs.py: merge your trained 4dgs. usage:

export exp_name="dynerf"
python merge_many_4dgs.py --model_path output/$exp_name/sear_steak

colmap.sh: generate point clouds from input data

bash colmap.sh data/hypernerf/virg/vrig-chicken hypernerf 
bash colmap.sh data/dynerf/sear_steak llff

Blender format seems doesn't work. Welcome to raise a pull request to fix it.

downsample_point.py :downsample generated point clouds by sfm.

python scripts/downsample_point.py data/dynerf/sear_steak/colmap/dense/workspace/fused.ply data/dynerf/sear_steak/points3D_downsample2.ply

In my paper, I always use colmap.sh to generate dense point clouds and downsample it to less than 40000 points.

Here are some codes maybe useful but never adopted in my paper, you can also try it.


Contributions

This project is still under development. Please feel free to raise issues or submit pull requests to contribute to our codebase.


Some source code of ours is borrowed from 3DGS, k-planes,HexPlane, TiNeuVox. We sincerely appreciate the excellent works of these authors.

Acknowledgement

We would like to express our sincere gratitude to @zhouzhenghong-gt for his revisions to our code and discussions on the content of our paper.

Citation

Some insights about neural voxel grids and dynamic scenes reconstruction originate from TiNeuVox. If you find this repository/work helpful in your research, welcome to cite these papers and give a ⭐.

@article{wu20234dgaussians,
  title={4D Gaussian Splatting for Real-Time Dynamic Scene Rendering},
  author={Wu, Guanjun and Yi, Taoran and Fang, Jiemin and Xie, Lingxi and Zhang, Xiaopeng and Wei Wei and Liu, Wenyu and Tian, Qi and Wang Xinggang},
  journal={arXiv preprint arXiv:2310.08528},
  year={2023}
}

@inproceedings{TiNeuVox,
  author = {Fang, Jiemin and Yi, Taoran and Wang, Xinggang and Xie, Lingxi and Zhang, Xiaopeng and Liu, Wenyu and Nie\ss{}ner, Matthias and Tian, Qi},
  title = {Fast Dynamic Radiance Fields with Time-Aware Neural Voxels},
  year = {2022},
  booktitle = {SIGGRAPH Asia 2022 Conference Papers}
}

More Repositories

1

Vim

Vision Mamba: Efficient Visual Representation Learning with Bidirectional State Space Model
Python
1,808
star
2

YOLOP

You Only Look Once for Panopitic Driving Perception.(MIR2022οΌ‰
Python
1,804
star
3

MapTR

[ICLR'23 Spotlight] MapTR: Structured Modeling and Learning for Online Vectorized HD Map Construction
Python
893
star
4

YOLOS

[NeurIPS 2021] You Only Look at One Sequence
Jupyter Notebook
810
star
5

SparseInst

[CVPR 2022] SparseInst: Sparse Instance Activation for Real-Time Instance Segmentation
Python
558
star
6

GaussianDreamer

GaussianDreamer: Fast Generation from Text to 3D Gaussians by Bridging 2D and 3D Diffusion Models (CVPR 2024)
Python
503
star
7

Matte-Anything

Matte Anything: Interactive Natural Image Matting with Segment Anything Models
Python
402
star
8

QueryInst

[ICCV 2021] Instances as Queries
Python
400
star
9

VAD

[ICCV 2023] VAD: Vectorized Scene Representation for Efficient Autonomous Driving
Python
385
star
10

TopFormer

TopFormer: Token Pyramid Transformer for Mobile Semantic Segmentation, CVPR2022
Python
373
star
11

MIMDet

[ICCV 2023] You Only Look at One Partial Sequence
Python
326
star
12

TiNeuVox

TiNeuVox: Fast Dynamic Radiance Fields with Time-Aware Neural Voxels (SIGGRAPH Asia 2022)
Python
306
star
13

ViTMatte

[Information Fusion] Boosting Image Matting with Pretrained Plain Vision Transformers
Python
245
star
14

TeViT

Temporally Efficient Vision Transformer for Video Instance Segmentation, CVPR 2022, Oral
Python
234
star
15

GKT

Efficient and Robust 2D-to-BEV Representation Learning via Geometry-guided Kernel Transformer
Python
197
star
16

BMaskR-CNN

[ECCV 2020] Boundary-preserving Mask R-CNN
Python
184
star
17

HAIS

Hierarchical Aggregation for 3D Instance Segmentation (ICCV 2021)
Python
163
star
18

VMA

A general map auto annotation framework based on MapTR, with high flexibility in terms of spatial scale and element type
Python
157
star
19

Symphonies

[CVPR 2024] Symphonies (Scene-from-Insts): Symphonize 3D Semantic Scene Completion with Contextual Instance Queries
Python
123
star
20

WeakTr

WeakTr: Exploring Plain Vision Transformer for Weakly-supervised Semantic Segmentation
Python
116
star
21

LaneGAP

Lane Graph as Path: Continuity-preserving Path-wise Modeling for Online Lane Graph Construction
110
star
22

SparseTrack

Official PyTorch implementation of SparseTrack (the new version of code will come soon)
Python
108
star
23

CrossVIS

[ICCV 2021] Crossover Learning for Fast Online Video Instance Segmentation
Python
85
star
24

MSG-Transformer

MSG-Transformer: Exchanging Local Spatial Information by Manipulating Messenger Tokens (CVPR 2022)
Python
80
star
25

PolarDETR

73
star
26

BoxTeacher

[CVPR 2023] Exploring High-Quality Pseudo Masks for Weakly Supervised Instance Segmentation
Python
72
star
27

TinyDet

Python
68
star
28

GNeuVox

GNeuVox: Generalizable Neural Voxels for Fast Human Radiance Fields
Python
59
star
29

AziNorm

AziNorm: Exploiting the Radial Symmetry of Point Cloud for Azimuth-Normalized 3D Perception, CVPR 2022.
Python
53
star
30

Featurized-QueryRCNN

Featurized Query R-CNN
Python
46
star
31

RILS

[CVPR 2023] RILS: Masked Visual Reconstruction in Language Semantic Space (https://arxiv.org/abs/2301.06958)
Python
43
star
32

PD-Quant

[CVPR 2023] PD-Quant: Post-Training Quantization Based on Prediction Difference Metric
Python
39
star
33

MIM4D

MIM4D: Masked Modeling with Multi-View Video for Autonomous Driving Representation Learning
36
star
34

NeuSample

Code of "NeuSample: Neural Sample Field for Efficient View Synthesis"
Python
35
star
35

SAUNet

A Simple Adaptive Unfolding Network for Hyperspectral Image Reconstruction
Python
29
star
36

Query6DoF

Query6DoF: Learning Sparse Queries as Implicit Shape Prior for Category-Level 6DoF Pose Estimation
Python
25
star
37

HDR-HexPlane

3DV 2024: Fast High Dynamic Range Radiance Fields for Dynamic Scenes
Python
25
star
38

WeakSAM

WeakSAM: Segment Anything Meets Weakly-supervised Instance-level Recognition
Python
24
star
39

ViTGaze

Python
23
star
40

CircuitFormer

[NeurIPS 2023] CircuitFormer: Circuit as Set of Points
Python
23
star
41

MMIL-Transformer

Python
19
star
42

LSFA

Real-Time and Accurate Object Detection in Compressed Video by Long Short-term Feature Aggregation
Python
19
star
43

EfficientPose

Cuda
18
star
44

OpenInst

Python
14
star
45

BoxCaseg

Jupyter Notebook
13
star
46

mancs

Mancs: A multi-task attentional network with curriculum sampling for person re-identification
Python
12
star
47

RND-SCI

A Range-Null Space Decomposition Approach for Fast and Flexible Spectral Compressive Imaging
Python
10
star
48

DGCN

Python
9
star
49

PySA

Pyramid Self-Attention for Semantic Segmentation
8
star
50

EM-OLN

Python
7
star
51

BCF

Xinggang Wang, Bin Feng, Xiang Bai, Wenyu Liu, and Longin Jan Latecki. Bag of Contour Fragments for Robust Shape Classification. Pattern Recognition, Volume 47, Issue 6, June 2014, Pages 2116-2125.
MATLAB
6
star
52

tbcl

1
star
53

DeepTunel

Python
1
star