Skip to content

Repository files navigation

GRM: Large Gaussian Reconstruction Model for Efficient 3D Reconstruction and Generation

GRM: Large Gaussian Reconstruction Model for Efficient 3D Reconstruction and Generation
Yinghao Xu*, Zifan Shi*, Wang Yifan, Hansheng Chen, Ceyuan Yang, Sida Peng, Yujun Shen, Gordon Wetzstein

3d-generation.mp4

Todo List

  • Release gradio demo code.
  • Release inference code.
  • Release pretrained models.
  • Release training code.

GRM Demo

Requirements

  • 64-bit Python 3.10 and PyTorch 2.0.1 or higher.
  • CUDA 11.8
  • Users can use the following commands to install the packages
conda create -n grm python=3.10
conda activate grm pip install -r requirements.txt --extra-index-url https://download.pytorch.org/whl/cu118
cd third_party/diff-gaussian-rasterization && pip install -e .

Pretrained weights

Pretrained weights can be downloaded from Hugging Face.

# Example
mkdir checkpoints &&cd checkpoints
wget https://huggingface.co/justimyhxu/GRM/blob/main/grm_u.pth &&cd ..

Note that we provide three checkpoints for use. We use the OpenCV coordinate system.

CheckpointTraining settings
grm_u.pthThe elevations are all 20 degrees and the azimuths uniformly cover all the 360-degree information.
grm_r.pthThe azimuths roughly cover the 360-degree information.
grm_zero123plus.pthThree views are with 30-degree elevations and the azimuths are evenly distributed at intervals of 120 degrees. Another view has the elevation of -20 degrees and the azimuth is 60 degrees different from one of the three.
instant3d.pthWe reproduce the first-stage diffusion model of instant3d, which can produce consistent multi-view images.

Besides, you need to download checkpoints for SV3D.

cd checkpoints
wget https://huggingface.co/stabilityai/sv3d/blob/main/sv3d_p.safetensors &&cd ..

Inference

# text-to-3D
python test.py --prompt 'a car made out of cheese'# image-to-3D with zero123plus-v1.1
python test.py --image_path examples/dragon2.png --model zero123plus-v1.1
# image-to-3D with zero123plus-v1.2
python test.py --image_path examples/dragon2.png --model zero123plus-v1.2
# image-to-3D with SV3D
python test.py --image_path examples/dragon2.png --model sv3d

Add --fuse_mesh True if you would like to get the textured mesh. Add --optimize_texture True if you would like to optimize texture on extracted textured mesh.

Gradio Demo

We provide an offline gradio demo, which can be run with the following command:

python app.py

Results

Blender Demo

blender_demo.mp4

Sparse-view Reconstruction

sparse-view.mp4

Acknowledgement

We thank all of the following amazing codes:

BibTeX

@article{xu2024grm,
author = {Xu, Yinghao and Shi, Zifan and Yifan, Wang and Peng, Sida and Yang, Ceyuan and Shen, Yujun and Wetzstein Gordon},
title = {GRM: Large Gaussian Reconstruction Model for Efficient 3D Reconstruction and Generation},
journal = {arxiv: 2403.14621},
year = {2024},
}

About

Large Gaussian Reconstruction Model for Efficient 3D Reconstruction and Generation

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages