jiawi-ren commited on
Commit
4d25a9a
1 Parent(s): 12b7f59
Files changed (1) hide show
  1. readme.md +14 -139
readme.md CHANGED
@@ -1,139 +1,14 @@
1
- # DreamGaussian
2
-
3
- This repository contains the official implementation for [DreamGaussian: Generative Gaussian Splatting for Efficient 3D Content Creation](https://arxiv.org/abs/2309.16653).
4
-
5
- ### [Project Page](https://dreamgaussian.github.io) | [Arxiv](https://arxiv.org/abs/2309.16653)
6
-
7
-
8
- https://github.com/dreamgaussian/dreamgaussian/assets/25863658/db860801-7b9c-4b30-9eb9-87330175f5c8
9
-
10
- ### [Colab demo](https://github.com/camenduru/dreamgaussian-colab)
11
- * Image-to-3D: [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/drive/1sLpYmmLS209-e5eHgcuqdryFRRO6ZhFS?usp=sharing)
12
- * Text-to-3D: [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/camenduru/dreamgaussian-colab/blob/main/dreamgaussian_colab.ipynb)
13
-
14
- ### [Gradio demo](https://huggingface.co/spaces/jiawei011/dreamgaussian)
15
- * Image-to-3D: <a href="https://huggingface.co/spaces/jiawei011/dreamgaussian"><img src="https://img.shields.io/badge/%F0%9F%A4%97%20Gradio%20Demo-Huggingface-orange"></a>
16
-
17
- ## Install
18
- ```bash
19
- pip install -r requirements.txt
20
-
21
- # a modified gaussian splatting (+ depth, alpha rendering)
22
- git clone --recursive https://github.com/ashawkey/diff-gaussian-rasterization
23
- pip install ./diff-gaussian-rasterization
24
-
25
- # simple-knn
26
- pip install ./simple-knn
27
-
28
- # nvdiffrast
29
- pip install git+https://github.com/NVlabs/nvdiffrast/
30
-
31
- # kiuikit
32
- pip install git+https://github.com/ashawkey/kiuikit
33
- ```
34
-
35
- Tested on:
36
- * Ubuntu 22 with torch 1.12 & CUDA 11.6 on a V100.
37
- * Windows 10 with torch 2.1 & CUDA 12.1 on a 3070.
38
-
39
- ## Usage
40
-
41
- Image-to-3D:
42
- ```bash
43
- ### preprocess
44
- # background removal and recentering, save rgba at 256x256
45
- python process.py data/name.jpg
46
-
47
- # save at a larger resolution
48
- python process.py data/name.jpg --size 512
49
-
50
- # process all jpg images under a dir
51
- python process.py data
52
-
53
- ### training gaussian stage
54
- # train 500 iters (~1min) and export ckpt & coarse_mesh to logs
55
- python main.py --config configs/image.yaml input=data/name_rgba.png save_path=name
56
-
57
- # gui mode (supports visualizing training)
58
- python main.py --config configs/image.yaml input=data/name_rgba.png save_path=name gui=True
59
-
60
- # load and visualize a saved ckpt
61
- python main.py --config configs/image.yaml load=logs/name_model.ply gui=True
62
-
63
- # use an estimated elevation angle if image is not front-view (e.g., common looking-down image can use -30)
64
- python main.py --config configs/image.yaml input=data/name_rgba.png save_path=name elevation=-30
65
-
66
- ### training mesh stage
67
- # auto load coarse_mesh and refine 50 iters (~1min), export fine_mesh to logs
68
- python main2.py --config configs/image.yaml input=data/name_rgba.png save_path=name
69
-
70
- # specify coarse mesh path explicity
71
- python main2.py --config configs/image.yaml input=data/name_rgba.png save_path=name mesh=logs/name_mesh.obj
72
-
73
- # gui mode
74
- python main2.py --config configs/image.yaml input=data/name_rgba.png save_path=name gui=True
75
-
76
- # export glb instead of obj
77
- python main2.py --config configs/image.yaml input=data/name_rgba.png save_path=name mesh_format=glb
78
-
79
- ### visualization
80
- # gui for visualizing mesh
81
- python -m kiui.render logs/name.obj
82
-
83
- # save 360 degree video of mesh (can run without gui)
84
- python -m kiui.render logs/name.obj --save_video name.mp4 --wogui
85
-
86
- # save 8 view images of mesh (can run without gui)
87
- python -m kiui.render logs/name.obj --save images/name/ --wogui
88
-
89
- ### evaluation of CLIP-similarity
90
- python -m kiui.cli.clip_sim data/name_rgba.png logs/name.obj
91
- ```
92
- Please check `./configs/image.yaml` for more options.
93
-
94
- Text-to-3D:
95
- ```bash
96
- ### training gaussian stage
97
- python main.py --config configs/text.yaml prompt="a photo of an icecream" save_path=icecream
98
-
99
- ### training mesh stage
100
- python main2.py --config configs/text.yaml prompt="a photo of an icecream" save_path=icecream
101
- ```
102
- Please check `./configs/text.yaml` for more options.
103
-
104
- Helper scripts:
105
- ```bash
106
- # run all image samples (*_rgba.png) in ./data
107
- python scripts/runall.py --dir ./data --gpu 0
108
-
109
- # run all text samples (hardcoded in runall_sd.py)
110
- python scripts/runall_sd.py --gpu 0
111
-
112
- # export all ./logs/*.obj to mp4 in ./videos
113
- python scripts/convert_obj_to_video.py --dir ./logs
114
- ```
115
-
116
- ### Gradio Demo
117
- ```bash
118
- python gradio_app.py
119
- ```
120
-
121
- ## Acknowledgement
122
-
123
- This work is built on many amazing research works and open-source projects, thanks a lot to all the authors for sharing!
124
-
125
- * [gaussian-splatting](https://github.com/graphdeco-inria/gaussian-splatting) and [diff-gaussian-rasterization](https://github.com/graphdeco-inria/diff-gaussian-rasterization)
126
- * [threestudio](https://github.com/threestudio-project/threestudio)
127
- * [nvdiffrast](https://github.com/NVlabs/nvdiffrast)
128
- * [dearpygui](https://github.com/hoffstadt/DearPyGui)
129
-
130
- ## Citation
131
-
132
- ```
133
- @article{tang2023dreamgaussian,
134
- title={DreamGaussian: Generative Gaussian Splatting for Efficient 3D Content Creation},
135
- author={Tang, Jiaxiang and Ren, Jiawei and Zhou, Hang and Liu, Ziwei and Zeng, Gang},
136
- journal={arXiv preprint arXiv:2309.16653},
137
- year={2023}
138
- }
139
- ```
 
1
+ ---
2
+ title: DreamGaussian
3
+ emoji: 🐠
4
+ colorFrom: purple
5
+ colorTo: yellow
6
+ sdk: gradio
7
+ sdk_version: 3.22.1
8
+ app_file: app.py
9
+ pinned: false
10
+ license: mit
11
+ ---
12
+
13
+ Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
14
+ Paper is from https://arxiv.org/abs/2309.16653