File size: 1,091 Bytes
899c526
 
a8c8616
899c526
 
 
 
 
 
 
 
 
 
 
a8c8616
899c526
 
 
 
 
 
 
 
 
 
a8c8616
 
 
 
 
 
 
899c526
 
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
from argparse import ArgumentParser
import rerun as rr
from mini_dpvo.api.inference import inference_dpvo
from mini_dpvo.config import cfg as base_cfg


if __name__ == "__main__":
    parser = ArgumentParser()
    parser.add_argument("--network-path", type=str, default="checkpoints/dpvo.pth")
    parser.add_argument("--imagedir", type=str)
    parser.add_argument("--calib", type=str)
    parser.add_argument("--stride", type=int, default=2)
    parser.add_argument("--skip", type=int, default=0)
    parser.add_argument("--buffer", type=int, default=2048)
    parser.add_argument("--config", default="config/fast.yaml")
    rr.script_add_args(parser)
    args = parser.parse_args()
    rr.script_setup(args, "mini_dpvo")

    base_cfg.merge_from_file(args.config)
    base_cfg.BUFFER_SIZE = args.buffer

    print("Running with config...")
    print(base_cfg)

    inference_dpvo(
        cfg=base_cfg,
        network_path=args.network_path,
        imagedir=args.imagedir,
        calib=args.calib,
        stride=args.stride,
        skip=args.skip,
    )
    rr.script_teardown(args)