From 61439622480eb43c6e177570639f4f27b36a0883 Mon Sep 17 00:00:00 2001 From: iperov Date: Fri, 10 May 2019 19:50:19 +0400 Subject: [PATCH] SAE: option apply_random_ct now True by default --- models/Model_SAE/Model.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/models/Model_SAE/Model.py b/models/Model_SAE/Model.py index 2ecc44f..e5aa61d 100644 --- a/models/Model_SAE/Model.py +++ b/models/Model_SAE/Model.py @@ -88,13 +88,13 @@ class SAEModel(ModelBase): self.options['bg_style_power'] = np.clip ( io.input_number("Background style power ( 0.0 .. 100.0 ?:help skip:%.2f) : " % (default_bg_style_power), default_bg_style_power, help_message="Learn to transfer image around face. This can make face more like dst. Enabling this option increases the chance of model collapse."), 0.0, 100.0 ) - default_apply_random_ct = False if is_first_run else self.options.get('apply_random_ct', False) + default_apply_random_ct = True if is_first_run else self.options.get('apply_random_ct', True) self.options['apply_random_ct'] = io.input_bool ("Apply random color transfer to src faceset? (y/n, ?:help skip:%s) : " % (yn_str[default_apply_random_ct]), default_apply_random_ct, help_message="Increase variativity of src samples by apply LCT color transfer from random dst samples. It is like 'face_style' learning, but more precise color transfer and without risk of model collapse, also it does not require additional GPU resources, but the training time may be longer, due to the src faceset is becoming more diverse.") else: self.options['pixel_loss'] = self.options.get('pixel_loss', False) self.options['face_style_power'] = self.options.get('face_style_power', default_face_style_power) self.options['bg_style_power'] = self.options.get('bg_style_power', default_bg_style_power) - self.options['apply_random_ct'] = self.options.get('apply_random_ct', False) + self.options['apply_random_ct'] = self.options.get('apply_random_ct', True) if is_first_run: self.options['pretrain'] = io.input_bool ("Pretrain the model? (y/n, ?:help skip:n) : ", False, help_message="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: encoder.h5. The longer you pretrain the model the more morphed face will look. After that, save and run the training again.") @@ -487,7 +487,7 @@ class SAEModel(ModelBase): predictor_input_size=self.options['resolution'], predictor_masked=self.options['learn_mask'], face_type=face_type, - default_mode = 1 if self.options['face_style_power'] or self.options['bg_style_power'] else 4, + default_mode = 1 if self.options['apply_random_ct'] or self.options['face_style_power'] or self.options['bg_style_power'] else 4, base_erode_mask_modifier=base_erode_mask_modifier, base_blur_mask_modifier=base_blur_mask_modifier, default_erode_mask_modifier=default_erode_mask_modifier,