rohitjakkam commited on
Commit
9d78cc8
·
verified ·
1 Parent(s): 34a4d54

Upload 2 files

Browse files
Files changed (2) hide show
  1. .gitignore.txt +4 -0
  2. options/swap_options.py +43 -0
.gitignore.txt ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+ g_model
2
+ flagged
3
+ arcface_model
4
+ retina_model
options/swap_options.py ADDED
@@ -0,0 +1,43 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import argparse
2
+
3
+
4
+ class SwapOptions():
5
+ def __init__(self):
6
+ self.parser = argparse.ArgumentParser()
7
+ self.initialized = False
8
+
9
+ def initialize(self):
10
+ # paths (data, models, etc...)
11
+ self.parser.add_argument('--arcface_path', type=str,
12
+ default="arcface_model/arcface/arc_res50.h5",
13
+ help='path to arcface model. Used to extract identity from source.')
14
+
15
+ # Video/Image necessary models
16
+ self.parser.add_argument('--retina_path', type=str,
17
+ default="retinaface/retinaface_res50.h5",
18
+ help='path to retinaface model.')
19
+ self.parser.add_argument('--compare', type=bool,
20
+ default=True,
21
+ help='If true, concatenates the frame with the manipulated frame')
22
+
23
+ self.parser.add_argument('--load', type=int,
24
+ default=30,
25
+ help='int of number to load checkpoint weights.')
26
+ self.parser.add_argument('--device_id', type=int, default=0,
27
+ help='which device to use')
28
+
29
+ # logging and checkpointing
30
+ self.parser.add_argument('--log_dir', type=str, default='logs/runs/',
31
+ help='logging directory')
32
+ self.parser.add_argument('--log_name', type=str, default='affa_f',
33
+ help='name of the run, change this to track several experiments')
34
+
35
+ self.parser.add_argument('--chkp_dir', type=str, default='checkpoints/',
36
+ help='checkpoint directory (will use same name as log_name!)')
37
+ self.initialized = True
38
+
39
+ def parse(self):
40
+ if not self.initialized:
41
+ self.initialize()
42
+ self.opt = self.parser.parse_args()
43
+ return self.opt