Spaces:
Runtime error
Runtime error
kxhit
commited on
Commit
·
b20dacb
1
Parent(s):
ce137a5
remove duration
Browse files
README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
| 1 |
---
|
| 2 |
title: EscherNet
|
| 3 |
-
emoji:
|
| 4 |
app_file: app.py
|
| 5 |
sdk: gradio
|
| 6 |
sdk_version: 4.31.0
|
|
|
|
| 1 |
---
|
| 2 |
title: EscherNet
|
| 3 |
+
emoji: 📸📸📸➡️🖼️🖼️🖼️🖼️
|
| 4 |
app_file: app.py
|
| 5 |
sdk: gradio
|
| 6 |
sdk_version: 4.31.0
|
app.py
CHANGED
|
@@ -153,7 +153,7 @@ predictor = sam_init()
|
|
| 153 |
|
| 154 |
|
| 155 |
|
| 156 |
-
@spaces.GPU
|
| 157 |
def run_eschernet(eschernet_input_dict, sample_steps, sample_seed, nvs_num, nvs_mode):
|
| 158 |
# set the random seed
|
| 159 |
generator = torch.Generator(device=device).manual_seed(sample_seed)
|
|
@@ -248,11 +248,6 @@ def run_eschernet(eschernet_input_dict, sample_steps, sample_seed, nvs_num, nvs_
|
|
| 248 |
|
| 249 |
return video_path
|
| 250 |
|
| 251 |
-
# TODO mesh it
|
| 252 |
-
@spaces.GPU(duration=120)
|
| 253 |
-
def make3d():
|
| 254 |
-
pass
|
| 255 |
-
|
| 256 |
|
| 257 |
|
| 258 |
############################ Dust3r as Pose Estimation ############################
|
|
@@ -268,7 +263,7 @@ from dust3r.viz import add_scene_cam, CAM_COLORS, OPENGL, pts3d_to_trimesh, cat_
|
|
| 268 |
from dust3r.cloud_opt import global_aligner, GlobalAlignerMode
|
| 269 |
import math
|
| 270 |
|
| 271 |
-
@spaces.GPU
|
| 272 |
def _convert_scene_output_to_glb(outdir, imgs, pts3d, mask, focals, cams2world, cam_size=0.05,
|
| 273 |
cam_color=None, as_pointcloud=False,
|
| 274 |
transparent_cams=False, silent=False, same_focals=False):
|
|
@@ -321,7 +316,7 @@ def _convert_scene_output_to_glb(outdir, imgs, pts3d, mask, focals, cams2world,
|
|
| 321 |
scene.export(file_obj=outfile)
|
| 322 |
return outfile
|
| 323 |
|
| 324 |
-
@spaces.GPU
|
| 325 |
def get_3D_model_from_scene(outdir, silent, scene, min_conf_thr=3, as_pointcloud=False, mask_sky=False,
|
| 326 |
clean_depth=False, transparent_cams=False, cam_size=0.05, same_focals=False):
|
| 327 |
"""
|
|
@@ -353,7 +348,7 @@ def get_3D_model_from_scene(outdir, silent, scene, min_conf_thr=3, as_pointcloud
|
|
| 353 |
transparent_cams=transparent_cams, cam_size=cam_size, silent=silent,
|
| 354 |
same_focals=same_focals)
|
| 355 |
|
| 356 |
-
@spaces.GPU
|
| 357 |
def get_reconstructed_scene(filelist, schedule, niter, min_conf_thr,
|
| 358 |
as_pointcloud, mask_sky, clean_depth, transparent_cams, cam_size,
|
| 359 |
scenegraph_type, winsize, refid, same_focals):
|
|
|
|
| 153 |
|
| 154 |
|
| 155 |
|
| 156 |
+
@spaces.GPU
|
| 157 |
def run_eschernet(eschernet_input_dict, sample_steps, sample_seed, nvs_num, nvs_mode):
|
| 158 |
# set the random seed
|
| 159 |
generator = torch.Generator(device=device).manual_seed(sample_seed)
|
|
|
|
| 248 |
|
| 249 |
return video_path
|
| 250 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 251 |
|
| 252 |
|
| 253 |
############################ Dust3r as Pose Estimation ############################
|
|
|
|
| 263 |
from dust3r.cloud_opt import global_aligner, GlobalAlignerMode
|
| 264 |
import math
|
| 265 |
|
| 266 |
+
@spaces.GPU
|
| 267 |
def _convert_scene_output_to_glb(outdir, imgs, pts3d, mask, focals, cams2world, cam_size=0.05,
|
| 268 |
cam_color=None, as_pointcloud=False,
|
| 269 |
transparent_cams=False, silent=False, same_focals=False):
|
|
|
|
| 316 |
scene.export(file_obj=outfile)
|
| 317 |
return outfile
|
| 318 |
|
| 319 |
+
@spaces.GPU
|
| 320 |
def get_3D_model_from_scene(outdir, silent, scene, min_conf_thr=3, as_pointcloud=False, mask_sky=False,
|
| 321 |
clean_depth=False, transparent_cams=False, cam_size=0.05, same_focals=False):
|
| 322 |
"""
|
|
|
|
| 348 |
transparent_cams=transparent_cams, cam_size=cam_size, silent=silent,
|
| 349 |
same_focals=same_focals)
|
| 350 |
|
| 351 |
+
@spaces.GPU
|
| 352 |
def get_reconstructed_scene(filelist, schedule, niter, min_conf_thr,
|
| 353 |
as_pointcloud, mask_sky, clean_depth, transparent_cams, cam_size,
|
| 354 |
scenegraph_type, winsize, refid, same_focals):
|