File size: 1,504 Bytes
6db5fd9
 
 
 
 
52321ab
6db5fd9
 
c6a15a0
6db5fd9
5f75751
 
6db5fd9
52321ab
 
6db5fd9
52321ab
 
 
1308f6d
6db5fd9
665b2f0
1308f6d
 
 
 
 
 
 
 
 
c6a15a0
bd0195a
1308f6d
 
 
6db5fd9
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
import sys
sys.path.append('wild-gaussian-splatting/mast3r/')
sys.path.append('demo/')

import gradio as gr
import torch
from mast3r.demo import get_args_parser
from mast3r_demo import mast3r_demo_tab
from gs_demo import gs_demo_tab

torch.backends.cuda.matmul.allow_tf32 = True

if __name__ == '__main__':
    # parser = get_args_parser()
    # args = parser.parse_args()

    # if args.server_name is not None:
    #     server_name = args.server_name
    # else:
    # server_name = '0.0.0.0'# if args.local_network else '127.0.0.1'

    # weights_path = '/app/wild-gaussian-splatting/mast3r/checkpoints/MASt3R_ViTLarge_BaseDecoder_512_catmlpdpt_metric.pth'
    # weights_path = "naver/MASt3R_ViTLarge_BaseDecoder_512_catmlpdpt_metric"#args.weights if args.weights is not None else  + MASt3R_ViTLarge_BaseDecoder_512_catmlpdpt_metric
    # device = device = 'cuda' if torch.cuda.is_available() else 'cpu'
    # chkpt_tag = hash_md5(weights_path)


    with gr.Blocks() as demo:
        with gr.Tabs():
            with gr.Tab("MASt3R Demo"):
                mast3r_demo_tab()
            with gr.Tab("Gaussian Splatting Demo"):
                gs_demo_tab()

        demo.launch(show_error=True, share=None, server_name=None, server_port=None) 
        # demo.launch(show_error=True, share=None, server_name='0.0.0.0', server_port=5555) 

# python3 demo.py --weights "/app/mast3r/checkpoints/MASt3R_ViTLarge_BaseDecoder_512_catmlpdpt_metric.pth" --device "cuda" --server_port 3334 --local_network "$@"