Spaces:
Running
on
Zero
Running
on
Zero
Paul Engstler
commited on
Commit
·
0992d0c
1
Parent(s):
84eee5b
simpleton ply output
Browse files
app.py
CHANGED
@@ -191,13 +191,6 @@ def generate_scene(img: Image.Image, prompt: str):
|
|
191 |
# crop to ensure the image dimensions are divisible by 8
|
192 |
img = img.crop((0, 0, img.width - img.width % 8, img.height - img.height % 8))
|
193 |
|
194 |
-
from hashlib import sha1
|
195 |
-
from datetime import datetime
|
196 |
-
|
197 |
-
run_id = sha1(datetime.now().isoformat().encode()).hexdigest()[:6]
|
198 |
-
|
199 |
-
run_name = f"gradio_{run_id}"
|
200 |
-
|
201 |
gs_optimization_bundle, point_cloud = generate_point_cloud(img, prompt)
|
202 |
|
203 |
downsampled_point_cloud = downsample_point_cloud(gs_optimization_bundle, device=device)
|
@@ -215,7 +208,7 @@ def generate_scene(img: Image.Image, prompt: str):
|
|
215 |
scene.gaussians._xyz[:, 1] = -scene.gaussians._xyz[:, 1]
|
216 |
scene.gaussians._xyz[:, 2] = -scene.gaussians._xyz[:, 2]
|
217 |
|
218 |
-
save_path =
|
219 |
|
220 |
scene.gaussians.save_ply(save_path)
|
221 |
|
|
|
191 |
# crop to ensure the image dimensions are divisible by 8
|
192 |
img = img.crop((0, 0, img.width - img.width % 8, img.height - img.height % 8))
|
193 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
194 |
gs_optimization_bundle, point_cloud = generate_point_cloud(img, prompt)
|
195 |
|
196 |
downsampled_point_cloud = downsample_point_cloud(gs_optimization_bundle, device=device)
|
|
|
208 |
scene.gaussians._xyz[:, 1] = -scene.gaussians._xyz[:, 1]
|
209 |
scene.gaussians._xyz[:, 2] = -scene.gaussians._xyz[:, 2]
|
210 |
|
211 |
+
save_path = "output.ply"
|
212 |
|
213 |
scene.gaussians.save_ply(save_path)
|
214 |
|