p.add_argument( '--pretrained-model-dir', action=fixPathAction, dest="pretrained_model_dir", default=None, help= "Optional dir of pretrain model files. (Currently only for Quick96).") p.add_argument('--model-dir', required=True, action=fixPathAction, dest="model_dir", help="Saved models dir.") p.add_argument('--model', required=True, dest="model_name", choices=pathex.get_all_dir_names_startswith( Path(__file__).parent / 'models', 'Model_'), help="Model class name.") p.add_argument('--debug', action="store_true", dest="debug", default=False, help="Debug samples.") p.add_argument('--no-preview', action="store_true", dest="no_preview", default=False, help="Disable preview window.") p.add_argument('--force-model-name', dest="force_model_name", default=None, help="Forcing to choose model name from model/ folder.")
'force_model_name' : arguments.force_model_name, 'force_gpu_idxs' : arguments.force_gpu_idxs, 'cpu_only' : arguments.cpu_only, 'execute_programs' : [ [int(x[0]), x[1] ] for x in arguments.execute_program ], 'debug' : arguments.debug, } from mainscripts import Trainer Trainer.main(**kwargs) p = subparsers.add_parser( "train", help="Trainer") p.add_argument('--training-data-src-dir', required=True, action=fixPathAction, dest="training_data_src_dir", help="Dir of extracted SRC faceset.") p.add_argument('--training-data-dst-dir', required=True, action=fixPathAction, dest="training_data_dst_dir", help="Dir of extracted DST faceset.") p.add_argument('--pretraining-data-dir', action=fixPathAction, dest="pretraining_data_dir", default=None, help="Optional dir of extracted faceset that will be used in pretraining mode.") p.add_argument('--pretrained-model-dir', action=fixPathAction, dest="pretrained_model_dir", default=None, help="Optional dir of pretrain model files. (Currently only for Quick96).") p.add_argument('--model-dir', required=True, action=fixPathAction, dest="model_dir", help="Saved models dir.") p.add_argument('--model', required=True, dest="model_name", choices=pathex.get_all_dir_names_startswith ( Path(__file__).parent / 'models' , 'Model_'), help="Model class name.") p.add_argument('--debug', action="store_true", dest="debug", default=False, help="Debug samples.") p.add_argument('--no-preview', action="store_true", dest="no_preview", default=False, help="Disable preview window.") p.add_argument('--force-model-name', dest="force_model_name", default=None, help="Forcing to choose model name from model/ folder.") p.add_argument('--cpu-only', action="store_true", dest="cpu_only", default=False, help="Train on CPU.") p.add_argument('--force-gpu-idxs', dest="force_gpu_idxs", default=None, help="Force to choose GPU indexes separated by comma.") p.add_argument('--execute-program', dest="execute_program", default=[], action='append', nargs='+') p.set_defaults (func=process_train) def process_merge(arguments): osex.set_process_lowest_prio() from mainscripts import Merger Merger.main ( model_class_name = arguments.model_name, saved_models_path = Path(arguments.model_dir), training_data_src_path = Path(arguments.training_data_src_dir) if arguments.training_data_src_dir is not None else None, force_model_name = arguments.force_model_name,