Jie Hu
commited on
Commit
·
83fd361
1
Parent(s):
7381ed6
init project
Browse files
app.py
CHANGED
@@ -40,6 +40,11 @@ import torchvision.transforms as tvf
|
|
40 |
from modules.mast3r.model import AsymmetricMASt3R
|
41 |
|
42 |
silent = False
|
|
|
|
|
|
|
|
|
|
|
43 |
|
44 |
def _convert_scene_output_to_glb(outdir, imgs, pts3d, mask, focals, cams2world, cam_size=0.05,
|
45 |
cam_color=None, as_pointcloud=False,
|
@@ -442,11 +447,6 @@ def get_reconstructed_scene(outdir, filelist, schedule, niter, min_conf_thr,
|
|
442 |
"""
|
443 |
if len(filelist) < 2:
|
444 |
raise gradio.Error("Please input at least 2 images.")
|
445 |
-
|
446 |
-
device = 'cuda' if torch.cuda.is_available() else 'cpu'
|
447 |
-
# pe3r = Models(device)
|
448 |
-
MAST3R_CKP = 'naver/MASt3R_ViTLarge_BaseDecoder_512_catmlpdpt_metric'
|
449 |
-
mast3r = AsymmetricMASt3R.from_pretrained(MAST3R_CKP).to(device)
|
450 |
|
451 |
images = Images(filelist=filelist, device=device)
|
452 |
|
|
|
40 |
from modules.mast3r.model import AsymmetricMASt3R
|
41 |
|
42 |
silent = False
|
43 |
+
device = 'cpu'
|
44 |
+
# pe3r = Models(device) 'cuda' if torch.cuda.is_available() else
|
45 |
+
MAST3R_CKP = 'naver/MASt3R_ViTLarge_BaseDecoder_512_catmlpdpt_metric'
|
46 |
+
mast3r = AsymmetricMASt3R.from_pretrained(MAST3R_CKP).to(device)
|
47 |
+
|
48 |
|
49 |
def _convert_scene_output_to_glb(outdir, imgs, pts3d, mask, focals, cams2world, cam_size=0.05,
|
50 |
cam_color=None, as_pointcloud=False,
|
|
|
447 |
"""
|
448 |
if len(filelist) < 2:
|
449 |
raise gradio.Error("Please input at least 2 images.")
|
|
|
|
|
|
|
|
|
|
|
450 |
|
451 |
images = Images(filelist=filelist, device=device)
|
452 |
|