-
Notifications
You must be signed in to change notification settings - Fork 59
/
parser.py
40 lines (33 loc) · 1.41 KB
/
parser.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
import argparse
def get_args():
parser = argparse.ArgumentParser()
parser.add_argument("--checkpoint_pattern", default="./checkpoints/pattern.pth", type=str)
parser.add_argument("--checkpoint_color", default="./checkpoints/color.pth", type=str)
parser.add_argument("--device", default="cuda", type=str)
# parser.add_argument('--batch_size', default = '1', type = int)
parser.add_argument("--prn", default=True, type=bool)
parser.add_argument("--color_only", default=False, action="store_true")
parser.add_argument("--pattern_only", default=False, action="store_true")
parser.add_argument(
"--input",
type=str,
default="./imgs/non-makeup.png",
help="Path to input image (non-makeup)",
)
parser.add_argument(
"--style",
type=str,
default="./imgs/style-2.png",
help="Path to style image (makeup style | reference image)",
)
parser.add_argument("--alpha", type=float, default=0.5, help="opacity of color makeup")
parser.add_argument("--savedir", type=str, default=".")
args = parser.parse_args()
print(" ⊱ ──────ஓ๑♡๑ஓ ────── ⊰")
print("🎵 hhey, arguments are here if you need to check 🎵")
for arg in vars(args):
print("{:>15}: {:>30}".format(str(arg), str(getattr(args, arg))))
print()
return args
if __name__ == "__main__":
get_args()