Spaces:
Running
on
Zero
Running
on
Zero
update
Browse files
README.md
CHANGED
@@ -1,167 +1,12 @@
|
|
1 |
-
|
2 |
-
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
## 🔆 Introduction
|
14 |
-
|
15 |
-
ViewCrafter can generate high-fidelity novel views from <strong>a single or sparse reference image</strong>, while also supporting highly precise pose control. Below shows an example:
|
16 |
-
|
17 |
-
|
18 |
-
### Zero-shot novel view synthesis (single view)
|
19 |
-
<table class="center">
|
20 |
-
<tr style="font-weight: bolder;text-align:center;">
|
21 |
-
<td>Reference image</td>
|
22 |
-
<td>Camera trajecotry</td>
|
23 |
-
<td>Generated novel view video</td>
|
24 |
-
</tr>
|
25 |
-
|
26 |
-
<tr>
|
27 |
-
<td>
|
28 |
-
<img src=assets/train.png width="250">
|
29 |
-
</td>
|
30 |
-
<td>
|
31 |
-
<img src=assets/ctrain.gif width="150">
|
32 |
-
</td>
|
33 |
-
<td>
|
34 |
-
<img src=assets/train.gif width="250">
|
35 |
-
</td>
|
36 |
-
</tr>
|
37 |
-
<tr>
|
38 |
-
<td>
|
39 |
-
<img src=assets/wst.png width="250">
|
40 |
-
</td>
|
41 |
-
<td>
|
42 |
-
<img src=assets/cwst.gif width="150">
|
43 |
-
</td>
|
44 |
-
<td>
|
45 |
-
<img src=assets/wst.gif width="250">
|
46 |
-
</td>
|
47 |
-
</tr>
|
48 |
-
<tr>
|
49 |
-
<td>
|
50 |
-
<img src=assets/flower.png width="250">
|
51 |
-
</td>
|
52 |
-
<td>
|
53 |
-
<img src=assets/cflower.gif width="150">
|
54 |
-
</td>
|
55 |
-
<td>
|
56 |
-
<img src=assets/flower.gif width="250">
|
57 |
-
</td>
|
58 |
-
</tr>
|
59 |
-
</table>
|
60 |
-
|
61 |
-
### Zero-shot novel view synthesis (2 views)
|
62 |
-
<table class="center">
|
63 |
-
<tr style="font-weight: bolder;text-align:center;">
|
64 |
-
<td>Reference image 1</td>
|
65 |
-
<td>Reference image 2</td>
|
66 |
-
<td>Generated novel view video</td>
|
67 |
-
</tr>
|
68 |
-
|
69 |
-
<tr>
|
70 |
-
<td>
|
71 |
-
<img src=assets/car2_1.png width="250">
|
72 |
-
</td>
|
73 |
-
<td>
|
74 |
-
<img src=assets/car2_2.png width="250">
|
75 |
-
</td>
|
76 |
-
<td>
|
77 |
-
<img src=assets/car2.gif width="250">
|
78 |
-
</td>
|
79 |
-
</tr>
|
80 |
-
<tr>
|
81 |
-
<td>
|
82 |
-
<img src=assets/barn_1.png width="250">
|
83 |
-
</td>
|
84 |
-
<td>
|
85 |
-
<img src=assets/barn_2.png width="250">
|
86 |
-
</td>
|
87 |
-
<td>
|
88 |
-
<img src=assets/barn.gif width="250">
|
89 |
-
</td>
|
90 |
-
</tr>
|
91 |
-
<tr>
|
92 |
-
<td>
|
93 |
-
<img src=assets/house_1.png width="250">
|
94 |
-
</td>
|
95 |
-
<td>
|
96 |
-
<img src=assets/house_2.png width="250">
|
97 |
-
</td>
|
98 |
-
<td>
|
99 |
-
<img src=assets/house.gif width="250">
|
100 |
-
</td>
|
101 |
-
</tr>
|
102 |
-
</table>
|
103 |
-
|
104 |
-
## 🗓️ TODO
|
105 |
-
- [x] [2024-09-01] Launch the project page and update the arXiv preprint.
|
106 |
-
- [x] [2024-09-01] Release pretrained models and the code for single-view novel view synthesis.
|
107 |
-
- [ ] Release the code for sparse-view novel view synthesis.
|
108 |
-
- [ ] Release the code for iterative novel view synthesis.
|
109 |
-
- [ ] Release the code for 3D-GS reconstruction.
|
110 |
-
<br>
|
111 |
-
|
112 |
-
## 🧰 Models
|
113 |
-
|
114 |
-
|Model|Resolution|Frames|GPU Mem. & Inference Time (A100, ddim 50steps)|Checkpoint|
|
115 |
-
|:---------|:---------|:--------|:--------|:--------|
|
116 |
-
|ViewCrafter_25|576x1024|25| 23.5GB & 120s (`perframe_ae=True`)|[Hugging Face](https://huggingface.co/Drexubery/ViewCrafter_25/blob/main/model.ckpt)|
|
117 |
-
|ViewCrafter_16|576x1024|16| 18.3GB & 75s (`perframe_ae=True`)|[Hugging Face](https://huggingface.co/Drexubery/ViewCrafter_16/blob/main/model.ckpt)|
|
118 |
-
|
119 |
-
|
120 |
-
Currently, we provide two versions of the model: a base model that generates 16 frames at a time and an enhanced model that generates 25 frames at a time. The inference time can be reduced by using fewer DDIM steps.
|
121 |
-
|
122 |
-
## ⚙️ Setup
|
123 |
-
|
124 |
-
### 1. Clone ViewCrafter
|
125 |
-
```bash
|
126 |
-
git clone https://github.com/Drexubery/ViewCrafter.git
|
127 |
-
cd ViewCrafter
|
128 |
-
```
|
129 |
-
### 2. Installation
|
130 |
-
|
131 |
-
```bash
|
132 |
-
# Create conda environment
|
133 |
-
conda create -n viewcrafter python=3.9.16
|
134 |
-
conda activate viewcrafter
|
135 |
-
pip install -r requirements.txt
|
136 |
-
|
137 |
-
# Install PyTorch3D
|
138 |
-
conda install https://anaconda.org/pytorch3d/pytorch3d/0.7.5/download/linux-64/pytorch3d-0.7.5-py39_cu117_pyt1131.tar.bz2
|
139 |
-
|
140 |
-
# Download DUSt3R
|
141 |
-
mkdir -p checkpoints/
|
142 |
-
wget https://download.europe.naverlabs.com/ComputerVision/DUSt3R/DUSt3R_ViTLarge_BaseDecoder_512_dpt.pth -P checkpoints/
|
143 |
-
|
144 |
-
```
|
145 |
-
|
146 |
-
## 💫 Inference
|
147 |
-
### 1. Command line
|
148 |
-
|
149 |
-
(1) Download pretrained model (ViewCrafter_25 for example) and put the `model.ckpt` in `checkpoints/model.ckpt`. \
|
150 |
-
(2) Run [inference.py](./inference.py) using the following script. Please refer to the [configuration document](docs/config_help.md) and [render document](docs/render_help.md) to set up inference parameters and camera trajectory.
|
151 |
-
```bash
|
152 |
-
sh run.sh
|
153 |
-
```
|
154 |
-
|
155 |
-
### 2. Local Gradio demo
|
156 |
-
|
157 |
-
Download the pretrained model and put it in the corresponding directory according to the previous guideline, then run:
|
158 |
-
```bash
|
159 |
-
python gradio_app.py
|
160 |
-
```
|
161 |
-
|
162 |
-
<a name="disc"></a>
|
163 |
-
## 📢 Disclaimer
|
164 |
-
⚠️This is an open-source research exploration rather than a commercial product, so it may not meet all your expectations. Due to the variability of the video diffusion model, you may encounter failure cases. Try using different seeds and adjusting the render configs if the results are not desirable.
|
165 |
-
Users are free to create videos using this tool, but they must comply with local laws and use it responsibly. The developers do not assume any responsibility for potential misuse by users.
|
166 |
-
****
|
167 |
-
|
|
|
1 |
+
---
|
2 |
+
title: ViewCrafter
|
3 |
+
emoji: 🐨
|
4 |
+
colorFrom: yellow
|
5 |
+
colorTo: purple
|
6 |
+
sdk: gradio
|
7 |
+
sdk_version: 4.36.0
|
8 |
+
app_file: app.py
|
9 |
+
pinned: false
|
10 |
+
license: other
|
11 |
+
---
|
12 |
+
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|