-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathconfig.py
45 lines (37 loc) · 1.03 KB
/
config.py
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
39
40
41
42
43
44
45
import argparse
import os
parser = argparse.ArgumentParser(description = 'FLAME model')
parser.add_argument(
'--flame_model_path',
type = str,
default = './model/generic_model.pkl',
help = 'flame model path'
)
parser.add_argument(
'--static_landmark_embedding_path',
type = str,
default = './data/flame_static_embedding.pkl',
help = 'Static landmark embeddings path for FLAME'
)
parser.add_argument(
'--dynamic_landmark_embedding_path',
type = str,
default = './model/flame_dynamic_embedding.npy',
help = 'Dynamic contour embedding path for FLAME'
)
parser.add_argument(
'--batch_size',
type = int,
default = 8,
help = 'Training batch size.'
)
def get_config():
config = parser.parse_args()
return config
def get_config_with_default_args():
config = parser.parse_args([])
return config
def get_config_with_args(cmd_args):
# cmd_args of the format ['--input', 'PATH_TO_INPUT', '--output', 'PATH_TO_OUTPUT']
config = parser.parse_args(cmd_args)
return config