mirror of
https://github.com/iperov/DeepFaceLab.git
synced 2025-07-06 04:52:13 -07:00
SAE: added option 'Pretrain the model?',
Pretrain the model with large amount of various faces. This technique may help to train the fake with overly different face shapes and light conditions of src/dst data. Face will be look more like a morphed. To reduce the morph effect, some model files will be initialized but not be updated after pretrain: LIAE: inter_AB.h5 DF: both decoders.h5. The longer you pretrain the model the more morphed face will look. After that, save and run the training again.
This commit is contained in:
parent
659aa5705a
commit
2a8dd788dc
8 changed files with 78 additions and 44 deletions
6
main.py
6
main.py
|
@ -120,6 +120,7 @@ if __name__ == "__main__":
|
|||
os_utils.set_process_lowest_prio()
|
||||
args = {'training_data_src_dir' : arguments.training_data_src_dir,
|
||||
'training_data_dst_dir' : arguments.training_data_dst_dir,
|
||||
'pretraining_data_dir' : arguments.pretraining_data_dir,
|
||||
'model_path' : arguments.model_dir,
|
||||
'model_name' : arguments.model_name,
|
||||
'no_preview' : arguments.no_preview,
|
||||
|
@ -133,8 +134,9 @@ if __name__ == "__main__":
|
|||
Trainer.main(args, device_args)
|
||||
|
||||
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 src-set.")
|
||||
p.add_argument('--training-data-dst-dir', required=True, action=fixPathAction, dest="training_data_dst_dir", help="Dir of dst-set.")
|
||||
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", help="Optional dir of extracted faceset that will be used in pretraining mode.")
|
||||
p.add_argument('--model-dir', required=True, action=fixPathAction, dest="model_dir", help="Model dir.")
|
||||
p.add_argument('--model', required=True, dest="model_name", choices=Path_utils.get_all_dir_names_startswith ( Path(__file__).parent / 'models' , 'Model_'), help="Type of model")
|
||||
p.add_argument('--no-preview', action="store_true", dest="no_preview", default=False, help="Disable preview window.")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue