Skip to content
This repository was archived by the owner on Nov 13, 2024. It is now read-only.

Commit 6cca016

Browse files
committed
remove trailing whitespace
1 parent 7ee85c9 commit 6cca016

File tree

1 file changed

+21
-21
lines changed

1 file changed

+21
-21
lines changed

main.py

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ def __call__(self, parser, namespace, values, option_string=None):
2323
setattr(namespace, self.dest, os.path.abspath(os.path.expanduser(values)))
2424

2525
exit_code = 0
26-
26+
2727
parser = argparse.ArgumentParser()
2828
subparsers = parser.add_subparsers()
2929

@@ -52,9 +52,9 @@ def process_extract(arguments):
5252
p.add_argument('--output-debug', action="store_true", dest="output_debug", default=None, help="Writes debug images to <output-dir>_debug\ directory.")
5353
p.add_argument('--no-output-debug', action="store_false", dest="output_debug", default=None, help="Don't writes debug images to <output-dir>_debug\ directory.")
5454
p.add_argument('--face-type', dest="face_type", choices=['half_face', 'full_face', 'whole_face', 'head', 'mark_only'], default=None)
55-
p.add_argument('--max-faces-from-image', type=int, dest="max_faces_from_image", default=None, help="Max faces from image.")
55+
p.add_argument('--max-faces-from-image', type=int, dest="max_faces_from_image", default=None, help="Max faces from image.")
5656
p.add_argument('--image-size', type=int, dest="image_size", default=None, help="Output image size.")
57-
p.add_argument('--jpeg-quality', type=int, dest="jpeg_quality", default=None, help="Jpeg quality.")
57+
p.add_argument('--jpeg-quality', type=int, dest="jpeg_quality", default=None, help="Jpeg quality.")
5858
p.add_argument('--manual-fix', action="store_true", dest="manual_fix", default=False, help="Enables manual extract only frames where faces were not recognized.")
5959
p.add_argument('--manual-output-debug-fix', action="store_true", dest="manual_output_debug_fix", default=False, help="Performs manual reextract input-dir frames which were deleted from [output_dir]_debug\ dir.")
6060
p.add_argument('--manual-window-size', type=int, dest="manual_window_size", default=1368, help="Manual fix window size. Default: 1368.")
@@ -98,7 +98,7 @@ def process_util(arguments):
9898
io.log_info ("Performing faceset unpacking...\r\n")
9999
from samplelib import PackedFaceset
100100
PackedFaceset.unpack( Path(arguments.input_dir) )
101-
101+
102102
if arguments.export_faceset_mask:
103103
io.log_info ("Exporting faceset mask..\r\n")
104104
Util.export_faceset_mask( Path(arguments.input_dir) )
@@ -149,10 +149,10 @@ def process_train(arguments):
149149
p.add_argument('--cpu-only', action="store_true", dest="cpu_only", default=False, help="Train on CPU.")
150150
p.add_argument('--force-gpu-idxs', dest="force_gpu_idxs", default=None, help="Force to choose GPU indexes separated by comma.")
151151
p.add_argument('--silent-start', action="store_true", dest="silent_start", default=False, help="Silent start. Automatically chooses Best GPU and last used model.")
152-
152+
153153
p.add_argument('--execute-program', dest="execute_program", default=[], action='append', nargs='+')
154154
p.set_defaults (func=process_train)
155-
155+
156156
def process_exportdfm(arguments):
157157
osex.set_process_lowest_prio()
158158
from mainscripts import ExportDFM
@@ -266,8 +266,8 @@ def process_faceset_enhancer(arguments):
266266
p.add_argument('--force-gpu-idxs', dest="force_gpu_idxs", default=None, help="Force to choose GPU indexes separated by comma.")
267267

268268
p.set_defaults(func=process_faceset_enhancer)
269-
270-
269+
270+
271271
p = facesettool_parser.add_parser ("resize", help="Resize DFL faceset.")
272272
p.add_argument('--input-dir', required=True, action=fixPathAction, dest="input_dir", help="Input directory of aligned faces.")
273273

@@ -285,22 +285,22 @@ def process_dev_test(arguments):
285285
p = subparsers.add_parser( "dev_test", help="")
286286
p.add_argument('--input-dir', required=True, action=fixPathAction, dest="input_dir")
287287
p.set_defaults (func=process_dev_test)
288-
288+
289289
# ========== XSeg
290290
xseg_parser = subparsers.add_parser( "xseg", help="XSeg tools.").add_subparsers()
291-
291+
292292
p = xseg_parser.add_parser( "editor", help="XSeg editor.")
293293

294294
def process_xsegeditor(arguments):
295295
osex.set_process_lowest_prio()
296296
from XSegEditor import XSegEditor
297297
global exit_code
298298
exit_code = XSegEditor.start (Path(arguments.input_dir))
299-
299+
300300
p.add_argument('--input-dir', required=True, action=fixPathAction, dest="input_dir")
301301

302302
p.set_defaults (func=process_xsegeditor)
303-
303+
304304
p = xseg_parser.add_parser( "apply", help="Apply trained XSeg model to the extracted faces.")
305305

306306
def process_xsegapply(arguments):
@@ -310,26 +310,26 @@ def process_xsegapply(arguments):
310310
p.add_argument('--input-dir', required=True, action=fixPathAction, dest="input_dir")
311311
p.add_argument('--model-dir', required=True, action=fixPathAction, dest="model_dir")
312312
p.set_defaults (func=process_xsegapply)
313-
314-
313+
314+
315315
p = xseg_parser.add_parser( "remove", help="Remove applied XSeg masks from the extracted faces.")
316316
def process_xsegremove(arguments):
317317
osex.set_process_lowest_prio()
318318
from mainscripts import XSegUtil
319319
XSegUtil.remove_xseg (Path(arguments.input_dir) )
320320
p.add_argument('--input-dir', required=True, action=fixPathAction, dest="input_dir")
321321
p.set_defaults (func=process_xsegremove)
322-
323-
322+
323+
324324
p = xseg_parser.add_parser( "remove_labels", help="Remove XSeg labels from the extracted faces.")
325325
def process_xsegremovelabels(arguments):
326326
osex.set_process_lowest_prio()
327327
from mainscripts import XSegUtil
328328
XSegUtil.remove_xseg_labels (Path(arguments.input_dir) )
329329
p.add_argument('--input-dir', required=True, action=fixPathAction, dest="input_dir")
330330
p.set_defaults (func=process_xsegremovelabels)
331-
332-
331+
332+
333333
p = xseg_parser.add_parser( "fetch", help="Copies faces containing XSeg polygons in <input_dir>_xseg dir.")
334334

335335
def process_xsegfetch(arguments):
@@ -338,7 +338,7 @@ def process_xsegfetch(arguments):
338338
XSegUtil.fetch_xseg (Path(arguments.input_dir) )
339339
p.add_argument('--input-dir', required=True, action=fixPathAction, dest="input_dir")
340340
p.set_defaults (func=process_xsegfetch)
341-
341+
342342
def bad_args(arguments):
343343
parser.print_help()
344344
exit(0)
@@ -349,9 +349,9 @@ def bad_args(arguments):
349349

350350
if exit_code == 0:
351351
print ("Done.")
352-
352+
353353
exit(exit_code)
354-
354+
355355
'''
356356
import code
357357
code.interact(local=dict(globals(), **locals()))

0 commit comments

Comments
 (0)