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