MCPcopy Create free account
hub / github.com/drinkingcoder/NeuralMarker / get_eval_args

Function get_eval_args

config.py:4–48  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

2import argparse
3
4def get_eval_args():
5 parser = argparse.ArgumentParser()
6 parser.add_argument('--root', type=str, default='./assets/',
7 help='image data root')
8 parser.add_argument('--save_root', type=str, default='./output/',
9 help='output save dir')
10 parser.add_argument('--folder', type=str, default="",
11 help='if evaluate scene images are not one of blend_type, specify scene images folder')
12
13 parser.add_argument('--blend_type', type=str, default='D',
14 choices=['D', 'V', 'L'], help='which subset from DVL')
15 parser.add_argument('--blend_method', type=str, default='twins-onestage',
16 choices=['homography', 'pdc', 'twins-onestage', 'ransac-flow', 'SPSG'],
17 help='which method to blend marker')
18 parser.add_argument('--detector', type=str, default='SIFT',
19 choices=['SIFT', 'ORB'], help='detector for homography feature extract')
20 parser.add_argument('--warp', type=str, default='grid_sample',
21 choices=['grid_sample', 'homography'], help='warp method for our model')
22
23 parser.add_argument('--img_num', type=int, default=10,
24 help='number of test markers')
25 parser.add_argument('--scn_num', type=int, default=10,
26 help='number of scene images per test marker')
27 parser.add_argument('--start_img_id', type=int, default=0,
28 help='test from marker with id=start_img_id')
29 parser.add_argument('--start_scene_id', type=int, default=0,
30 help='test from scene image with id=start_scene_id')
31 parser.add_argument('--source_id', type=int, default=-1,
32 help='if blend_type is light, source id should be specified for metrics calculation')
33 parser.add_argument('--img_shape', type=int, nargs='+', default=[480, 640],
34 help='resize image shape [H, W]')
35
36 parser.add_argument('--with_mask', action='store_true',
37 help='caculate PSNR/SSIM with or without mask')
38 parser.add_argument('--use_colormap', action='store_true',
39 help='warp with colormap or not')
40 parser.add_argument('--heatmap', action='store_true',
41 help='save metrics with heatmap')
42
43 parser.add_argument('--draw', action='store_true',
44 help='imshow output')
45 parser.add_argument('--save', action='store_true',
46 help='save results')
47
48 return parser.parse_args()
49
50def get_twins_args():
51 parser = configargparse.ArgParser(config_file_parser_class=configargparse.YAMLConfigFileParser)

Callers 1

runFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected