Spaces:
zino36
/
Runtime error

yocabon commited on
Commit
627e15a
1 Parent(s): 4d8e1ba

add timestamps in demo output

Browse files
Files changed (2) hide show
  1. app.py +6 -2
  2. mast3r +1 -1
app.py CHANGED
@@ -2,7 +2,7 @@
2
  # Licensed under CC BY-NC-SA 4.0 (non-commercial use only).
3
  #
4
  # --------------------------------------------------------
5
- # masst3r demo
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/" + 'MASt3R_ViTLarge_BaseDecoder_512_catmlpdpt_metric'
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 d888156a48957235238643fa57eceba50a981417
 
1
+ Subproject commit 427435d34de0e4840e63cdd3a0c0f887b3bcdadb