Jie Hu
commited on
Commit
·
eb0c94f
1
Parent(s):
0bfe798
init project
Browse files
app.py
CHANGED
@@ -38,8 +38,8 @@ from modules.pe3r.models import Models
|
|
38 |
import torchvision.transforms as tvf
|
39 |
|
40 |
silent = False
|
41 |
-
device = 'cpu'
|
42 |
-
pe3r = Models(device) #
|
43 |
|
44 |
|
45 |
def _convert_scene_output_to_glb(outdir, imgs, pts3d, mask, focals, cams2world, cam_size=0.05,
|
@@ -500,7 +500,7 @@ def get_reconstructed_scene(outdir, filelist, schedule, niter, min_conf_thr,
|
|
500 |
|
501 |
return scene, outfile
|
502 |
|
503 |
-
@spaces.GPU(duration=
|
504 |
def get_3D_object_from_scene(outdir, text, threshold, scene, min_conf_thr, as_pointcloud,
|
505 |
mask_sky, clean_depth, transparent_cams, cam_size):
|
506 |
|
|
|
38 |
import torchvision.transforms as tvf
|
39 |
|
40 |
silent = False
|
41 |
+
device = 'cuda' if torch.cuda.is_available() else 'cpu'
|
42 |
+
pe3r = Models(device) #
|
43 |
|
44 |
|
45 |
def _convert_scene_output_to_glb(outdir, imgs, pts3d, mask, focals, cams2world, cam_size=0.05,
|
|
|
500 |
|
501 |
return scene, outfile
|
502 |
|
503 |
+
@spaces.GPU(duration=120)
|
504 |
def get_3D_object_from_scene(outdir, text, threshold, scene, min_conf_thr, as_pointcloud,
|
505 |
mask_sky, clean_depth, transparent_cams, cam_size):
|
506 |
|