add timestamps in demo output
Browse files
app.py
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
# Licensed under CC BY-NC-SA 4.0 (non-commercial use only).
|
3 |
#
|
4 |
# --------------------------------------------------------
|
5 |
-
#
|
6 |
# --------------------------------------------------------
|
7 |
import spaces
|
8 |
import os
|
@@ -22,14 +22,18 @@ from mast3r.demo import get_reconstructed_scene
|
|
22 |
from mast3r.model import AsymmetricMASt3R
|
23 |
from mast3r.utils.misc import hash_md5
|
24 |
|
|
|
|
|
|
|
25 |
import matplotlib.pyplot as pl
|
26 |
pl.ion()
|
27 |
|
28 |
# for gpu >= Ampere and pytorch >= 1.12
|
29 |
torch.backends.cuda.matmul.allow_tf32 = True
|
30 |
batch_size = 1
|
|
|
31 |
|
32 |
-
weights_path = "naver/"
|
33 |
device = 'cuda' if torch.cuda.is_available() else 'cpu'
|
34 |
model = AsymmetricMASt3R.from_pretrained(weights_path).to(device)
|
35 |
chkpt_tag = hash_md5(weights_path)
|
|
|
2 |
# Licensed under CC BY-NC-SA 4.0 (non-commercial use only).
|
3 |
#
|
4 |
# --------------------------------------------------------
|
5 |
+
# mast3r demo
|
6 |
# --------------------------------------------------------
|
7 |
import spaces
|
8 |
import os
|
|
|
22 |
from mast3r.model import AsymmetricMASt3R
|
23 |
from mast3r.utils.misc import hash_md5
|
24 |
|
25 |
+
import mast3r.utils.path_to_dust3r # noqa
|
26 |
+
from dust3r.demo import set_print_with_timestamp
|
27 |
+
|
28 |
import matplotlib.pyplot as pl
|
29 |
pl.ion()
|
30 |
|
31 |
# for gpu >= Ampere and pytorch >= 1.12
|
32 |
torch.backends.cuda.matmul.allow_tf32 = True
|
33 |
batch_size = 1
|
34 |
+
set_print_with_timestamp()
|
35 |
|
36 |
+
weights_path = "naver/MASt3R_ViTLarge_BaseDecoder_512_catmlpdpt_metric"
|
37 |
device = 'cuda' if torch.cuda.is_available() else 'cpu'
|
38 |
model = AsymmetricMASt3R.from_pretrained(weights_path).to(device)
|
39 |
chkpt_tag = hash_md5(weights_path)
|
mast3r
CHANGED
@@ -1 +1 @@
|
|
1 |
-
Subproject commit
|
|
|
1 |
+
Subproject commit 427435d34de0e4840e63cdd3a0c0f887b3bcdadb
|