From 1bf224841fe03d855eb234b9d805492fd1d3ec46 Mon Sep 17 00:00:00 2001 From: Hunor Laczko Date: Mon, 7 Nov 2022 15:13:05 +0000 Subject: [PATCH] save config files --- configs/config_abl_10p.py | 118 +++++++++++ configs/config_abl_10p_skin.py | 118 +++++++++++ configs/config_abl_25p.py | 118 +++++++++++ configs/config_abl_25p_skin.py | 118 +++++++++++ configs/config_abl_2_pyr_32.py | 185 +++++++++++++++++ configs/config_abl_2_pyr_32_64.py | 185 +++++++++++++++++ configs/config_abl_2_pyr_32_64_2.py | 185 +++++++++++++++++ configs/config_abl_2_pyr_32_64_skirt.py | 189 +++++++++++++++++ configs/config_abl_2_pyr_32_skin.py | 191 ++++++++++++++++++ configs/config_abl_2_pyr_32_skin_2.py | 191 ++++++++++++++++++ configs/config_abl_2_pyr_32_skin_norm.py | 191 ++++++++++++++++++ configs/config_abl_2_pyr_32_skirt.py | 189 +++++++++++++++++ .../config_abl_2_pyr_32_skirt_extra_loss.py | 189 +++++++++++++++++ .../config_abl_2_pyr_64_128_256_512_cape_f.py | 188 +++++++++++++++++ .../config_abl_2_pyr_64_128_256_512_cape_m.py | 188 +++++++++++++++++ configs/config_abl_2_pyr_64_128_256_cape_f.py | 188 +++++++++++++++++ configs/config_abl_2_pyr_64_128_256_cape_m.py | 187 +++++++++++++++++ configs/config_abl_2_pyr_64_128_cape_f.py | 188 +++++++++++++++++ configs/config_abl_2_pyr_64_128_cape_m.py | 187 +++++++++++++++++ configs/config_abl_2_pyr_64_cape_f.py | 187 +++++++++++++++++ configs/config_abl_2_pyr_64_cape_m.py | 187 +++++++++++++++++ configs/config_abl_extra_loss_skirt_2.py | 118 +++++++++++ configs/config_abl_norm_skirt.py | 117 +++++++++++ configs/config_abl_pyr_32.py | 1 + configs/config_abl_pyr_32_2.py | 182 +++++++++++++++++ configs/config_abl_pyr_32_64_2.py | 180 +++++++++++++++++ configs/config_abl_pyr_32_64_skirt.py | 181 +++++++++++++++++ configs/config_abl_pyr_32_64_skirt_2.py | 181 +++++++++++++++++ .../config_abl_pyr_64_128_256_512_cape_f.py | 8 +- .../config_abl_pyr_64_128_256_512_cape_f_2.py | 181 +++++++++++++++++ configs/config_abl_pyr_64_128_256_cape_f.py | 4 + configs/config_abl_pyr_64_128_cape_f.py | 4 + configs/config_abl_pyr_64_128_cape_m.py | 1 + configs/config_abl_pyr_64_cape_f.py | 4 + configs/config_abl_pyr_64_cape_m.py | 5 + configs/config_abl_skin_norm.py | 116 +++++++++++ configs/config_abl_skin_skirt.py | 148 +++++++------- configs/config_abl_skin_var.py | 116 +++++++++++ configs/config_abl_skin_var_2.py | 116 +++++++++++ configs/config_abl_skin_var_3.py | 116 +++++++++++ configs/config_abl_skin_var_4.py | 117 +++++++++++ configs/config_ae_body.py | 8 +- configs/config_ae_curv.py | 2 +- configs/config_ae_static.py | 2 +- configs/config_base.py | 11 + configs/config_cvae.json | 190 +++++++++++++++++ configs/config_cvae.py | 9 +- configs/config_cvae_2.json | 1 + configs/config_cvae_curv.py | 90 +++++++++ configs/config_cvae_test.py | 26 ++- configs/config_pyramid.py | 2 +- 51 files changed, 5807 insertions(+), 97 deletions(-) create mode 100644 configs/config_abl_10p.py create mode 100644 configs/config_abl_10p_skin.py create mode 100644 configs/config_abl_25p.py create mode 100644 configs/config_abl_25p_skin.py create mode 100644 configs/config_abl_2_pyr_32.py create mode 100644 configs/config_abl_2_pyr_32_64.py create mode 100644 configs/config_abl_2_pyr_32_64_2.py create mode 100644 configs/config_abl_2_pyr_32_64_skirt.py create mode 100644 configs/config_abl_2_pyr_32_skin.py create mode 100644 configs/config_abl_2_pyr_32_skin_2.py create mode 100644 configs/config_abl_2_pyr_32_skin_norm.py create mode 100644 configs/config_abl_2_pyr_32_skirt.py create mode 100644 configs/config_abl_2_pyr_32_skirt_extra_loss.py create mode 100644 configs/config_abl_2_pyr_64_128_256_512_cape_f.py create mode 100644 configs/config_abl_2_pyr_64_128_256_512_cape_m.py create mode 100644 configs/config_abl_2_pyr_64_128_256_cape_f.py create mode 100644 configs/config_abl_2_pyr_64_128_256_cape_m.py create mode 100644 configs/config_abl_2_pyr_64_128_cape_f.py create mode 100644 configs/config_abl_2_pyr_64_128_cape_m.py create mode 100644 configs/config_abl_2_pyr_64_cape_f.py create mode 100644 configs/config_abl_2_pyr_64_cape_m.py create mode 100644 configs/config_abl_extra_loss_skirt_2.py create mode 100644 configs/config_abl_norm_skirt.py create mode 100644 configs/config_abl_pyr_32_2.py create mode 100644 configs/config_abl_pyr_32_64_2.py create mode 100644 configs/config_abl_pyr_32_64_skirt.py create mode 100644 configs/config_abl_pyr_32_64_skirt_2.py create mode 100644 configs/config_abl_pyr_64_128_256_512_cape_f_2.py create mode 100644 configs/config_abl_skin_norm.py create mode 100644 configs/config_abl_skin_var.py create mode 100644 configs/config_abl_skin_var_2.py create mode 100644 configs/config_abl_skin_var_3.py create mode 100644 configs/config_abl_skin_var_4.py create mode 100644 configs/config_cvae.json create mode 100644 configs/config_cvae_2.json create mode 100644 configs/config_cvae_curv.py diff --git a/configs/config_abl_10p.py b/configs/config_abl_10p.py new file mode 100644 index 0000000..054a5b4 --- /dev/null +++ b/configs/config_abl_10p.py @@ -0,0 +1,118 @@ +config = dict() + +# DON'T FORGET TO RESET SSIM LOSS USAGE +# DON'T FORGET TO CHECK MODEL LOADING +# DON'T FORGET TO CHECK IF STORE IN MEMORY +# DON'T FORGET TO CHECK REG LOSS COEFF +# DON'T FORGET TO LOAD FINAL UPSCALER UNLESS HAVE LEVEL 512 +# DON'T FORGET TO CHECK AVG GARMENT USED + +config['use_skinning'] = True # and deshaping +config['remove_global_orientation'] = True +config['use_curvature'] = True +config['use_extra_losses'] = True # edge, collision, 3d mesh +config['use_offsets'] = True + +config['use_norm_loss'] = False + +ablation_count = [config['use_skinning'], config['remove_global_orientation'], config['use_curvature'], config['use_extra_losses'], config['use_offsets']].count(False) +assert ablation_count == 1 or ablation_count == 0 + +config['gpu'] = '1' +config['name'] = 'abl_10p' +config['notes'] = '' + +config['avg_garment_path'] = 'custom_data/train_no_shape_avg_uv.npy' #custom_data/train_no_shape_avg_uv.npy # train_no_shape_avg_uv train_no_shape_one_hot_avg_uv +if config['use_skinning']: + assert (config['use_offsets'] and config['avg_garment_path'] != '') or (not config['use_offsets'] and config['avg_garment_path'] == '') + +config['reg_loss_coeff'] = 0.1 # set to 0 if don't want to use edge+collision + +config['batch_size'] = 4 +config['resolution'] = 512 +config['is_skirt'] = False +config['dataset_in_memory'] = False +config['is_cape'] = False + +config['train_dir'] = '/home/workspace/local-data/train' +config['valid_dir'] = '/home/workspace/local-data/valid' +config['test_dir'] = '/home/workspace/data/dataset/test_ready' +config['frames_file'] = 'frames_10p.txt' + +config['static_model'] = 'checkpoints/static_1' +config['body_model'] = 'checkpoints/body_1' +config['curvature_model'] = 'checkpoints/curv_1' + + +config['smpl_res'] = 14475 +if config['is_cape']: + config['smpl_res'] = 3638 + +config['latent_dim'] = 128 + +config['pretrained_model'] = '' + +############### +config['lr'] = 0.0001# 0.0001 +############### +config['starting_balancing_coeff'] = 0.0001 + +config['signature_dynamic'] = { 'id': (), 'frame_nr': (), + 'pose_shape': (72 + 11,), + 'uv_body_posed': (512, 256, 3), + 'mesh_body_posed': (14475, 3,), + 'mesh_posed': (14475, 3,), + 'uv_curvature': (512, 256, 7), + } +config['signature_static'] = { 'uv_static': (512, 256, 3), + 'mesh_mask': (14475,), + 'uv_mask': (512, 256,), + } + +if config['use_skinning']: + config['signature_dynamic']['uv_unposed'] = (512, 256, 3) + config['signature_dynamic']['mesh_unposed'] = (14475, 3,) +else: + config['signature_dynamic']['uv_posed'] = (512, 256, 3) + + +config['upscale_enhancer'] = '' +config['freeze_encoders'] = True +config['use_one_hot'] = False + +config['cvae'] = dict() +config['cvae']['is_label'] = False +config['cvae']['latent_dim'] = config['latent_dim'] +config['cvae']['add_noise'] = True +config['cvae']['noise_amount'] = 0.025 + +config['cvae']['kernel_size'] = 7 +config['cvae']['encoder_depths'] = [3, 3, 9, 3] +config['cvae']['encoder_dims'] = [32, 64, 128, 256] +config['cvae']['decoder_input'] = (16, 8, 80) +config['cvae']['decoder_depths'] = [3, 3, 9, 3] +config['cvae']['decoder_dims'] = [256, 128, 64, 16] + + +config['cond_ae'] = dict() +config['cond_ae']['is_label'] = False +config['cond_ae']['upscale_output'] = False +config['cond_ae']['latent_dim'] = config['latent_dim'] +config['cond_ae']['kernel_size'] = 7 +config['cond_ae']['bottleneck_size'] = 64 +config['cond_ae']['encoder_depths'] = [3, 3, 9, 9, 3] +config['cond_ae']['encoder_dims'] = [32, 64, 128, 256, config['cond_ae']['bottleneck_size']] +config['cond_ae']['decoder_input'] = (8, 4, config['cond_ae']['bottleneck_size']) +config['cond_ae']['decoder_depths'] = [3, 3, 9, 3, 3] +config['cond_ae']['decoder_dims'] = [config['cond_ae']['bottleneck_size'], 256, 128, 64, 16] + +config['cond_ae_body'] = dict() +config['cond_ae_body']['latent_dim'] = config['latent_dim'] +config['cond_ae_body']['kernel_size'] = 7 +config['cond_ae_body']['upscale_output'] = True +config['cond_ae_body']['bottleneck_size'] = 512 +config['cond_ae_body']['encoder_depths'] = [3, 3, 9, 9, 3, 3] +config['cond_ae_body']['encoder_dims'] = [32, 64, 128, 256, 256, config['cond_ae_body']['bottleneck_size']] +config['cond_ae_body']['decoder_input'] = (4, 2, config['cond_ae_body']['bottleneck_size']) +config['cond_ae_body']['decoder_depths'] = [3, 3, 9, 3] +config['cond_ae_body']['decoder_dims'] = [config['cond_ae_body']['bottleneck_size'], 128, 64, 16] diff --git a/configs/config_abl_10p_skin.py b/configs/config_abl_10p_skin.py new file mode 100644 index 0000000..19a2867 --- /dev/null +++ b/configs/config_abl_10p_skin.py @@ -0,0 +1,118 @@ +config = dict() + +# DON'T FORGET TO RESET SSIM LOSS USAGE +# DON'T FORGET TO CHECK MODEL LOADING +# DON'T FORGET TO CHECK IF STORE IN MEMORY +# DON'T FORGET TO CHECK REG LOSS COEFF +# DON'T FORGET TO LOAD FINAL UPSCALER UNLESS HAVE LEVEL 512 +# DON'T FORGET TO CHECK AVG GARMENT USED + +config['use_skinning'] = False # and deshaping +config['remove_global_orientation'] = True +config['use_curvature'] = True +config['use_extra_losses'] = True # edge, collision, 3d mesh +config['use_offsets'] = True + +config['use_norm_loss'] = False + +ablation_count = [config['use_skinning'], config['remove_global_orientation'], config['use_curvature'], config['use_extra_losses'], config['use_offsets']].count(False) +assert ablation_count == 1 or ablation_count == 0 + +config['gpu'] = '4' +config['name'] = 'abl_10p_skin' +config['notes'] = '' + +config['avg_garment_path'] = '' #custom_data/train_no_shape_avg_uv.npy # train_no_shape_avg_uv train_no_shape_one_hot_avg_uv +if config['use_skinning']: + assert (config['use_offsets'] and config['avg_garment_path'] != '') or (not config['use_offsets'] and config['avg_garment_path'] == '') + +config['reg_loss_coeff'] = 0.1 # set to 0 if don't want to use edge+collision + +config['batch_size'] = 4 +config['resolution'] = 512 +config['is_skirt'] = False +config['dataset_in_memory'] = False +config['is_cape'] = False + +config['train_dir'] = '/home/workspace/local-data/train' +config['valid_dir'] = '/home/workspace/local-data/valid' +config['test_dir'] = '/home/workspace/data/dataset/test_ready' +config['frames_file'] = 'frames_10p.txt' + +config['static_model'] = 'checkpoints/static_1' +config['body_model'] = 'checkpoints/body_1' +config['curvature_model'] = 'checkpoints/curv_1' + + +config['smpl_res'] = 14475 +if config['is_cape']: + config['smpl_res'] = 3638 + +config['latent_dim'] = 128 + +config['pretrained_model'] = '' + +############### +config['lr'] = 0.0001# 0.0001 +############### +config['starting_balancing_coeff'] = 0.0001 + +config['signature_dynamic'] = { 'id': (), 'frame_nr': (), + 'pose_shape': (72 + 11,), + 'uv_body_posed': (512, 256, 3), + 'mesh_body_posed': (14475, 3,), + 'mesh_posed': (14475, 3,), + 'uv_curvature': (512, 256, 7), + } +config['signature_static'] = { 'uv_static': (512, 256, 3), + 'mesh_mask': (14475,), + 'uv_mask': (512, 256,), + } + +if config['use_skinning']: + config['signature_dynamic']['uv_unposed'] = (512, 256, 3) + config['signature_dynamic']['mesh_unposed'] = (14475, 3,) +else: + config['signature_dynamic']['uv_posed'] = (512, 256, 3) + + +config['upscale_enhancer'] = '' +config['freeze_encoders'] = True +config['use_one_hot'] = False + +config['cvae'] = dict() +config['cvae']['is_label'] = False +config['cvae']['latent_dim'] = config['latent_dim'] +config['cvae']['add_noise'] = True +config['cvae']['noise_amount'] = 0.025 + +config['cvae']['kernel_size'] = 7 +config['cvae']['encoder_depths'] = [3, 3, 9, 3] +config['cvae']['encoder_dims'] = [32, 64, 128, 256] +config['cvae']['decoder_input'] = (16, 8, 80) +config['cvae']['decoder_depths'] = [3, 3, 9, 3] +config['cvae']['decoder_dims'] = [256, 128, 64, 16] + + +config['cond_ae'] = dict() +config['cond_ae']['is_label'] = False +config['cond_ae']['upscale_output'] = False +config['cond_ae']['latent_dim'] = config['latent_dim'] +config['cond_ae']['kernel_size'] = 7 +config['cond_ae']['bottleneck_size'] = 64 +config['cond_ae']['encoder_depths'] = [3, 3, 9, 9, 3] +config['cond_ae']['encoder_dims'] = [32, 64, 128, 256, config['cond_ae']['bottleneck_size']] +config['cond_ae']['decoder_input'] = (8, 4, config['cond_ae']['bottleneck_size']) +config['cond_ae']['decoder_depths'] = [3, 3, 9, 3, 3] +config['cond_ae']['decoder_dims'] = [config['cond_ae']['bottleneck_size'], 256, 128, 64, 16] + +config['cond_ae_body'] = dict() +config['cond_ae_body']['latent_dim'] = config['latent_dim'] +config['cond_ae_body']['kernel_size'] = 7 +config['cond_ae_body']['upscale_output'] = True +config['cond_ae_body']['bottleneck_size'] = 512 +config['cond_ae_body']['encoder_depths'] = [3, 3, 9, 9, 3, 3] +config['cond_ae_body']['encoder_dims'] = [32, 64, 128, 256, 256, config['cond_ae_body']['bottleneck_size']] +config['cond_ae_body']['decoder_input'] = (4, 2, config['cond_ae_body']['bottleneck_size']) +config['cond_ae_body']['decoder_depths'] = [3, 3, 9, 3] +config['cond_ae_body']['decoder_dims'] = [config['cond_ae_body']['bottleneck_size'], 128, 64, 16] diff --git a/configs/config_abl_25p.py b/configs/config_abl_25p.py new file mode 100644 index 0000000..9083585 --- /dev/null +++ b/configs/config_abl_25p.py @@ -0,0 +1,118 @@ +config = dict() + +# DON'T FORGET TO RESET SSIM LOSS USAGE +# DON'T FORGET TO CHECK MODEL LOADING +# DON'T FORGET TO CHECK IF STORE IN MEMORY +# DON'T FORGET TO CHECK REG LOSS COEFF +# DON'T FORGET TO LOAD FINAL UPSCALER UNLESS HAVE LEVEL 512 +# DON'T FORGET TO CHECK AVG GARMENT USED + +config['use_skinning'] = True # and deshaping +config['remove_global_orientation'] = True +config['use_curvature'] = True +config['use_extra_losses'] = True # edge, collision, 3d mesh +config['use_offsets'] = True + +config['use_norm_loss'] = False + +ablation_count = [config['use_skinning'], config['remove_global_orientation'], config['use_curvature'], config['use_extra_losses'], config['use_offsets']].count(False) +assert ablation_count == 1 or ablation_count == 0 + +config['gpu'] = '3' +config['name'] = 'abl_25p' +config['notes'] = '' + +config['avg_garment_path'] = 'custom_data/train_no_shape_avg_uv.npy' #custom_data/train_no_shape_avg_uv.npy # train_no_shape_avg_uv train_no_shape_one_hot_avg_uv +if config['use_skinning']: + assert (config['use_offsets'] and config['avg_garment_path'] != '') or (not config['use_offsets'] and config['avg_garment_path'] == '') + +config['reg_loss_coeff'] = 0.1 # set to 0 if don't want to use edge+collision + +config['batch_size'] = 4 +config['resolution'] = 512 +config['is_skirt'] = False +config['dataset_in_memory'] = False +config['is_cape'] = False + +config['train_dir'] = '/home/workspace/local-data/train' +config['valid_dir'] = '/home/workspace/local-data/valid' +config['test_dir'] = '/home/workspace/data/dataset/test_ready' +config['frames_file'] = 'frames_25p.txt' + +config['static_model'] = 'checkpoints/static_1' +config['body_model'] = 'checkpoints/body_1' +config['curvature_model'] = 'checkpoints/curv_1' + + +config['smpl_res'] = 14475 +if config['is_cape']: + config['smpl_res'] = 3638 + +config['latent_dim'] = 128 + +config['pretrained_model'] = '' + +############### +config['lr'] = 0.0001# 0.0001 +############### +config['starting_balancing_coeff'] = 0.0001 + +config['signature_dynamic'] = { 'id': (), 'frame_nr': (), + 'pose_shape': (72 + 11,), + 'uv_body_posed': (512, 256, 3), + 'mesh_body_posed': (14475, 3,), + 'mesh_posed': (14475, 3,), + 'uv_curvature': (512, 256, 7), + } +config['signature_static'] = { 'uv_static': (512, 256, 3), + 'mesh_mask': (14475,), + 'uv_mask': (512, 256,), + } + +if config['use_skinning']: + config['signature_dynamic']['uv_unposed'] = (512, 256, 3) + config['signature_dynamic']['mesh_unposed'] = (14475, 3,) +else: + config['signature_dynamic']['uv_posed'] = (512, 256, 3) + + +config['upscale_enhancer'] = '' +config['freeze_encoders'] = True +config['use_one_hot'] = False + +config['cvae'] = dict() +config['cvae']['is_label'] = False +config['cvae']['latent_dim'] = config['latent_dim'] +config['cvae']['add_noise'] = True +config['cvae']['noise_amount'] = 0.025 + +config['cvae']['kernel_size'] = 7 +config['cvae']['encoder_depths'] = [3, 3, 9, 3] +config['cvae']['encoder_dims'] = [32, 64, 128, 256] +config['cvae']['decoder_input'] = (16, 8, 80) +config['cvae']['decoder_depths'] = [3, 3, 9, 3] +config['cvae']['decoder_dims'] = [256, 128, 64, 16] + + +config['cond_ae'] = dict() +config['cond_ae']['is_label'] = False +config['cond_ae']['upscale_output'] = False +config['cond_ae']['latent_dim'] = config['latent_dim'] +config['cond_ae']['kernel_size'] = 7 +config['cond_ae']['bottleneck_size'] = 64 +config['cond_ae']['encoder_depths'] = [3, 3, 9, 9, 3] +config['cond_ae']['encoder_dims'] = [32, 64, 128, 256, config['cond_ae']['bottleneck_size']] +config['cond_ae']['decoder_input'] = (8, 4, config['cond_ae']['bottleneck_size']) +config['cond_ae']['decoder_depths'] = [3, 3, 9, 3, 3] +config['cond_ae']['decoder_dims'] = [config['cond_ae']['bottleneck_size'], 256, 128, 64, 16] + +config['cond_ae_body'] = dict() +config['cond_ae_body']['latent_dim'] = config['latent_dim'] +config['cond_ae_body']['kernel_size'] = 7 +config['cond_ae_body']['upscale_output'] = True +config['cond_ae_body']['bottleneck_size'] = 512 +config['cond_ae_body']['encoder_depths'] = [3, 3, 9, 9, 3, 3] +config['cond_ae_body']['encoder_dims'] = [32, 64, 128, 256, 256, config['cond_ae_body']['bottleneck_size']] +config['cond_ae_body']['decoder_input'] = (4, 2, config['cond_ae_body']['bottleneck_size']) +config['cond_ae_body']['decoder_depths'] = [3, 3, 9, 3] +config['cond_ae_body']['decoder_dims'] = [config['cond_ae_body']['bottleneck_size'], 128, 64, 16] diff --git a/configs/config_abl_25p_skin.py b/configs/config_abl_25p_skin.py new file mode 100644 index 0000000..45159c5 --- /dev/null +++ b/configs/config_abl_25p_skin.py @@ -0,0 +1,118 @@ +config = dict() + +# DON'T FORGET TO RESET SSIM LOSS USAGE +# DON'T FORGET TO CHECK MODEL LOADING +# DON'T FORGET TO CHECK IF STORE IN MEMORY +# DON'T FORGET TO CHECK REG LOSS COEFF +# DON'T FORGET TO LOAD FINAL UPSCALER UNLESS HAVE LEVEL 512 +# DON'T FORGET TO CHECK AVG GARMENT USED + +config['use_skinning'] = False # and deshaping +config['remove_global_orientation'] = True +config['use_curvature'] = True +config['use_extra_losses'] = True # edge, collision, 3d mesh +config['use_offsets'] = True + +config['use_norm_loss'] = False + +ablation_count = [config['use_skinning'], config['remove_global_orientation'], config['use_curvature'], config['use_extra_losses'], config['use_offsets']].count(False) +assert ablation_count == 1 or ablation_count == 0 + +config['gpu'] = '1' +config['name'] = 'abl_25p_skin' +config['notes'] = '' + +config['avg_garment_path'] = '' #custom_data/train_no_shape_avg_uv.npy # train_no_shape_avg_uv train_no_shape_one_hot_avg_uv +if config['use_skinning']: + assert (config['use_offsets'] and config['avg_garment_path'] != '') or (not config['use_offsets'] and config['avg_garment_path'] == '') + +config['reg_loss_coeff'] = 0.1 # set to 0 if don't want to use edge+collision + +config['batch_size'] = 4 +config['resolution'] = 512 +config['is_skirt'] = False +config['dataset_in_memory'] = False +config['is_cape'] = False + +config['train_dir'] = '/home/workspace/local-data/train' +config['valid_dir'] = '/home/workspace/local-data/valid' +config['test_dir'] = '/home/workspace/data/dataset/test_ready' +config['frames_file'] = 'frames_25p.txt' + +config['static_model'] = 'checkpoints/static_1' +config['body_model'] = 'checkpoints/body_1' +config['curvature_model'] = 'checkpoints/curv_1' + + +config['smpl_res'] = 14475 +if config['is_cape']: + config['smpl_res'] = 3638 + +config['latent_dim'] = 128 + +config['pretrained_model'] = '' + +############### +config['lr'] = 0.0001# 0.0001 +############### +config['starting_balancing_coeff'] = 0.0001 + +config['signature_dynamic'] = { 'id': (), 'frame_nr': (), + 'pose_shape': (72 + 11,), + 'uv_body_posed': (512, 256, 3), + 'mesh_body_posed': (14475, 3,), + 'mesh_posed': (14475, 3,), + 'uv_curvature': (512, 256, 7), + } +config['signature_static'] = { 'uv_static': (512, 256, 3), + 'mesh_mask': (14475,), + 'uv_mask': (512, 256,), + } + +if config['use_skinning']: + config['signature_dynamic']['uv_unposed'] = (512, 256, 3) + config['signature_dynamic']['mesh_unposed'] = (14475, 3,) +else: + config['signature_dynamic']['uv_posed'] = (512, 256, 3) + + +config['upscale_enhancer'] = '' +config['freeze_encoders'] = True +config['use_one_hot'] = False + +config['cvae'] = dict() +config['cvae']['is_label'] = False +config['cvae']['latent_dim'] = config['latent_dim'] +config['cvae']['add_noise'] = True +config['cvae']['noise_amount'] = 0.025 + +config['cvae']['kernel_size'] = 7 +config['cvae']['encoder_depths'] = [3, 3, 9, 3] +config['cvae']['encoder_dims'] = [32, 64, 128, 256] +config['cvae']['decoder_input'] = (16, 8, 80) +config['cvae']['decoder_depths'] = [3, 3, 9, 3] +config['cvae']['decoder_dims'] = [256, 128, 64, 16] + + +config['cond_ae'] = dict() +config['cond_ae']['is_label'] = False +config['cond_ae']['upscale_output'] = False +config['cond_ae']['latent_dim'] = config['latent_dim'] +config['cond_ae']['kernel_size'] = 7 +config['cond_ae']['bottleneck_size'] = 64 +config['cond_ae']['encoder_depths'] = [3, 3, 9, 9, 3] +config['cond_ae']['encoder_dims'] = [32, 64, 128, 256, config['cond_ae']['bottleneck_size']] +config['cond_ae']['decoder_input'] = (8, 4, config['cond_ae']['bottleneck_size']) +config['cond_ae']['decoder_depths'] = [3, 3, 9, 3, 3] +config['cond_ae']['decoder_dims'] = [config['cond_ae']['bottleneck_size'], 256, 128, 64, 16] + +config['cond_ae_body'] = dict() +config['cond_ae_body']['latent_dim'] = config['latent_dim'] +config['cond_ae_body']['kernel_size'] = 7 +config['cond_ae_body']['upscale_output'] = True +config['cond_ae_body']['bottleneck_size'] = 512 +config['cond_ae_body']['encoder_depths'] = [3, 3, 9, 9, 3, 3] +config['cond_ae_body']['encoder_dims'] = [32, 64, 128, 256, 256, config['cond_ae_body']['bottleneck_size']] +config['cond_ae_body']['decoder_input'] = (4, 2, config['cond_ae_body']['bottleneck_size']) +config['cond_ae_body']['decoder_depths'] = [3, 3, 9, 3] +config['cond_ae_body']['decoder_dims'] = [config['cond_ae_body']['bottleneck_size'], 128, 64, 16] diff --git a/configs/config_abl_2_pyr_32.py b/configs/config_abl_2_pyr_32.py new file mode 100644 index 0000000..8cbdb80 --- /dev/null +++ b/configs/config_abl_2_pyr_32.py @@ -0,0 +1,185 @@ +config = dict() + +config['gpu'] = '1' +config['name'] = 'abl_2_pyr_32' +config['notes'] = 'fixed noise handling' +config['tags'] = ['pyr_non_skirt_2'] + +# DON'T FORGET TO RESET SSIM LOSS USAGE +# DON'T FORGET TO CHECK MODEL LOADING +# DON'T FORGET TO CHECK IF STORE IN MEMORY +# DON'T FORGET TO CHECK REG LOSS COEFF +# DON'T FORGET TO LOAD FINAL UPSCALER UNLESS HAVE LEVEL 512 +# DON'T FORGET TO CHECK IF SKIRT +# DON'T FORGET TO CHECK IF CAPE +# DON'T FORGET TO CHECK IF USING DOWNSCALE NONE OR _2 +# DON'T FORGET TO CHECK UPSCALING and ENCODER CHECKPOINTS + +config['use_skinning'] = True # and deshaping +config['remove_global_orientation'] = True +config['use_extra_losses'] = True # edge, collision, 3d mesh +config['use_offsets'] = False +config['use_norm_loss'] = False + +config['pretrained_model'] = 'checkpoints/pyr_abl_32_430k' +config['pretrained_model_iteration'] = '430000' + +config['pyramid'] = dict() +config['pyramid']['resolutions'] = [32] +config['pyramid']['pretrained_pyramid'] = '' +config['pyramid']['final_upscale_enhancer'] = 'checkpoints/32_512_4' + +config['train_dir'] = '/home/workspace/local-data/train' +config['valid_dir'] = '/home/workspace/local-data/valid' +config['test_dir'] = '/home/workspace/data/dataset/test_ready' +config['batch_size'] = 4 +config['is_skirt'] = False +config['is_cape'] = False + +config['dataset_in_memory'] = False +config['resolution'] = None +config['latent_dim'] = 128 + +config['smpl_res'] = 14475 +if config['is_cape']: + config['smpl_res'] = 3638 + +config['lr'] = 0.0001 +config['starting_balancing_coeff'] = 0.0001 +config['reg_loss_coeff'] = 0.1 # set to 0 if don't want to use edge+collision +config['avg_garment_path'] = '' + +config['signature_dynamic'] = { 'id': (), 'frame_nr': (), + 'pose_shape': (72 + 11,), + 'uv_body_posed': (512, 256, 3), + 'mesh_body_posed': (config['smpl_res'], 3,), + 'mesh_posed': (config['smpl_res'], 3,), + 'mesh_unposed': (config['smpl_res'], 3,), + 'uv_unposed': (512, 256, 3), + 'uv_curvature': (512, 256, 7), + } +config['signature_static'] = { 'uv_static': (512, 256, 3), + 'mesh_mask': (config['smpl_res'],), + 'uv_mask': (512, 256,), + } + +config['pyramid']['is_label'] = False +config['pyramid']['latent_dim'] = config['latent_dim'] +config['pyramid']['add_noise'] = True +config['pyramid']['noise_amount'] = 0.001 + +config['pyramid']['loss_weights'] = [1,1,1,1,1] + +for res in config['pyramid']['resolutions']: + if res != 512: + res_modifier = '_' + str(res) + config['signature_dynamic']['uv_body_posed' + res_modifier] = (res, res//2, 3) + config['signature_dynamic']['uv_unposed' + res_modifier] = (res, res//2, 3) + config['signature_dynamic']['uv_curvature' + res_modifier] = (res, res//2, 7) + config['signature_static']['uv_static' + res_modifier] = (res, res//2, 3) + config['signature_static']['uv_mask' + res_modifier] = (res, res//2) + + +config['pyramid']['static_model'] = 'checkpoints/static_1' +config['pyramid']['body_model'] = 'checkpoints/body_1' +config['pyramid']['curvature_model'] = 'checkpoints/curv_1' +config['pyramid']['freeze_encoders'] = True + +config['pyramid']['levels'] = [] +for res in config['pyramid']['resolutions']: + if res == 512: + level = dict() + level['resolution'] = 512 + level['latent_dim'] = config['latent_dim'] + level['kernel_size'] = 7 + level['encoder_depths'] = [3, 3, 9, 3] + level['encoder_dims'] = [32, 64, 128, 256] + level['decoder_input'] = (16, 8, 80) + level['decoder_depths'] = [3, 3, 9, 3] + level['decoder_dims'] = [256, 128, 64, 16] + level['avg_garment_path'] = '' + level['upscale_enhancer'] = '' + config['pyramid']['levels'].append(level) + elif res == 256: + level = dict() + level['resolution'] = 256 + level['latent_dim'] = config['latent_dim'] + level['kernel_size'] = 7 + level['encoder_depths'] = [9, 9, 9, 9] + level['encoder_dims'] = [32, 64, 128, 256] + level['decoder_input'] = (8, 4, 128) + level['decoder_depths'] = [9, 9, 9, 9] + level['decoder_dims'] = [256, 128, 64, 16] + level['avg_garment_path'] = '' + level['upscale_enhancer'] = ''#'checkpoints/up_3_d256_512_2' + level['upscale_enhancer_freeze'] = True + config['pyramid']['levels'].append(level) + elif res == 128: + level = dict() + level['resolution'] = 128 + level['latent_dim'] = config['latent_dim'] + level['kernel_size'] = 5 + level['encoder_depths'] = [16, 9, 9, 9] + level['encoder_dims'] = [64, 128, 128, 256] + level['decoder_input'] = (4, 2, 128) + level['decoder_depths'] = [16, 9, 9, 9] + level['decoder_dims'] = [256, 128, 128, 64] + level['avg_garment_path'] = '' + level['upscale_enhancer'] = ''#'checkpoints/up_3_d128_256_2' + level['upscale_enhancer_freeze'] = True + config['pyramid']['levels'].append(level) + elif res == 64: + level = dict() + level['resolution'] = 64 + level['latent_dim'] = config['latent_dim'] + level['kernel_size'] = 5 + level['encoder_depths'] = [9, 9, 9] + level['encoder_dims'] = [64, 128, 256] + level['decoder_input'] = (4, 2, 256) + level['decoder_depths'] = [9, 9, 9] + level['decoder_dims'] = [256, 128, 64] + level['avg_garment_path'] = '' + level['upscale_enhancer'] = ''#checkpoints/up_3_d64_128_2' + level['upscale_enhancer_freeze'] = False + config['pyramid']['levels'].append(level) + elif res == 32: + level = dict() + level['resolution'] = 32 + level['latent_dim'] = config['latent_dim'] + level['kernel_size'] = 3 + level['encoder_depths'] = [9, 9] + level['encoder_dims'] = [256, 256] + level['decoder_input'] = (4, 2, 256) + level['decoder_depths'] = [9, 9] + level['decoder_dims'] = [256, 256] + level['avg_garment_path'] = '' + level['upscale_enhancer'] = ''#'checkpoints/up_3_d32_64_2' + level['upscale_enhancer_freeze'] = True + config['pyramid']['levels'].append(level) + else: + raise NotImplementedError + + + +config['cond_ae'] = dict() +config['cond_ae']['is_label'] = False +config['cond_ae']['upscale_output'] = False +config['cond_ae']['latent_dim'] = config['latent_dim'] +config['cond_ae']['kernel_size'] = 7 +config['cond_ae']['bottleneck_size'] = 64 +config['cond_ae']['encoder_depths'] = [3, 3, 9, 9, 3] +config['cond_ae']['encoder_dims'] = [32, 64, 128, 256, config['cond_ae']['bottleneck_size']] +config['cond_ae']['decoder_input'] = (8, 4, config['cond_ae']['bottleneck_size']) +config['cond_ae']['decoder_depths'] = [3, 3, 9, 3, 3] +config['cond_ae']['decoder_dims'] = [config['cond_ae']['bottleneck_size'], 256, 128, 64, 16] + +config['cond_ae_body'] = dict() +config['cond_ae_body']['latent_dim'] = config['latent_dim'] +config['cond_ae_body']['kernel_size'] = 7 +config['cond_ae_body']['upscale_output'] = True +config['cond_ae_body']['bottleneck_size'] = 512 +config['cond_ae_body']['encoder_depths'] = [3, 3, 9, 9, 3, 3] +config['cond_ae_body']['encoder_dims'] = [32, 64, 128, 256, 256, config['cond_ae_body']['bottleneck_size']] +config['cond_ae_body']['decoder_input'] = (4, 2, config['cond_ae_body']['bottleneck_size']) +config['cond_ae_body']['decoder_depths'] = [3, 3, 9, 3] +config['cond_ae_body']['decoder_dims'] = [config['cond_ae_body']['bottleneck_size'], 128, 64, 16] \ No newline at end of file diff --git a/configs/config_abl_2_pyr_32_64.py b/configs/config_abl_2_pyr_32_64.py new file mode 100644 index 0000000..99eee41 --- /dev/null +++ b/configs/config_abl_2_pyr_32_64.py @@ -0,0 +1,185 @@ +config = dict() + +config['gpu'] = '4' +config['name'] = 'abl_2_pyr_32_64' +config['notes'] = 'fixed noise handling' +config['tags'] = ['pyr_non_skirt_2'] + +# DON'T FORGET TO RESET SSIM LOSS USAGE +# DON'T FORGET TO CHECK MODEL LOADING +# DON'T FORGET TO CHECK IF STORE IN MEMORY +# DON'T FORGET TO CHECK REG LOSS COEFF +# DON'T FORGET TO LOAD FINAL UPSCALER UNLESS HAVE LEVEL 512 +# DON'T FORGET TO CHECK IF SKIRT +# DON'T FORGET TO CHECK IF CAPE +# DON'T FORGET TO CHECK IF USING DOWNSCALE NONE OR _2 +# DON'T FORGET TO CHECK UPSCALING and ENCODER CHECKPOINTS + +config['use_skinning'] = True # and deshaping +config['remove_global_orientation'] = True +config['use_extra_losses'] = True # edge, collision, 3d mesh +config['use_offsets'] = False +config['use_norm_loss'] = False + +config['pretrained_model'] = '' +config['pretrained_model_iteration'] = '' + +config['pyramid'] = dict() +config['pyramid']['resolutions'] = [32, 64] +config['pyramid']['pretrained_pyramid'] = 'checkpoints/abl_2_pyr_32' +config['pyramid']['final_upscale_enhancer'] = 'checkpoints/32_512_4' + +config['train_dir'] = '/home/workspace/local-data/train' +config['valid_dir'] = '/home/workspace/local-data/valid' +config['test_dir'] = '/home/workspace/data/dataset/test_ready' +config['batch_size'] = 4 +config['is_skirt'] = False +config['is_cape'] = False + +config['dataset_in_memory'] = False +config['resolution'] = None +config['latent_dim'] = 128 + +config['smpl_res'] = 14475 +if config['is_cape']: + config['smpl_res'] = 3638 + +config['lr'] = 0.0001 +config['starting_balancing_coeff'] = 0.0001 +config['reg_loss_coeff'] = 0.1 # set to 0 if don't want to use edge+collision +config['avg_garment_path'] = '' + +config['signature_dynamic'] = { 'id': (), 'frame_nr': (), + 'pose_shape': (72 + 11,), + 'uv_body_posed': (512, 256, 3), + 'mesh_body_posed': (config['smpl_res'], 3,), + 'mesh_posed': (config['smpl_res'], 3,), + 'mesh_unposed': (config['smpl_res'], 3,), + 'uv_unposed': (512, 256, 3), + 'uv_curvature': (512, 256, 7), + } +config['signature_static'] = { 'uv_static': (512, 256, 3), + 'mesh_mask': (config['smpl_res'],), + 'uv_mask': (512, 256,), + } + +config['pyramid']['is_label'] = False +config['pyramid']['latent_dim'] = config['latent_dim'] +config['pyramid']['add_noise'] = True +config['pyramid']['noise_amount'] = 0.001 + +config['pyramid']['loss_weights'] = [1,1,1,1,1] + +for res in config['pyramid']['resolutions']: + if res != 512: + res_modifier = '_' + str(res) + config['signature_dynamic']['uv_body_posed' + res_modifier] = (res, res//2, 3) + config['signature_dynamic']['uv_unposed' + res_modifier] = (res, res//2, 3) + config['signature_dynamic']['uv_curvature' + res_modifier] = (res, res//2, 7) + config['signature_static']['uv_static' + res_modifier] = (res, res//2, 3) + config['signature_static']['uv_mask' + res_modifier] = (res, res//2) + + +config['pyramid']['static_model'] = 'checkpoints/static_1' +config['pyramid']['body_model'] = 'checkpoints/body_1' +config['pyramid']['curvature_model'] = 'checkpoints/curv_1' +config['pyramid']['freeze_encoders'] = True + +config['pyramid']['levels'] = [] +for res in config['pyramid']['resolutions']: + if res == 512: + level = dict() + level['resolution'] = 512 + level['latent_dim'] = config['latent_dim'] + level['kernel_size'] = 7 + level['encoder_depths'] = [3, 3, 9, 3] + level['encoder_dims'] = [32, 64, 128, 256] + level['decoder_input'] = (16, 8, 80) + level['decoder_depths'] = [3, 3, 9, 3] + level['decoder_dims'] = [256, 128, 64, 16] + level['avg_garment_path'] = '' + level['upscale_enhancer'] = '' + config['pyramid']['levels'].append(level) + elif res == 256: + level = dict() + level['resolution'] = 256 + level['latent_dim'] = config['latent_dim'] + level['kernel_size'] = 7 + level['encoder_depths'] = [9, 9, 9, 9] + level['encoder_dims'] = [32, 64, 128, 256] + level['decoder_input'] = (8, 4, 128) + level['decoder_depths'] = [9, 9, 9, 9] + level['decoder_dims'] = [256, 128, 64, 16] + level['avg_garment_path'] = '' + level['upscale_enhancer'] = ''#'checkpoints/up_3_d256_512_2' + level['upscale_enhancer_freeze'] = True + config['pyramid']['levels'].append(level) + elif res == 128: + level = dict() + level['resolution'] = 128 + level['latent_dim'] = config['latent_dim'] + level['kernel_size'] = 5 + level['encoder_depths'] = [16, 9, 9, 9] + level['encoder_dims'] = [64, 128, 128, 256] + level['decoder_input'] = (4, 2, 128) + level['decoder_depths'] = [16, 9, 9, 9] + level['decoder_dims'] = [256, 128, 128, 64] + level['avg_garment_path'] = '' + level['upscale_enhancer'] = ''#'checkpoints/up_3_d128_256_2' + level['upscale_enhancer_freeze'] = True + config['pyramid']['levels'].append(level) + elif res == 64: + level = dict() + level['resolution'] = 64 + level['latent_dim'] = config['latent_dim'] + level['kernel_size'] = 5 + level['encoder_depths'] = [9, 9, 9] + level['encoder_dims'] = [64, 128, 256] + level['decoder_input'] = (4, 2, 256) + level['decoder_depths'] = [9, 9, 9] + level['decoder_dims'] = [256, 128, 64] + level['avg_garment_path'] = '' + level['upscale_enhancer'] = ''#checkpoints/up_3_d64_128_2' + level['upscale_enhancer_freeze'] = False + config['pyramid']['levels'].append(level) + elif res == 32: + level = dict() + level['resolution'] = 32 + level['latent_dim'] = config['latent_dim'] + level['kernel_size'] = 3 + level['encoder_depths'] = [9, 9] + level['encoder_dims'] = [256, 256] + level['decoder_input'] = (4, 2, 256) + level['decoder_depths'] = [9, 9] + level['decoder_dims'] = [256, 256] + level['avg_garment_path'] = '' + level['upscale_enhancer'] = 'checkpoints/32_512_4'#'checkpoints/up_3_d32_64_2' + level['upscale_enhancer_freeze'] = True + config['pyramid']['levels'].append(level) + else: + raise NotImplementedError + + + +config['cond_ae'] = dict() +config['cond_ae']['is_label'] = False +config['cond_ae']['upscale_output'] = False +config['cond_ae']['latent_dim'] = config['latent_dim'] +config['cond_ae']['kernel_size'] = 7 +config['cond_ae']['bottleneck_size'] = 64 +config['cond_ae']['encoder_depths'] = [3, 3, 9, 9, 3] +config['cond_ae']['encoder_dims'] = [32, 64, 128, 256, config['cond_ae']['bottleneck_size']] +config['cond_ae']['decoder_input'] = (8, 4, config['cond_ae']['bottleneck_size']) +config['cond_ae']['decoder_depths'] = [3, 3, 9, 3, 3] +config['cond_ae']['decoder_dims'] = [config['cond_ae']['bottleneck_size'], 256, 128, 64, 16] + +config['cond_ae_body'] = dict() +config['cond_ae_body']['latent_dim'] = config['latent_dim'] +config['cond_ae_body']['kernel_size'] = 7 +config['cond_ae_body']['upscale_output'] = True +config['cond_ae_body']['bottleneck_size'] = 512 +config['cond_ae_body']['encoder_depths'] = [3, 3, 9, 9, 3, 3] +config['cond_ae_body']['encoder_dims'] = [32, 64, 128, 256, 256, config['cond_ae_body']['bottleneck_size']] +config['cond_ae_body']['decoder_input'] = (4, 2, config['cond_ae_body']['bottleneck_size']) +config['cond_ae_body']['decoder_depths'] = [3, 3, 9, 3] +config['cond_ae_body']['decoder_dims'] = [config['cond_ae_body']['bottleneck_size'], 128, 64, 16] \ No newline at end of file diff --git a/configs/config_abl_2_pyr_32_64_2.py b/configs/config_abl_2_pyr_32_64_2.py new file mode 100644 index 0000000..b6b1bdf --- /dev/null +++ b/configs/config_abl_2_pyr_32_64_2.py @@ -0,0 +1,185 @@ +config = dict() + +config['gpu'] = '0' +config['name'] = 'abl_2_pyr_32_64_2' +config['notes'] = 'fixed noise handling, don\'t divide output by 100' +config['tags'] = ['pyr_non_skirt_2'] + +# DON'T FORGET TO RESET SSIM LOSS USAGE +# DON'T FORGET TO CHECK MODEL LOADING +# DON'T FORGET TO CHECK IF STORE IN MEMORY +# DON'T FORGET TO CHECK REG LOSS COEFF +# DON'T FORGET TO LOAD FINAL UPSCALER UNLESS HAVE LEVEL 512 +# DON'T FORGET TO CHECK IF SKIRT +# DON'T FORGET TO CHECK IF CAPE +# DON'T FORGET TO CHECK IF USING DOWNSCALE NONE OR _2 +# DON'T FORGET TO CHECK UPSCALING and ENCODER CHECKPOINTS + +config['use_skinning'] = True # and deshaping +config['remove_global_orientation'] = True +config['use_extra_losses'] = True # edge, collision, 3d mesh +config['use_offsets'] = False +config['use_norm_loss'] = False + +config['pretrained_model'] = '' +config['pretrained_model_iteration'] = '' + +config['pyramid'] = dict() +config['pyramid']['resolutions'] = [32, 64] +config['pyramid']['pretrained_pyramid'] = 'checkpoints/abl_2_pyr_32' +config['pyramid']['final_upscale_enhancer'] = 'checkpoints/32_512_4' + +config['train_dir'] = '/home/workspace/local-data/train' +config['valid_dir'] = '/home/workspace/local-data/valid' +config['test_dir'] = '/home/workspace/data/dataset/test_ready' +config['batch_size'] = 4 +config['is_skirt'] = False +config['is_cape'] = False + +config['dataset_in_memory'] = False +config['resolution'] = None +config['latent_dim'] = 128 + +config['smpl_res'] = 14475 +if config['is_cape']: + config['smpl_res'] = 3638 + +config['lr'] = 0.0001 +config['starting_balancing_coeff'] = 0.0001 +config['reg_loss_coeff'] = 0.1 # set to 0 if don't want to use edge+collision +config['avg_garment_path'] = '' + +config['signature_dynamic'] = { 'id': (), 'frame_nr': (), + 'pose_shape': (72 + 11,), + 'uv_body_posed': (512, 256, 3), + 'mesh_body_posed': (config['smpl_res'], 3,), + 'mesh_posed': (config['smpl_res'], 3,), + 'mesh_unposed': (config['smpl_res'], 3,), + 'uv_unposed': (512, 256, 3), + 'uv_curvature': (512, 256, 7), + } +config['signature_static'] = { 'uv_static': (512, 256, 3), + 'mesh_mask': (config['smpl_res'],), + 'uv_mask': (512, 256,), + } + +config['pyramid']['is_label'] = False +config['pyramid']['latent_dim'] = config['latent_dim'] +config['pyramid']['add_noise'] = True +config['pyramid']['noise_amount'] = 0.001 + +config['pyramid']['loss_weights'] = [1,1,1,1,1] + +for res in config['pyramid']['resolutions']: + if res != 512: + res_modifier = '_' + str(res) + config['signature_dynamic']['uv_body_posed' + res_modifier] = (res, res//2, 3) + config['signature_dynamic']['uv_unposed' + res_modifier] = (res, res//2, 3) + config['signature_dynamic']['uv_curvature' + res_modifier] = (res, res//2, 7) + config['signature_static']['uv_static' + res_modifier] = (res, res//2, 3) + config['signature_static']['uv_mask' + res_modifier] = (res, res//2) + + +config['pyramid']['static_model'] = 'checkpoints/static_1' +config['pyramid']['body_model'] = 'checkpoints/body_1' +config['pyramid']['curvature_model'] = 'checkpoints/curv_1' +config['pyramid']['freeze_encoders'] = True + +config['pyramid']['levels'] = [] +for res in config['pyramid']['resolutions']: + if res == 512: + level = dict() + level['resolution'] = 512 + level['latent_dim'] = config['latent_dim'] + level['kernel_size'] = 7 + level['encoder_depths'] = [3, 3, 9, 3] + level['encoder_dims'] = [32, 64, 128, 256] + level['decoder_input'] = (16, 8, 80) + level['decoder_depths'] = [3, 3, 9, 3] + level['decoder_dims'] = [256, 128, 64, 16] + level['avg_garment_path'] = '' + level['upscale_enhancer'] = '' + config['pyramid']['levels'].append(level) + elif res == 256: + level = dict() + level['resolution'] = 256 + level['latent_dim'] = config['latent_dim'] + level['kernel_size'] = 7 + level['encoder_depths'] = [9, 9, 9, 9] + level['encoder_dims'] = [32, 64, 128, 256] + level['decoder_input'] = (8, 4, 128) + level['decoder_depths'] = [9, 9, 9, 9] + level['decoder_dims'] = [256, 128, 64, 16] + level['avg_garment_path'] = '' + level['upscale_enhancer'] = ''#'checkpoints/up_3_d256_512_2' + level['upscale_enhancer_freeze'] = True + config['pyramid']['levels'].append(level) + elif res == 128: + level = dict() + level['resolution'] = 128 + level['latent_dim'] = config['latent_dim'] + level['kernel_size'] = 5 + level['encoder_depths'] = [16, 9, 9, 9] + level['encoder_dims'] = [64, 128, 128, 256] + level['decoder_input'] = (4, 2, 128) + level['decoder_depths'] = [16, 9, 9, 9] + level['decoder_dims'] = [256, 128, 128, 64] + level['avg_garment_path'] = '' + level['upscale_enhancer'] = ''#'checkpoints/up_3_d128_256_2' + level['upscale_enhancer_freeze'] = True + config['pyramid']['levels'].append(level) + elif res == 64: + level = dict() + level['resolution'] = 64 + level['latent_dim'] = config['latent_dim'] + level['kernel_size'] = 5 + level['encoder_depths'] = [9, 9, 9] + level['encoder_dims'] = [64, 128, 256] + level['decoder_input'] = (4, 2, 256) + level['decoder_depths'] = [9, 9, 9] + level['decoder_dims'] = [256, 128, 64] + level['avg_garment_path'] = '' + level['upscale_enhancer'] = ''#checkpoints/up_3_d64_128_2' + level['upscale_enhancer_freeze'] = False + config['pyramid']['levels'].append(level) + elif res == 32: + level = dict() + level['resolution'] = 32 + level['latent_dim'] = config['latent_dim'] + level['kernel_size'] = 3 + level['encoder_depths'] = [9, 9] + level['encoder_dims'] = [256, 256] + level['decoder_input'] = (4, 2, 256) + level['decoder_depths'] = [9, 9] + level['decoder_dims'] = [256, 256] + level['avg_garment_path'] = '' + level['upscale_enhancer'] = 'checkpoints/32_512_4'#'checkpoints/up_3_d32_64_2' + level['upscale_enhancer_freeze'] = True + config['pyramid']['levels'].append(level) + else: + raise NotImplementedError + + + +config['cond_ae'] = dict() +config['cond_ae']['is_label'] = False +config['cond_ae']['upscale_output'] = False +config['cond_ae']['latent_dim'] = config['latent_dim'] +config['cond_ae']['kernel_size'] = 7 +config['cond_ae']['bottleneck_size'] = 64 +config['cond_ae']['encoder_depths'] = [3, 3, 9, 9, 3] +config['cond_ae']['encoder_dims'] = [32, 64, 128, 256, config['cond_ae']['bottleneck_size']] +config['cond_ae']['decoder_input'] = (8, 4, config['cond_ae']['bottleneck_size']) +config['cond_ae']['decoder_depths'] = [3, 3, 9, 3, 3] +config['cond_ae']['decoder_dims'] = [config['cond_ae']['bottleneck_size'], 256, 128, 64, 16] + +config['cond_ae_body'] = dict() +config['cond_ae_body']['latent_dim'] = config['latent_dim'] +config['cond_ae_body']['kernel_size'] = 7 +config['cond_ae_body']['upscale_output'] = True +config['cond_ae_body']['bottleneck_size'] = 512 +config['cond_ae_body']['encoder_depths'] = [3, 3, 9, 9, 3, 3] +config['cond_ae_body']['encoder_dims'] = [32, 64, 128, 256, 256, config['cond_ae_body']['bottleneck_size']] +config['cond_ae_body']['decoder_input'] = (4, 2, config['cond_ae_body']['bottleneck_size']) +config['cond_ae_body']['decoder_depths'] = [3, 3, 9, 3] +config['cond_ae_body']['decoder_dims'] = [config['cond_ae_body']['bottleneck_size'], 128, 64, 16] \ No newline at end of file diff --git a/configs/config_abl_2_pyr_32_64_skirt.py b/configs/config_abl_2_pyr_32_64_skirt.py new file mode 100644 index 0000000..531fb15 --- /dev/null +++ b/configs/config_abl_2_pyr_32_64_skirt.py @@ -0,0 +1,189 @@ +config = dict() + +config['gpu'] = '4' +config['name'] = 'abl_2_pyr_32_64_skirt' +config['notes'] = '' +config['tags'] = ['pyr_skirt_2'] + +# DON'T FORGET TO RESET SSIM LOSS USAGE +# DON'T FORGET TO CHECK MODEL LOADING +# DON'T FORGET TO CHECK IF STORE IN MEMORY +# DON'T FORGET TO CHECK REG LOSS COEFF +# DON'T FORGET TO LOAD FINAL UPSCALER UNLESS HAVE LEVEL 512 +# DON'T FORGET TO CHECK IF SKIRT +# DON'T FORGET TO CHECK IF CAPE +# DON'T FORGET TO CHECK IF USING DOWNSCALE NONE OR _2 +# DON'T FORGET TO CHECK UPSCALING and ENCODER CHECKPOINTS + +config['use_skinning'] = True # and deshaping +config['remove_global_orientation'] = True +config['use_extra_losses'] = True # edge, collision, 3d mesh +config['use_offsets'] = False + +config['use_norm_loss'] = False + +config['pretrained_model'] = '' +config['pretrained_model_iteration'] = '' + +config['pyramid'] = dict() +config['pyramid']['resolutions'] = [32, 64] +config['pyramid']['pretrained_pyramid'] = 'checkpoints/abl_2_pyr_32_skirt' +config['pyramid']['pretrained_pyramid_iteration'] = '' +config['pyramid']['final_upscale_enhancer'] = 'checkpoints/64_512_skirt' + +config['train_dir'] = '/home/workspace/local-data/train_skirt' +config['valid_dir'] = '/home/workspace/local-data/valid_skirt' +config['test_dir'] = '/home/workspace/data/dataset/test_skirt_ready_2' +config['batch_size'] = 4 +config['is_skirt'] = True +config['is_cape'] = False + +config['pyramid']['static_model'] = 'checkpoints/static_1_skirt' +config['pyramid']['body_model'] = 'checkpoints/body_1_skirt_2_2' +config['pyramid']['curvature_model'] = 'checkpoints/curv_1_skirt' + +config['dataset_in_memory'] = False +config['resolution'] = None +config['latent_dim'] = 128 + +config['smpl_res'] = 14475 +if config['is_cape']: + config['smpl_res'] = 3638 + +config['lr'] = 0.0001 +config['starting_balancing_coeff'] = 0.0001 +config['reg_loss_coeff'] = 0.1 # set to 0 if don't want to use edge+collision +config['avg_garment_path'] = '' + +config['signature_dynamic'] = { 'id': (), 'frame_nr': (), + 'pose_shape': (72 + 11,), + 'uv_body_posed': (512, 256, 3), + 'mesh_body_posed': (config['smpl_res'], 3,), + 'mesh_posed': (config['smpl_res'], 3,), + 'mesh_unposed': (config['smpl_res'], 3,), + 'uv_unposed': (512, 256, 3), + 'uv_curvature': (512, 256, 7), + } +config['signature_static'] = { 'uv_static': (512, 256, 3), + 'mesh_mask': (config['smpl_res'],), + 'uv_mask': (512, 256,), + } + +config['pyramid']['is_label'] = False +config['pyramid']['latent_dim'] = config['latent_dim'] +config['pyramid']['add_noise'] = True +config['pyramid']['noise_amount'] = 0.001 + +config['pyramid']['loss_weights'] = [1,1,1,1,1] + +for res in config['pyramid']['resolutions']: + if res != 512: + res_modifier = '_' + str(res) + config['signature_dynamic']['uv_body_posed' + res_modifier] = (res, res//2, 3) + config['signature_dynamic']['uv_unposed' + res_modifier] = (res, res//2, 3) + config['signature_dynamic']['uv_curvature' + res_modifier] = (res, res//2, 7) + config['signature_static']['uv_static' + res_modifier] = (res, res//2, 3) + config['signature_static']['uv_mask' + res_modifier] = (res, res//2) + + + +config['pyramid']['freeze_encoders'] = True + +config['pyramid']['levels'] = [] +for res in config['pyramid']['resolutions']: + if res == 512: + level = dict() + level['resolution'] = 512 + level['latent_dim'] = config['latent_dim'] + level['kernel_size'] = 7 + level['encoder_depths'] = [3, 3, 9, 3] + level['encoder_dims'] = [32, 64, 128, 256] + level['decoder_input'] = (16, 8, 80) + level['decoder_depths'] = [3, 3, 9, 3] + level['decoder_dims'] = [256, 128, 64, 16] + level['avg_garment_path'] = '' + level['upscale_enhancer'] = '' + config['pyramid']['levels'].append(level) + elif res == 256: + level = dict() + level['resolution'] = 256 + level['latent_dim'] = config['latent_dim'] + level['kernel_size'] = 7 + level['encoder_depths'] = [9, 9, 9, 9] + level['encoder_dims'] = [32, 64, 128, 256] + level['decoder_input'] = (8, 4, 128) + level['decoder_depths'] = [9, 9, 9, 9] + level['decoder_dims'] = [256, 128, 64, 16] + level['avg_garment_path'] = '' + level['upscale_enhancer'] = ''#'checkpoints/up_3_d256_512_2' + level['upscale_enhancer_freeze'] = True + config['pyramid']['levels'].append(level) + elif res == 128: + level = dict() + level['resolution'] = 128 + level['latent_dim'] = config['latent_dim'] + level['kernel_size'] = 5 + level['encoder_depths'] = [16, 9, 9, 9] + level['encoder_dims'] = [64, 128, 128, 256] + level['decoder_input'] = (4, 2, 128) + level['decoder_depths'] = [16, 9, 9, 9] + level['decoder_dims'] = [256, 128, 128, 64] + level['avg_garment_path'] = '' + level['upscale_enhancer'] = ''#'checkpoints/up_3_d128_256_2' + level['upscale_enhancer_freeze'] = True + config['pyramid']['levels'].append(level) + elif res == 64: + level = dict() + level['resolution'] = 64 + level['latent_dim'] = config['latent_dim'] + level['kernel_size'] = 5 + level['encoder_depths'] = [9, 9, 9] + level['encoder_dims'] = [64, 128, 256] + level['decoder_input'] = (4, 2, 256) + level['decoder_depths'] = [9, 9, 9] + level['decoder_dims'] = [256, 128, 64] + level['avg_garment_path'] = '' + level['upscale_enhancer'] = ''#checkpoints/up_3_d64_128_2' + level['upscale_enhancer_freeze'] = False + config['pyramid']['levels'].append(level) + elif res == 32: + level = dict() + level['resolution'] = 32 + level['latent_dim'] = config['latent_dim'] + level['kernel_size'] = 3 + level['encoder_depths'] = [9, 9] + level['encoder_dims'] = [256, 256] + level['decoder_input'] = (4, 2, 256) + level['decoder_depths'] = [9, 9] + level['decoder_dims'] = [256, 256] + level['avg_garment_path'] = '' + level['upscale_enhancer'] = 'checkpoints/32_512_skirt'#'checkpoints/up_3_d32_64_2' + level['upscale_enhancer_freeze'] = True + config['pyramid']['levels'].append(level) + else: + raise NotImplementedError + + + +config['cond_ae'] = dict() +config['cond_ae']['is_label'] = False +config['cond_ae']['upscale_output'] = False +config['cond_ae']['latent_dim'] = config['latent_dim'] +config['cond_ae']['kernel_size'] = 7 +config['cond_ae']['bottleneck_size'] = 64 +config['cond_ae']['encoder_depths'] = [3, 3, 9, 9, 3] +config['cond_ae']['encoder_dims'] = [32, 64, 128, 256, config['cond_ae']['bottleneck_size']] +config['cond_ae']['decoder_input'] = (8, 4, config['cond_ae']['bottleneck_size']) +config['cond_ae']['decoder_depths'] = [3, 3, 9, 3, 3] +config['cond_ae']['decoder_dims'] = [config['cond_ae']['bottleneck_size'], 256, 128, 64, 16] + +config['cond_ae_body'] = dict() +config['cond_ae_body']['latent_dim'] = config['latent_dim'] +config['cond_ae_body']['kernel_size'] = 7 +config['cond_ae_body']['upscale_output'] = True +config['cond_ae_body']['bottleneck_size'] = 512 +config['cond_ae_body']['encoder_depths'] = [3, 3, 9, 9, 3, 3] +config['cond_ae_body']['encoder_dims'] = [32, 64, 128, 256, 256, config['cond_ae_body']['bottleneck_size']] +config['cond_ae_body']['decoder_input'] = (4, 2, config['cond_ae_body']['bottleneck_size']) +config['cond_ae_body']['decoder_depths'] = [3, 3, 9, 3] +config['cond_ae_body']['decoder_dims'] = [config['cond_ae_body']['bottleneck_size'], 128, 64, 16] \ No newline at end of file diff --git a/configs/config_abl_2_pyr_32_skin.py b/configs/config_abl_2_pyr_32_skin.py new file mode 100644 index 0000000..c311cb2 --- /dev/null +++ b/configs/config_abl_2_pyr_32_skin.py @@ -0,0 +1,191 @@ +config = dict() + +config['gpu'] = '3' +config['name'] = 'abl_2_pyr_32_skin' +config['notes'] = 'fixed noise handling' +config['tags'] = ['pyr_non_skirt_2'] + +# DON'T FORGET TO RESET SSIM LOSS USAGE +# DON'T FORGET TO CHECK MODEL LOADING +# DON'T FORGET TO CHECK IF STORE IN MEMORY +# DON'T FORGET TO CHECK REG LOSS COEFF +# DON'T FORGET TO LOAD FINAL UPSCALER UNLESS HAVE LEVEL 512 +# DON'T FORGET TO CHECK IF SKIRT +# DON'T FORGET TO CHECK IF CAPE +# DON'T FORGET TO CHECK IF USING DOWNSCALE NONE OR _2 +# DON'T FORGET TO CHECK UPSCALING and ENCODER CHECKPOINTS + +config['use_skinning'] = False # and deshaping +config['remove_global_orientation'] = True +config['use_extra_losses'] = True # edge, collision, 3d mesh +config['use_offsets'] = False +config['use_norm_loss'] = False + +config['pretrained_model'] = 'checkpoints/pyr_abl_32_skin' +config['pretrained_model_iteration'] = '250000' + +config['pyramid'] = dict() +config['pyramid']['resolutions'] = [32] +config['pyramid']['pretrained_pyramid'] = '' +config['pyramid']['final_upscale_enhancer'] = 'checkpoints/32_512_4' + +config['train_dir'] = '/home/workspace/local-data/train' +config['valid_dir'] = '/home/workspace/local-data/valid' +config['test_dir'] = '/home/workspace/data/dataset/test_ready' +config['batch_size'] = 4 +config['is_skirt'] = False +config['is_cape'] = False + +config['dataset_in_memory'] = False +config['resolution'] = None +config['latent_dim'] = 128 + +config['smpl_res'] = 14475 +if config['is_cape']: + config['smpl_res'] = 3638 + +config['lr'] = 0.0001 +config['starting_balancing_coeff'] = 0.0001 +config['reg_loss_coeff'] = 0.1 # set to 0 if don't want to use edge+collision +config['avg_garment_path'] = '' + +config['signature_dynamic'] = { 'id': (), 'frame_nr': (), + 'pose_shape': (72 + 11,), + 'uv_body_posed': (512, 256, 3), + 'mesh_body_posed': (config['smpl_res'], 3,), + 'mesh_posed': (config['smpl_res'], 3,), + 'uv_curvature': (512, 256, 7), + } +if config['use_skinning']: + config['signature_dynamic']['uv_unposed'] = (512, 256, 3) + config['signature_dynamic']['mesh_unposed'] = (config['smpl_res'], 3,) +else: + config['signature_dynamic']['uv_posed'] = (512, 256, 3) +config['signature_static'] = { 'uv_static': (512, 256, 3), + 'mesh_mask': (config['smpl_res'],), + 'uv_mask': (512, 256,), + } + +config['pyramid']['is_label'] = False +config['pyramid']['latent_dim'] = config['latent_dim'] +config['pyramid']['add_noise'] = True +config['pyramid']['noise_amount'] = 0.001 + +config['pyramid']['loss_weights'] = [1,1,1,1,1] + +for res in config['pyramid']['resolutions']: + if res != 512: + res_modifier = '_' + str(res) + config['signature_dynamic']['uv_body_posed' + res_modifier] = (res, res//2, 3) + if config['use_skinning']: + config['signature_dynamic']['uv_unposed' + res_modifier] = (res, res//2, 3) + else: + config['signature_dynamic']['uv_posed' + res_modifier] = (res, res//2, 3) + config['signature_dynamic']['uv_curvature' + res_modifier] = (res, res//2, 7) + config['signature_static']['uv_static' + res_modifier] = (res, res//2, 3) + config['signature_static']['uv_mask' + res_modifier] = (res, res//2) + + +config['pyramid']['static_model'] = 'checkpoints/static_1' +config['pyramid']['body_model'] = 'checkpoints/body_1' +config['pyramid']['curvature_model'] = 'checkpoints/curv_1' +config['pyramid']['freeze_encoders'] = True + +config['pyramid']['levels'] = [] +for res in config['pyramid']['resolutions']: + if res == 512: + level = dict() + level['resolution'] = 512 + level['latent_dim'] = config['latent_dim'] + level['kernel_size'] = 7 + level['encoder_depths'] = [3, 3, 9, 3] + level['encoder_dims'] = [32, 64, 128, 256] + level['decoder_input'] = (16, 8, 80) + level['decoder_depths'] = [3, 3, 9, 3] + level['decoder_dims'] = [256, 128, 64, 16] + level['avg_garment_path'] = '' + level['upscale_enhancer'] = '' + config['pyramid']['levels'].append(level) + elif res == 256: + level = dict() + level['resolution'] = 256 + level['latent_dim'] = config['latent_dim'] + level['kernel_size'] = 7 + level['encoder_depths'] = [9, 9, 9, 9] + level['encoder_dims'] = [32, 64, 128, 256] + level['decoder_input'] = (8, 4, 128) + level['decoder_depths'] = [9, 9, 9, 9] + level['decoder_dims'] = [256, 128, 64, 16] + level['avg_garment_path'] = '' + level['upscale_enhancer'] = ''#'checkpoints/up_3_d256_512_2' + level['upscale_enhancer_freeze'] = True + config['pyramid']['levels'].append(level) + elif res == 128: + level = dict() + level['resolution'] = 128 + level['latent_dim'] = config['latent_dim'] + level['kernel_size'] = 5 + level['encoder_depths'] = [16, 9, 9, 9] + level['encoder_dims'] = [64, 128, 128, 256] + level['decoder_input'] = (4, 2, 128) + level['decoder_depths'] = [16, 9, 9, 9] + level['decoder_dims'] = [256, 128, 128, 64] + level['avg_garment_path'] = '' + level['upscale_enhancer'] = ''#'checkpoints/up_3_d128_256_2' + level['upscale_enhancer_freeze'] = True + config['pyramid']['levels'].append(level) + elif res == 64: + level = dict() + level['resolution'] = 64 + level['latent_dim'] = config['latent_dim'] + level['kernel_size'] = 5 + level['encoder_depths'] = [9, 9, 9] + level['encoder_dims'] = [64, 128, 256] + level['decoder_input'] = (4, 2, 256) + level['decoder_depths'] = [9, 9, 9] + level['decoder_dims'] = [256, 128, 64] + level['avg_garment_path'] = '' + level['upscale_enhancer'] = ''#checkpoints/up_3_d64_128_2' + level['upscale_enhancer_freeze'] = False + config['pyramid']['levels'].append(level) + elif res == 32: + level = dict() + level['resolution'] = 32 + level['latent_dim'] = config['latent_dim'] + level['kernel_size'] = 3 + level['encoder_depths'] = [9, 9] + level['encoder_dims'] = [256, 256] + level['decoder_input'] = (4, 2, 256) + level['decoder_depths'] = [9, 9] + level['decoder_dims'] = [256, 256] + level['avg_garment_path'] = '' + level['upscale_enhancer'] = ''#'checkpoints/up_3_d32_64_2' + level['upscale_enhancer_freeze'] = True + config['pyramid']['levels'].append(level) + else: + raise NotImplementedError + + + +config['cond_ae'] = dict() +config['cond_ae']['is_label'] = False +config['cond_ae']['upscale_output'] = False +config['cond_ae']['latent_dim'] = config['latent_dim'] +config['cond_ae']['kernel_size'] = 7 +config['cond_ae']['bottleneck_size'] = 64 +config['cond_ae']['encoder_depths'] = [3, 3, 9, 9, 3] +config['cond_ae']['encoder_dims'] = [32, 64, 128, 256, config['cond_ae']['bottleneck_size']] +config['cond_ae']['decoder_input'] = (8, 4, config['cond_ae']['bottleneck_size']) +config['cond_ae']['decoder_depths'] = [3, 3, 9, 3, 3] +config['cond_ae']['decoder_dims'] = [config['cond_ae']['bottleneck_size'], 256, 128, 64, 16] + +config['cond_ae_body'] = dict() +config['cond_ae_body']['latent_dim'] = config['latent_dim'] +config['cond_ae_body']['kernel_size'] = 7 +config['cond_ae_body']['upscale_output'] = True +config['cond_ae_body']['bottleneck_size'] = 512 +config['cond_ae_body']['encoder_depths'] = [3, 3, 9, 9, 3, 3] +config['cond_ae_body']['encoder_dims'] = [32, 64, 128, 256, 256, config['cond_ae_body']['bottleneck_size']] +config['cond_ae_body']['decoder_input'] = (4, 2, config['cond_ae_body']['bottleneck_size']) +config['cond_ae_body']['decoder_depths'] = [3, 3, 9, 3] +config['cond_ae_body']['decoder_dims'] = [config['cond_ae_body']['bottleneck_size'], 128, 64, 16] \ No newline at end of file diff --git a/configs/config_abl_2_pyr_32_skin_2.py b/configs/config_abl_2_pyr_32_skin_2.py new file mode 100644 index 0000000..61d1bb9 --- /dev/null +++ b/configs/config_abl_2_pyr_32_skin_2.py @@ -0,0 +1,191 @@ +config = dict() + +config['gpu'] = '5' +config['name'] = 'abl_2_pyr_32_skin_2' +config['notes'] = 'fixed noise handling' +config['tags'] = ['pyr_non_skirt_2'] + +# DON'T FORGET TO RESET SSIM LOSS USAGE +# DON'T FORGET TO CHECK MODEL LOADING +# DON'T FORGET TO CHECK IF STORE IN MEMORY +# DON'T FORGET TO CHECK REG LOSS COEFF +# DON'T FORGET TO LOAD FINAL UPSCALER UNLESS HAVE LEVEL 512 +# DON'T FORGET TO CHECK IF SKIRT +# DON'T FORGET TO CHECK IF CAPE +# DON'T FORGET TO CHECK IF USING DOWNSCALE NONE OR _2 +# DON'T FORGET TO CHECK UPSCALING and ENCODER CHECKPOINTS + +config['use_skinning'] = False # and deshaping +config['remove_global_orientation'] = True +config['use_extra_losses'] = True # edge, collision, 3d mesh +config['use_offsets'] = False +config['use_norm_loss'] = False + +config['pretrained_model'] = 'checkpoints/pyr_abl_32_430k' +config['pretrained_model_iteration'] = '430000' + +config['pyramid'] = dict() +config['pyramid']['resolutions'] = [32] +config['pyramid']['pretrained_pyramid'] = '' +config['pyramid']['final_upscale_enhancer'] = 'checkpoints/32_512_4' + +config['train_dir'] = '/home/workspace/local-data/train' +config['valid_dir'] = '/home/workspace/local-data/valid' +config['test_dir'] = '/home/workspace/data/dataset/test_ready' +config['batch_size'] = 4 +config['is_skirt'] = False +config['is_cape'] = False + +config['dataset_in_memory'] = False +config['resolution'] = None +config['latent_dim'] = 128 + +config['smpl_res'] = 14475 +if config['is_cape']: + config['smpl_res'] = 3638 + +config['lr'] = 0.0001 +config['starting_balancing_coeff'] = 0.0001 +config['reg_loss_coeff'] = 0.1 # set to 0 if don't want to use edge+collision +config['avg_garment_path'] = '' + +config['signature_dynamic'] = { 'id': (), 'frame_nr': (), + 'pose_shape': (72 + 11,), + 'uv_body_posed': (512, 256, 3), + 'mesh_body_posed': (config['smpl_res'], 3,), + 'mesh_posed': (config['smpl_res'], 3,), + 'uv_curvature': (512, 256, 7), + } +if config['use_skinning']: + config['signature_dynamic']['uv_unposed'] = (512, 256, 3) + config['signature_dynamic']['mesh_unposed'] = (config['smpl_res'], 3,) +else: + config['signature_dynamic']['uv_posed'] = (512, 256, 3) +config['signature_static'] = { 'uv_static': (512, 256, 3), + 'mesh_mask': (config['smpl_res'],), + 'uv_mask': (512, 256,), + } + +config['pyramid']['is_label'] = False +config['pyramid']['latent_dim'] = config['latent_dim'] +config['pyramid']['add_noise'] = True +config['pyramid']['noise_amount'] = 0.001 + +config['pyramid']['loss_weights'] = [1,1,1,1,1] + +for res in config['pyramid']['resolutions']: + if res != 512: + res_modifier = '_' + str(res) + config['signature_dynamic']['uv_body_posed' + res_modifier] = (res, res//2, 3) + if config['use_skinning']: + config['signature_dynamic']['uv_unposed' + res_modifier] = (res, res//2, 3) + else: + config['signature_dynamic']['uv_posed' + res_modifier] = (res, res//2, 3) + config['signature_dynamic']['uv_curvature' + res_modifier] = (res, res//2, 7) + config['signature_static']['uv_static' + res_modifier] = (res, res//2, 3) + config['signature_static']['uv_mask' + res_modifier] = (res, res//2) + + +config['pyramid']['static_model'] = 'checkpoints/static_1' +config['pyramid']['body_model'] = 'checkpoints/body_1' +config['pyramid']['curvature_model'] = 'checkpoints/curv_1' +config['pyramid']['freeze_encoders'] = True + +config['pyramid']['levels'] = [] +for res in config['pyramid']['resolutions']: + if res == 512: + level = dict() + level['resolution'] = 512 + level['latent_dim'] = config['latent_dim'] + level['kernel_size'] = 7 + level['encoder_depths'] = [3, 3, 9, 3] + level['encoder_dims'] = [32, 64, 128, 256] + level['decoder_input'] = (16, 8, 80) + level['decoder_depths'] = [3, 3, 9, 3] + level['decoder_dims'] = [256, 128, 64, 16] + level['avg_garment_path'] = '' + level['upscale_enhancer'] = '' + config['pyramid']['levels'].append(level) + elif res == 256: + level = dict() + level['resolution'] = 256 + level['latent_dim'] = config['latent_dim'] + level['kernel_size'] = 7 + level['encoder_depths'] = [9, 9, 9, 9] + level['encoder_dims'] = [32, 64, 128, 256] + level['decoder_input'] = (8, 4, 128) + level['decoder_depths'] = [9, 9, 9, 9] + level['decoder_dims'] = [256, 128, 64, 16] + level['avg_garment_path'] = '' + level['upscale_enhancer'] = ''#'checkpoints/up_3_d256_512_2' + level['upscale_enhancer_freeze'] = True + config['pyramid']['levels'].append(level) + elif res == 128: + level = dict() + level['resolution'] = 128 + level['latent_dim'] = config['latent_dim'] + level['kernel_size'] = 5 + level['encoder_depths'] = [16, 9, 9, 9] + level['encoder_dims'] = [64, 128, 128, 256] + level['decoder_input'] = (4, 2, 128) + level['decoder_depths'] = [16, 9, 9, 9] + level['decoder_dims'] = [256, 128, 128, 64] + level['avg_garment_path'] = '' + level['upscale_enhancer'] = ''#'checkpoints/up_3_d128_256_2' + level['upscale_enhancer_freeze'] = True + config['pyramid']['levels'].append(level) + elif res == 64: + level = dict() + level['resolution'] = 64 + level['latent_dim'] = config['latent_dim'] + level['kernel_size'] = 5 + level['encoder_depths'] = [9, 9, 9] + level['encoder_dims'] = [64, 128, 256] + level['decoder_input'] = (4, 2, 256) + level['decoder_depths'] = [9, 9, 9] + level['decoder_dims'] = [256, 128, 64] + level['avg_garment_path'] = '' + level['upscale_enhancer'] = ''#checkpoints/up_3_d64_128_2' + level['upscale_enhancer_freeze'] = False + config['pyramid']['levels'].append(level) + elif res == 32: + level = dict() + level['resolution'] = 32 + level['latent_dim'] = config['latent_dim'] + level['kernel_size'] = 3 + level['encoder_depths'] = [9, 9] + level['encoder_dims'] = [256, 256] + level['decoder_input'] = (4, 2, 256) + level['decoder_depths'] = [9, 9] + level['decoder_dims'] = [256, 256] + level['avg_garment_path'] = '' + level['upscale_enhancer'] = ''#'checkpoints/up_3_d32_64_2' + level['upscale_enhancer_freeze'] = True + config['pyramid']['levels'].append(level) + else: + raise NotImplementedError + + + +config['cond_ae'] = dict() +config['cond_ae']['is_label'] = False +config['cond_ae']['upscale_output'] = False +config['cond_ae']['latent_dim'] = config['latent_dim'] +config['cond_ae']['kernel_size'] = 7 +config['cond_ae']['bottleneck_size'] = 64 +config['cond_ae']['encoder_depths'] = [3, 3, 9, 9, 3] +config['cond_ae']['encoder_dims'] = [32, 64, 128, 256, config['cond_ae']['bottleneck_size']] +config['cond_ae']['decoder_input'] = (8, 4, config['cond_ae']['bottleneck_size']) +config['cond_ae']['decoder_depths'] = [3, 3, 9, 3, 3] +config['cond_ae']['decoder_dims'] = [config['cond_ae']['bottleneck_size'], 256, 128, 64, 16] + +config['cond_ae_body'] = dict() +config['cond_ae_body']['latent_dim'] = config['latent_dim'] +config['cond_ae_body']['kernel_size'] = 7 +config['cond_ae_body']['upscale_output'] = True +config['cond_ae_body']['bottleneck_size'] = 512 +config['cond_ae_body']['encoder_depths'] = [3, 3, 9, 9, 3, 3] +config['cond_ae_body']['encoder_dims'] = [32, 64, 128, 256, 256, config['cond_ae_body']['bottleneck_size']] +config['cond_ae_body']['decoder_input'] = (4, 2, config['cond_ae_body']['bottleneck_size']) +config['cond_ae_body']['decoder_depths'] = [3, 3, 9, 3] +config['cond_ae_body']['decoder_dims'] = [config['cond_ae_body']['bottleneck_size'], 128, 64, 16] \ No newline at end of file diff --git a/configs/config_abl_2_pyr_32_skin_norm.py b/configs/config_abl_2_pyr_32_skin_norm.py new file mode 100644 index 0000000..7667882 --- /dev/null +++ b/configs/config_abl_2_pyr_32_skin_norm.py @@ -0,0 +1,191 @@ +config = dict() + +config['gpu'] = '4' +config['name'] = 'abl_2_pyr_32_skin_norm' +config['notes'] = 'fixed noise handling' +config['tags'] = ['pyr_non_skirt_2'] + +# DON'T FORGET TO RESET SSIM LOSS USAGE +# DON'T FORGET TO CHECK MODEL LOADING +# DON'T FORGET TO CHECK IF STORE IN MEMORY +# DON'T FORGET TO CHECK REG LOSS COEFF +# DON'T FORGET TO LOAD FINAL UPSCALER UNLESS HAVE LEVEL 512 +# DON'T FORGET TO CHECK IF SKIRT +# DON'T FORGET TO CHECK IF CAPE +# DON'T FORGET TO CHECK IF USING DOWNSCALE NONE OR _2 +# DON'T FORGET TO CHECK UPSCALING and ENCODER CHECKPOINTS + +config['use_skinning'] = False # and deshaping +config['remove_global_orientation'] = True +config['use_extra_losses'] = True # edge, collision, 3d mesh +config['use_offsets'] = False +config['use_norm_loss'] = True + +config['pretrained_model'] = 'checkpoints/pyr_abl_32_skin' +config['pretrained_model_iteration'] = '250000' + +config['pyramid'] = dict() +config['pyramid']['resolutions'] = [32] +config['pyramid']['pretrained_pyramid'] = '' +config['pyramid']['final_upscale_enhancer'] = 'checkpoints/32_512_4' + +config['train_dir'] = '/home/workspace/local-data/train' +config['valid_dir'] = '/home/workspace/local-data/valid' +config['test_dir'] = '/home/workspace/data/dataset/test_ready' +config['batch_size'] = 4 +config['is_skirt'] = False +config['is_cape'] = False + +config['dataset_in_memory'] = False +config['resolution'] = None +config['latent_dim'] = 128 + +config['smpl_res'] = 14475 +if config['is_cape']: + config['smpl_res'] = 3638 + +config['lr'] = 0.0001 +config['starting_balancing_coeff'] = 0.0001 +config['reg_loss_coeff'] = 0.1 # set to 0 if don't want to use edge+collision +config['avg_garment_path'] = '' + +config['signature_dynamic'] = { 'id': (), 'frame_nr': (), + 'pose_shape': (72 + 11,), + 'uv_body_posed': (512, 256, 3), + 'mesh_body_posed': (config['smpl_res'], 3,), + 'mesh_posed': (config['smpl_res'], 3,), + 'uv_curvature': (512, 256, 7), + } +if config['use_skinning']: + config['signature_dynamic']['uv_unposed'] = (512, 256, 3) + config['signature_dynamic']['mesh_unposed'] = (config['smpl_res'], 3,) +else: + config['signature_dynamic']['uv_posed'] = (512, 256, 3) +config['signature_static'] = { 'uv_static': (512, 256, 3), + 'mesh_mask': (config['smpl_res'],), + 'uv_mask': (512, 256,), + } + +config['pyramid']['is_label'] = False +config['pyramid']['latent_dim'] = config['latent_dim'] +config['pyramid']['add_noise'] = True +config['pyramid']['noise_amount'] = 0.001 + +config['pyramid']['loss_weights'] = [1,1,1,1,1] + +for res in config['pyramid']['resolutions']: + if res != 512: + res_modifier = '_' + str(res) + config['signature_dynamic']['uv_body_posed' + res_modifier] = (res, res//2, 3) + if config['use_skinning']: + config['signature_dynamic']['uv_unposed' + res_modifier] = (res, res//2, 3) + else: + config['signature_dynamic']['uv_posed' + res_modifier] = (res, res//2, 3) + config['signature_dynamic']['uv_curvature' + res_modifier] = (res, res//2, 7) + config['signature_static']['uv_static' + res_modifier] = (res, res//2, 3) + config['signature_static']['uv_mask' + res_modifier] = (res, res//2) + + +config['pyramid']['static_model'] = 'checkpoints/static_1' +config['pyramid']['body_model'] = 'checkpoints/body_1' +config['pyramid']['curvature_model'] = 'checkpoints/curv_1' +config['pyramid']['freeze_encoders'] = True + +config['pyramid']['levels'] = [] +for res in config['pyramid']['resolutions']: + if res == 512: + level = dict() + level['resolution'] = 512 + level['latent_dim'] = config['latent_dim'] + level['kernel_size'] = 7 + level['encoder_depths'] = [3, 3, 9, 3] + level['encoder_dims'] = [32, 64, 128, 256] + level['decoder_input'] = (16, 8, 80) + level['decoder_depths'] = [3, 3, 9, 3] + level['decoder_dims'] = [256, 128, 64, 16] + level['avg_garment_path'] = '' + level['upscale_enhancer'] = '' + config['pyramid']['levels'].append(level) + elif res == 256: + level = dict() + level['resolution'] = 256 + level['latent_dim'] = config['latent_dim'] + level['kernel_size'] = 7 + level['encoder_depths'] = [9, 9, 9, 9] + level['encoder_dims'] = [32, 64, 128, 256] + level['decoder_input'] = (8, 4, 128) + level['decoder_depths'] = [9, 9, 9, 9] + level['decoder_dims'] = [256, 128, 64, 16] + level['avg_garment_path'] = '' + level['upscale_enhancer'] = ''#'checkpoints/up_3_d256_512_2' + level['upscale_enhancer_freeze'] = True + config['pyramid']['levels'].append(level) + elif res == 128: + level = dict() + level['resolution'] = 128 + level['latent_dim'] = config['latent_dim'] + level['kernel_size'] = 5 + level['encoder_depths'] = [16, 9, 9, 9] + level['encoder_dims'] = [64, 128, 128, 256] + level['decoder_input'] = (4, 2, 128) + level['decoder_depths'] = [16, 9, 9, 9] + level['decoder_dims'] = [256, 128, 128, 64] + level['avg_garment_path'] = '' + level['upscale_enhancer'] = ''#'checkpoints/up_3_d128_256_2' + level['upscale_enhancer_freeze'] = True + config['pyramid']['levels'].append(level) + elif res == 64: + level = dict() + level['resolution'] = 64 + level['latent_dim'] = config['latent_dim'] + level['kernel_size'] = 5 + level['encoder_depths'] = [9, 9, 9] + level['encoder_dims'] = [64, 128, 256] + level['decoder_input'] = (4, 2, 256) + level['decoder_depths'] = [9, 9, 9] + level['decoder_dims'] = [256, 128, 64] + level['avg_garment_path'] = '' + level['upscale_enhancer'] = ''#checkpoints/up_3_d64_128_2' + level['upscale_enhancer_freeze'] = False + config['pyramid']['levels'].append(level) + elif res == 32: + level = dict() + level['resolution'] = 32 + level['latent_dim'] = config['latent_dim'] + level['kernel_size'] = 3 + level['encoder_depths'] = [9, 9] + level['encoder_dims'] = [256, 256] + level['decoder_input'] = (4, 2, 256) + level['decoder_depths'] = [9, 9] + level['decoder_dims'] = [256, 256] + level['avg_garment_path'] = '' + level['upscale_enhancer'] = ''#'checkpoints/up_3_d32_64_2' + level['upscale_enhancer_freeze'] = True + config['pyramid']['levels'].append(level) + else: + raise NotImplementedError + + + +config['cond_ae'] = dict() +config['cond_ae']['is_label'] = False +config['cond_ae']['upscale_output'] = False +config['cond_ae']['latent_dim'] = config['latent_dim'] +config['cond_ae']['kernel_size'] = 7 +config['cond_ae']['bottleneck_size'] = 64 +config['cond_ae']['encoder_depths'] = [3, 3, 9, 9, 3] +config['cond_ae']['encoder_dims'] = [32, 64, 128, 256, config['cond_ae']['bottleneck_size']] +config['cond_ae']['decoder_input'] = (8, 4, config['cond_ae']['bottleneck_size']) +config['cond_ae']['decoder_depths'] = [3, 3, 9, 3, 3] +config['cond_ae']['decoder_dims'] = [config['cond_ae']['bottleneck_size'], 256, 128, 64, 16] + +config['cond_ae_body'] = dict() +config['cond_ae_body']['latent_dim'] = config['latent_dim'] +config['cond_ae_body']['kernel_size'] = 7 +config['cond_ae_body']['upscale_output'] = True +config['cond_ae_body']['bottleneck_size'] = 512 +config['cond_ae_body']['encoder_depths'] = [3, 3, 9, 9, 3, 3] +config['cond_ae_body']['encoder_dims'] = [32, 64, 128, 256, 256, config['cond_ae_body']['bottleneck_size']] +config['cond_ae_body']['decoder_input'] = (4, 2, config['cond_ae_body']['bottleneck_size']) +config['cond_ae_body']['decoder_depths'] = [3, 3, 9, 3] +config['cond_ae_body']['decoder_dims'] = [config['cond_ae_body']['bottleneck_size'], 128, 64, 16] \ No newline at end of file diff --git a/configs/config_abl_2_pyr_32_skirt.py b/configs/config_abl_2_pyr_32_skirt.py new file mode 100644 index 0000000..b163504 --- /dev/null +++ b/configs/config_abl_2_pyr_32_skirt.py @@ -0,0 +1,189 @@ +config = dict() + +config['gpu'] = '4' +config['name'] = 'abl_2_pyr_32_skirt' +config['notes'] = '' +config['tags'] = ['pyr_skirt_2'] + +# DON'T FORGET TO RESET SSIM LOSS USAGE +# DON'T FORGET TO CHECK MODEL LOADING +# DON'T FORGET TO CHECK IF STORE IN MEMORY +# DON'T FORGET TO CHECK REG LOSS COEFF +# DON'T FORGET TO LOAD FINAL UPSCALER UNLESS HAVE LEVEL 512 +# DON'T FORGET TO CHECK IF SKIRT +# DON'T FORGET TO CHECK IF CAPE +# DON'T FORGET TO CHECK IF USING DOWNSCALE NONE OR _2 +# DON'T FORGET TO CHECK UPSCALING and ENCODER CHECKPOINTS + +config['use_skinning'] = True # and deshaping +config['remove_global_orientation'] = True +config['use_extra_losses'] = True # edge, collision, 3d mesh +config['use_offsets'] = False + +config['use_norm_loss'] = False + +config['pretrained_model'] = 'checkpoints/pyr_abl_32_skirt_2' +config['pretrained_model_iteration'] = '130000' + +config['pyramid'] = dict() +config['pyramid']['resolutions'] = [32] +config['pyramid']['pretrained_pyramid'] = '' +config['pyramid']['pretrained_pyramid_iteration'] = '' +config['pyramid']['final_upscale_enhancer'] = 'checkpoints/32_512_skirt' + +config['train_dir'] = '/home/workspace/local-data/train_skirt' +config['valid_dir'] = '/home/workspace/local-data/valid_skirt' +config['test_dir'] = '/home/workspace/data/dataset/test_skirt_ready_2' +config['batch_size'] = 4 +config['is_skirt'] = True +config['is_cape'] = False + +config['pyramid']['static_model'] = 'checkpoints/static_1_skirt' +config['pyramid']['body_model'] = 'checkpoints/body_1_skirt_2_2' +config['pyramid']['curvature_model'] = 'checkpoints/curv_1_skirt' + +config['dataset_in_memory'] = False +config['resolution'] = None +config['latent_dim'] = 128 + +config['smpl_res'] = 14475 +if config['is_cape']: + config['smpl_res'] = 3638 + +config['lr'] = 0.0001 +config['starting_balancing_coeff'] = 0.0001 +config['reg_loss_coeff'] = 0.1 # set to 0 if don't want to use edge+collision +config['avg_garment_path'] = '' + +config['signature_dynamic'] = { 'id': (), 'frame_nr': (), + 'pose_shape': (72 + 11,), + 'uv_body_posed': (512, 256, 3), + 'mesh_body_posed': (config['smpl_res'], 3,), + 'mesh_posed': (config['smpl_res'], 3,), + 'mesh_unposed': (config['smpl_res'], 3,), + 'uv_unposed': (512, 256, 3), + 'uv_curvature': (512, 256, 7), + } +config['signature_static'] = { 'uv_static': (512, 256, 3), + 'mesh_mask': (config['smpl_res'],), + 'uv_mask': (512, 256,), + } + +config['pyramid']['is_label'] = False +config['pyramid']['latent_dim'] = config['latent_dim'] +config['pyramid']['add_noise'] = True +config['pyramid']['noise_amount'] = 0.001 + +config['pyramid']['loss_weights'] = [1,1,1,1,1] + +for res in config['pyramid']['resolutions']: + if res != 512: + res_modifier = '_' + str(res) + config['signature_dynamic']['uv_body_posed' + res_modifier] = (res, res//2, 3) + config['signature_dynamic']['uv_unposed' + res_modifier] = (res, res//2, 3) + config['signature_dynamic']['uv_curvature' + res_modifier] = (res, res//2, 7) + config['signature_static']['uv_static' + res_modifier] = (res, res//2, 3) + config['signature_static']['uv_mask' + res_modifier] = (res, res//2) + + + +config['pyramid']['freeze_encoders'] = True + +config['pyramid']['levels'] = [] +for res in config['pyramid']['resolutions']: + if res == 512: + level = dict() + level['resolution'] = 512 + level['latent_dim'] = config['latent_dim'] + level['kernel_size'] = 7 + level['encoder_depths'] = [3, 3, 9, 3] + level['encoder_dims'] = [32, 64, 128, 256] + level['decoder_input'] = (16, 8, 80) + level['decoder_depths'] = [3, 3, 9, 3] + level['decoder_dims'] = [256, 128, 64, 16] + level['avg_garment_path'] = '' + level['upscale_enhancer'] = '' + config['pyramid']['levels'].append(level) + elif res == 256: + level = dict() + level['resolution'] = 256 + level['latent_dim'] = config['latent_dim'] + level['kernel_size'] = 7 + level['encoder_depths'] = [9, 9, 9, 9] + level['encoder_dims'] = [32, 64, 128, 256] + level['decoder_input'] = (8, 4, 128) + level['decoder_depths'] = [9, 9, 9, 9] + level['decoder_dims'] = [256, 128, 64, 16] + level['avg_garment_path'] = '' + level['upscale_enhancer'] = ''#'checkpoints/up_3_d256_512_2' + level['upscale_enhancer_freeze'] = True + config['pyramid']['levels'].append(level) + elif res == 128: + level = dict() + level['resolution'] = 128 + level['latent_dim'] = config['latent_dim'] + level['kernel_size'] = 5 + level['encoder_depths'] = [16, 9, 9, 9] + level['encoder_dims'] = [64, 128, 128, 256] + level['decoder_input'] = (4, 2, 128) + level['decoder_depths'] = [16, 9, 9, 9] + level['decoder_dims'] = [256, 128, 128, 64] + level['avg_garment_path'] = '' + level['upscale_enhancer'] = ''#'checkpoints/up_3_d128_256_2' + level['upscale_enhancer_freeze'] = True + config['pyramid']['levels'].append(level) + elif res == 64: + level = dict() + level['resolution'] = 64 + level['latent_dim'] = config['latent_dim'] + level['kernel_size'] = 5 + level['encoder_depths'] = [9, 9, 9] + level['encoder_dims'] = [64, 128, 256] + level['decoder_input'] = (4, 2, 256) + level['decoder_depths'] = [9, 9, 9] + level['decoder_dims'] = [256, 128, 64] + level['avg_garment_path'] = '' + level['upscale_enhancer'] = ''#checkpoints/up_3_d64_128_2' + level['upscale_enhancer_freeze'] = False + config['pyramid']['levels'].append(level) + elif res == 32: + level = dict() + level['resolution'] = 32 + level['latent_dim'] = config['latent_dim'] + level['kernel_size'] = 3 + level['encoder_depths'] = [9, 9] + level['encoder_dims'] = [256, 256] + level['decoder_input'] = (4, 2, 256) + level['decoder_depths'] = [9, 9] + level['decoder_dims'] = [256, 256] + level['avg_garment_path'] = '' + level['upscale_enhancer'] = ''#'checkpoints/up_3_d32_64_2' + level['upscale_enhancer_freeze'] = True + config['pyramid']['levels'].append(level) + else: + raise NotImplementedError + + + +config['cond_ae'] = dict() +config['cond_ae']['is_label'] = False +config['cond_ae']['upscale_output'] = False +config['cond_ae']['latent_dim'] = config['latent_dim'] +config['cond_ae']['kernel_size'] = 7 +config['cond_ae']['bottleneck_size'] = 64 +config['cond_ae']['encoder_depths'] = [3, 3, 9, 9, 3] +config['cond_ae']['encoder_dims'] = [32, 64, 128, 256, config['cond_ae']['bottleneck_size']] +config['cond_ae']['decoder_input'] = (8, 4, config['cond_ae']['bottleneck_size']) +config['cond_ae']['decoder_depths'] = [3, 3, 9, 3, 3] +config['cond_ae']['decoder_dims'] = [config['cond_ae']['bottleneck_size'], 256, 128, 64, 16] + +config['cond_ae_body'] = dict() +config['cond_ae_body']['latent_dim'] = config['latent_dim'] +config['cond_ae_body']['kernel_size'] = 7 +config['cond_ae_body']['upscale_output'] = True +config['cond_ae_body']['bottleneck_size'] = 512 +config['cond_ae_body']['encoder_depths'] = [3, 3, 9, 9, 3, 3] +config['cond_ae_body']['encoder_dims'] = [32, 64, 128, 256, 256, config['cond_ae_body']['bottleneck_size']] +config['cond_ae_body']['decoder_input'] = (4, 2, config['cond_ae_body']['bottleneck_size']) +config['cond_ae_body']['decoder_depths'] = [3, 3, 9, 3] +config['cond_ae_body']['decoder_dims'] = [config['cond_ae_body']['bottleneck_size'], 128, 64, 16] \ No newline at end of file diff --git a/configs/config_abl_2_pyr_32_skirt_extra_loss.py b/configs/config_abl_2_pyr_32_skirt_extra_loss.py new file mode 100644 index 0000000..98cd673 --- /dev/null +++ b/configs/config_abl_2_pyr_32_skirt_extra_loss.py @@ -0,0 +1,189 @@ +config = dict() + +config['gpu'] = '4' +config['name'] = 'abl_2_pyr_32_skirt_extra_loss' +config['notes'] = '' +config['tags'] = ['pyr_skirt_2'] + +# DON'T FORGET TO RESET SSIM LOSS USAGE +# DON'T FORGET TO CHECK MODEL LOADING +# DON'T FORGET TO CHECK IF STORE IN MEMORY +# DON'T FORGET TO CHECK REG LOSS COEFF +# DON'T FORGET TO LOAD FINAL UPSCALER UNLESS HAVE LEVEL 512 +# DON'T FORGET TO CHECK IF SKIRT +# DON'T FORGET TO CHECK IF CAPE +# DON'T FORGET TO CHECK IF USING DOWNSCALE NONE OR _2 +# DON'T FORGET TO CHECK UPSCALING and ENCODER CHECKPOINTS + +config['use_skinning'] = True # and deshaping +config['remove_global_orientation'] = True +config['use_extra_losses'] = False # edge, collision, 3d mesh +config['use_offsets'] = False + +config['use_norm_loss'] = False + +config['pretrained_model'] = 'checkpoints/pyr_abl_32_extra_loss_skirt' +config['pretrained_model_iteration'] = '130000' + +config['pyramid'] = dict() +config['pyramid']['resolutions'] = [32] +config['pyramid']['pretrained_pyramid'] = '' +config['pyramid']['pretrained_pyramid_iteration'] = '' +config['pyramid']['final_upscale_enhancer'] = 'checkpoints/32_512_skirt' + +config['train_dir'] = '/home/workspace/local-data/train_skirt' +config['valid_dir'] = '/home/workspace/local-data/valid_skirt' +config['test_dir'] = '/home/workspace/data/dataset/test_skirt_ready_2' +config['batch_size'] = 4 +config['is_skirt'] = True +config['is_cape'] = False + +config['pyramid']['static_model'] = 'checkpoints/static_1_skirt' +config['pyramid']['body_model'] = 'checkpoints/body_1_skirt_2_2' +config['pyramid']['curvature_model'] = 'checkpoints/curv_1_skirt' + +config['dataset_in_memory'] = False +config['resolution'] = None +config['latent_dim'] = 128 + +config['smpl_res'] = 14475 +if config['is_cape']: + config['smpl_res'] = 3638 + +config['lr'] = 0.0001 +config['starting_balancing_coeff'] = 0.0001 +config['reg_loss_coeff'] = 0.1 # set to 0 if don't want to use edge+collision +config['avg_garment_path'] = '' + +config['signature_dynamic'] = { 'id': (), 'frame_nr': (), + 'pose_shape': (72 + 11,), + 'uv_body_posed': (512, 256, 3), + 'mesh_body_posed': (config['smpl_res'], 3,), + 'mesh_posed': (config['smpl_res'], 3,), + 'mesh_unposed': (config['smpl_res'], 3,), + 'uv_unposed': (512, 256, 3), + 'uv_curvature': (512, 256, 7), + } +config['signature_static'] = { 'uv_static': (512, 256, 3), + 'mesh_mask': (config['smpl_res'],), + 'uv_mask': (512, 256,), + } + +config['pyramid']['is_label'] = False +config['pyramid']['latent_dim'] = config['latent_dim'] +config['pyramid']['add_noise'] = True +config['pyramid']['noise_amount'] = 0.001 + +config['pyramid']['loss_weights'] = [1,1,1,1,1] + +for res in config['pyramid']['resolutions']: + if res != 512: + res_modifier = '_' + str(res) + config['signature_dynamic']['uv_body_posed' + res_modifier] = (res, res//2, 3) + config['signature_dynamic']['uv_unposed' + res_modifier] = (res, res//2, 3) + config['signature_dynamic']['uv_curvature' + res_modifier] = (res, res//2, 7) + config['signature_static']['uv_static' + res_modifier] = (res, res//2, 3) + config['signature_static']['uv_mask' + res_modifier] = (res, res//2) + + + +config['pyramid']['freeze_encoders'] = True + +config['pyramid']['levels'] = [] +for res in config['pyramid']['resolutions']: + if res == 512: + level = dict() + level['resolution'] = 512 + level['latent_dim'] = config['latent_dim'] + level['kernel_size'] = 7 + level['encoder_depths'] = [3, 3, 9, 3] + level['encoder_dims'] = [32, 64, 128, 256] + level['decoder_input'] = (16, 8, 80) + level['decoder_depths'] = [3, 3, 9, 3] + level['decoder_dims'] = [256, 128, 64, 16] + level['avg_garment_path'] = '' + level['upscale_enhancer'] = '' + config['pyramid']['levels'].append(level) + elif res == 256: + level = dict() + level['resolution'] = 256 + level['latent_dim'] = config['latent_dim'] + level['kernel_size'] = 7 + level['encoder_depths'] = [9, 9, 9, 9] + level['encoder_dims'] = [32, 64, 128, 256] + level['decoder_input'] = (8, 4, 128) + level['decoder_depths'] = [9, 9, 9, 9] + level['decoder_dims'] = [256, 128, 64, 16] + level['avg_garment_path'] = '' + level['upscale_enhancer'] = ''#'checkpoints/up_3_d256_512_2' + level['upscale_enhancer_freeze'] = True + config['pyramid']['levels'].append(level) + elif res == 128: + level = dict() + level['resolution'] = 128 + level['latent_dim'] = config['latent_dim'] + level['kernel_size'] = 5 + level['encoder_depths'] = [16, 9, 9, 9] + level['encoder_dims'] = [64, 128, 128, 256] + level['decoder_input'] = (4, 2, 128) + level['decoder_depths'] = [16, 9, 9, 9] + level['decoder_dims'] = [256, 128, 128, 64] + level['avg_garment_path'] = '' + level['upscale_enhancer'] = ''#'checkpoints/up_3_d128_256_2' + level['upscale_enhancer_freeze'] = True + config['pyramid']['levels'].append(level) + elif res == 64: + level = dict() + level['resolution'] = 64 + level['latent_dim'] = config['latent_dim'] + level['kernel_size'] = 5 + level['encoder_depths'] = [9, 9, 9] + level['encoder_dims'] = [64, 128, 256] + level['decoder_input'] = (4, 2, 256) + level['decoder_depths'] = [9, 9, 9] + level['decoder_dims'] = [256, 128, 64] + level['avg_garment_path'] = '' + level['upscale_enhancer'] = ''#checkpoints/up_3_d64_128_2' + level['upscale_enhancer_freeze'] = False + config['pyramid']['levels'].append(level) + elif res == 32: + level = dict() + level['resolution'] = 32 + level['latent_dim'] = config['latent_dim'] + level['kernel_size'] = 3 + level['encoder_depths'] = [9, 9] + level['encoder_dims'] = [256, 256] + level['decoder_input'] = (4, 2, 256) + level['decoder_depths'] = [9, 9] + level['decoder_dims'] = [256, 256] + level['avg_garment_path'] = '' + level['upscale_enhancer'] = ''#'checkpoints/up_3_d32_64_2' + level['upscale_enhancer_freeze'] = True + config['pyramid']['levels'].append(level) + else: + raise NotImplementedError + + + +config['cond_ae'] = dict() +config['cond_ae']['is_label'] = False +config['cond_ae']['upscale_output'] = False +config['cond_ae']['latent_dim'] = config['latent_dim'] +config['cond_ae']['kernel_size'] = 7 +config['cond_ae']['bottleneck_size'] = 64 +config['cond_ae']['encoder_depths'] = [3, 3, 9, 9, 3] +config['cond_ae']['encoder_dims'] = [32, 64, 128, 256, config['cond_ae']['bottleneck_size']] +config['cond_ae']['decoder_input'] = (8, 4, config['cond_ae']['bottleneck_size']) +config['cond_ae']['decoder_depths'] = [3, 3, 9, 3, 3] +config['cond_ae']['decoder_dims'] = [config['cond_ae']['bottleneck_size'], 256, 128, 64, 16] + +config['cond_ae_body'] = dict() +config['cond_ae_body']['latent_dim'] = config['latent_dim'] +config['cond_ae_body']['kernel_size'] = 7 +config['cond_ae_body']['upscale_output'] = True +config['cond_ae_body']['bottleneck_size'] = 512 +config['cond_ae_body']['encoder_depths'] = [3, 3, 9, 9, 3, 3] +config['cond_ae_body']['encoder_dims'] = [32, 64, 128, 256, 256, config['cond_ae_body']['bottleneck_size']] +config['cond_ae_body']['decoder_input'] = (4, 2, config['cond_ae_body']['bottleneck_size']) +config['cond_ae_body']['decoder_depths'] = [3, 3, 9, 3] +config['cond_ae_body']['decoder_dims'] = [config['cond_ae_body']['bottleneck_size'], 128, 64, 16] \ No newline at end of file diff --git a/configs/config_abl_2_pyr_64_128_256_512_cape_f.py b/configs/config_abl_2_pyr_64_128_256_512_cape_f.py new file mode 100644 index 0000000..b65e891 --- /dev/null +++ b/configs/config_abl_2_pyr_64_128_256_512_cape_f.py @@ -0,0 +1,188 @@ +config = dict() + +config['gpu'] = '6' +config['name'] = 'abl_2_pyr_64_128_256_512_cape_f' +config['notes'] = '' +config['tags'] = ['cape_f_2'] + +# DON'T FORGET TO RESET SSIM LOSS USAGE +# DON'T FORGET TO CHECK MODEL LOADING +# DON'T FORGET TO CHECK IF STORE IN MEMORY +# DON'T FORGET TO CHECK REG LOSS COEFF +# DON'T FORGET TO LOAD FINAL UPSCALER UNLESS HAVE LEVEL 512 +# DON'T FORGET TO CHECK IF SKIRT +# DON'T FORGET TO CHECK IF CAPE +# DON'T FORGET TO CHECK IF USING DOWNSCALE NONE OR _2 +# DON'T FORGET TO CHECK UPSCALING and ENCODER CHECKPOINTS + +config['use_skinning'] = True # and deshaping +config['remove_global_orientation'] = True +config['use_extra_losses'] = True # edge, collision, 3d mesh +config['use_offsets'] = False +config['use_norm_loss'] = False + +config['pretrained_model'] = '' +config['pretrained_model_iteration'] = '' + +config['pyramid'] = dict() +config['pyramid']['resolutions'] = [64, 128, 256, 512] +config['pyramid']['pretrained_pyramid'] = 'checkpoints/abl_2_pyr_64_128_256_cape_f' +config['pyramid']['pretrained_pyramid_iteration'] = '40000' +config['pyramid']['final_upscale_enhancer'] = '' + +config['train_dir'] = '/home/workspace/local-data/cape_processed/train/female' +config['valid_dir'] = '/home/workspace/local-data/cape_processed/test/female' +config['test_dir'] = '/home/workspace/local-data/cape_processed/test/female' +config['batch_size'] = 4 +config['is_skirt'] = False +config['is_cape'] = True + +config['pyramid']['static_model'] = 'checkpoints/static_1_cape_f' +config['pyramid']['body_model'] = 'checkpoints/body_1_cape_f' +config['pyramid']['curvature_model'] = 'checkpoints/curv_1_cape_f' + +config['dataset_in_memory'] = False +config['resolution'] = None +config['latent_dim'] = 128 + +config['smpl_res'] = 14475 +if config['is_cape']: + config['smpl_res'] = 3638 + +config['lr'] = 0.0001 +config['starting_balancing_coeff'] = 0.0001 +config['reg_loss_coeff'] = None # set to 0 if don't want to use edge+collision +config['avg_garment_path'] = '' + +config['signature_dynamic'] = { 'id': (), 'frame_nr': (), + 'pose_shape': (72 + 11,), + 'uv_body_posed': (512, 256, 3), + 'mesh_body_posed': (config['smpl_res'], 3,), + 'mesh_posed': (config['smpl_res'], 3,), + 'mesh_unposed': (config['smpl_res'], 3,), + 'uv_unposed': (512, 256, 3), + 'uv_curvature': (512, 256, 7), + } +config['signature_static'] = { 'uv_static': (512, 256, 3), + 'mesh_mask': (config['smpl_res'],), + 'uv_mask': (512, 256,), + } + +config['pyramid']['is_label'] = False +config['pyramid']['latent_dim'] = config['latent_dim'] +config['pyramid']['add_noise'] = True +config['pyramid']['noise_amount'] = 0.001 + +config['pyramid']['loss_weights'] = [1,1,1,1,1] + +for res in config['pyramid']['resolutions']: + if res != 512: + res_modifier = '_' + str(res) + config['signature_dynamic']['uv_body_posed' + res_modifier] = (res, res//2, 3) + config['signature_dynamic']['uv_unposed' + res_modifier] = (res, res//2, 3) + config['signature_dynamic']['uv_curvature' + res_modifier] = (res, res//2, 7) + config['signature_static']['uv_static' + res_modifier] = (res, res//2, 3) + config['signature_static']['uv_mask' + res_modifier] = (res, res//2) + + + +config['pyramid']['freeze_encoders'] = True + +config['pyramid']['levels'] = [] +for res in config['pyramid']['resolutions']: + if res == 512: + level = dict() + level['resolution'] = 512 + level['latent_dim'] = config['latent_dim'] + level['kernel_size'] = 7 + level['encoder_depths'] = [3, 3, 9, 3] + level['encoder_dims'] = [32, 64, 128, 256] + level['decoder_input'] = (16, 8, 80) + level['decoder_depths'] = [3, 3, 9, 3] + level['decoder_dims'] = [256, 128, 64, 16] + level['avg_garment_path'] = '' + level['upscale_enhancer'] = '' + config['pyramid']['levels'].append(level) + elif res == 256: + level = dict() + level['resolution'] = 256 + level['latent_dim'] = config['latent_dim'] + level['kernel_size'] = 7 + level['encoder_depths'] = [9, 9, 9, 9] + level['encoder_dims'] = [32, 64, 128, 256] + level['decoder_input'] = (8, 4, 128) + level['decoder_depths'] = [9, 9, 9, 9] + level['decoder_dims'] = [256, 128, 64, 16] + level['avg_garment_path'] = '' + level['upscale_enhancer'] = 'checkpoints/256_512_cape_f'#'checkpoints/up_3_d256_512_2' + level['upscale_enhancer_freeze'] = True + config['pyramid']['levels'].append(level) + elif res == 128: + level = dict() + level['resolution'] = 128 + level['latent_dim'] = config['latent_dim'] + level['kernel_size'] = 5 + level['encoder_depths'] = [16, 9, 9, 9] + level['encoder_dims'] = [64, 128, 128, 256] + level['decoder_input'] = (4, 2, 128) + level['decoder_depths'] = [16, 9, 9, 9] + level['decoder_dims'] = [256, 128, 128, 64] + level['avg_garment_path'] = '' + level['upscale_enhancer'] = 'checkpoints/128_512_cape_f'#'checkpoints/up_3_d128_256_2' + level['upscale_enhancer_freeze'] = True + config['pyramid']['levels'].append(level) + elif res == 64: + level = dict() + level['resolution'] = 64 + level['latent_dim'] = config['latent_dim'] + level['kernel_size'] = 5 + level['encoder_depths'] = [9, 9, 9] + level['encoder_dims'] = [64, 128, 256] + level['decoder_input'] = (4, 2, 256) + level['decoder_depths'] = [9, 9, 9] + level['decoder_dims'] = [256, 128, 64] + level['avg_garment_path'] = '' + level['upscale_enhancer'] = 'checkpoints/64_512_cape_f'#checkpoints/up_3_d64_128_2' + level['upscale_enhancer_freeze'] = False + config['pyramid']['levels'].append(level) + elif res == 32: + level = dict() + level['resolution'] = 32 + level['latent_dim'] = config['latent_dim'] + level['kernel_size'] = 3 + level['encoder_depths'] = [9, 9] + level['encoder_dims'] = [256, 256] + level['decoder_input'] = (4, 2, 256) + level['decoder_depths'] = [9, 9] + level['decoder_dims'] = [256, 256] + level['avg_garment_path'] = '' + level['upscale_enhancer'] = ''#'checkpoints/up_3_d32_64_2' + level['upscale_enhancer_freeze'] = True + config['pyramid']['levels'].append(level) + else: + raise NotImplementedError + + + +config['cond_ae'] = dict() +config['cond_ae']['is_label'] = False +config['cond_ae']['upscale_output'] = False +config['cond_ae']['latent_dim'] = config['latent_dim'] +config['cond_ae']['kernel_size'] = 7 +config['cond_ae']['bottleneck_size'] = 64 +config['cond_ae']['encoder_depths'] = [3, 3, 9, 9, 3] +config['cond_ae']['encoder_dims'] = [32, 64, 128, 256, config['cond_ae']['bottleneck_size']] +config['cond_ae']['decoder_input'] = (8, 4, config['cond_ae']['bottleneck_size']) +config['cond_ae']['decoder_depths'] = [3, 3, 9, 3, 3] +config['cond_ae']['decoder_dims'] = [config['cond_ae']['bottleneck_size'], 256, 128, 64, 16] + +config['cond_ae_body'] = dict() +config['cond_ae_body']['latent_dim'] = config['latent_dim'] +config['cond_ae_body']['kernel_size'] = 7 +config['cond_ae_body']['upscale_output'] = True +config['cond_ae_body']['bottleneck_size'] = 512 +config['cond_ae_body']['encoder_depths'] = [3, 3, 9, 9, 3, 3] +config['cond_ae_body']['encoder_dims'] = [32, 64, 128, 256, 256, config['cond_ae_body']['bottleneck_size']] +config['cond_ae_body']['decoder_input'] = (4, 2, config['cond_ae_body']['bottleneck_size']) +config['cond_ae_body']['decoder_depths'] = [3, 3, 9, 3] +config['cond_ae_body']['decoder_dims'] = [config['cond_ae_body']['bottleneck_size'], 128, 64, 16] \ No newline at end of file diff --git a/configs/config_abl_2_pyr_64_128_256_512_cape_m.py b/configs/config_abl_2_pyr_64_128_256_512_cape_m.py new file mode 100644 index 0000000..6abc7ef --- /dev/null +++ b/configs/config_abl_2_pyr_64_128_256_512_cape_m.py @@ -0,0 +1,188 @@ +config = dict() + +config['gpu'] = '5' +config['name'] = 'abl_2_pyr_64_128_256_512_cape_m' +config['notes'] = '' +config['tags'] = ['cape_m_2'] + +# DON'T FORGET TO RESET SSIM LOSS USAGE +# DON'T FORGET TO CHECK MODEL LOADING +# DON'T FORGET TO CHECK IF STORE IN MEMORY +# DON'T FORGET TO CHECK REG LOSS COEFF +# DON'T FORGET TO LOAD FINAL UPSCALER UNLESS HAVE LEVEL 512 +# DON'T FORGET TO CHECK IF SKIRT +# DON'T FORGET TO CHECK IF CAPE +# DON'T FORGET TO CHECK IF USING DOWNSCALE NONE OR _2 +# DON'T FORGET TO CHECK UPSCALING and ENCODER CHECKPOINTS + +config['use_skinning'] = True # and deshaping +config['remove_global_orientation'] = True +config['use_extra_losses'] = True # edge, collision, 3d mesh +config['use_offsets'] = False +config['use_norm_loss'] = False + +config['pretrained_model'] = '' +config['pretrained_model_iteration'] = '' + +config['pyramid'] = dict() +config['pyramid']['resolutions'] = [64, 128, 256, 512] +config['pyramid']['pretrained_pyramid'] = 'checkpoints/abl_2_pyr_64_128_256_cape_m' +config['pyramid']['pretrained_pyramid_iteration'] = '40000' +config['pyramid']['final_upscale_enhancer'] = '' + +config['train_dir'] = '/home/workspace/local-data/cape_processed/train/male' +config['valid_dir'] = '/home/workspace/local-data/cape_processed/test/male' +config['test_dir'] = '/home/workspace/local-data/cape_processed/test/male' +config['batch_size'] = 4 +config['is_skirt'] = False +config['is_cape'] = True + +config['pyramid']['static_model'] = 'checkpoints/static_1_cape_m' +config['pyramid']['body_model'] = 'checkpoints/body_1_cape_m' +config['pyramid']['curvature_model'] = 'checkpoints/curv_1_cape_m' + +config['dataset_in_memory'] = False +config['resolution'] = None +config['latent_dim'] = 128 + +config['smpl_res'] = 14475 +if config['is_cape']: + config['smpl_res'] = 3638 + +config['lr'] = 0.0001 +config['starting_balancing_coeff'] = 0.0001 +config['reg_loss_coeff'] = None # set to 0 if don't want to use edge+collision +config['avg_garment_path'] = '' + +config['signature_dynamic'] = { 'id': (), 'frame_nr': (), + 'pose_shape': (72 + 11,), + 'uv_body_posed': (512, 256, 3), + 'mesh_body_posed': (config['smpl_res'], 3,), + 'mesh_posed': (config['smpl_res'], 3,), + 'mesh_unposed': (config['smpl_res'], 3,), + 'uv_unposed': (512, 256, 3), + 'uv_curvature': (512, 256, 7), + } +config['signature_static'] = { 'uv_static': (512, 256, 3), + 'mesh_mask': (config['smpl_res'],), + 'uv_mask': (512, 256,), + } + +config['pyramid']['is_label'] = False +config['pyramid']['latent_dim'] = config['latent_dim'] +config['pyramid']['add_noise'] = True +config['pyramid']['noise_amount'] = 0.001 + +config['pyramid']['loss_weights'] = [1,1,1,1,1] + +for res in config['pyramid']['resolutions']: + if res != 512: + res_modifier = '_' + str(res) + config['signature_dynamic']['uv_body_posed' + res_modifier] = (res, res//2, 3) + config['signature_dynamic']['uv_unposed' + res_modifier] = (res, res//2, 3) + config['signature_dynamic']['uv_curvature' + res_modifier] = (res, res//2, 7) + config['signature_static']['uv_static' + res_modifier] = (res, res//2, 3) + config['signature_static']['uv_mask' + res_modifier] = (res, res//2) + + + +config['pyramid']['freeze_encoders'] = True + +config['pyramid']['levels'] = [] +for res in config['pyramid']['resolutions']: + if res == 512: + level = dict() + level['resolution'] = 512 + level['latent_dim'] = config['latent_dim'] + level['kernel_size'] = 7 + level['encoder_depths'] = [3, 3, 9, 3] + level['encoder_dims'] = [32, 64, 128, 256] + level['decoder_input'] = (16, 8, 80) + level['decoder_depths'] = [3, 3, 9, 3] + level['decoder_dims'] = [256, 128, 64, 16] + level['avg_garment_path'] = '' + level['upscale_enhancer'] = '' + config['pyramid']['levels'].append(level) + elif res == 256: + level = dict() + level['resolution'] = 256 + level['latent_dim'] = config['latent_dim'] + level['kernel_size'] = 7 + level['encoder_depths'] = [9, 9, 9, 9] + level['encoder_dims'] = [32, 64, 128, 256] + level['decoder_input'] = (8, 4, 128) + level['decoder_depths'] = [9, 9, 9, 9] + level['decoder_dims'] = [256, 128, 64, 16] + level['avg_garment_path'] = '' + level['upscale_enhancer'] = 'checkpoints/256_512_cape_m'#'checkpoints/up_3_d256_512_2' + level['upscale_enhancer_freeze'] = True + config['pyramid']['levels'].append(level) + elif res == 128: + level = dict() + level['resolution'] = 128 + level['latent_dim'] = config['latent_dim'] + level['kernel_size'] = 5 + level['encoder_depths'] = [16, 9, 9, 9] + level['encoder_dims'] = [64, 128, 128, 256] + level['decoder_input'] = (4, 2, 128) + level['decoder_depths'] = [16, 9, 9, 9] + level['decoder_dims'] = [256, 128, 128, 64] + level['avg_garment_path'] = '' + level['upscale_enhancer'] = 'checkpoints/128_512_cape_m'#'checkpoints/up_3_d128_256_2' + level['upscale_enhancer_freeze'] = True + config['pyramid']['levels'].append(level) + elif res == 64: + level = dict() + level['resolution'] = 64 + level['latent_dim'] = config['latent_dim'] + level['kernel_size'] = 5 + level['encoder_depths'] = [9, 9, 9] + level['encoder_dims'] = [64, 128, 256] + level['decoder_input'] = (4, 2, 256) + level['decoder_depths'] = [9, 9, 9] + level['decoder_dims'] = [256, 128, 64] + level['avg_garment_path'] = '' + level['upscale_enhancer'] = 'checkpoints/64_512_cape_m'#checkpoints/up_3_d64_128_2' + level['upscale_enhancer_freeze'] = False + config['pyramid']['levels'].append(level) + elif res == 32: + level = dict() + level['resolution'] = 32 + level['latent_dim'] = config['latent_dim'] + level['kernel_size'] = 3 + level['encoder_depths'] = [9, 9] + level['encoder_dims'] = [256, 256] + level['decoder_input'] = (4, 2, 256) + level['decoder_depths'] = [9, 9] + level['decoder_dims'] = [256, 256] + level['avg_garment_path'] = '' + level['upscale_enhancer'] = ''#'checkpoints/up_3_d32_64_2' + level['upscale_enhancer_freeze'] = True + config['pyramid']['levels'].append(level) + else: + raise NotImplementedError + + + +config['cond_ae'] = dict() +config['cond_ae']['is_label'] = False +config['cond_ae']['upscale_output'] = False +config['cond_ae']['latent_dim'] = config['latent_dim'] +config['cond_ae']['kernel_size'] = 7 +config['cond_ae']['bottleneck_size'] = 64 +config['cond_ae']['encoder_depths'] = [3, 3, 9, 9, 3] +config['cond_ae']['encoder_dims'] = [32, 64, 128, 256, config['cond_ae']['bottleneck_size']] +config['cond_ae']['decoder_input'] = (8, 4, config['cond_ae']['bottleneck_size']) +config['cond_ae']['decoder_depths'] = [3, 3, 9, 3, 3] +config['cond_ae']['decoder_dims'] = [config['cond_ae']['bottleneck_size'], 256, 128, 64, 16] + +config['cond_ae_body'] = dict() +config['cond_ae_body']['latent_dim'] = config['latent_dim'] +config['cond_ae_body']['kernel_size'] = 7 +config['cond_ae_body']['upscale_output'] = True +config['cond_ae_body']['bottleneck_size'] = 512 +config['cond_ae_body']['encoder_depths'] = [3, 3, 9, 9, 3, 3] +config['cond_ae_body']['encoder_dims'] = [32, 64, 128, 256, 256, config['cond_ae_body']['bottleneck_size']] +config['cond_ae_body']['decoder_input'] = (4, 2, config['cond_ae_body']['bottleneck_size']) +config['cond_ae_body']['decoder_depths'] = [3, 3, 9, 3] +config['cond_ae_body']['decoder_dims'] = [config['cond_ae_body']['bottleneck_size'], 128, 64, 16] \ No newline at end of file diff --git a/configs/config_abl_2_pyr_64_128_256_cape_f.py b/configs/config_abl_2_pyr_64_128_256_cape_f.py new file mode 100644 index 0000000..01925b8 --- /dev/null +++ b/configs/config_abl_2_pyr_64_128_256_cape_f.py @@ -0,0 +1,188 @@ +config = dict() + +config['gpu'] = '6' +config['name'] = 'abl_2_pyr_64_128_256_cape_f' +config['notes'] = '' +config['tags'] = ['cape_f_2'] + +# DON'T FORGET TO RESET SSIM LOSS USAGE +# DON'T FORGET TO CHECK MODEL LOADING +# DON'T FORGET TO CHECK IF STORE IN MEMORY +# DON'T FORGET TO CHECK REG LOSS COEFF +# DON'T FORGET TO LOAD FINAL UPSCALER UNLESS HAVE LEVEL 512 +# DON'T FORGET TO CHECK IF SKIRT +# DON'T FORGET TO CHECK IF CAPE +# DON'T FORGET TO CHECK IF USING DOWNSCALE NONE OR _2 +# DON'T FORGET TO CHECK UPSCALING and ENCODER CHECKPOINTS + +config['use_skinning'] = True # and deshaping +config['remove_global_orientation'] = True +config['use_extra_losses'] = True # edge, collision, 3d mesh +config['use_offsets'] = False +config['use_norm_loss'] = False + +config['pretrained_model'] = '' +config['pretrained_model_iteration'] = '' + +config['pyramid'] = dict() +config['pyramid']['resolutions'] = [64, 128, 256] +config['pyramid']['pretrained_pyramid'] = 'checkpoints/abl_2_pyr_64_128_cape_f' +config['pyramid']['pretrained_pyramid_iteration'] = '40000' +config['pyramid']['final_upscale_enhancer'] = 'checkpoints/256_512_cape_f' + +config['train_dir'] = '/home/workspace/local-data/cape_processed/train/female' +config['valid_dir'] = '/home/workspace/local-data/cape_processed/test/female' +config['test_dir'] = '/home/workspace/local-data/cape_processed/test/female' +config['batch_size'] = 4 +config['is_skirt'] = False +config['is_cape'] = True + +config['pyramid']['static_model'] = 'checkpoints/static_1_cape_f' +config['pyramid']['body_model'] = 'checkpoints/body_1_cape_f' +config['pyramid']['curvature_model'] = 'checkpoints/curv_1_cape_f' + +config['dataset_in_memory'] = False +config['resolution'] = None +config['latent_dim'] = 128 + +config['smpl_res'] = 14475 +if config['is_cape']: + config['smpl_res'] = 3638 + +config['lr'] = 0.0001 +config['starting_balancing_coeff'] = 0.0001 +config['reg_loss_coeff'] = None # set to 0 if don't want to use edge+collision +config['avg_garment_path'] = '' + +config['signature_dynamic'] = { 'id': (), 'frame_nr': (), + 'pose_shape': (72 + 11,), + 'uv_body_posed': (512, 256, 3), + 'mesh_body_posed': (config['smpl_res'], 3,), + 'mesh_posed': (config['smpl_res'], 3,), + 'mesh_unposed': (config['smpl_res'], 3,), + 'uv_unposed': (512, 256, 3), + 'uv_curvature': (512, 256, 7), + } +config['signature_static'] = { 'uv_static': (512, 256, 3), + 'mesh_mask': (config['smpl_res'],), + 'uv_mask': (512, 256,), + } + +config['pyramid']['is_label'] = False +config['pyramid']['latent_dim'] = config['latent_dim'] +config['pyramid']['add_noise'] = True +config['pyramid']['noise_amount'] = 0.001 + +config['pyramid']['loss_weights'] = [1,1,1,1,1] + +for res in config['pyramid']['resolutions']: + if res != 512: + res_modifier = '_' + str(res) + config['signature_dynamic']['uv_body_posed' + res_modifier] = (res, res//2, 3) + config['signature_dynamic']['uv_unposed' + res_modifier] = (res, res//2, 3) + config['signature_dynamic']['uv_curvature' + res_modifier] = (res, res//2, 7) + config['signature_static']['uv_static' + res_modifier] = (res, res//2, 3) + config['signature_static']['uv_mask' + res_modifier] = (res, res//2) + + + +config['pyramid']['freeze_encoders'] = True + +config['pyramid']['levels'] = [] +for res in config['pyramid']['resolutions']: + if res == 512: + level = dict() + level['resolution'] = 512 + level['latent_dim'] = config['latent_dim'] + level['kernel_size'] = 7 + level['encoder_depths'] = [3, 3, 9, 3] + level['encoder_dims'] = [32, 64, 128, 256] + level['decoder_input'] = (16, 8, 80) + level['decoder_depths'] = [3, 3, 9, 3] + level['decoder_dims'] = [256, 128, 64, 16] + level['avg_garment_path'] = '' + level['upscale_enhancer'] = '' + config['pyramid']['levels'].append(level) + elif res == 256: + level = dict() + level['resolution'] = 256 + level['latent_dim'] = config['latent_dim'] + level['kernel_size'] = 7 + level['encoder_depths'] = [9, 9, 9, 9] + level['encoder_dims'] = [32, 64, 128, 256] + level['decoder_input'] = (8, 4, 128) + level['decoder_depths'] = [9, 9, 9, 9] + level['decoder_dims'] = [256, 128, 64, 16] + level['avg_garment_path'] = '' + level['upscale_enhancer'] = ''#'checkpoints/up_3_d256_512_2' + level['upscale_enhancer_freeze'] = True + config['pyramid']['levels'].append(level) + elif res == 128: + level = dict() + level['resolution'] = 128 + level['latent_dim'] = config['latent_dim'] + level['kernel_size'] = 5 + level['encoder_depths'] = [16, 9, 9, 9] + level['encoder_dims'] = [64, 128, 128, 256] + level['decoder_input'] = (4, 2, 128) + level['decoder_depths'] = [16, 9, 9, 9] + level['decoder_dims'] = [256, 128, 128, 64] + level['avg_garment_path'] = '' + level['upscale_enhancer'] = 'checkpoints/128_512_cape_f'#'checkpoints/up_3_d128_256_2' + level['upscale_enhancer_freeze'] = True + config['pyramid']['levels'].append(level) + elif res == 64: + level = dict() + level['resolution'] = 64 + level['latent_dim'] = config['latent_dim'] + level['kernel_size'] = 5 + level['encoder_depths'] = [9, 9, 9] + level['encoder_dims'] = [64, 128, 256] + level['decoder_input'] = (4, 2, 256) + level['decoder_depths'] = [9, 9, 9] + level['decoder_dims'] = [256, 128, 64] + level['avg_garment_path'] = '' + level['upscale_enhancer'] = 'checkpoints/64_512_cape_f'#checkpoints/up_3_d64_128_2' + level['upscale_enhancer_freeze'] = False + config['pyramid']['levels'].append(level) + elif res == 32: + level = dict() + level['resolution'] = 32 + level['latent_dim'] = config['latent_dim'] + level['kernel_size'] = 3 + level['encoder_depths'] = [9, 9] + level['encoder_dims'] = [256, 256] + level['decoder_input'] = (4, 2, 256) + level['decoder_depths'] = [9, 9] + level['decoder_dims'] = [256, 256] + level['avg_garment_path'] = '' + level['upscale_enhancer'] = ''#'checkpoints/up_3_d32_64_2' + level['upscale_enhancer_freeze'] = True + config['pyramid']['levels'].append(level) + else: + raise NotImplementedError + + + +config['cond_ae'] = dict() +config['cond_ae']['is_label'] = False +config['cond_ae']['upscale_output'] = False +config['cond_ae']['latent_dim'] = config['latent_dim'] +config['cond_ae']['kernel_size'] = 7 +config['cond_ae']['bottleneck_size'] = 64 +config['cond_ae']['encoder_depths'] = [3, 3, 9, 9, 3] +config['cond_ae']['encoder_dims'] = [32, 64, 128, 256, config['cond_ae']['bottleneck_size']] +config['cond_ae']['decoder_input'] = (8, 4, config['cond_ae']['bottleneck_size']) +config['cond_ae']['decoder_depths'] = [3, 3, 9, 3, 3] +config['cond_ae']['decoder_dims'] = [config['cond_ae']['bottleneck_size'], 256, 128, 64, 16] + +config['cond_ae_body'] = dict() +config['cond_ae_body']['latent_dim'] = config['latent_dim'] +config['cond_ae_body']['kernel_size'] = 7 +config['cond_ae_body']['upscale_output'] = True +config['cond_ae_body']['bottleneck_size'] = 512 +config['cond_ae_body']['encoder_depths'] = [3, 3, 9, 9, 3, 3] +config['cond_ae_body']['encoder_dims'] = [32, 64, 128, 256, 256, config['cond_ae_body']['bottleneck_size']] +config['cond_ae_body']['decoder_input'] = (4, 2, config['cond_ae_body']['bottleneck_size']) +config['cond_ae_body']['decoder_depths'] = [3, 3, 9, 3] +config['cond_ae_body']['decoder_dims'] = [config['cond_ae_body']['bottleneck_size'], 128, 64, 16] \ No newline at end of file diff --git a/configs/config_abl_2_pyr_64_128_256_cape_m.py b/configs/config_abl_2_pyr_64_128_256_cape_m.py new file mode 100644 index 0000000..e26b02d --- /dev/null +++ b/configs/config_abl_2_pyr_64_128_256_cape_m.py @@ -0,0 +1,187 @@ +config = dict() + +config['gpu'] = '5' +config['name'] = 'abl_2_pyr_64_128_256_cape_m' +config['notes'] = 'abl_2_pyr_64_128_cape_m at 40k' +config['tags'] = ['cape_m_2'] + +# DON'T FORGET TO RESET SSIM LOSS USAGE +# DON'T FORGET TO CHECK MODEL LOADING +# DON'T FORGET TO CHECK IF STORE IN MEMORY +# DON'T FORGET TO CHECK REG LOSS COEFF +# DON'T FORGET TO LOAD FINAL UPSCALER UNLESS HAVE LEVEL 512 +# DON'T FORGET TO CHECK IF SKIRT +# DON'T FORGET TO CHECK IF CAPE +# DON'T FORGET TO CHECK IF USING DOWNSCALE NONE OR _2 +# DON'T FORGET TO CHECK UPSCALING and ENCODER CHECKPOINTS + +config['use_skinning'] = True # and deshaping +config['remove_global_orientation'] = True +config['use_extra_losses'] = True # edge, collision, 3d mesh +config['use_offsets'] = False +config['use_norm_loss'] = False + +config['pretrained_model'] = '' +config['pretrained_model_iteration'] = '' + +config['pyramid'] = dict() +config['pyramid']['resolutions'] = [64, 128, 256] +config['pyramid']['pretrained_pyramid'] = 'checkpoints/abl_2_pyr_64_128_cape_m' +config['pyramid']['final_upscale_enhancer'] = 'checkpoints/256_512_cape_m' + +config['train_dir'] = '/home/workspace/local-data/cape_processed/train/male' +config['valid_dir'] = '/home/workspace/local-data/cape_processed/test/male' +config['test_dir'] = '/home/workspace/local-data/cape_processed/test/male' +config['batch_size'] = 4 +config['is_skirt'] = False +config['is_cape'] = True + +config['pyramid']['static_model'] = 'checkpoints/static_1_cape_m' +config['pyramid']['body_model'] = 'checkpoints/body_1_cape_m' +config['pyramid']['curvature_model'] = 'checkpoints/curv_1_cape_m' + +config['dataset_in_memory'] = False +config['resolution'] = None +config['latent_dim'] = 128 + +config['smpl_res'] = 14475 +if config['is_cape']: + config['smpl_res'] = 3638 + +config['lr'] = 0.0001 +config['starting_balancing_coeff'] = 0.0001 +config['reg_loss_coeff'] = None # set to 0 if don't want to use edge+collision +config['avg_garment_path'] = '' + +config['signature_dynamic'] = { 'id': (), 'frame_nr': (), + 'pose_shape': (72 + 11,), + 'uv_body_posed': (512, 256, 3), + 'mesh_body_posed': (config['smpl_res'], 3,), + 'mesh_posed': (config['smpl_res'], 3,), + 'mesh_unposed': (config['smpl_res'], 3,), + 'uv_unposed': (512, 256, 3), + 'uv_curvature': (512, 256, 7), + } +config['signature_static'] = { 'uv_static': (512, 256, 3), + 'mesh_mask': (config['smpl_res'],), + 'uv_mask': (512, 256,), + } + +config['pyramid']['is_label'] = False +config['pyramid']['latent_dim'] = config['latent_dim'] +config['pyramid']['add_noise'] = True +config['pyramid']['noise_amount'] = 0.001 + +config['pyramid']['loss_weights'] = [1,1,1,1,1] + +for res in config['pyramid']['resolutions']: + if res != 512: + res_modifier = '_' + str(res) + config['signature_dynamic']['uv_body_posed' + res_modifier] = (res, res//2, 3) + config['signature_dynamic']['uv_unposed' + res_modifier] = (res, res//2, 3) + config['signature_dynamic']['uv_curvature' + res_modifier] = (res, res//2, 7) + config['signature_static']['uv_static' + res_modifier] = (res, res//2, 3) + config['signature_static']['uv_mask' + res_modifier] = (res, res//2) + + + +config['pyramid']['freeze_encoders'] = True + +config['pyramid']['levels'] = [] +for res in config['pyramid']['resolutions']: + if res == 512: + level = dict() + level['resolution'] = 512 + level['latent_dim'] = config['latent_dim'] + level['kernel_size'] = 7 + level['encoder_depths'] = [3, 3, 9, 3] + level['encoder_dims'] = [32, 64, 128, 256] + level['decoder_input'] = (16, 8, 80) + level['decoder_depths'] = [3, 3, 9, 3] + level['decoder_dims'] = [256, 128, 64, 16] + level['avg_garment_path'] = '' + level['upscale_enhancer'] = '' + config['pyramid']['levels'].append(level) + elif res == 256: + level = dict() + level['resolution'] = 256 + level['latent_dim'] = config['latent_dim'] + level['kernel_size'] = 7 + level['encoder_depths'] = [9, 9, 9, 9] + level['encoder_dims'] = [32, 64, 128, 256] + level['decoder_input'] = (8, 4, 128) + level['decoder_depths'] = [9, 9, 9, 9] + level['decoder_dims'] = [256, 128, 64, 16] + level['avg_garment_path'] = '' + level['upscale_enhancer'] = ''#'checkpoints/up_3_d256_512_2' + level['upscale_enhancer_freeze'] = True + config['pyramid']['levels'].append(level) + elif res == 128: + level = dict() + level['resolution'] = 128 + level['latent_dim'] = config['latent_dim'] + level['kernel_size'] = 5 + level['encoder_depths'] = [16, 9, 9, 9] + level['encoder_dims'] = [64, 128, 128, 256] + level['decoder_input'] = (4, 2, 128) + level['decoder_depths'] = [16, 9, 9, 9] + level['decoder_dims'] = [256, 128, 128, 64] + level['avg_garment_path'] = '' + level['upscale_enhancer'] = 'checkpoints/128_512_cape_m'#'checkpoints/up_3_d128_256_2' + level['upscale_enhancer_freeze'] = True + config['pyramid']['levels'].append(level) + elif res == 64: + level = dict() + level['resolution'] = 64 + level['latent_dim'] = config['latent_dim'] + level['kernel_size'] = 5 + level['encoder_depths'] = [9, 9, 9] + level['encoder_dims'] = [64, 128, 256] + level['decoder_input'] = (4, 2, 256) + level['decoder_depths'] = [9, 9, 9] + level['decoder_dims'] = [256, 128, 64] + level['avg_garment_path'] = '' + level['upscale_enhancer'] = 'checkpoints/64_512_cape_m'#checkpoints/up_3_d64_128_2' + level['upscale_enhancer_freeze'] = False + config['pyramid']['levels'].append(level) + elif res == 32: + level = dict() + level['resolution'] = 32 + level['latent_dim'] = config['latent_dim'] + level['kernel_size'] = 3 + level['encoder_depths'] = [9, 9] + level['encoder_dims'] = [256, 256] + level['decoder_input'] = (4, 2, 256) + level['decoder_depths'] = [9, 9] + level['decoder_dims'] = [256, 256] + level['avg_garment_path'] = '' + level['upscale_enhancer'] = ''#'checkpoints/up_3_d32_64_2' + level['upscale_enhancer_freeze'] = True + config['pyramid']['levels'].append(level) + else: + raise NotImplementedError + + + +config['cond_ae'] = dict() +config['cond_ae']['is_label'] = False +config['cond_ae']['upscale_output'] = False +config['cond_ae']['latent_dim'] = config['latent_dim'] +config['cond_ae']['kernel_size'] = 7 +config['cond_ae']['bottleneck_size'] = 64 +config['cond_ae']['encoder_depths'] = [3, 3, 9, 9, 3] +config['cond_ae']['encoder_dims'] = [32, 64, 128, 256, config['cond_ae']['bottleneck_size']] +config['cond_ae']['decoder_input'] = (8, 4, config['cond_ae']['bottleneck_size']) +config['cond_ae']['decoder_depths'] = [3, 3, 9, 3, 3] +config['cond_ae']['decoder_dims'] = [config['cond_ae']['bottleneck_size'], 256, 128, 64, 16] + +config['cond_ae_body'] = dict() +config['cond_ae_body']['latent_dim'] = config['latent_dim'] +config['cond_ae_body']['kernel_size'] = 7 +config['cond_ae_body']['upscale_output'] = True +config['cond_ae_body']['bottleneck_size'] = 512 +config['cond_ae_body']['encoder_depths'] = [3, 3, 9, 9, 3, 3] +config['cond_ae_body']['encoder_dims'] = [32, 64, 128, 256, 256, config['cond_ae_body']['bottleneck_size']] +config['cond_ae_body']['decoder_input'] = (4, 2, config['cond_ae_body']['bottleneck_size']) +config['cond_ae_body']['decoder_depths'] = [3, 3, 9, 3] +config['cond_ae_body']['decoder_dims'] = [config['cond_ae_body']['bottleneck_size'], 128, 64, 16] \ No newline at end of file diff --git a/configs/config_abl_2_pyr_64_128_cape_f.py b/configs/config_abl_2_pyr_64_128_cape_f.py new file mode 100644 index 0000000..39b396c --- /dev/null +++ b/configs/config_abl_2_pyr_64_128_cape_f.py @@ -0,0 +1,188 @@ +config = dict() + +config['gpu'] = '6' +config['name'] = 'abl_2_pyr_64_128_cape_f' +config['notes'] = '' +config['tags'] = ['cape_f_2'] + +# DON'T FORGET TO RESET SSIM LOSS USAGE +# DON'T FORGET TO CHECK MODEL LOADING +# DON'T FORGET TO CHECK IF STORE IN MEMORY +# DON'T FORGET TO CHECK REG LOSS COEFF +# DON'T FORGET TO LOAD FINAL UPSCALER UNLESS HAVE LEVEL 512 +# DON'T FORGET TO CHECK IF SKIRT +# DON'T FORGET TO CHECK IF CAPE +# DON'T FORGET TO CHECK IF USING DOWNSCALE NONE OR _2 +# DON'T FORGET TO CHECK UPSCALING and ENCODER CHECKPOINTS + +config['use_skinning'] = True # and deshaping +config['remove_global_orientation'] = True +config['use_extra_losses'] = True # edge, collision, 3d mesh +config['use_offsets'] = False +config['use_norm_loss'] = False + +config['pretrained_model'] = '' +config['pretrained_model_iteration'] = '' + +config['pyramid'] = dict() +config['pyramid']['resolutions'] = [64, 128] +config['pyramid']['pretrained_pyramid'] = 'checkpoints/abl_2_pyr_64_cape_f' +config['pyramid']['pretrained_pyramid_iteration'] = '70000' +config['pyramid']['final_upscale_enhancer'] = 'checkpoints/128_512_cape_f' + +config['train_dir'] = '/home/workspace/local-data/cape_processed/train/female' +config['valid_dir'] = '/home/workspace/local-data/cape_processed/test/female' +config['test_dir'] = '/home/workspace/local-data/cape_processed/test/female' +config['batch_size'] = 4 +config['is_skirt'] = False +config['is_cape'] = True + +config['pyramid']['static_model'] = 'checkpoints/static_1_cape_f' +config['pyramid']['body_model'] = 'checkpoints/body_1_cape_f' +config['pyramid']['curvature_model'] = 'checkpoints/curv_1_cape_f' + +config['dataset_in_memory'] = False +config['resolution'] = None +config['latent_dim'] = 128 + +config['smpl_res'] = 14475 +if config['is_cape']: + config['smpl_res'] = 3638 + +config['lr'] = 0.0001 +config['starting_balancing_coeff'] = 0.0001 +config['reg_loss_coeff'] = None # set to 0 if don't want to use edge+collision +config['avg_garment_path'] = '' + +config['signature_dynamic'] = { 'id': (), 'frame_nr': (), + 'pose_shape': (72 + 11,), + 'uv_body_posed': (512, 256, 3), + 'mesh_body_posed': (config['smpl_res'], 3,), + 'mesh_posed': (config['smpl_res'], 3,), + 'mesh_unposed': (config['smpl_res'], 3,), + 'uv_unposed': (512, 256, 3), + 'uv_curvature': (512, 256, 7), + } +config['signature_static'] = { 'uv_static': (512, 256, 3), + 'mesh_mask': (config['smpl_res'],), + 'uv_mask': (512, 256,), + } + +config['pyramid']['is_label'] = False +config['pyramid']['latent_dim'] = config['latent_dim'] +config['pyramid']['add_noise'] = True +config['pyramid']['noise_amount'] = 0.001 + +config['pyramid']['loss_weights'] = [1,1,1,1,1] + +for res in config['pyramid']['resolutions']: + if res != 512: + res_modifier = '_' + str(res) + config['signature_dynamic']['uv_body_posed' + res_modifier] = (res, res//2, 3) + config['signature_dynamic']['uv_unposed' + res_modifier] = (res, res//2, 3) + config['signature_dynamic']['uv_curvature' + res_modifier] = (res, res//2, 7) + config['signature_static']['uv_static' + res_modifier] = (res, res//2, 3) + config['signature_static']['uv_mask' + res_modifier] = (res, res//2) + + + +config['pyramid']['freeze_encoders'] = True + +config['pyramid']['levels'] = [] +for res in config['pyramid']['resolutions']: + if res == 512: + level = dict() + level['resolution'] = 512 + level['latent_dim'] = config['latent_dim'] + level['kernel_size'] = 7 + level['encoder_depths'] = [3, 3, 9, 3] + level['encoder_dims'] = [32, 64, 128, 256] + level['decoder_input'] = (16, 8, 80) + level['decoder_depths'] = [3, 3, 9, 3] + level['decoder_dims'] = [256, 128, 64, 16] + level['avg_garment_path'] = '' + level['upscale_enhancer'] = '' + config['pyramid']['levels'].append(level) + elif res == 256: + level = dict() + level['resolution'] = 256 + level['latent_dim'] = config['latent_dim'] + level['kernel_size'] = 7 + level['encoder_depths'] = [9, 9, 9, 9] + level['encoder_dims'] = [32, 64, 128, 256] + level['decoder_input'] = (8, 4, 128) + level['decoder_depths'] = [9, 9, 9, 9] + level['decoder_dims'] = [256, 128, 64, 16] + level['avg_garment_path'] = '' + level['upscale_enhancer'] = ''#'checkpoints/up_3_d256_512_2' + level['upscale_enhancer_freeze'] = True + config['pyramid']['levels'].append(level) + elif res == 128: + level = dict() + level['resolution'] = 128 + level['latent_dim'] = config['latent_dim'] + level['kernel_size'] = 5 + level['encoder_depths'] = [16, 9, 9, 9] + level['encoder_dims'] = [64, 128, 128, 256] + level['decoder_input'] = (4, 2, 128) + level['decoder_depths'] = [16, 9, 9, 9] + level['decoder_dims'] = [256, 128, 128, 64] + level['avg_garment_path'] = '' + level['upscale_enhancer'] = ''#'checkpoints/up_3_d128_256_2' + level['upscale_enhancer_freeze'] = True + config['pyramid']['levels'].append(level) + elif res == 64: + level = dict() + level['resolution'] = 64 + level['latent_dim'] = config['latent_dim'] + level['kernel_size'] = 5 + level['encoder_depths'] = [9, 9, 9] + level['encoder_dims'] = [64, 128, 256] + level['decoder_input'] = (4, 2, 256) + level['decoder_depths'] = [9, 9, 9] + level['decoder_dims'] = [256, 128, 64] + level['avg_garment_path'] = '' + level['upscale_enhancer'] = 'checkpoints/64_512_cape_f'#checkpoints/up_3_d64_128_2' + level['upscale_enhancer_freeze'] = False + config['pyramid']['levels'].append(level) + elif res == 32: + level = dict() + level['resolution'] = 32 + level['latent_dim'] = config['latent_dim'] + level['kernel_size'] = 3 + level['encoder_depths'] = [9, 9] + level['encoder_dims'] = [256, 256] + level['decoder_input'] = (4, 2, 256) + level['decoder_depths'] = [9, 9] + level['decoder_dims'] = [256, 256] + level['avg_garment_path'] = '' + level['upscale_enhancer'] = ''#'checkpoints/up_3_d32_64_2' + level['upscale_enhancer_freeze'] = True + config['pyramid']['levels'].append(level) + else: + raise NotImplementedError + + + +config['cond_ae'] = dict() +config['cond_ae']['is_label'] = False +config['cond_ae']['upscale_output'] = False +config['cond_ae']['latent_dim'] = config['latent_dim'] +config['cond_ae']['kernel_size'] = 7 +config['cond_ae']['bottleneck_size'] = 64 +config['cond_ae']['encoder_depths'] = [3, 3, 9, 9, 3] +config['cond_ae']['encoder_dims'] = [32, 64, 128, 256, config['cond_ae']['bottleneck_size']] +config['cond_ae']['decoder_input'] = (8, 4, config['cond_ae']['bottleneck_size']) +config['cond_ae']['decoder_depths'] = [3, 3, 9, 3, 3] +config['cond_ae']['decoder_dims'] = [config['cond_ae']['bottleneck_size'], 256, 128, 64, 16] + +config['cond_ae_body'] = dict() +config['cond_ae_body']['latent_dim'] = config['latent_dim'] +config['cond_ae_body']['kernel_size'] = 7 +config['cond_ae_body']['upscale_output'] = True +config['cond_ae_body']['bottleneck_size'] = 512 +config['cond_ae_body']['encoder_depths'] = [3, 3, 9, 9, 3, 3] +config['cond_ae_body']['encoder_dims'] = [32, 64, 128, 256, 256, config['cond_ae_body']['bottleneck_size']] +config['cond_ae_body']['decoder_input'] = (4, 2, config['cond_ae_body']['bottleneck_size']) +config['cond_ae_body']['decoder_depths'] = [3, 3, 9, 3] +config['cond_ae_body']['decoder_dims'] = [config['cond_ae_body']['bottleneck_size'], 128, 64, 16] \ No newline at end of file diff --git a/configs/config_abl_2_pyr_64_128_cape_m.py b/configs/config_abl_2_pyr_64_128_cape_m.py new file mode 100644 index 0000000..b85b532 --- /dev/null +++ b/configs/config_abl_2_pyr_64_128_cape_m.py @@ -0,0 +1,187 @@ +config = dict() + +config['gpu'] = '6' +config['name'] = 'abl_2_pyr_64_128_cape_m' +config['notes'] = '' +config['tags'] = ['cape_m_2'] + +# DON'T FORGET TO RESET SSIM LOSS USAGE +# DON'T FORGET TO CHECK MODEL LOADING +# DON'T FORGET TO CHECK IF STORE IN MEMORY +# DON'T FORGET TO CHECK REG LOSS COEFF +# DON'T FORGET TO LOAD FINAL UPSCALER UNLESS HAVE LEVEL 512 +# DON'T FORGET TO CHECK IF SKIRT +# DON'T FORGET TO CHECK IF CAPE +# DON'T FORGET TO CHECK IF USING DOWNSCALE NONE OR _2 +# DON'T FORGET TO CHECK UPSCALING and ENCODER CHECKPOINTS + +config['use_skinning'] = True # and deshaping +config['remove_global_orientation'] = True +config['use_extra_losses'] = True # edge, collision, 3d mesh +config['use_offsets'] = False +config['use_norm_loss'] = False + +config['pretrained_model'] = '' +config['pretrained_model_iteration'] = '' + +config['pyramid'] = dict() +config['pyramid']['resolutions'] = [64, 128] +config['pyramid']['pretrained_pyramid'] = 'checkpoints/abl_2_pyr_64_cape_m' +config['pyramid']['final_upscale_enhancer'] = 'checkpoints/128_512_cape_m' + +config['train_dir'] = '/home/workspace/local-data/cape_processed/train/male' +config['valid_dir'] = '/home/workspace/local-data/cape_processed/test/male' +config['test_dir'] = '/home/workspace/local-data/cape_processed/test/male' +config['batch_size'] = 4 +config['is_skirt'] = False +config['is_cape'] = True + +config['pyramid']['static_model'] = 'checkpoints/static_1_cape_m' +config['pyramid']['body_model'] = 'checkpoints/body_1_cape_m' +config['pyramid']['curvature_model'] = 'checkpoints/curv_1_cape_m' + +config['dataset_in_memory'] = False +config['resolution'] = None +config['latent_dim'] = 128 + +config['smpl_res'] = 14475 +if config['is_cape']: + config['smpl_res'] = 3638 + +config['lr'] = 0.0001 +config['starting_balancing_coeff'] = 0.0001 +config['reg_loss_coeff'] = None # set to 0 if don't want to use edge+collision +config['avg_garment_path'] = '' + +config['signature_dynamic'] = { 'id': (), 'frame_nr': (), + 'pose_shape': (72 + 11,), + 'uv_body_posed': (512, 256, 3), + 'mesh_body_posed': (config['smpl_res'], 3,), + 'mesh_posed': (config['smpl_res'], 3,), + 'mesh_unposed': (config['smpl_res'], 3,), + 'uv_unposed': (512, 256, 3), + 'uv_curvature': (512, 256, 7), + } +config['signature_static'] = { 'uv_static': (512, 256, 3), + 'mesh_mask': (config['smpl_res'],), + 'uv_mask': (512, 256,), + } + +config['pyramid']['is_label'] = False +config['pyramid']['latent_dim'] = config['latent_dim'] +config['pyramid']['add_noise'] = True +config['pyramid']['noise_amount'] = 0.001 + +config['pyramid']['loss_weights'] = [1,1,1,1,1] + +for res in config['pyramid']['resolutions']: + if res != 512: + res_modifier = '_' + str(res) + config['signature_dynamic']['uv_body_posed' + res_modifier] = (res, res//2, 3) + config['signature_dynamic']['uv_unposed' + res_modifier] = (res, res//2, 3) + config['signature_dynamic']['uv_curvature' + res_modifier] = (res, res//2, 7) + config['signature_static']['uv_static' + res_modifier] = (res, res//2, 3) + config['signature_static']['uv_mask' + res_modifier] = (res, res//2) + + + +config['pyramid']['freeze_encoders'] = True + +config['pyramid']['levels'] = [] +for res in config['pyramid']['resolutions']: + if res == 512: + level = dict() + level['resolution'] = 512 + level['latent_dim'] = config['latent_dim'] + level['kernel_size'] = 7 + level['encoder_depths'] = [3, 3, 9, 3] + level['encoder_dims'] = [32, 64, 128, 256] + level['decoder_input'] = (16, 8, 80) + level['decoder_depths'] = [3, 3, 9, 3] + level['decoder_dims'] = [256, 128, 64, 16] + level['avg_garment_path'] = '' + level['upscale_enhancer'] = '' + config['pyramid']['levels'].append(level) + elif res == 256: + level = dict() + level['resolution'] = 256 + level['latent_dim'] = config['latent_dim'] + level['kernel_size'] = 7 + level['encoder_depths'] = [9, 9, 9, 9] + level['encoder_dims'] = [32, 64, 128, 256] + level['decoder_input'] = (8, 4, 128) + level['decoder_depths'] = [9, 9, 9, 9] + level['decoder_dims'] = [256, 128, 64, 16] + level['avg_garment_path'] = '' + level['upscale_enhancer'] = ''#'checkpoints/up_3_d256_512_2' + level['upscale_enhancer_freeze'] = True + config['pyramid']['levels'].append(level) + elif res == 128: + level = dict() + level['resolution'] = 128 + level['latent_dim'] = config['latent_dim'] + level['kernel_size'] = 5 + level['encoder_depths'] = [16, 9, 9, 9] + level['encoder_dims'] = [64, 128, 128, 256] + level['decoder_input'] = (4, 2, 128) + level['decoder_depths'] = [16, 9, 9, 9] + level['decoder_dims'] = [256, 128, 128, 64] + level['avg_garment_path'] = '' + level['upscale_enhancer'] = ''#'checkpoints/up_3_d128_256_2' + level['upscale_enhancer_freeze'] = True + config['pyramid']['levels'].append(level) + elif res == 64: + level = dict() + level['resolution'] = 64 + level['latent_dim'] = config['latent_dim'] + level['kernel_size'] = 5 + level['encoder_depths'] = [9, 9, 9] + level['encoder_dims'] = [64, 128, 256] + level['decoder_input'] = (4, 2, 256) + level['decoder_depths'] = [9, 9, 9] + level['decoder_dims'] = [256, 128, 64] + level['avg_garment_path'] = '' + level['upscale_enhancer'] = 'checkpoints/64_512_cape_m'#checkpoints/up_3_d64_128_2' + level['upscale_enhancer_freeze'] = False + config['pyramid']['levels'].append(level) + elif res == 32: + level = dict() + level['resolution'] = 32 + level['latent_dim'] = config['latent_dim'] + level['kernel_size'] = 3 + level['encoder_depths'] = [9, 9] + level['encoder_dims'] = [256, 256] + level['decoder_input'] = (4, 2, 256) + level['decoder_depths'] = [9, 9] + level['decoder_dims'] = [256, 256] + level['avg_garment_path'] = '' + level['upscale_enhancer'] = ''#'checkpoints/up_3_d32_64_2' + level['upscale_enhancer_freeze'] = True + config['pyramid']['levels'].append(level) + else: + raise NotImplementedError + + + +config['cond_ae'] = dict() +config['cond_ae']['is_label'] = False +config['cond_ae']['upscale_output'] = False +config['cond_ae']['latent_dim'] = config['latent_dim'] +config['cond_ae']['kernel_size'] = 7 +config['cond_ae']['bottleneck_size'] = 64 +config['cond_ae']['encoder_depths'] = [3, 3, 9, 9, 3] +config['cond_ae']['encoder_dims'] = [32, 64, 128, 256, config['cond_ae']['bottleneck_size']] +config['cond_ae']['decoder_input'] = (8, 4, config['cond_ae']['bottleneck_size']) +config['cond_ae']['decoder_depths'] = [3, 3, 9, 3, 3] +config['cond_ae']['decoder_dims'] = [config['cond_ae']['bottleneck_size'], 256, 128, 64, 16] + +config['cond_ae_body'] = dict() +config['cond_ae_body']['latent_dim'] = config['latent_dim'] +config['cond_ae_body']['kernel_size'] = 7 +config['cond_ae_body']['upscale_output'] = True +config['cond_ae_body']['bottleneck_size'] = 512 +config['cond_ae_body']['encoder_depths'] = [3, 3, 9, 9, 3, 3] +config['cond_ae_body']['encoder_dims'] = [32, 64, 128, 256, 256, config['cond_ae_body']['bottleneck_size']] +config['cond_ae_body']['decoder_input'] = (4, 2, config['cond_ae_body']['bottleneck_size']) +config['cond_ae_body']['decoder_depths'] = [3, 3, 9, 3] +config['cond_ae_body']['decoder_dims'] = [config['cond_ae_body']['bottleneck_size'], 128, 64, 16] \ No newline at end of file diff --git a/configs/config_abl_2_pyr_64_cape_f.py b/configs/config_abl_2_pyr_64_cape_f.py new file mode 100644 index 0000000..7632252 --- /dev/null +++ b/configs/config_abl_2_pyr_64_cape_f.py @@ -0,0 +1,187 @@ +config = dict() + +config['gpu'] = '6' +config['name'] = 'abl_2_pyr_64_cape_f' +config['notes'] = '' +config['tags'] = ['cape_f_2'] + +# DON'T FORGET TO RESET SSIM LOSS USAGE +# DON'T FORGET TO CHECK MODEL LOADING +# DON'T FORGET TO CHECK IF STORE IN MEMORY +# DON'T FORGET TO CHECK REG LOSS COEFF +# DON'T FORGET TO LOAD FINAL UPSCALER UNLESS HAVE LEVEL 512 +# DON'T FORGET TO CHECK IF SKIRT +# DON'T FORGET TO CHECK IF CAPE +# DON'T FORGET TO CHECK IF USING DOWNSCALE NONE OR _2 +# DON'T FORGET TO CHECK UPSCALING and ENCODER CHECKPOINTS + +config['use_skinning'] = True # and deshaping +config['remove_global_orientation'] = True +config['use_extra_losses'] = True # edge, collision, 3d mesh +config['use_offsets'] = False +config['use_norm_loss'] = False + +config['pretrained_model'] = 'checkpoints/pyr_abl_64_cape_f' +config['pretrained_model_iteration'] = '170000' + +config['pyramid'] = dict() +config['pyramid']['resolutions'] = [64] +config['pyramid']['pretrained_pyramid'] = '' +config['pyramid']['final_upscale_enhancer'] = 'checkpoints/64_512_cape_f' + +config['train_dir'] = '/home/workspace/local-data/cape_processed/train/female' +config['valid_dir'] = '/home/workspace/local-data/cape_processed/test/female' +config['test_dir'] = '/home/workspace/local-data/cape_processed/test/female' +config['batch_size'] = 4 +config['is_skirt'] = False +config['is_cape'] = True + +config['pyramid']['static_model'] = 'checkpoints/static_1_cape_f' +config['pyramid']['body_model'] = 'checkpoints/body_1_cape_f' +config['pyramid']['curvature_model'] = 'checkpoints/curv_1_cape_f' + +config['dataset_in_memory'] = False +config['resolution'] = None +config['latent_dim'] = 128 + +config['smpl_res'] = 14475 +if config['is_cape']: + config['smpl_res'] = 3638 + +config['lr'] = 0.0001 +config['starting_balancing_coeff'] = 0.0001 +config['reg_loss_coeff'] = None # set to 0 if don't want to use edge+collision +config['avg_garment_path'] = '' + +config['signature_dynamic'] = { 'id': (), 'frame_nr': (), + 'pose_shape': (72 + 11,), + 'uv_body_posed': (512, 256, 3), + 'mesh_body_posed': (config['smpl_res'], 3,), + 'mesh_posed': (config['smpl_res'], 3,), + 'mesh_unposed': (config['smpl_res'], 3,), + 'uv_unposed': (512, 256, 3), + 'uv_curvature': (512, 256, 7), + } +config['signature_static'] = { 'uv_static': (512, 256, 3), + 'mesh_mask': (config['smpl_res'],), + 'uv_mask': (512, 256,), + } + +config['pyramid']['is_label'] = False +config['pyramid']['latent_dim'] = config['latent_dim'] +config['pyramid']['add_noise'] = True +config['pyramid']['noise_amount'] = 0.001 + +config['pyramid']['loss_weights'] = [1,1,1,1,1] + +for res in config['pyramid']['resolutions']: + if res != 512: + res_modifier = '_' + str(res) + config['signature_dynamic']['uv_body_posed' + res_modifier] = (res, res//2, 3) + config['signature_dynamic']['uv_unposed' + res_modifier] = (res, res//2, 3) + config['signature_dynamic']['uv_curvature' + res_modifier] = (res, res//2, 7) + config['signature_static']['uv_static' + res_modifier] = (res, res//2, 3) + config['signature_static']['uv_mask' + res_modifier] = (res, res//2) + + + +config['pyramid']['freeze_encoders'] = True + +config['pyramid']['levels'] = [] +for res in config['pyramid']['resolutions']: + if res == 512: + level = dict() + level['resolution'] = 512 + level['latent_dim'] = config['latent_dim'] + level['kernel_size'] = 7 + level['encoder_depths'] = [3, 3, 9, 3] + level['encoder_dims'] = [32, 64, 128, 256] + level['decoder_input'] = (16, 8, 80) + level['decoder_depths'] = [3, 3, 9, 3] + level['decoder_dims'] = [256, 128, 64, 16] + level['avg_garment_path'] = '' + level['upscale_enhancer'] = '' + config['pyramid']['levels'].append(level) + elif res == 256: + level = dict() + level['resolution'] = 256 + level['latent_dim'] = config['latent_dim'] + level['kernel_size'] = 7 + level['encoder_depths'] = [9, 9, 9, 9] + level['encoder_dims'] = [32, 64, 128, 256] + level['decoder_input'] = (8, 4, 128) + level['decoder_depths'] = [9, 9, 9, 9] + level['decoder_dims'] = [256, 128, 64, 16] + level['avg_garment_path'] = '' + level['upscale_enhancer'] = ''#'checkpoints/up_3_d256_512_2' + level['upscale_enhancer_freeze'] = True + config['pyramid']['levels'].append(level) + elif res == 128: + level = dict() + level['resolution'] = 128 + level['latent_dim'] = config['latent_dim'] + level['kernel_size'] = 5 + level['encoder_depths'] = [16, 9, 9, 9] + level['encoder_dims'] = [64, 128, 128, 256] + level['decoder_input'] = (4, 2, 128) + level['decoder_depths'] = [16, 9, 9, 9] + level['decoder_dims'] = [256, 128, 128, 64] + level['avg_garment_path'] = '' + level['upscale_enhancer'] = ''#'checkpoints/up_3_d128_256_2' + level['upscale_enhancer_freeze'] = True + config['pyramid']['levels'].append(level) + elif res == 64: + level = dict() + level['resolution'] = 64 + level['latent_dim'] = config['latent_dim'] + level['kernel_size'] = 5 + level['encoder_depths'] = [9, 9, 9] + level['encoder_dims'] = [64, 128, 256] + level['decoder_input'] = (4, 2, 256) + level['decoder_depths'] = [9, 9, 9] + level['decoder_dims'] = [256, 128, 64] + level['avg_garment_path'] = '' + level['upscale_enhancer'] = ''#checkpoints/up_3_d64_128_2' + level['upscale_enhancer_freeze'] = False + config['pyramid']['levels'].append(level) + elif res == 32: + level = dict() + level['resolution'] = 32 + level['latent_dim'] = config['latent_dim'] + level['kernel_size'] = 3 + level['encoder_depths'] = [9, 9] + level['encoder_dims'] = [256, 256] + level['decoder_input'] = (4, 2, 256) + level['decoder_depths'] = [9, 9] + level['decoder_dims'] = [256, 256] + level['avg_garment_path'] = '' + level['upscale_enhancer'] = ''#'checkpoints/up_3_d32_64_2' + level['upscale_enhancer_freeze'] = True + config['pyramid']['levels'].append(level) + else: + raise NotImplementedError + + + +config['cond_ae'] = dict() +config['cond_ae']['is_label'] = False +config['cond_ae']['upscale_output'] = False +config['cond_ae']['latent_dim'] = config['latent_dim'] +config['cond_ae']['kernel_size'] = 7 +config['cond_ae']['bottleneck_size'] = 64 +config['cond_ae']['encoder_depths'] = [3, 3, 9, 9, 3] +config['cond_ae']['encoder_dims'] = [32, 64, 128, 256, config['cond_ae']['bottleneck_size']] +config['cond_ae']['decoder_input'] = (8, 4, config['cond_ae']['bottleneck_size']) +config['cond_ae']['decoder_depths'] = [3, 3, 9, 3, 3] +config['cond_ae']['decoder_dims'] = [config['cond_ae']['bottleneck_size'], 256, 128, 64, 16] + +config['cond_ae_body'] = dict() +config['cond_ae_body']['latent_dim'] = config['latent_dim'] +config['cond_ae_body']['kernel_size'] = 7 +config['cond_ae_body']['upscale_output'] = True +config['cond_ae_body']['bottleneck_size'] = 512 +config['cond_ae_body']['encoder_depths'] = [3, 3, 9, 9, 3, 3] +config['cond_ae_body']['encoder_dims'] = [32, 64, 128, 256, 256, config['cond_ae_body']['bottleneck_size']] +config['cond_ae_body']['decoder_input'] = (4, 2, config['cond_ae_body']['bottleneck_size']) +config['cond_ae_body']['decoder_depths'] = [3, 3, 9, 3] +config['cond_ae_body']['decoder_dims'] = [config['cond_ae_body']['bottleneck_size'], 128, 64, 16] \ No newline at end of file diff --git a/configs/config_abl_2_pyr_64_cape_m.py b/configs/config_abl_2_pyr_64_cape_m.py new file mode 100644 index 0000000..d17f134 --- /dev/null +++ b/configs/config_abl_2_pyr_64_cape_m.py @@ -0,0 +1,187 @@ +config = dict() + +config['gpu'] = '6' +config['name'] = 'abl_2_pyr_64_cape_m' +config['notes'] = '' +config['tags'] = ['cape_m_2'] + +# DON'T FORGET TO RESET SSIM LOSS USAGE +# DON'T FORGET TO CHECK MODEL LOADING +# DON'T FORGET TO CHECK IF STORE IN MEMORY +# DON'T FORGET TO CHECK REG LOSS COEFF +# DON'T FORGET TO LOAD FINAL UPSCALER UNLESS HAVE LEVEL 512 +# DON'T FORGET TO CHECK IF SKIRT +# DON'T FORGET TO CHECK IF CAPE +# DON'T FORGET TO CHECK IF USING DOWNSCALE NONE OR _2 +# DON'T FORGET TO CHECK UPSCALING and ENCODER CHECKPOINTS + +config['use_skinning'] = True # and deshaping +config['remove_global_orientation'] = True +config['use_extra_losses'] = True # edge, collision, 3d mesh +config['use_offsets'] = False +config['use_norm_loss'] = False + +config['pretrained_model'] = 'checkpoints/pyr_abl_64_cape_m' +config['pretrained_model_iteration'] = '170000' + +config['pyramid'] = dict() +config['pyramid']['resolutions'] = [64] +config['pyramid']['pretrained_pyramid'] = '' +config['pyramid']['final_upscale_enhancer'] = 'checkpoints/64_512_cape_m' + +config['train_dir'] = '/home/workspace/local-data/cape_processed/train/male' +config['valid_dir'] = '/home/workspace/local-data/cape_processed/test/male' +config['test_dir'] = '/home/workspace/local-data/cape_processed/test/male' +config['batch_size'] = 4 +config['is_skirt'] = False +config['is_cape'] = True + +config['pyramid']['static_model'] = 'checkpoints/static_1_cape_m' +config['pyramid']['body_model'] = 'checkpoints/body_1_cape_m' +config['pyramid']['curvature_model'] = 'checkpoints/curv_1_cape_m' + +config['dataset_in_memory'] = False +config['resolution'] = None +config['latent_dim'] = 128 + +config['smpl_res'] = 14475 +if config['is_cape']: + config['smpl_res'] = 3638 + +config['lr'] = 0.0001 +config['starting_balancing_coeff'] = 0.0001 +config['reg_loss_coeff'] = None # set to 0 if don't want to use edge+collision +config['avg_garment_path'] = '' + +config['signature_dynamic'] = { 'id': (), 'frame_nr': (), + 'pose_shape': (72 + 11,), + 'uv_body_posed': (512, 256, 3), + 'mesh_body_posed': (config['smpl_res'], 3,), + 'mesh_posed': (config['smpl_res'], 3,), + 'mesh_unposed': (config['smpl_res'], 3,), + 'uv_unposed': (512, 256, 3), + 'uv_curvature': (512, 256, 7), + } +config['signature_static'] = { 'uv_static': (512, 256, 3), + 'mesh_mask': (config['smpl_res'],), + 'uv_mask': (512, 256,), + } + +config['pyramid']['is_label'] = False +config['pyramid']['latent_dim'] = config['latent_dim'] +config['pyramid']['add_noise'] = True +config['pyramid']['noise_amount'] = 0.001 + +config['pyramid']['loss_weights'] = [1,1,1,1,1] + +for res in config['pyramid']['resolutions']: + if res != 512: + res_modifier = '_' + str(res) + config['signature_dynamic']['uv_body_posed' + res_modifier] = (res, res//2, 3) + config['signature_dynamic']['uv_unposed' + res_modifier] = (res, res//2, 3) + config['signature_dynamic']['uv_curvature' + res_modifier] = (res, res//2, 7) + config['signature_static']['uv_static' + res_modifier] = (res, res//2, 3) + config['signature_static']['uv_mask' + res_modifier] = (res, res//2) + + + +config['pyramid']['freeze_encoders'] = True + +config['pyramid']['levels'] = [] +for res in config['pyramid']['resolutions']: + if res == 512: + level = dict() + level['resolution'] = 512 + level['latent_dim'] = config['latent_dim'] + level['kernel_size'] = 7 + level['encoder_depths'] = [3, 3, 9, 3] + level['encoder_dims'] = [32, 64, 128, 256] + level['decoder_input'] = (16, 8, 80) + level['decoder_depths'] = [3, 3, 9, 3] + level['decoder_dims'] = [256, 128, 64, 16] + level['avg_garment_path'] = '' + level['upscale_enhancer'] = '' + config['pyramid']['levels'].append(level) + elif res == 256: + level = dict() + level['resolution'] = 256 + level['latent_dim'] = config['latent_dim'] + level['kernel_size'] = 7 + level['encoder_depths'] = [9, 9, 9, 9] + level['encoder_dims'] = [32, 64, 128, 256] + level['decoder_input'] = (8, 4, 128) + level['decoder_depths'] = [9, 9, 9, 9] + level['decoder_dims'] = [256, 128, 64, 16] + level['avg_garment_path'] = '' + level['upscale_enhancer'] = ''#'checkpoints/up_3_d256_512_2' + level['upscale_enhancer_freeze'] = True + config['pyramid']['levels'].append(level) + elif res == 128: + level = dict() + level['resolution'] = 128 + level['latent_dim'] = config['latent_dim'] + level['kernel_size'] = 5 + level['encoder_depths'] = [16, 9, 9, 9] + level['encoder_dims'] = [64, 128, 128, 256] + level['decoder_input'] = (4, 2, 128) + level['decoder_depths'] = [16, 9, 9, 9] + level['decoder_dims'] = [256, 128, 128, 64] + level['avg_garment_path'] = '' + level['upscale_enhancer'] = ''#'checkpoints/up_3_d128_256_2' + level['upscale_enhancer_freeze'] = True + config['pyramid']['levels'].append(level) + elif res == 64: + level = dict() + level['resolution'] = 64 + level['latent_dim'] = config['latent_dim'] + level['kernel_size'] = 5 + level['encoder_depths'] = [9, 9, 9] + level['encoder_dims'] = [64, 128, 256] + level['decoder_input'] = (4, 2, 256) + level['decoder_depths'] = [9, 9, 9] + level['decoder_dims'] = [256, 128, 64] + level['avg_garment_path'] = '' + level['upscale_enhancer'] = ''#checkpoints/up_3_d64_128_2' + level['upscale_enhancer_freeze'] = False + config['pyramid']['levels'].append(level) + elif res == 32: + level = dict() + level['resolution'] = 32 + level['latent_dim'] = config['latent_dim'] + level['kernel_size'] = 3 + level['encoder_depths'] = [9, 9] + level['encoder_dims'] = [256, 256] + level['decoder_input'] = (4, 2, 256) + level['decoder_depths'] = [9, 9] + level['decoder_dims'] = [256, 256] + level['avg_garment_path'] = '' + level['upscale_enhancer'] = ''#'checkpoints/up_3_d32_64_2' + level['upscale_enhancer_freeze'] = True + config['pyramid']['levels'].append(level) + else: + raise NotImplementedError + + + +config['cond_ae'] = dict() +config['cond_ae']['is_label'] = False +config['cond_ae']['upscale_output'] = False +config['cond_ae']['latent_dim'] = config['latent_dim'] +config['cond_ae']['kernel_size'] = 7 +config['cond_ae']['bottleneck_size'] = 64 +config['cond_ae']['encoder_depths'] = [3, 3, 9, 9, 3] +config['cond_ae']['encoder_dims'] = [32, 64, 128, 256, config['cond_ae']['bottleneck_size']] +config['cond_ae']['decoder_input'] = (8, 4, config['cond_ae']['bottleneck_size']) +config['cond_ae']['decoder_depths'] = [3, 3, 9, 3, 3] +config['cond_ae']['decoder_dims'] = [config['cond_ae']['bottleneck_size'], 256, 128, 64, 16] + +config['cond_ae_body'] = dict() +config['cond_ae_body']['latent_dim'] = config['latent_dim'] +config['cond_ae_body']['kernel_size'] = 7 +config['cond_ae_body']['upscale_output'] = True +config['cond_ae_body']['bottleneck_size'] = 512 +config['cond_ae_body']['encoder_depths'] = [3, 3, 9, 9, 3, 3] +config['cond_ae_body']['encoder_dims'] = [32, 64, 128, 256, 256, config['cond_ae_body']['bottleneck_size']] +config['cond_ae_body']['decoder_input'] = (4, 2, config['cond_ae_body']['bottleneck_size']) +config['cond_ae_body']['decoder_depths'] = [3, 3, 9, 3] +config['cond_ae_body']['decoder_dims'] = [config['cond_ae_body']['bottleneck_size'], 128, 64, 16] \ No newline at end of file diff --git a/configs/config_abl_extra_loss_skirt_2.py b/configs/config_abl_extra_loss_skirt_2.py new file mode 100644 index 0000000..6035e18 --- /dev/null +++ b/configs/config_abl_extra_loss_skirt_2.py @@ -0,0 +1,118 @@ +config = dict() + +# DON'T FORGET TO RESET SSIM LOSS USAGE +# DON'T FORGET TO CHECK MODEL LOADING +# DON'T FORGET TO CHECK IF STORE IN MEMORY +# DON'T FORGET TO CHECK REG LOSS COEFF +# DON'T FORGET TO LOAD FINAL UPSCALER UNLESS HAVE LEVEL 512 +# DON'T FORGET TO CHECK AVG GARMENT USED + +config['use_skinning'] = True # and deshaping +config['remove_global_orientation'] = True +config['use_curvature'] = True +config['use_extra_losses'] = True # edge, collision, 3d mesh +config['use_offsets'] = True + +config['use_norm_loss'] = False +config['block_collision_loss'] = True + +ablation_count = [config['use_skinning'], config['remove_global_orientation'], config['use_curvature'], config['use_extra_losses'], config['use_offsets']].count(False) +assert ablation_count == 1 or ablation_count == 0 + +config['gpu'] = '0' +config['name'] = 'abl_extra_loss_skirt_2' +config['notes'] = '' + +config['avg_garment_path'] = 'custom_data/train_no_shape_skirt_avg_uv.npy' #custom_data/train_no_shape_avg_uv.npy # train_no_shape_avg_uv train_no_shape_one_hot_avg_uv +if config['use_skinning']: + assert (config['use_offsets'] and config['avg_garment_path'] != '') or (not config['use_offsets'] and config['avg_garment_path'] == '') + +config['reg_loss_coeff'] = 0.1 # set to 0 if don't want to use edge+collision + +config['batch_size'] = 4 +config['resolution'] = 512 +config['is_skirt'] = True +config['dataset_in_memory'] = False +config['is_cape'] = False + +config['train_dir'] = '/home/workspace/local-data/train_skirt' +config['valid_dir'] = '/home/workspace/local-data/valid_skirt' +config['test_dir'] = '/home/workspace/data/dataset/test_skirt_ready_2' + +config['static_model'] = 'checkpoints/static_1_skirt' +config['body_model'] = 'checkpoints/body_1_skirt_2_2' +config['curvature_model'] = 'checkpoints/curv_1_skirt' + + +config['smpl_res'] = 14475 +if config['is_cape']: + config['smpl_res'] = 3638 + +config['latent_dim'] = 128 + +config['pretrained_model'] = '' + +############### +config['lr'] = 0.0001# 0.0001 +############### +config['starting_balancing_coeff'] = 0.0001 + +config['signature_dynamic'] = { 'id': (), 'frame_nr': (), + 'pose_shape': (72 + 11,), + 'uv_body_posed': (512, 256, 3), + 'mesh_body_posed': (14475, 3,), + 'mesh_posed': (14475, 3,), + 'uv_curvature': (512, 256, 7), + } +config['signature_static'] = { 'uv_static': (512, 256, 3), + 'mesh_mask': (14475,), + 'uv_mask': (512, 256,), + } + +if config['use_skinning']: + config['signature_dynamic']['uv_unposed'] = (512, 256, 3) + config['signature_dynamic']['mesh_unposed'] = (14475, 3,) +else: + config['signature_dynamic']['uv_posed'] = (512, 256, 3) + + +config['upscale_enhancer'] = '' +config['freeze_encoders'] = True +config['use_one_hot'] = False + +config['cvae'] = dict() +config['cvae']['is_label'] = False +config['cvae']['latent_dim'] = config['latent_dim'] +config['cvae']['add_noise'] = True +config['cvae']['noise_amount'] = 0.025 + +config['cvae']['kernel_size'] = 7 +config['cvae']['encoder_depths'] = [3, 3, 9, 3] +config['cvae']['encoder_dims'] = [32, 64, 128, 256] +config['cvae']['decoder_input'] = (16, 8, 80) +config['cvae']['decoder_depths'] = [3, 3, 9, 3] +config['cvae']['decoder_dims'] = [256, 128, 64, 16] + + +config['cond_ae'] = dict() +config['cond_ae']['is_label'] = False +config['cond_ae']['upscale_output'] = False +config['cond_ae']['latent_dim'] = config['latent_dim'] +config['cond_ae']['kernel_size'] = 7 +config['cond_ae']['bottleneck_size'] = 64 +config['cond_ae']['encoder_depths'] = [3, 3, 9, 9, 3] +config['cond_ae']['encoder_dims'] = [32, 64, 128, 256, config['cond_ae']['bottleneck_size']] +config['cond_ae']['decoder_input'] = (8, 4, config['cond_ae']['bottleneck_size']) +config['cond_ae']['decoder_depths'] = [3, 3, 9, 3, 3] +config['cond_ae']['decoder_dims'] = [config['cond_ae']['bottleneck_size'], 256, 128, 64, 16] + +config['cond_ae_body'] = dict() +config['cond_ae_body']['latent_dim'] = config['latent_dim'] +config['cond_ae_body']['kernel_size'] = 7 +config['cond_ae_body']['upscale_output'] = True +config['cond_ae_body']['bottleneck_size'] = 512 +config['cond_ae_body']['encoder_depths'] = [3, 3, 9, 9, 3, 3] +config['cond_ae_body']['encoder_dims'] = [32, 64, 128, 256, 256, config['cond_ae_body']['bottleneck_size']] +config['cond_ae_body']['decoder_input'] = (4, 2, config['cond_ae_body']['bottleneck_size']) +config['cond_ae_body']['decoder_depths'] = [3, 3, 9, 3] +config['cond_ae_body']['decoder_dims'] = [config['cond_ae_body']['bottleneck_size'], 128, 64, 16] diff --git a/configs/config_abl_norm_skirt.py b/configs/config_abl_norm_skirt.py new file mode 100644 index 0000000..d9adafb --- /dev/null +++ b/configs/config_abl_norm_skirt.py @@ -0,0 +1,117 @@ +config = dict() + +# DON'T FORGET TO RESET SSIM LOSS USAGE +# DON'T FORGET TO CHECK MODEL LOADING +# DON'T FORGET TO CHECK IF STORE IN MEMORY +# DON'T FORGET TO CHECK REG LOSS COEFF +# DON'T FORGET TO LOAD FINAL UPSCALER UNLESS HAVE LEVEL 512 +# DON'T FORGET TO CHECK AVG GARMENT USED + +config['use_skinning'] = True # and deshaping +config['remove_global_orientation'] = True +config['use_curvature'] = True +config['use_extra_losses'] = True # edge, collision, 3d mesh +config['use_offsets'] = True + +config['use_norm_loss'] = True + +ablation_count = [config['use_skinning'], config['remove_global_orientation'], config['use_curvature'], config['use_extra_losses'], config['use_offsets']].count(False) +assert ablation_count == 1 or ablation_count == 0 + +config['gpu'] = '0' +config['name'] = 'abl_norm_skirt' +config['notes'] = '' + +config['avg_garment_path'] = 'custom_data/train_no_shape_skirt_avg_uv.npy' #custom_data/train_no_shape_avg_uv.npy # train_no_shape_avg_uv train_no_shape_one_hot_avg_uv +if config['use_skinning']: + assert (config['use_offsets'] and config['avg_garment_path'] != '') or (not config['use_offsets'] and config['avg_garment_path'] == '') + +config['reg_loss_coeff'] = 0.1 # set to 0 if don't want to use edge+collision + +config['batch_size'] = 4 +config['resolution'] = 512 +config['is_skirt'] = True +config['dataset_in_memory'] = False +config['is_cape'] = False + +config['train_dir'] = '/home/workspace/local-data/train_skirt' +config['valid_dir'] = '/home/workspace/local-data/valid_skirt' +config['test_dir'] = '/home/workspace/data/dataset/test_skirt_ready_2' + +config['static_model'] = 'checkpoints/static_1_skirt' +config['body_model'] = 'checkpoints/body_1_skirt_2_2' +config['curvature_model'] = 'checkpoints/curv_1_skirt' + + +config['smpl_res'] = 14475 +if config['is_cape']: + config['smpl_res'] = 3638 + +config['latent_dim'] = 128 + +config['pretrained_model'] = '' + +############### +config['lr'] = 0.0001# 0.0001 +############### +config['starting_balancing_coeff'] = 0.0001 + +config['signature_dynamic'] = { 'id': (), 'frame_nr': (), + 'pose_shape': (72 + 11,), + 'uv_body_posed': (512, 256, 3), + 'mesh_body_posed': (14475, 3,), + 'mesh_posed': (14475, 3,), + 'uv_curvature': (512, 256, 7), + } +config['signature_static'] = { 'uv_static': (512, 256, 3), + 'mesh_mask': (14475,), + 'uv_mask': (512, 256,), + } + +if config['use_skinning']: + config['signature_dynamic']['uv_unposed'] = (512, 256, 3) + config['signature_dynamic']['mesh_unposed'] = (14475, 3,) +else: + config['signature_dynamic']['uv_posed'] = (512, 256, 3) + + +config['upscale_enhancer'] = '' +config['freeze_encoders'] = True +config['use_one_hot'] = False + +config['cvae'] = dict() +config['cvae']['is_label'] = False +config['cvae']['latent_dim'] = config['latent_dim'] +config['cvae']['add_noise'] = True +config['cvae']['noise_amount'] = 0.025 + +config['cvae']['kernel_size'] = 7 +config['cvae']['encoder_depths'] = [3, 3, 9, 3] +config['cvae']['encoder_dims'] = [32, 64, 128, 256] +config['cvae']['decoder_input'] = (16, 8, 80) +config['cvae']['decoder_depths'] = [3, 3, 9, 3] +config['cvae']['decoder_dims'] = [256, 128, 64, 16] + + +config['cond_ae'] = dict() +config['cond_ae']['is_label'] = False +config['cond_ae']['upscale_output'] = False +config['cond_ae']['latent_dim'] = config['latent_dim'] +config['cond_ae']['kernel_size'] = 7 +config['cond_ae']['bottleneck_size'] = 64 +config['cond_ae']['encoder_depths'] = [3, 3, 9, 9, 3] +config['cond_ae']['encoder_dims'] = [32, 64, 128, 256, config['cond_ae']['bottleneck_size']] +config['cond_ae']['decoder_input'] = (8, 4, config['cond_ae']['bottleneck_size']) +config['cond_ae']['decoder_depths'] = [3, 3, 9, 3, 3] +config['cond_ae']['decoder_dims'] = [config['cond_ae']['bottleneck_size'], 256, 128, 64, 16] + +config['cond_ae_body'] = dict() +config['cond_ae_body']['latent_dim'] = config['latent_dim'] +config['cond_ae_body']['kernel_size'] = 7 +config['cond_ae_body']['upscale_output'] = True +config['cond_ae_body']['bottleneck_size'] = 512 +config['cond_ae_body']['encoder_depths'] = [3, 3, 9, 9, 3, 3] +config['cond_ae_body']['encoder_dims'] = [32, 64, 128, 256, 256, config['cond_ae_body']['bottleneck_size']] +config['cond_ae_body']['decoder_input'] = (4, 2, config['cond_ae_body']['bottleneck_size']) +config['cond_ae_body']['decoder_depths'] = [3, 3, 9, 3] +config['cond_ae_body']['decoder_dims'] = [config['cond_ae_body']['bottleneck_size'], 128, 64, 16] diff --git a/configs/config_abl_pyr_32.py b/configs/config_abl_pyr_32.py index bce80d9..1181afb 100644 --- a/configs/config_abl_pyr_32.py +++ b/configs/config_abl_pyr_32.py @@ -62,6 +62,7 @@ config['signature_static'] = { 'uv_static': (512, 256, 3), config['pyramid']['is_label'] = False config['pyramid']['latent_dim'] = config['latent_dim'] config['pyramid']['add_noise'] = True +config['pyramid']['noise_amount'] = 0.025 config['pyramid']['loss_weights'] = [1,1,1,1,1] diff --git a/configs/config_abl_pyr_32_2.py b/configs/config_abl_pyr_32_2.py new file mode 100644 index 0000000..2169446 --- /dev/null +++ b/configs/config_abl_pyr_32_2.py @@ -0,0 +1,182 @@ +config = dict() + +config['gpu'] = '2' +config['name'] = 'pyr_abl_32_2' +config['notes'] = 'fixed noise handling' + +# DON'T FORGET TO RESET SSIM LOSS USAGE +# DON'T FORGET TO CHECK MODEL LOADING +# DON'T FORGET TO CHECK IF STORE IN MEMORY +# DON'T FORGET TO CHECK REG LOSS COEFF +# DON'T FORGET TO LOAD FINAL UPSCALER UNLESS HAVE LEVEL 512 +# DON'T FORGET TO CHECK IF SKIRT +# DON'T FORGET TO CHECK IF CAPE +# DON'T FORGET TO CHECK IF USING DOWNSCALE NONE OR _2 +# DON'T FORGET TO CHECK UPSCALING and ENCODER CHECKPOINTS + +config['use_skinning'] = True # and deshaping +config['remove_global_orientation'] = True +config['use_extra_losses'] = True # edge, collision, 3d mesh +config['use_offsets'] = False +config['use_norm_loss'] = False + + +config['pyramid'] = dict() +config['pyramid']['resolutions'] = [32] +config['pyramid']['pretrained_pyramid'] = '' +config['pyramid']['final_upscale_enhancer'] = 'checkpoints/32_512_4' + +config['train_dir'] = '/home/workspace/local-data/train' +config['valid_dir'] = '/home/workspace/local-data/valid' +config['test_dir'] = '/home/workspace/data/dataset/test_ready' +config['batch_size'] = 4 +config['is_skirt'] = False +config['is_cape'] = False + +config['dataset_in_memory'] = False +config['resolution'] = None +config['latent_dim'] = 128 + +config['smpl_res'] = 14475 +if config['is_cape']: + config['smpl_res'] = 3638 + +config['lr'] = 0.0001 +config['starting_balancing_coeff'] = 0.0001 +config['reg_loss_coeff'] = 0.1 # set to 0 if don't want to use edge+collision +config['avg_garment_path'] = '' + +config['signature_dynamic'] = { 'id': (), 'frame_nr': (), + 'pose_shape': (72 + 11,), + 'uv_body_posed': (512, 256, 3), + 'mesh_body_posed': (config['smpl_res'], 3,), + 'mesh_posed': (config['smpl_res'], 3,), + 'mesh_unposed': (config['smpl_res'], 3,), + 'uv_unposed': (512, 256, 3), + 'uv_curvature': (512, 256, 7), + } +config['signature_static'] = { 'uv_static': (512, 256, 3), + 'mesh_mask': (config['smpl_res'],), + 'uv_mask': (512, 256,), + } + +config['pyramid']['is_label'] = False +config['pyramid']['latent_dim'] = config['latent_dim'] +config['pyramid']['add_noise'] = True +config['pyramid']['noise_amount'] = 0.025 + +config['pyramid']['loss_weights'] = [1,1,1,1,1] + +for res in config['pyramid']['resolutions']: + if res != 512: + res_modifier = '_' + str(res) + config['signature_dynamic']['uv_body_posed' + res_modifier] = (res, res//2, 3) + config['signature_dynamic']['uv_unposed' + res_modifier] = (res, res//2, 3) + config['signature_dynamic']['uv_curvature' + res_modifier] = (res, res//2, 7) + config['signature_static']['uv_static' + res_modifier] = (res, res//2, 3) + config['signature_static']['uv_mask' + res_modifier] = (res, res//2) + + +config['pyramid']['static_model'] = 'checkpoints/static_1' +config['pyramid']['body_model'] = 'checkpoints/body_1' +config['pyramid']['curvature_model'] = 'checkpoints/curv_1' +config['pyramid']['freeze_encoders'] = True + +config['pyramid']['levels'] = [] +for res in config['pyramid']['resolutions']: + if res == 512: + level = dict() + level['resolution'] = 512 + level['latent_dim'] = config['latent_dim'] + level['kernel_size'] = 7 + level['encoder_depths'] = [3, 3, 9, 3] + level['encoder_dims'] = [32, 64, 128, 256] + level['decoder_input'] = (16, 8, 80) + level['decoder_depths'] = [3, 3, 9, 3] + level['decoder_dims'] = [256, 128, 64, 16] + level['avg_garment_path'] = '' + level['upscale_enhancer'] = '' + config['pyramid']['levels'].append(level) + elif res == 256: + level = dict() + level['resolution'] = 256 + level['latent_dim'] = config['latent_dim'] + level['kernel_size'] = 7 + level['encoder_depths'] = [9, 9, 9, 9] + level['encoder_dims'] = [32, 64, 128, 256] + level['decoder_input'] = (8, 4, 128) + level['decoder_depths'] = [9, 9, 9, 9] + level['decoder_dims'] = [256, 128, 64, 16] + level['avg_garment_path'] = '' + level['upscale_enhancer'] = ''#'checkpoints/up_3_d256_512_2' + level['upscale_enhancer_freeze'] = True + config['pyramid']['levels'].append(level) + elif res == 128: + level = dict() + level['resolution'] = 128 + level['latent_dim'] = config['latent_dim'] + level['kernel_size'] = 5 + level['encoder_depths'] = [16, 9, 9, 9] + level['encoder_dims'] = [64, 128, 128, 256] + level['decoder_input'] = (4, 2, 128) + level['decoder_depths'] = [16, 9, 9, 9] + level['decoder_dims'] = [256, 128, 128, 64] + level['avg_garment_path'] = '' + level['upscale_enhancer'] = ''#'checkpoints/up_3_d128_256_2' + level['upscale_enhancer_freeze'] = True + config['pyramid']['levels'].append(level) + elif res == 64: + level = dict() + level['resolution'] = 64 + level['latent_dim'] = config['latent_dim'] + level['kernel_size'] = 5 + level['encoder_depths'] = [9, 9, 9] + level['encoder_dims'] = [64, 128, 256] + level['decoder_input'] = (4, 2, 256) + level['decoder_depths'] = [9, 9, 9] + level['decoder_dims'] = [256, 128, 64] + level['avg_garment_path'] = '' + level['upscale_enhancer'] = ''#checkpoints/up_3_d64_128_2' + level['upscale_enhancer_freeze'] = False + config['pyramid']['levels'].append(level) + elif res == 32: + level = dict() + level['resolution'] = 32 + level['latent_dim'] = config['latent_dim'] + level['kernel_size'] = 3 + level['encoder_depths'] = [9, 9] + level['encoder_dims'] = [256, 256] + level['decoder_input'] = (4, 2, 256) + level['decoder_depths'] = [9, 9] + level['decoder_dims'] = [256, 256] + level['avg_garment_path'] = '' + level['upscale_enhancer'] = ''#'checkpoints/up_3_d32_64_2' + level['upscale_enhancer_freeze'] = True + config['pyramid']['levels'].append(level) + else: + raise NotImplementedError + + + +config['cond_ae'] = dict() +config['cond_ae']['is_label'] = False +config['cond_ae']['upscale_output'] = False +config['cond_ae']['latent_dim'] = config['latent_dim'] +config['cond_ae']['kernel_size'] = 7 +config['cond_ae']['bottleneck_size'] = 64 +config['cond_ae']['encoder_depths'] = [3, 3, 9, 9, 3] +config['cond_ae']['encoder_dims'] = [32, 64, 128, 256, config['cond_ae']['bottleneck_size']] +config['cond_ae']['decoder_input'] = (8, 4, config['cond_ae']['bottleneck_size']) +config['cond_ae']['decoder_depths'] = [3, 3, 9, 3, 3] +config['cond_ae']['decoder_dims'] = [config['cond_ae']['bottleneck_size'], 256, 128, 64, 16] + +config['cond_ae_body'] = dict() +config['cond_ae_body']['latent_dim'] = config['latent_dim'] +config['cond_ae_body']['kernel_size'] = 7 +config['cond_ae_body']['upscale_output'] = True +config['cond_ae_body']['bottleneck_size'] = 512 +config['cond_ae_body']['encoder_depths'] = [3, 3, 9, 9, 3, 3] +config['cond_ae_body']['encoder_dims'] = [32, 64, 128, 256, 256, config['cond_ae_body']['bottleneck_size']] +config['cond_ae_body']['decoder_input'] = (4, 2, config['cond_ae_body']['bottleneck_size']) +config['cond_ae_body']['decoder_depths'] = [3, 3, 9, 3] +config['cond_ae_body']['decoder_dims'] = [config['cond_ae_body']['bottleneck_size'], 128, 64, 16] \ No newline at end of file diff --git a/configs/config_abl_pyr_32_64_2.py b/configs/config_abl_pyr_32_64_2.py new file mode 100644 index 0000000..83e3079 --- /dev/null +++ b/configs/config_abl_pyr_32_64_2.py @@ -0,0 +1,180 @@ +config = dict() + +config['gpu'] = '0' +config['name'] = 'pyr_abl_32_64_2' +config['notes'] = 'dividing output by 100, not 10' + +# DON'T FORGET TO RESET SSIM LOSS USAGE +# DON'T FORGET TO CHECK MODEL LOADING +# DON'T FORGET TO CHECK IF STORE IN MEMORY +# DON'T FORGET TO CHECK REG LOSS COEFF +# DON'T FORGET TO LOAD FINAL UPSCALER UNLESS HAVE LEVEL 512 +# DON'T FORGET TO CHECK IF SKIRT +# DON'T FORGET TO CHECK IF CAPE +# DON'T FORGET TO CHECK IF USING DOWNSCALE NONE OR _2 +# DON'T FORGET TO CHECK UPSCALING and ENCODER CHECKPOINTS + +config['use_skinning'] = True # and deshaping +config['remove_global_orientation'] = True +config['use_extra_losses'] = True # edge, collision, 3d mesh +config['use_offsets'] = False + + +config['pyramid'] = dict() +config['pyramid']['resolutions'] = [32, 64] +config['pyramid']['pretrained_pyramid'] = 'checkpoints/pyr_abl_32_430k' +config['pyramid']['final_upscale_enhancer'] = 'checkpoints/64_512_2' + +config['train_dir'] = '/home/workspace/local-data/train' +config['valid_dir'] = '/home/workspace/local-data/valid' +config['test_dir'] = '/home/workspace/data/dataset/test_ready' +config['batch_size'] = 4 +config['is_skirt'] = False +config['is_cape'] = False + +config['dataset_in_memory'] = False +config['resolution'] = None +config['latent_dim'] = 128 + +config['smpl_res'] = 14475 +if config['is_cape']: + config['smpl_res'] = 3638 + +config['lr'] = 0.0001 +config['starting_balancing_coeff'] = 0.0001 +config['reg_loss_coeff'] = 0.1 # set to 0 if don't want to use edge+collision +config['avg_garment_path'] = '' + +config['signature_dynamic'] = { 'id': (), 'frame_nr': (), + 'pose_shape': (72 + 11,), + 'uv_body_posed': (512, 256, 3), + 'mesh_body_posed': (config['smpl_res'], 3,), + 'mesh_posed': (config['smpl_res'], 3,), + 'mesh_unposed': (config['smpl_res'], 3,), + 'uv_unposed': (512, 256, 3), + 'uv_curvature': (512, 256, 7), + } +config['signature_static'] = { 'uv_static': (512, 256, 3), + 'mesh_mask': (config['smpl_res'],), + 'uv_mask': (512, 256,), + } + +config['pyramid']['is_label'] = False +config['pyramid']['latent_dim'] = config['latent_dim'] +config['pyramid']['add_noise'] = True + +config['pyramid']['loss_weights'] = [1,1,1,1,1] + +for res in config['pyramid']['resolutions']: + if res != 512: + res_modifier = '_' + str(res) + config['signature_dynamic']['uv_body_posed' + res_modifier] = (res, res//2, 3) + config['signature_dynamic']['uv_unposed' + res_modifier] = (res, res//2, 3) + config['signature_dynamic']['uv_curvature' + res_modifier] = (res, res//2, 7) + config['signature_static']['uv_static' + res_modifier] = (res, res//2, 3) + config['signature_static']['uv_mask' + res_modifier] = (res, res//2) + + +config['pyramid']['static_model'] = 'checkpoints/static_1' +config['pyramid']['body_model'] = 'checkpoints/body_1' +config['pyramid']['curvature_model'] = 'checkpoints/curv_1' +config['pyramid']['freeze_encoders'] = True + +config['pyramid']['levels'] = [] +for res in config['pyramid']['resolutions']: + if res == 512: + level = dict() + level['resolution'] = 512 + level['latent_dim'] = config['latent_dim'] + level['kernel_size'] = 7 + level['encoder_depths'] = [3, 3, 9, 3] + level['encoder_dims'] = [32, 64, 128, 256] + level['decoder_input'] = (16, 8, 80) + level['decoder_depths'] = [3, 3, 9, 3] + level['decoder_dims'] = [256, 128, 64, 16] + level['avg_garment_path'] = '' + level['upscale_enhancer'] = '' + config['pyramid']['levels'].append(level) + elif res == 256: + level = dict() + level['resolution'] = 256 + level['latent_dim'] = config['latent_dim'] + level['kernel_size'] = 7 + level['encoder_depths'] = [9, 9, 9, 9] + level['encoder_dims'] = [32, 64, 128, 256] + level['decoder_input'] = (8, 4, 128) + level['decoder_depths'] = [9, 9, 9, 9] + level['decoder_dims'] = [256, 128, 64, 16] + level['avg_garment_path'] = '' + level['upscale_enhancer'] = ''#'checkpoints/up_3_d256_512_2' + level['upscale_enhancer_freeze'] = True + config['pyramid']['levels'].append(level) + elif res == 128: + level = dict() + level['resolution'] = 128 + level['latent_dim'] = config['latent_dim'] + level['kernel_size'] = 5 + level['encoder_depths'] = [16, 9, 9, 9] + level['encoder_dims'] = [64, 128, 128, 256] + level['decoder_input'] = (4, 2, 128) + level['decoder_depths'] = [16, 9, 9, 9] + level['decoder_dims'] = [256, 128, 128, 64] + level['avg_garment_path'] = '' + level['upscale_enhancer'] = ''#'checkpoints/up_3_d128_256_2' + level['upscale_enhancer_freeze'] = True + config['pyramid']['levels'].append(level) + elif res == 64: + level = dict() + level['resolution'] = 64 + level['latent_dim'] = config['latent_dim'] + level['kernel_size'] = 5 + level['encoder_depths'] = [9, 9, 9] + level['encoder_dims'] = [64, 128, 256] + level['decoder_input'] = (4, 2, 256) + level['decoder_depths'] = [9, 9, 9] + level['decoder_dims'] = [256, 128, 64] + level['avg_garment_path'] = '' + level['upscale_enhancer'] = ''#checkpoints/up_3_d64_128_2' + level['upscale_enhancer_freeze'] = False + config['pyramid']['levels'].append(level) + elif res == 32: + level = dict() + level['resolution'] = 32 + level['latent_dim'] = config['latent_dim'] + level['kernel_size'] = 3 + level['encoder_depths'] = [9, 9] + level['encoder_dims'] = [256, 256] + level['decoder_input'] = (4, 2, 256) + level['decoder_depths'] = [9, 9] + level['decoder_dims'] = [256, 256] + level['avg_garment_path'] = '' + level['upscale_enhancer'] = 'checkpoints/32_512_4'#'checkpoints/up_3_d32_64_2' + level['upscale_enhancer_freeze'] = True + config['pyramid']['levels'].append(level) + else: + raise NotImplementedError + + + +config['cond_ae'] = dict() +config['cond_ae']['is_label'] = False +config['cond_ae']['upscale_output'] = False +config['cond_ae']['latent_dim'] = config['latent_dim'] +config['cond_ae']['kernel_size'] = 7 +config['cond_ae']['bottleneck_size'] = 64 +config['cond_ae']['encoder_depths'] = [3, 3, 9, 9, 3] +config['cond_ae']['encoder_dims'] = [32, 64, 128, 256, config['cond_ae']['bottleneck_size']] +config['cond_ae']['decoder_input'] = (8, 4, config['cond_ae']['bottleneck_size']) +config['cond_ae']['decoder_depths'] = [3, 3, 9, 3, 3] +config['cond_ae']['decoder_dims'] = [config['cond_ae']['bottleneck_size'], 256, 128, 64, 16] + +config['cond_ae_body'] = dict() +config['cond_ae_body']['latent_dim'] = config['latent_dim'] +config['cond_ae_body']['kernel_size'] = 7 +config['cond_ae_body']['upscale_output'] = True +config['cond_ae_body']['bottleneck_size'] = 512 +config['cond_ae_body']['encoder_depths'] = [3, 3, 9, 9, 3, 3] +config['cond_ae_body']['encoder_dims'] = [32, 64, 128, 256, 256, config['cond_ae_body']['bottleneck_size']] +config['cond_ae_body']['decoder_input'] = (4, 2, config['cond_ae_body']['bottleneck_size']) +config['cond_ae_body']['decoder_depths'] = [3, 3, 9, 3] +config['cond_ae_body']['decoder_dims'] = [config['cond_ae_body']['bottleneck_size'], 128, 64, 16] \ No newline at end of file diff --git a/configs/config_abl_pyr_32_64_skirt.py b/configs/config_abl_pyr_32_64_skirt.py new file mode 100644 index 0000000..136f4c2 --- /dev/null +++ b/configs/config_abl_pyr_32_64_skirt.py @@ -0,0 +1,181 @@ +config = dict() + +config['gpu'] = '5' +config['name'] = 'pyr_abl_32_64_skirt' +config['notes'] = '' + +# DON'T FORGET TO RESET SSIM LOSS USAGE +# DON'T FORGET TO CHECK MODEL LOADING +# DON'T FORGET TO CHECK IF STORE IN MEMORY +# DON'T FORGET TO CHECK REG LOSS COEFF +# DON'T FORGET TO LOAD FINAL UPSCALER UNLESS HAVE LEVEL 512 +# DON'T FORGET TO CHECK IF SKIRT +# DON'T FORGET TO CHECK IF CAPE +# DON'T FORGET TO CHECK IF USING DOWNSCALE NONE OR _2 +# DON'T FORGET TO CHECK UPSCALING and ENCODER CHECKPOINTS + +config['use_skinning'] = True # and deshaping +config['remove_global_orientation'] = True +config['use_extra_losses'] = True # edge, collision, 3d mesh +config['use_offsets'] = False + +config['pyramid'] = dict() +config['pyramid']['resolutions'] = [32, 64] +config['pyramid']['pretrained_pyramid'] = 'checkpoints/pyr_abl_32_skirt_2' +config['pyramid']['final_upscale_enhancer'] = 'checkpoints/64_512_skirt' + +config['train_dir'] = '/home/workspace/local-data/train_skirt' +config['valid_dir'] = '/home/workspace/local-data/valid_skirt' +config['test_dir'] = '/home/workspace/data/dataset/test_skirt_ready_2' +config['batch_size'] = 4 +config['is_skirt'] = True +config['is_cape'] = False + +config['pyramid']['static_model'] = 'checkpoints/static_1_skirt' +config['pyramid']['body_model'] = 'checkpoints/body_1_skirt_2_2' +config['pyramid']['curvature_model'] = 'checkpoints/curv_1_skirt' + +config['dataset_in_memory'] = False +config['resolution'] = None +config['latent_dim'] = 128 + +config['smpl_res'] = 14475 +if config['is_cape']: + config['smpl_res'] = 3638 + +config['lr'] = 0.0001 +config['starting_balancing_coeff'] = 0.0001 +config['reg_loss_coeff'] = 0.1 # set to 0 if don't want to use edge+collision +config['avg_garment_path'] = '' + +config['signature_dynamic'] = { 'id': (), 'frame_nr': (), + 'pose_shape': (72 + 11,), + 'uv_body_posed': (512, 256, 3), + 'mesh_body_posed': (config['smpl_res'], 3,), + 'mesh_posed': (config['smpl_res'], 3,), + 'mesh_unposed': (config['smpl_res'], 3,), + 'uv_unposed': (512, 256, 3), + 'uv_curvature': (512, 256, 7), + } +config['signature_static'] = { 'uv_static': (512, 256, 3), + 'mesh_mask': (config['smpl_res'],), + 'uv_mask': (512, 256,), + } + +config['pyramid']['is_label'] = False +config['pyramid']['latent_dim'] = config['latent_dim'] +config['pyramid']['add_noise'] = True + +config['pyramid']['loss_weights'] = [1,1,1,1,1] + +for res in config['pyramid']['resolutions']: + if res != 512: + res_modifier = '_' + str(res) + config['signature_dynamic']['uv_body_posed' + res_modifier] = (res, res//2, 3) + config['signature_dynamic']['uv_unposed' + res_modifier] = (res, res//2, 3) + config['signature_dynamic']['uv_curvature' + res_modifier] = (res, res//2, 7) + config['signature_static']['uv_static' + res_modifier] = (res, res//2, 3) + config['signature_static']['uv_mask' + res_modifier] = (res, res//2) + + + +config['pyramid']['freeze_encoders'] = True + +config['pyramid']['levels'] = [] +for res in config['pyramid']['resolutions']: + if res == 512: + level = dict() + level['resolution'] = 512 + level['latent_dim'] = config['latent_dim'] + level['kernel_size'] = 7 + level['encoder_depths'] = [3, 3, 9, 3] + level['encoder_dims'] = [32, 64, 128, 256] + level['decoder_input'] = (16, 8, 80) + level['decoder_depths'] = [3, 3, 9, 3] + level['decoder_dims'] = [256, 128, 64, 16] + level['avg_garment_path'] = '' + level['upscale_enhancer'] = '' + config['pyramid']['levels'].append(level) + elif res == 256: + level = dict() + level['resolution'] = 256 + level['latent_dim'] = config['latent_dim'] + level['kernel_size'] = 7 + level['encoder_depths'] = [9, 9, 9, 9] + level['encoder_dims'] = [32, 64, 128, 256] + level['decoder_input'] = (8, 4, 128) + level['decoder_depths'] = [9, 9, 9, 9] + level['decoder_dims'] = [256, 128, 64, 16] + level['avg_garment_path'] = '' + level['upscale_enhancer'] = ''#'checkpoints/up_3_d256_512_2' + level['upscale_enhancer_freeze'] = True + config['pyramid']['levels'].append(level) + elif res == 128: + level = dict() + level['resolution'] = 128 + level['latent_dim'] = config['latent_dim'] + level['kernel_size'] = 5 + level['encoder_depths'] = [16, 9, 9, 9] + level['encoder_dims'] = [64, 128, 128, 256] + level['decoder_input'] = (4, 2, 128) + level['decoder_depths'] = [16, 9, 9, 9] + level['decoder_dims'] = [256, 128, 128, 64] + level['avg_garment_path'] = '' + level['upscale_enhancer'] = ''#'checkpoints/up_3_d128_256_2' + level['upscale_enhancer_freeze'] = True + config['pyramid']['levels'].append(level) + elif res == 64: + level = dict() + level['resolution'] = 64 + level['latent_dim'] = config['latent_dim'] + level['kernel_size'] = 5 + level['encoder_depths'] = [9, 9, 9] + level['encoder_dims'] = [64, 128, 256] + level['decoder_input'] = (4, 2, 256) + level['decoder_depths'] = [9, 9, 9] + level['decoder_dims'] = [256, 128, 64] + level['avg_garment_path'] = '' + level['upscale_enhancer'] = ''#checkpoints/up_3_d64_128_2' + level['upscale_enhancer_freeze'] = False + config['pyramid']['levels'].append(level) + elif res == 32: + level = dict() + level['resolution'] = 32 + level['latent_dim'] = config['latent_dim'] + level['kernel_size'] = 3 + level['encoder_depths'] = [9, 9] + level['encoder_dims'] = [256, 256] + level['decoder_input'] = (4, 2, 256) + level['decoder_depths'] = [9, 9] + level['decoder_dims'] = [256, 256] + level['avg_garment_path'] = '' + level['upscale_enhancer'] = 'checkpoints/32_512_skirt'#'checkpoints/up_3_d32_64_2' + level['upscale_enhancer_freeze'] = True + config['pyramid']['levels'].append(level) + else: + raise NotImplementedError + + + +config['cond_ae'] = dict() +config['cond_ae']['is_label'] = False +config['cond_ae']['upscale_output'] = False +config['cond_ae']['latent_dim'] = config['latent_dim'] +config['cond_ae']['kernel_size'] = 7 +config['cond_ae']['bottleneck_size'] = 64 +config['cond_ae']['encoder_depths'] = [3, 3, 9, 9, 3] +config['cond_ae']['encoder_dims'] = [32, 64, 128, 256, config['cond_ae']['bottleneck_size']] +config['cond_ae']['decoder_input'] = (8, 4, config['cond_ae']['bottleneck_size']) +config['cond_ae']['decoder_depths'] = [3, 3, 9, 3, 3] +config['cond_ae']['decoder_dims'] = [config['cond_ae']['bottleneck_size'], 256, 128, 64, 16] + +config['cond_ae_body'] = dict() +config['cond_ae_body']['latent_dim'] = config['latent_dim'] +config['cond_ae_body']['kernel_size'] = 7 +config['cond_ae_body']['upscale_output'] = True +config['cond_ae_body']['bottleneck_size'] = 512 +config['cond_ae_body']['encoder_depths'] = [3, 3, 9, 9, 3, 3] +config['cond_ae_body']['encoder_dims'] = [32, 64, 128, 256, 256, config['cond_ae_body']['bottleneck_size']] +config['cond_ae_body']['decoder_input'] = (4, 2, config['cond_ae_body']['bottleneck_size']) +config['cond_ae_body']['decoder_depths'] = [3, 3, 9, 3] +config['cond_ae_body']['decoder_dims'] = [config['cond_ae_body']['bottleneck_size'], 128, 64, 16] \ No newline at end of file diff --git a/configs/config_abl_pyr_32_64_skirt_2.py b/configs/config_abl_pyr_32_64_skirt_2.py new file mode 100644 index 0000000..e1ff541 --- /dev/null +++ b/configs/config_abl_pyr_32_64_skirt_2.py @@ -0,0 +1,181 @@ +config = dict() + +config['gpu'] = '5' +config['name'] = 'pyr_abl_32_64_skirt_2' +config['notes'] = 'dividing output by 100, not 10' + +# DON'T FORGET TO RESET SSIM LOSS USAGE +# DON'T FORGET TO CHECK MODEL LOADING +# DON'T FORGET TO CHECK IF STORE IN MEMORY +# DON'T FORGET TO CHECK REG LOSS COEFF +# DON'T FORGET TO LOAD FINAL UPSCALER UNLESS HAVE LEVEL 512 +# DON'T FORGET TO CHECK IF SKIRT +# DON'T FORGET TO CHECK IF CAPE +# DON'T FORGET TO CHECK IF USING DOWNSCALE NONE OR _2 +# DON'T FORGET TO CHECK UPSCALING and ENCODER CHECKPOINTS + +config['use_skinning'] = True # and deshaping +config['remove_global_orientation'] = True +config['use_extra_losses'] = True # edge, collision, 3d mesh +config['use_offsets'] = False + +config['pyramid'] = dict() +config['pyramid']['resolutions'] = [32, 64] +config['pyramid']['pretrained_pyramid'] = 'checkpoints/pyr_abl_32_skirt_2' +config['pyramid']['final_upscale_enhancer'] = 'checkpoints/64_512_skirt' + +config['train_dir'] = '/home/workspace/local-data/train_skirt' +config['valid_dir'] = '/home/workspace/local-data/valid_skirt' +config['test_dir'] = '/home/workspace/data/dataset/test_skirt_ready_2' +config['batch_size'] = 4 +config['is_skirt'] = True +config['is_cape'] = False + +config['pyramid']['static_model'] = 'checkpoints/static_1_skirt' +config['pyramid']['body_model'] = 'checkpoints/body_1_skirt_2_2' +config['pyramid']['curvature_model'] = 'checkpoints/curv_1_skirt' + +config['dataset_in_memory'] = False +config['resolution'] = None +config['latent_dim'] = 128 + +config['smpl_res'] = 14475 +if config['is_cape']: + config['smpl_res'] = 3638 + +config['lr'] = 0.0001 +config['starting_balancing_coeff'] = 0.0001 +config['reg_loss_coeff'] = 0.1 # set to 0 if don't want to use edge+collision +config['avg_garment_path'] = '' + +config['signature_dynamic'] = { 'id': (), 'frame_nr': (), + 'pose_shape': (72 + 11,), + 'uv_body_posed': (512, 256, 3), + 'mesh_body_posed': (config['smpl_res'], 3,), + 'mesh_posed': (config['smpl_res'], 3,), + 'mesh_unposed': (config['smpl_res'], 3,), + 'uv_unposed': (512, 256, 3), + 'uv_curvature': (512, 256, 7), + } +config['signature_static'] = { 'uv_static': (512, 256, 3), + 'mesh_mask': (config['smpl_res'],), + 'uv_mask': (512, 256,), + } + +config['pyramid']['is_label'] = False +config['pyramid']['latent_dim'] = config['latent_dim'] +config['pyramid']['add_noise'] = True + +config['pyramid']['loss_weights'] = [1,1,1,1,1] + +for res in config['pyramid']['resolutions']: + if res != 512: + res_modifier = '_' + str(res) + config['signature_dynamic']['uv_body_posed' + res_modifier] = (res, res//2, 3) + config['signature_dynamic']['uv_unposed' + res_modifier] = (res, res//2, 3) + config['signature_dynamic']['uv_curvature' + res_modifier] = (res, res//2, 7) + config['signature_static']['uv_static' + res_modifier] = (res, res//2, 3) + config['signature_static']['uv_mask' + res_modifier] = (res, res//2) + + + +config['pyramid']['freeze_encoders'] = True + +config['pyramid']['levels'] = [] +for res in config['pyramid']['resolutions']: + if res == 512: + level = dict() + level['resolution'] = 512 + level['latent_dim'] = config['latent_dim'] + level['kernel_size'] = 7 + level['encoder_depths'] = [3, 3, 9, 3] + level['encoder_dims'] = [32, 64, 128, 256] + level['decoder_input'] = (16, 8, 80) + level['decoder_depths'] = [3, 3, 9, 3] + level['decoder_dims'] = [256, 128, 64, 16] + level['avg_garment_path'] = '' + level['upscale_enhancer'] = '' + config['pyramid']['levels'].append(level) + elif res == 256: + level = dict() + level['resolution'] = 256 + level['latent_dim'] = config['latent_dim'] + level['kernel_size'] = 7 + level['encoder_depths'] = [9, 9, 9, 9] + level['encoder_dims'] = [32, 64, 128, 256] + level['decoder_input'] = (8, 4, 128) + level['decoder_depths'] = [9, 9, 9, 9] + level['decoder_dims'] = [256, 128, 64, 16] + level['avg_garment_path'] = '' + level['upscale_enhancer'] = ''#'checkpoints/up_3_d256_512_2' + level['upscale_enhancer_freeze'] = True + config['pyramid']['levels'].append(level) + elif res == 128: + level = dict() + level['resolution'] = 128 + level['latent_dim'] = config['latent_dim'] + level['kernel_size'] = 5 + level['encoder_depths'] = [16, 9, 9, 9] + level['encoder_dims'] = [64, 128, 128, 256] + level['decoder_input'] = (4, 2, 128) + level['decoder_depths'] = [16, 9, 9, 9] + level['decoder_dims'] = [256, 128, 128, 64] + level['avg_garment_path'] = '' + level['upscale_enhancer'] = ''#'checkpoints/up_3_d128_256_2' + level['upscale_enhancer_freeze'] = True + config['pyramid']['levels'].append(level) + elif res == 64: + level = dict() + level['resolution'] = 64 + level['latent_dim'] = config['latent_dim'] + level['kernel_size'] = 5 + level['encoder_depths'] = [9, 9, 9] + level['encoder_dims'] = [64, 128, 256] + level['decoder_input'] = (4, 2, 256) + level['decoder_depths'] = [9, 9, 9] + level['decoder_dims'] = [256, 128, 64] + level['avg_garment_path'] = '' + level['upscale_enhancer'] = ''#checkpoints/up_3_d64_128_2' + level['upscale_enhancer_freeze'] = False + config['pyramid']['levels'].append(level) + elif res == 32: + level = dict() + level['resolution'] = 32 + level['latent_dim'] = config['latent_dim'] + level['kernel_size'] = 3 + level['encoder_depths'] = [9, 9] + level['encoder_dims'] = [256, 256] + level['decoder_input'] = (4, 2, 256) + level['decoder_depths'] = [9, 9] + level['decoder_dims'] = [256, 256] + level['avg_garment_path'] = '' + level['upscale_enhancer'] = 'checkpoints/32_512_skirt'#'checkpoints/up_3_d32_64_2' + level['upscale_enhancer_freeze'] = True + config['pyramid']['levels'].append(level) + else: + raise NotImplementedError + + + +config['cond_ae'] = dict() +config['cond_ae']['is_label'] = False +config['cond_ae']['upscale_output'] = False +config['cond_ae']['latent_dim'] = config['latent_dim'] +config['cond_ae']['kernel_size'] = 7 +config['cond_ae']['bottleneck_size'] = 64 +config['cond_ae']['encoder_depths'] = [3, 3, 9, 9, 3] +config['cond_ae']['encoder_dims'] = [32, 64, 128, 256, config['cond_ae']['bottleneck_size']] +config['cond_ae']['decoder_input'] = (8, 4, config['cond_ae']['bottleneck_size']) +config['cond_ae']['decoder_depths'] = [3, 3, 9, 3, 3] +config['cond_ae']['decoder_dims'] = [config['cond_ae']['bottleneck_size'], 256, 128, 64, 16] + +config['cond_ae_body'] = dict() +config['cond_ae_body']['latent_dim'] = config['latent_dim'] +config['cond_ae_body']['kernel_size'] = 7 +config['cond_ae_body']['upscale_output'] = True +config['cond_ae_body']['bottleneck_size'] = 512 +config['cond_ae_body']['encoder_depths'] = [3, 3, 9, 9, 3, 3] +config['cond_ae_body']['encoder_dims'] = [32, 64, 128, 256, 256, config['cond_ae_body']['bottleneck_size']] +config['cond_ae_body']['decoder_input'] = (4, 2, config['cond_ae_body']['bottleneck_size']) +config['cond_ae_body']['decoder_depths'] = [3, 3, 9, 3] +config['cond_ae_body']['decoder_dims'] = [config['cond_ae_body']['bottleneck_size'], 128, 64, 16] \ No newline at end of file diff --git a/configs/config_abl_pyr_64_128_256_512_cape_f.py b/configs/config_abl_pyr_64_128_256_512_cape_f.py index 6451086..74fa68c 100644 --- a/configs/config_abl_pyr_64_128_256_512_cape_f.py +++ b/configs/config_abl_pyr_64_128_256_512_cape_f.py @@ -1,8 +1,8 @@ config = dict() -config['gpu'] = '0' -config['name'] = 'pyr_abl_64_128_256_512_cape_f_2' -config['notes'] = 'removing activation from last layer and dividing output by 100, 80k pretrained prev level' +config['gpu'] = '6' +config['name'] = 'pyr_abl_64_128_256_512_cape_f' +config['notes'] = 'removing activation from last layer and dividing output by 100, 30k pretrained prev level' # DON'T FORGET TO RESET SSIM LOSS USAGE # DON'T FORGET TO CHECK MODEL LOADING @@ -16,6 +16,8 @@ config['notes'] = 'removing activation from last layer and dividing output by 10 config['use_skinning'] = True # and deshaping config['remove_global_orientation'] = True +config['use_extra_losses'] = True # edge, collision, 3d mesh +config['use_offsets'] = False config['pyramid'] = dict() config['pyramid']['resolutions'] = [64, 128, 256, 512] diff --git a/configs/config_abl_pyr_64_128_256_512_cape_f_2.py b/configs/config_abl_pyr_64_128_256_512_cape_f_2.py new file mode 100644 index 0000000..22cc3fa --- /dev/null +++ b/configs/config_abl_pyr_64_128_256_512_cape_f_2.py @@ -0,0 +1,181 @@ +config = dict() + +config['gpu'] = '0' +config['name'] = 'pyr_abl_64_128_256_512_cape_f_2' +config['notes'] = 'removing activation from last layer and dividing output by 100, 80k pretrained prev level' + +# DON'T FORGET TO RESET SSIM LOSS USAGE +# DON'T FORGET TO CHECK MODEL LOADING +# DON'T FORGET TO CHECK IF STORE IN MEMORY +# DON'T FORGET TO CHECK REG LOSS COEFF +# DON'T FORGET TO LOAD FINAL UPSCALER UNLESS HAVE LEVEL 512 +# DON'T FORGET TO CHECK IF SKIRT +# DON'T FORGET TO CHECK IF CAPE +# DON'T FORGET TO CHECK IF USING DOWNSCALE NONE OR _2 +# DON'T FORGET TO CHECK UPSCALING and ENCODER CHECKPOINTS + +config['use_skinning'] = True # and deshaping +config['remove_global_orientation'] = True +config['use_extra_losses'] = True # edge, collision, 3d mesh +config['use_offsets'] = False + +config['pyramid'] = dict() +config['pyramid']['resolutions'] = [64, 128, 256, 512] +config['pyramid']['pretrained_pyramid'] = 'checkpoints/pyr_abl_64_128_256_cape_f_2' +config['pyramid']['final_upscale_enhancer'] = '' + +config['train_dir'] = '/home/workspace/local-data/cape_processed/train/female' +config['valid_dir'] = '/home/workspace/local-data/cape_processed/test/female' +config['test_dir'] = '/home/workspace/local-data/cape_processed/test/female' +config['batch_size'] = 4 +config['is_skirt'] = False +config['is_cape'] = True + +config['pyramid']['static_model'] = 'checkpoints/static_1_cape_f' +config['pyramid']['body_model'] = 'checkpoints/body_1_cape_f' +config['pyramid']['curvature_model'] = 'checkpoints/curv_1_cape_f' + +config['dataset_in_memory'] = False +config['resolution'] = None +config['latent_dim'] = 128 + +config['smpl_res'] = 14475 +if config['is_cape']: + config['smpl_res'] = 3638 + +config['lr'] = 0.0001 +config['starting_balancing_coeff'] = 0.0001 +config['reg_loss_coeff'] = None # set to 0 if don't want to use edge+collision +config['avg_garment_path'] = '' + +config['signature_dynamic'] = { 'id': (), 'frame_nr': (), + 'pose_shape': (72 + 11,), + 'uv_body_posed': (512, 256, 3), + 'mesh_body_posed': (config['smpl_res'], 3,), + 'mesh_posed': (config['smpl_res'], 3,), + 'mesh_unposed': (config['smpl_res'], 3,), + 'uv_unposed': (512, 256, 3), + 'uv_curvature': (512, 256, 7), + } +config['signature_static'] = { 'uv_static': (512, 256, 3), + 'mesh_mask': (config['smpl_res'],), + 'uv_mask': (512, 256,), + } + +config['pyramid']['is_label'] = False +config['pyramid']['latent_dim'] = config['latent_dim'] +config['pyramid']['add_noise'] = True + +config['pyramid']['loss_weights'] = [1,1,1,1,1] + +for res in config['pyramid']['resolutions']: + if res != 512: + res_modifier = '_' + str(res) + config['signature_dynamic']['uv_body_posed' + res_modifier] = (res, res//2, 3) + config['signature_dynamic']['uv_unposed' + res_modifier] = (res, res//2, 3) + config['signature_dynamic']['uv_curvature' + res_modifier] = (res, res//2, 7) + config['signature_static']['uv_static' + res_modifier] = (res, res//2, 3) + config['signature_static']['uv_mask' + res_modifier] = (res, res//2) + + + +config['pyramid']['freeze_encoders'] = True + +config['pyramid']['levels'] = [] +for res in config['pyramid']['resolutions']: + if res == 512: + level = dict() + level['resolution'] = 512 + level['latent_dim'] = config['latent_dim'] + level['kernel_size'] = 7 + level['encoder_depths'] = [3, 3, 9, 3] + level['encoder_dims'] = [32, 64, 128, 256] + level['decoder_input'] = (16, 8, 80) + level['decoder_depths'] = [3, 3, 9, 3] + level['decoder_dims'] = [256, 128, 64, 16] + level['avg_garment_path'] = '' + level['upscale_enhancer'] = '' + config['pyramid']['levels'].append(level) + elif res == 256: + level = dict() + level['resolution'] = 256 + level['latent_dim'] = config['latent_dim'] + level['kernel_size'] = 7 + level['encoder_depths'] = [9, 9, 9, 9] + level['encoder_dims'] = [32, 64, 128, 256] + level['decoder_input'] = (8, 4, 128) + level['decoder_depths'] = [9, 9, 9, 9] + level['decoder_dims'] = [256, 128, 64, 16] + level['avg_garment_path'] = '' + level['upscale_enhancer'] = 'checkpoints/256_512_cape_f'#'checkpoints/up_3_d256_512_2' + level['upscale_enhancer_freeze'] = True + config['pyramid']['levels'].append(level) + elif res == 128: + level = dict() + level['resolution'] = 128 + level['latent_dim'] = config['latent_dim'] + level['kernel_size'] = 5 + level['encoder_depths'] = [16, 9, 9, 9] + level['encoder_dims'] = [64, 128, 128, 256] + level['decoder_input'] = (4, 2, 128) + level['decoder_depths'] = [16, 9, 9, 9] + level['decoder_dims'] = [256, 128, 128, 64] + level['avg_garment_path'] = '' + level['upscale_enhancer'] = 'checkpoints/128_512_cape_f'#'checkpoints/up_3_d128_256_2' + level['upscale_enhancer_freeze'] = True + config['pyramid']['levels'].append(level) + elif res == 64: + level = dict() + level['resolution'] = 64 + level['latent_dim'] = config['latent_dim'] + level['kernel_size'] = 5 + level['encoder_depths'] = [9, 9, 9] + level['encoder_dims'] = [64, 128, 256] + level['decoder_input'] = (4, 2, 256) + level['decoder_depths'] = [9, 9, 9] + level['decoder_dims'] = [256, 128, 64] + level['avg_garment_path'] = '' + level['upscale_enhancer'] = 'checkpoints/64_512_cape_f'#checkpoints/up_3_d64_128_2' + level['upscale_enhancer_freeze'] = False + config['pyramid']['levels'].append(level) + elif res == 32: + level = dict() + level['resolution'] = 32 + level['latent_dim'] = config['latent_dim'] + level['kernel_size'] = 3 + level['encoder_depths'] = [9, 9] + level['encoder_dims'] = [256, 256] + level['decoder_input'] = (4, 2, 256) + level['decoder_depths'] = [9, 9] + level['decoder_dims'] = [256, 256] + level['avg_garment_path'] = '' + level['upscale_enhancer'] = ''#'checkpoints/up_3_d32_64_2' + level['upscale_enhancer_freeze'] = True + config['pyramid']['levels'].append(level) + else: + raise NotImplementedError + + + +config['cond_ae'] = dict() +config['cond_ae']['is_label'] = False +config['cond_ae']['upscale_output'] = False +config['cond_ae']['latent_dim'] = config['latent_dim'] +config['cond_ae']['kernel_size'] = 7 +config['cond_ae']['bottleneck_size'] = 64 +config['cond_ae']['encoder_depths'] = [3, 3, 9, 9, 3] +config['cond_ae']['encoder_dims'] = [32, 64, 128, 256, config['cond_ae']['bottleneck_size']] +config['cond_ae']['decoder_input'] = (8, 4, config['cond_ae']['bottleneck_size']) +config['cond_ae']['decoder_depths'] = [3, 3, 9, 3, 3] +config['cond_ae']['decoder_dims'] = [config['cond_ae']['bottleneck_size'], 256, 128, 64, 16] + +config['cond_ae_body'] = dict() +config['cond_ae_body']['latent_dim'] = config['latent_dim'] +config['cond_ae_body']['kernel_size'] = 7 +config['cond_ae_body']['upscale_output'] = True +config['cond_ae_body']['bottleneck_size'] = 512 +config['cond_ae_body']['encoder_depths'] = [3, 3, 9, 9, 3, 3] +config['cond_ae_body']['encoder_dims'] = [32, 64, 128, 256, 256, config['cond_ae_body']['bottleneck_size']] +config['cond_ae_body']['decoder_input'] = (4, 2, config['cond_ae_body']['bottleneck_size']) +config['cond_ae_body']['decoder_depths'] = [3, 3, 9, 3] +config['cond_ae_body']['decoder_dims'] = [config['cond_ae_body']['bottleneck_size'], 128, 64, 16] \ No newline at end of file diff --git a/configs/config_abl_pyr_64_128_256_cape_f.py b/configs/config_abl_pyr_64_128_256_cape_f.py index a089edb..2762218 100644 --- a/configs/config_abl_pyr_64_128_256_cape_f.py +++ b/configs/config_abl_pyr_64_128_256_cape_f.py @@ -14,6 +14,10 @@ config['notes'] = 'removing activation from last layer and dividing output by 10 # DON'T FORGET TO CHECK IF USING DOWNSCALE NONE OR _2 # DON'T FORGET TO CHECK UPSCALING and ENCODER CHECKPOINTS +config['use_skinning'] = True # and deshaping +config['remove_global_orientation'] = True +config['use_extra_losses'] = True # edge, collision, 3d mesh +config['use_offsets'] = False config['pyramid'] = dict() config['pyramid']['resolutions'] = [64, 128, 256] diff --git a/configs/config_abl_pyr_64_128_cape_f.py b/configs/config_abl_pyr_64_128_cape_f.py index 1600f4d..ae80a5d 100644 --- a/configs/config_abl_pyr_64_128_cape_f.py +++ b/configs/config_abl_pyr_64_128_cape_f.py @@ -14,6 +14,10 @@ config['notes'] = 'removing activation from last layer and dividing output by 10 # DON'T FORGET TO CHECK IF USING DOWNSCALE NONE OR _2 # DON'T FORGET TO CHECK UPSCALING and ENCODER CHECKPOINTS +config['use_skinning'] = True # and deshaping +config['remove_global_orientation'] = True +config['use_extra_losses'] = True # edge, collision, 3d mesh +config['use_offsets'] = False config['pyramid'] = dict() config['pyramid']['resolutions'] = [64, 128] diff --git a/configs/config_abl_pyr_64_128_cape_m.py b/configs/config_abl_pyr_64_128_cape_m.py index 56f31c6..e1e2206 100644 --- a/configs/config_abl_pyr_64_128_cape_m.py +++ b/configs/config_abl_pyr_64_128_cape_m.py @@ -67,6 +67,7 @@ config['signature_static'] = { 'uv_static': (512, 256, 3), config['pyramid']['is_label'] = False config['pyramid']['latent_dim'] = config['latent_dim'] config['pyramid']['add_noise'] = True +config['pyramid']['noise_amount'] = 0.025 config['pyramid']['loss_weights'] = [1,1,1,1,1] diff --git a/configs/config_abl_pyr_64_cape_f.py b/configs/config_abl_pyr_64_cape_f.py index 990db53..5957409 100644 --- a/configs/config_abl_pyr_64_cape_f.py +++ b/configs/config_abl_pyr_64_cape_f.py @@ -14,6 +14,10 @@ config['notes'] = '' # DON'T FORGET TO CHECK IF USING DOWNSCALE NONE OR _2 # DON'T FORGET TO CHECK UPSCALING and ENCODER CHECKPOINTS +config['use_skinning'] = True # and deshaping +config['remove_global_orientation'] = True +config['use_extra_losses'] = True # edge, collision, 3d mesh +config['use_offsets'] = False config['pyramid'] = dict() config['pyramid']['resolutions'] = [64] diff --git a/configs/config_abl_pyr_64_cape_m.py b/configs/config_abl_pyr_64_cape_m.py index d5ca508..cde407a 100644 --- a/configs/config_abl_pyr_64_cape_m.py +++ b/configs/config_abl_pyr_64_cape_m.py @@ -14,6 +14,11 @@ config['notes'] = '' # DON'T FORGET TO CHECK IF USING DOWNSCALE NONE OR _2 # DON'T FORGET TO CHECK UPSCALING and ENCODER CHECKPOINTS +config['use_skinning'] = True # and deshaping +config['remove_global_orientation'] = True +config['use_extra_losses'] = True # edge, collision, 3d mesh +config['use_offsets'] = False + config['pyramid'] = dict() config['pyramid']['resolutions'] = [64] diff --git a/configs/config_abl_skin_norm.py b/configs/config_abl_skin_norm.py new file mode 100644 index 0000000..b15e100 --- /dev/null +++ b/configs/config_abl_skin_norm.py @@ -0,0 +1,116 @@ +config = dict() + +# DON'T FORGET TO RESET SSIM LOSS USAGE +# DON'T FORGET TO CHECK MODEL LOADING +# DON'T FORGET TO CHECK IF STORE IN MEMORY +# DON'T FORGET TO CHECK REG LOSS COEFF +# DON'T FORGET TO LOAD FINAL UPSCALER UNLESS HAVE LEVEL 512 +# DON'T FORGET TO CHECK AVG GARMENT USED + +config['use_skinning'] = False # and deshaping +config['remove_global_orientation'] = True +config['use_curvature'] = True +config['use_extra_losses'] = True # edge, collision, 3d mesh +config['use_offsets'] = True + +config['use_norm_loss'] = True + +ablation_count = [config['use_skinning'], config['remove_global_orientation'], config['use_curvature'], config['use_extra_losses'], config['use_offsets']].count(False) + +config['gpu'] = '3' +config['name'] = 'abl_skin_norm' +config['notes'] = '' + +config['avg_garment_path'] = '' #custom_data/train_no_shape_avg_uv.npy # train_no_shape_avg_uv train_no_shape_one_hot_avg_uv +if config['use_skinning']: + assert (config['use_offsets'] and config['avg_garment_path'] != '') or (not config['use_offsets'] and config['avg_garment_path'] == '') + +config['reg_loss_coeff'] = 0.1 # set to 0 if don't want to use edge+collision + +config['batch_size'] = 4 +config['resolution'] = 512 +config['is_skirt'] = False +config['dataset_in_memory'] = False +config['is_cape'] = False + +config['train_dir'] = '/home/workspace/local-data/train' +config['valid_dir'] = '/home/workspace/local-data/valid' +config['test_dir'] = '/home/workspace/data/dataset/test_ready' + +config['static_model'] = 'checkpoints/static_1' +config['body_model'] = 'checkpoints/body_1' +config['curvature_model'] = 'checkpoints/curv_1' + + +config['smpl_res'] = 14475 +if config['is_cape']: + config['smpl_res'] = 3638 + +config['latent_dim'] = 128 + +config['pretrained_model'] = '' + +############### +config['lr'] = 0.0001# 0.0001 +############### +config['starting_balancing_coeff'] = 0.0001 + +config['signature_dynamic'] = { 'id': (), 'frame_nr': (), + 'pose_shape': (72 + 11,), + 'uv_body_posed': (512, 256, 3), + 'mesh_body_posed': (14475, 3,), + 'mesh_posed': (14475, 3,), + 'uv_curvature': (512, 256, 7), + } +config['signature_static'] = { 'uv_static': (512, 256, 3), + 'mesh_mask': (14475,), + 'uv_mask': (512, 256,), + } + +if config['use_skinning']: + config['signature_dynamic']['uv_unposed'] = (512, 256, 3) + config['signature_dynamic']['mesh_unposed'] = (14475, 3,) +else: + config['signature_dynamic']['uv_posed'] = (512, 256, 3) + + +config['upscale_enhancer'] = '' +config['freeze_encoders'] = True +config['use_one_hot'] = False + +config['cvae'] = dict() +config['cvae']['is_label'] = False +config['cvae']['latent_dim'] = config['latent_dim'] +config['cvae']['add_noise'] = True +config['cvae']['noise_amount'] = 0.025 + +config['cvae']['kernel_size'] = 7 +config['cvae']['encoder_depths'] = [3, 3, 9, 3] +config['cvae']['encoder_dims'] = [32, 64, 128, 256] +config['cvae']['decoder_input'] = (16, 8, 80) +config['cvae']['decoder_depths'] = [3, 3, 9, 3] +config['cvae']['decoder_dims'] = [256, 128, 64, 16] + + +config['cond_ae'] = dict() +config['cond_ae']['is_label'] = False +config['cond_ae']['upscale_output'] = False +config['cond_ae']['latent_dim'] = config['latent_dim'] +config['cond_ae']['kernel_size'] = 7 +config['cond_ae']['bottleneck_size'] = 64 +config['cond_ae']['encoder_depths'] = [3, 3, 9, 9, 3] +config['cond_ae']['encoder_dims'] = [32, 64, 128, 256, config['cond_ae']['bottleneck_size']] +config['cond_ae']['decoder_input'] = (8, 4, config['cond_ae']['bottleneck_size']) +config['cond_ae']['decoder_depths'] = [3, 3, 9, 3, 3] +config['cond_ae']['decoder_dims'] = [config['cond_ae']['bottleneck_size'], 256, 128, 64, 16] + +config['cond_ae_body'] = dict() +config['cond_ae_body']['latent_dim'] = config['latent_dim'] +config['cond_ae_body']['kernel_size'] = 7 +config['cond_ae_body']['upscale_output'] = True +config['cond_ae_body']['bottleneck_size'] = 512 +config['cond_ae_body']['encoder_depths'] = [3, 3, 9, 9, 3, 3] +config['cond_ae_body']['encoder_dims'] = [32, 64, 128, 256, 256, config['cond_ae_body']['bottleneck_size']] +config['cond_ae_body']['decoder_input'] = (4, 2, config['cond_ae_body']['bottleneck_size']) +config['cond_ae_body']['decoder_depths'] = [3, 3, 9, 3] +config['cond_ae_body']['decoder_dims'] = [config['cond_ae_body']['bottleneck_size'], 128, 64, 16] diff --git a/configs/config_abl_skin_skirt.py b/configs/config_abl_skin_skirt.py index d9214f4..c6a65d8 100644 --- a/configs/config_abl_skin_skirt.py +++ b/configs/config_abl_skin_skirt.py @@ -1,4 +1,4 @@ -config = dict() +config_a = dict() # DON'T FORGET TO RESET SSIM LOSS USAGE # DON'T FORGET TO CHECK MODEL LOADING @@ -7,110 +7,110 @@ config = dict() # DON'T FORGET TO LOAD FINAL UPSCALER UNLESS HAVE LEVEL 512 # DON'T FORGET TO CHECK AVG GARMENT USED -config['use_skinning'] = False # and deshaping -config['remove_global_orientation'] = True -config['use_curvature'] = True -config['use_extra_losses'] = True # edge, collision, 3d mesh -config['use_offsets'] = True +config_a['use_skinning'] = False # and deshaping +config_a['remove_global_orientation'] = True +config_a['use_curvature'] = True +config_a['use_extra_losses'] = True # edge, collision, 3d mesh +config_a['use_offsets'] = True -config['use_norm_loss'] = False +config_a['use_norm_loss'] = False -ablation_count = [config['use_skinning'], config['remove_global_orientation'], config['use_curvature'], config['use_extra_losses'], config['use_offsets']].count(False) +ablation_count = [config_a['use_skinning'], config_a['remove_global_orientation'], config_a['use_curvature'], config_a['use_extra_losses'], config_a['use_offsets']].count(False) -config['gpu'] = '4' -config['name'] = 'abl_skin_skirt' -config['notes'] = '' +config_a['gpu'] = '4' +config_a['name'] = 'abl_skin_skirt' +config_a['notes'] = '' -config['avg_garment_path'] = '' #custom_data/train_no_shape_avg_uv.npy # train_no_shape_avg_uv train_no_shape_one_hot_avg_uv -if config['use_skinning']: - assert (config['use_offsets'] and config['avg_garment_path'] != '') or (not config['use_offsets'] and config['avg_garment_path'] == '') +config_a['avg_garment_path'] = '' #custom_data/train_no_shape_avg_uv.npy # train_no_shape_avg_uv train_no_shape_one_hot_avg_uv +if config_a['use_skinning']: + assert (config_a['use_offsets'] and config_a['avg_garment_path'] != '') or (not config_a['use_offsets'] and config_a['avg_garment_path'] == '') -config['reg_loss_coeff'] = 0.1 # set to 0 if don't want to use edge+collision +config_a['reg_loss_coeff'] = 0.1 # set to 0 if don't want to use edge+collision -config['batch_size'] = 4 -config['resolution'] = 512 -config['is_skirt'] = True -config['dataset_in_memory'] = False -config['is_cape'] = False +config_a['batch_size'] = 4 +config_a['resolution'] = 512 +config_a['is_skirt'] = True +config_a['dataset_in_memory'] = False +config_a['is_cape'] = False -config['train_dir'] = '/home/workspace/local-data/train_skirt' -config['valid_dir'] = '/home/workspace/local-data/valid_skirt' -config['test_dir'] = '/home/workspace/data/dataset/test_skirt_ready_2' +config_a['train_dir'] = '/home/workspace/local-data/train_skirt' +config_a['valid_dir'] = '/home/workspace/local-data/valid_skirt' +config_a['test_dir'] = '/home/workspace/data/dataset/test_skirt_ready_2' -config['static_model'] = 'checkpoints/static_1_skirt' -config['body_model'] = 'checkpoints/body_1_skirt_2_2' -config['curvature_model'] = 'checkpoints/curv_1_skirt' +config_a['static_model'] = 'checkpoints/static_1_skirt' +config_a['body_model'] = 'checkpoints/body_1_skirt_2_2' +config_a['curvature_model'] = 'checkpoints/curv_1_skirt' -config['smpl_res'] = 14475 -if config['is_cape']: - config['smpl_res'] = 3638 +config_a['smpl_res'] = 14475 +if config_a['is_cape']: + config_a['smpl_res'] = 3638 -config['latent_dim'] = 128 +config_a['latent_dim'] = 128 -config['pretrained_model'] = '' +config_a['pretrained_model'] = '' ############### -config['lr'] = 0.0001# 0.0001 +config_a['lr'] = 0.0001# 0.0001 ############### -config['starting_balancing_coeff'] = 0.0001 +config_a['starting_balancing_coeff'] = 0.0001 -config['signature_dynamic'] = { 'id': (), 'frame_nr': (), +config_a['signature_dynamic'] = { 'id': (), 'frame_nr': (), 'pose_shape': (72 + 11,), 'uv_body_posed': (512, 256, 3), 'mesh_body_posed': (14475, 3,), 'mesh_posed': (14475, 3,), 'uv_curvature': (512, 256, 7), } -config['signature_static'] = { 'uv_static': (512, 256, 3), +config_a['signature_static'] = { 'uv_static': (512, 256, 3), 'mesh_mask': (14475,), 'uv_mask': (512, 256,), } -if config['use_skinning']: - config['signature_dynamic']['uv_unposed'] = (512, 256, 3) - config['signature_dynamic']['mesh_unposed'] = (14475, 3,) +if config_a['use_skinning']: + config_a['signature_dynamic']['uv_unposed'] = (512, 256, 3) + config_a['signature_dynamic']['mesh_unposed'] = (14475, 3,) else: - config['signature_dynamic']['uv_posed'] = (512, 256, 3) + config_a['signature_dynamic']['uv_posed'] = (512, 256, 3) -config['upscale_enhancer'] = '' -config['freeze_encoders'] = True -config['use_one_hot'] = False +config_a['upscale_enhancer'] = '' +config_a['freeze_encoders'] = True +config_a['use_one_hot'] = False -config['cvae'] = dict() -config['cvae']['is_label'] = False -config['cvae']['latent_dim'] = config['latent_dim'] -config['cvae']['add_noise'] = True -config['cvae']['noise_amount'] = 0.025 +config_a['cvae'] = dict() +config_a['cvae']['is_label'] = False +config_a['cvae']['latent_dim'] = config_a['latent_dim'] +config_a['cvae']['add_noise'] = True +config_a['cvae']['noise_amount'] = 0.025 -config['cvae']['kernel_size'] = 7 -config['cvae']['encoder_depths'] = [3, 3, 9, 3] -config['cvae']['encoder_dims'] = [32, 64, 128, 256] -config['cvae']['decoder_input'] = (16, 8, 80) -config['cvae']['decoder_depths'] = [3, 3, 9, 3] -config['cvae']['decoder_dims'] = [256, 128, 64, 16] +config_a['cvae']['kernel_size'] = 7 +config_a['cvae']['encoder_depths'] = [3, 3, 9, 3] +config_a['cvae']['encoder_dims'] = [32, 64, 128, 256] +config_a['cvae']['decoder_input'] = (16, 8, 80) +config_a['cvae']['decoder_depths'] = [3, 3, 9, 3] +config_a['cvae']['decoder_dims'] = [256, 128, 64, 16] -config['cond_ae'] = dict() -config['cond_ae']['is_label'] = False -config['cond_ae']['upscale_output'] = False -config['cond_ae']['latent_dim'] = config['latent_dim'] -config['cond_ae']['kernel_size'] = 7 -config['cond_ae']['bottleneck_size'] = 64 -config['cond_ae']['encoder_depths'] = [3, 3, 9, 9, 3] -config['cond_ae']['encoder_dims'] = [32, 64, 128, 256, config['cond_ae']['bottleneck_size']] -config['cond_ae']['decoder_input'] = (8, 4, config['cond_ae']['bottleneck_size']) -config['cond_ae']['decoder_depths'] = [3, 3, 9, 3, 3] -config['cond_ae']['decoder_dims'] = [config['cond_ae']['bottleneck_size'], 256, 128, 64, 16] +config_a['cond_ae'] = dict() +config_a['cond_ae']['is_label'] = False +config_a['cond_ae']['upscale_output'] = False +config_a['cond_ae']['latent_dim'] = config_a['latent_dim'] +config_a['cond_ae']['kernel_size'] = 7 +config_a['cond_ae']['bottleneck_size'] = 64 +config_a['cond_ae']['encoder_depths'] = [3, 3, 9, 9, 3] +config_a['cond_ae']['encoder_dims'] = [32, 64, 128, 256, config_a['cond_ae']['bottleneck_size']] +config_a['cond_ae']['decoder_input'] = (8, 4, config_a['cond_ae']['bottleneck_size']) +config_a['cond_ae']['decoder_depths'] = [3, 3, 9, 3, 3] +config_a['cond_ae']['decoder_dims'] = [config_a['cond_ae']['bottleneck_size'], 256, 128, 64, 16] -config['cond_ae_body'] = dict() -config['cond_ae_body']['latent_dim'] = config['latent_dim'] -config['cond_ae_body']['kernel_size'] = 7 -config['cond_ae_body']['upscale_output'] = True -config['cond_ae_body']['bottleneck_size'] = 512 -config['cond_ae_body']['encoder_depths'] = [3, 3, 9, 9, 3, 3] -config['cond_ae_body']['encoder_dims'] = [32, 64, 128, 256, 256, config['cond_ae_body']['bottleneck_size']] -config['cond_ae_body']['decoder_input'] = (4, 2, config['cond_ae_body']['bottleneck_size']) -config['cond_ae_body']['decoder_depths'] = [3, 3, 9, 3] -config['cond_ae_body']['decoder_dims'] = [config['cond_ae_body']['bottleneck_size'], 128, 64, 16] +config_a['cond_ae_body'] = dict() +config_a['cond_ae_body']['latent_dim'] = config_a['latent_dim'] +config_a['cond_ae_body']['kernel_size'] = 7 +config_a['cond_ae_body']['upscale_output'] = True +config_a['cond_ae_body']['bottleneck_size'] = 512 +config_a['cond_ae_body']['encoder_depths'] = [3, 3, 9, 9, 3, 3] +config_a['cond_ae_body']['encoder_dims'] = [32, 64, 128, 256, 256, config_a['cond_ae_body']['bottleneck_size']] +config_a['cond_ae_body']['decoder_input'] = (4, 2, config_a['cond_ae_body']['bottleneck_size']) +config_a['cond_ae_body']['decoder_depths'] = [3, 3, 9, 3] +config_a['cond_ae_body']['decoder_dims'] = [config_a['cond_ae_body']['bottleneck_size'], 128, 64, 16] diff --git a/configs/config_abl_skin_var.py b/configs/config_abl_skin_var.py new file mode 100644 index 0000000..8c9d21f --- /dev/null +++ b/configs/config_abl_skin_var.py @@ -0,0 +1,116 @@ +config = dict() + +# DON'T FORGET TO RESET SSIM LOSS USAGE +# DON'T FORGET TO CHECK MODEL LOADING +# DON'T FORGET TO CHECK IF STORE IN MEMORY +# DON'T FORGET TO CHECK REG LOSS COEFF +# DON'T FORGET TO LOAD FINAL UPSCALER UNLESS HAVE LEVEL 512 +# DON'T FORGET TO CHECK AVG GARMENT USED + +config['use_skinning'] = False # and deshaping +config['remove_global_orientation'] = True +config['use_curvature'] = True +config['use_extra_losses'] = True # edge, collision, 3d mesh +config['use_offsets'] = True + +config['use_norm_loss'] = False + +ablation_count = [config['use_skinning'], config['remove_global_orientation'], config['use_curvature'], config['use_extra_losses'], config['use_offsets']].count(False) + +config['gpu'] = '2' +config['name'] = 'abl_skin_var' +config['notes'] = '' + +config['avg_garment_path'] = '' #custom_data/train_no_shape_avg_uv.npy # train_no_shape_avg_uv train_no_shape_one_hot_avg_uv +if config['use_skinning']: + assert (config['use_offsets'] and config['avg_garment_path'] != '') or (not config['use_offsets'] and config['avg_garment_path'] == '') + +config['reg_loss_coeff'] = 0.1 # set to 0 if don't want to use edge+collision + +config['batch_size'] = 4 +config['resolution'] = 512 +config['is_skirt'] = False +config['dataset_in_memory'] = False +config['is_cape'] = False + +config['train_dir'] = '/home/workspace/local-data/train' +config['valid_dir'] = '/home/workspace/local-data/valid' +config['test_dir'] = '/home/workspace/data/dataset/test_ready' + +config['static_model'] = 'checkpoints/static_1' +config['body_model'] = 'checkpoints/body_1' +config['curvature_model'] = 'checkpoints/curv_1' + + +config['smpl_res'] = 14475 +if config['is_cape']: + config['smpl_res'] = 3638 + +config['latent_dim'] = 128 + +config['pretrained_model'] = '' + +############### +config['lr'] = 0.0001# 0.0001 +############### +config['starting_balancing_coeff'] = 0.01 + +config['signature_dynamic'] = { 'id': (), 'frame_nr': (), + 'pose_shape': (72 + 11,), + 'uv_body_posed': (512, 256, 3), + 'mesh_body_posed': (14475, 3,), + 'mesh_posed': (14475, 3,), + 'uv_curvature': (512, 256, 7), + } +config['signature_static'] = { 'uv_static': (512, 256, 3), + 'mesh_mask': (14475,), + 'uv_mask': (512, 256,), + } + +if config['use_skinning']: + config['signature_dynamic']['uv_unposed'] = (512, 256, 3) + config['signature_dynamic']['mesh_unposed'] = (14475, 3,) +else: + config['signature_dynamic']['uv_posed'] = (512, 256, 3) + + +config['upscale_enhancer'] = '' +config['freeze_encoders'] = True +config['use_one_hot'] = False + +config['cvae'] = dict() +config['cvae']['is_label'] = False +config['cvae']['latent_dim'] = config['latent_dim'] +config['cvae']['add_noise'] = False +config['cvae']['noise_amount'] = 0.025 + +config['cvae']['kernel_size'] = 7 +config['cvae']['encoder_depths'] = [3, 3, 9, 3] +config['cvae']['encoder_dims'] = [32, 64, 128, 256] +config['cvae']['decoder_input'] = (16, 8, 80) +config['cvae']['decoder_depths'] = [3, 3, 9, 3] +config['cvae']['decoder_dims'] = [256, 128, 64, 16] + + +config['cond_ae'] = dict() +config['cond_ae']['is_label'] = False +config['cond_ae']['upscale_output'] = False +config['cond_ae']['latent_dim'] = config['latent_dim'] +config['cond_ae']['kernel_size'] = 7 +config['cond_ae']['bottleneck_size'] = 64 +config['cond_ae']['encoder_depths'] = [3, 3, 9, 9, 3] +config['cond_ae']['encoder_dims'] = [32, 64, 128, 256, config['cond_ae']['bottleneck_size']] +config['cond_ae']['decoder_input'] = (8, 4, config['cond_ae']['bottleneck_size']) +config['cond_ae']['decoder_depths'] = [3, 3, 9, 3, 3] +config['cond_ae']['decoder_dims'] = [config['cond_ae']['bottleneck_size'], 256, 128, 64, 16] + +config['cond_ae_body'] = dict() +config['cond_ae_body']['latent_dim'] = config['latent_dim'] +config['cond_ae_body']['kernel_size'] = 7 +config['cond_ae_body']['upscale_output'] = True +config['cond_ae_body']['bottleneck_size'] = 512 +config['cond_ae_body']['encoder_depths'] = [3, 3, 9, 9, 3, 3] +config['cond_ae_body']['encoder_dims'] = [32, 64, 128, 256, 256, config['cond_ae_body']['bottleneck_size']] +config['cond_ae_body']['decoder_input'] = (4, 2, config['cond_ae_body']['bottleneck_size']) +config['cond_ae_body']['decoder_depths'] = [3, 3, 9, 3] +config['cond_ae_body']['decoder_dims'] = [config['cond_ae_body']['bottleneck_size'], 128, 64, 16] diff --git a/configs/config_abl_skin_var_2.py b/configs/config_abl_skin_var_2.py new file mode 100644 index 0000000..daf1500 --- /dev/null +++ b/configs/config_abl_skin_var_2.py @@ -0,0 +1,116 @@ +config = dict() + +# DON'T FORGET TO RESET SSIM LOSS USAGE +# DON'T FORGET TO CHECK MODEL LOADING +# DON'T FORGET TO CHECK IF STORE IN MEMORY +# DON'T FORGET TO CHECK REG LOSS COEFF +# DON'T FORGET TO LOAD FINAL UPSCALER UNLESS HAVE LEVEL 512 +# DON'T FORGET TO CHECK AVG GARMENT USED + +config['use_skinning'] = False # and deshaping +config['remove_global_orientation'] = True +config['use_curvature'] = True +config['use_extra_losses'] = True # edge, collision, 3d mesh +config['use_offsets'] = True + +config['use_norm_loss'] = False + +ablation_count = [config['use_skinning'], config['remove_global_orientation'], config['use_curvature'], config['use_extra_losses'], config['use_offsets']].count(False) + +config['gpu'] = '3' +config['name'] = 'abl_skin_var_2' +config['notes'] = '' + +config['avg_garment_path'] = '' #custom_data/train_no_shape_avg_uv.npy # train_no_shape_avg_uv train_no_shape_one_hot_avg_uv +if config['use_skinning']: + assert (config['use_offsets'] and config['avg_garment_path'] != '') or (not config['use_offsets'] and config['avg_garment_path'] == '') + +config['reg_loss_coeff'] = 0.1 # set to 0 if don't want to use edge+collision + +config['batch_size'] = 4 +config['resolution'] = 512 +config['is_skirt'] = False +config['dataset_in_memory'] = False +config['is_cape'] = False + +config['train_dir'] = '/home/workspace/local-data/train' +config['valid_dir'] = '/home/workspace/local-data/valid' +config['test_dir'] = '/home/workspace/data/dataset/test_ready' + +config['static_model'] = 'checkpoints/static_1' +config['body_model'] = 'checkpoints/body_1' +config['curvature_model'] = 'checkpoints/curv_1' + + +config['smpl_res'] = 14475 +if config['is_cape']: + config['smpl_res'] = 3638 + +config['latent_dim'] = 128 + +config['pretrained_model'] = 'checkpoints/abl_skin' + +############### +config['lr'] = 0.0001# 0.0001 +############### +config['starting_balancing_coeff'] = 0.01 + +config['signature_dynamic'] = { 'id': (), 'frame_nr': (), + 'pose_shape': (72 + 11,), + 'uv_body_posed': (512, 256, 3), + 'mesh_body_posed': (14475, 3,), + 'mesh_posed': (14475, 3,), + 'uv_curvature': (512, 256, 7), + } +config['signature_static'] = { 'uv_static': (512, 256, 3), + 'mesh_mask': (14475,), + 'uv_mask': (512, 256,), + } + +if config['use_skinning']: + config['signature_dynamic']['uv_unposed'] = (512, 256, 3) + config['signature_dynamic']['mesh_unposed'] = (14475, 3,) +else: + config['signature_dynamic']['uv_posed'] = (512, 256, 3) + + +config['upscale_enhancer'] = '' +config['freeze_encoders'] = True +config['use_one_hot'] = False + +config['cvae'] = dict() +config['cvae']['is_label'] = False +config['cvae']['latent_dim'] = config['latent_dim'] +config['cvae']['add_noise'] = False +config['cvae']['noise_amount'] = 0.025 + +config['cvae']['kernel_size'] = 7 +config['cvae']['encoder_depths'] = [3, 3, 9, 3] +config['cvae']['encoder_dims'] = [32, 64, 128, 256] +config['cvae']['decoder_input'] = (16, 8, 80) +config['cvae']['decoder_depths'] = [3, 3, 9, 3] +config['cvae']['decoder_dims'] = [256, 128, 64, 16] + + +config['cond_ae'] = dict() +config['cond_ae']['is_label'] = False +config['cond_ae']['upscale_output'] = False +config['cond_ae']['latent_dim'] = config['latent_dim'] +config['cond_ae']['kernel_size'] = 7 +config['cond_ae']['bottleneck_size'] = 64 +config['cond_ae']['encoder_depths'] = [3, 3, 9, 9, 3] +config['cond_ae']['encoder_dims'] = [32, 64, 128, 256, config['cond_ae']['bottleneck_size']] +config['cond_ae']['decoder_input'] = (8, 4, config['cond_ae']['bottleneck_size']) +config['cond_ae']['decoder_depths'] = [3, 3, 9, 3, 3] +config['cond_ae']['decoder_dims'] = [config['cond_ae']['bottleneck_size'], 256, 128, 64, 16] + +config['cond_ae_body'] = dict() +config['cond_ae_body']['latent_dim'] = config['latent_dim'] +config['cond_ae_body']['kernel_size'] = 7 +config['cond_ae_body']['upscale_output'] = True +config['cond_ae_body']['bottleneck_size'] = 512 +config['cond_ae_body']['encoder_depths'] = [3, 3, 9, 9, 3, 3] +config['cond_ae_body']['encoder_dims'] = [32, 64, 128, 256, 256, config['cond_ae_body']['bottleneck_size']] +config['cond_ae_body']['decoder_input'] = (4, 2, config['cond_ae_body']['bottleneck_size']) +config['cond_ae_body']['decoder_depths'] = [3, 3, 9, 3] +config['cond_ae_body']['decoder_dims'] = [config['cond_ae_body']['bottleneck_size'], 128, 64, 16] diff --git a/configs/config_abl_skin_var_3.py b/configs/config_abl_skin_var_3.py new file mode 100644 index 0000000..08ea00e --- /dev/null +++ b/configs/config_abl_skin_var_3.py @@ -0,0 +1,116 @@ +config = dict() + +# DON'T FORGET TO RESET SSIM LOSS USAGE +# DON'T FORGET TO CHECK MODEL LOADING +# DON'T FORGET TO CHECK IF STORE IN MEMORY +# DON'T FORGET TO CHECK REG LOSS COEFF +# DON'T FORGET TO LOAD FINAL UPSCALER UNLESS HAVE LEVEL 512 +# DON'T FORGET TO CHECK AVG GARMENT USED + +config['use_skinning'] = False # and deshaping +config['remove_global_orientation'] = True +config['use_curvature'] = True +config['use_extra_losses'] = True # edge, collision, 3d mesh +config['use_offsets'] = True + +config['use_norm_loss'] = False + +ablation_count = [config['use_skinning'], config['remove_global_orientation'], config['use_curvature'], config['use_extra_losses'], config['use_offsets']].count(False) + +config['gpu'] = '3' +config['name'] = 'abl_skin_var_3' +config['notes'] = '' + +config['avg_garment_path'] = '' #custom_data/train_no_shape_avg_uv.npy # train_no_shape_avg_uv train_no_shape_one_hot_avg_uv +if config['use_skinning']: + assert (config['use_offsets'] and config['avg_garment_path'] != '') or (not config['use_offsets'] and config['avg_garment_path'] == '') + +config['reg_loss_coeff'] = 0.1 # set to 0 if don't want to use edge+collision + +config['batch_size'] = 4 +config['resolution'] = 512 +config['is_skirt'] = False +config['dataset_in_memory'] = False +config['is_cape'] = False + +config['train_dir'] = '/home/workspace/local-data/train' +config['valid_dir'] = '/home/workspace/local-data/valid' +config['test_dir'] = '/home/workspace/data/dataset/test_ready' + +config['static_model'] = 'checkpoints/static_1' +config['body_model'] = 'checkpoints/body_1' +config['curvature_model'] = 'checkpoints/curv_1' + + +config['smpl_res'] = 14475 +if config['is_cape']: + config['smpl_res'] = 3638 + +config['latent_dim'] = 128 + +config['pretrained_model'] = 'checkpoints/abl_skin' + +############### +config['lr'] = 0.0001# 0.0001 +############### +config['starting_balancing_coeff'] = 1.0 + +config['signature_dynamic'] = { 'id': (), 'frame_nr': (), + 'pose_shape': (72 + 11,), + 'uv_body_posed': (512, 256, 3), + 'mesh_body_posed': (14475, 3,), + 'mesh_posed': (14475, 3,), + 'uv_curvature': (512, 256, 7), + } +config['signature_static'] = { 'uv_static': (512, 256, 3), + 'mesh_mask': (14475,), + 'uv_mask': (512, 256,), + } + +if config['use_skinning']: + config['signature_dynamic']['uv_unposed'] = (512, 256, 3) + config['signature_dynamic']['mesh_unposed'] = (14475, 3,) +else: + config['signature_dynamic']['uv_posed'] = (512, 256, 3) + + +config['upscale_enhancer'] = '' +config['freeze_encoders'] = True +config['use_one_hot'] = False + +config['cvae'] = dict() +config['cvae']['is_label'] = False +config['cvae']['latent_dim'] = config['latent_dim'] +config['cvae']['add_noise'] = False +config['cvae']['noise_amount'] = 0.025 + +config['cvae']['kernel_size'] = 7 +config['cvae']['encoder_depths'] = [3, 3, 9, 3] +config['cvae']['encoder_dims'] = [32, 64, 128, 256] +config['cvae']['decoder_input'] = (16, 8, 80) +config['cvae']['decoder_depths'] = [3, 3, 9, 3] +config['cvae']['decoder_dims'] = [256, 128, 64, 16] + + +config['cond_ae'] = dict() +config['cond_ae']['is_label'] = False +config['cond_ae']['upscale_output'] = False +config['cond_ae']['latent_dim'] = config['latent_dim'] +config['cond_ae']['kernel_size'] = 7 +config['cond_ae']['bottleneck_size'] = 64 +config['cond_ae']['encoder_depths'] = [3, 3, 9, 9, 3] +config['cond_ae']['encoder_dims'] = [32, 64, 128, 256, config['cond_ae']['bottleneck_size']] +config['cond_ae']['decoder_input'] = (8, 4, config['cond_ae']['bottleneck_size']) +config['cond_ae']['decoder_depths'] = [3, 3, 9, 3, 3] +config['cond_ae']['decoder_dims'] = [config['cond_ae']['bottleneck_size'], 256, 128, 64, 16] + +config['cond_ae_body'] = dict() +config['cond_ae_body']['latent_dim'] = config['latent_dim'] +config['cond_ae_body']['kernel_size'] = 7 +config['cond_ae_body']['upscale_output'] = True +config['cond_ae_body']['bottleneck_size'] = 512 +config['cond_ae_body']['encoder_depths'] = [3, 3, 9, 9, 3, 3] +config['cond_ae_body']['encoder_dims'] = [32, 64, 128, 256, 256, config['cond_ae_body']['bottleneck_size']] +config['cond_ae_body']['decoder_input'] = (4, 2, config['cond_ae_body']['bottleneck_size']) +config['cond_ae_body']['decoder_depths'] = [3, 3, 9, 3] +config['cond_ae_body']['decoder_dims'] = [config['cond_ae_body']['bottleneck_size'], 128, 64, 16] diff --git a/configs/config_abl_skin_var_4.py b/configs/config_abl_skin_var_4.py new file mode 100644 index 0000000..855b8b6 --- /dev/null +++ b/configs/config_abl_skin_var_4.py @@ -0,0 +1,117 @@ +config = dict() + +# DON'T FORGET TO RESET SSIM LOSS USAGE +# DON'T FORGET TO CHECK MODEL LOADING +# DON'T FORGET TO CHECK IF STORE IN MEMORY +# DON'T FORGET TO CHECK REG LOSS COEFF +# DON'T FORGET TO LOAD FINAL UPSCALER UNLESS HAVE LEVEL 512 +# DON'T FORGET TO CHECK AVG GARMENT USED + +config['use_skinning'] = False # and deshaping +config['remove_global_orientation'] = True +config['use_curvature'] = True +config['use_extra_losses'] = True # edge, collision, 3d mesh +config['use_offsets'] = True + +config['use_norm_loss'] = False + +ablation_count = [config['use_skinning'], config['remove_global_orientation'], config['use_curvature'], config['use_extra_losses'], config['use_offsets']].count(False) + +config['gpu'] = '2' +config['name'] = 'abl_skin_var_4' +config['notes'] = 'lower noise, don\'t increase balancing coeff' + +config['avg_garment_path'] = '' #custom_data/train_no_shape_avg_uv.npy # train_no_shape_avg_uv train_no_shape_one_hot_avg_uv +if config['use_skinning']: + assert (config['use_offsets'] and config['avg_garment_path'] != '') or (not config['use_offsets'] and config['avg_garment_path'] == '') + +config['reg_loss_coeff'] = 0.1 # set to 0 if don't want to use edge+collision + +config['batch_size'] = 4 +config['resolution'] = 512 +config['is_skirt'] = False +config['dataset_in_memory'] = False +config['is_cape'] = False + +config['train_dir'] = '/home/workspace/local-data/train' +config['valid_dir'] = '/home/workspace/local-data/valid' +config['test_dir'] = '/home/workspace/data/dataset/test_ready' + +config['static_model'] = 'checkpoints/static_1' +config['body_model'] = 'checkpoints/body_1' +config['curvature_model'] = 'checkpoints/curv_1' + + +config['smpl_res'] = 14475 +if config['is_cape']: + config['smpl_res'] = 3638 + +config['latent_dim'] = 128 + +config['pretrained_model'] = '' + +############### +config['lr'] = 0.0001# 0.0001 +############### +config['starting_balancing_coeff'] = 0.01 +config['balancing_activation_limit'] = 0.0 + +config['signature_dynamic'] = { 'id': (), 'frame_nr': (), + 'pose_shape': (72 + 11,), + 'uv_body_posed': (512, 256, 3), + 'mesh_body_posed': (14475, 3,), + 'mesh_posed': (14475, 3,), + 'uv_curvature': (512, 256, 7), + } +config['signature_static'] = { 'uv_static': (512, 256, 3), + 'mesh_mask': (14475,), + 'uv_mask': (512, 256,), + } + +if config['use_skinning']: + config['signature_dynamic']['uv_unposed'] = (512, 256, 3) + config['signature_dynamic']['mesh_unposed'] = (14475, 3,) +else: + config['signature_dynamic']['uv_posed'] = (512, 256, 3) + + +config['upscale_enhancer'] = '' +config['freeze_encoders'] = True +config['use_one_hot'] = False + +config['cvae'] = dict() +config['cvae']['is_label'] = False +config['cvae']['latent_dim'] = config['latent_dim'] +config['cvae']['add_noise'] = False +config['cvae']['noise_amount'] = 0.001 + +config['cvae']['kernel_size'] = 7 +config['cvae']['encoder_depths'] = [3, 3, 9, 3] +config['cvae']['encoder_dims'] = [32, 64, 128, 256] +config['cvae']['decoder_input'] = (16, 8, 80) +config['cvae']['decoder_depths'] = [3, 3, 9, 3] +config['cvae']['decoder_dims'] = [256, 128, 64, 16] + + +config['cond_ae'] = dict() +config['cond_ae']['is_label'] = False +config['cond_ae']['upscale_output'] = False +config['cond_ae']['latent_dim'] = config['latent_dim'] +config['cond_ae']['kernel_size'] = 7 +config['cond_ae']['bottleneck_size'] = 64 +config['cond_ae']['encoder_depths'] = [3, 3, 9, 9, 3] +config['cond_ae']['encoder_dims'] = [32, 64, 128, 256, config['cond_ae']['bottleneck_size']] +config['cond_ae']['decoder_input'] = (8, 4, config['cond_ae']['bottleneck_size']) +config['cond_ae']['decoder_depths'] = [3, 3, 9, 3, 3] +config['cond_ae']['decoder_dims'] = [config['cond_ae']['bottleneck_size'], 256, 128, 64, 16] + +config['cond_ae_body'] = dict() +config['cond_ae_body']['latent_dim'] = config['latent_dim'] +config['cond_ae_body']['kernel_size'] = 7 +config['cond_ae_body']['upscale_output'] = True +config['cond_ae_body']['bottleneck_size'] = 512 +config['cond_ae_body']['encoder_depths'] = [3, 3, 9, 9, 3, 3] +config['cond_ae_body']['encoder_dims'] = [32, 64, 128, 256, 256, config['cond_ae_body']['bottleneck_size']] +config['cond_ae_body']['decoder_input'] = (4, 2, config['cond_ae_body']['bottleneck_size']) +config['cond_ae_body']['decoder_depths'] = [3, 3, 9, 3] +config['cond_ae_body']['decoder_dims'] = [config['cond_ae_body']['bottleneck_size'], 128, 64, 16] diff --git a/configs/config_ae_body.py b/configs/config_ae_body.py index 5f50b51..339b196 100644 --- a/configs/config_ae_body.py +++ b/configs/config_ae_body.py @@ -1,8 +1,8 @@ from configs.config_base import config -config['gpu'] = '1' +config['gpu'] = '2' config['lr'] = 0.0001 -config['name'] = 'body_1' +config['name'] = 'body_1_skirt_2_2' config['notes'] = 'convnext + convnext, add dense with tanh at the end of reverse convnext, | \ flattened bottleneck with 128 latent_dim\ remove global orientation | \ @@ -12,13 +12,13 @@ config['notes'] = 'convnext + convnext, add dense with tanh at the end of revers larger bottleneck, low res output upscaled | \ larger batch size, 32 instead of 4 | \ calculate euclidean error on whole body, not just garment masked | \ + continued from body_1_skirt_2 | \ ' config['dataset_in_memory'] = False config['batch_size'] = 32 - -config['signature_dynamic'] = { 'id': (), +config['signature_dynamic'] = { 'id': (), 'frame_nr': (), 'pose_shape': (72 + 11,), 'uv_body_posed': (3, 512, 256,), 'mesh_body_posed': (config['smpl_res'], 3,), diff --git a/configs/config_ae_curv.py b/configs/config_ae_curv.py index b4718b6..7f52774 100644 --- a/configs/config_ae_curv.py +++ b/configs/config_ae_curv.py @@ -9,7 +9,7 @@ config['notes'] = 'convnext + convnext, 16*8*32, ce loss. flattened latent dim o config['cond_ae']['is_label'] = True -config['signature_dynamic'] = { 'id': (), +config['signature_dynamic'] = { 'id': (), 'frame_nr': (), 'uv_curvature': (512, 256, 7), 'mesh_curvature': (config['smpl_res']) } diff --git a/configs/config_ae_static.py b/configs/config_ae_static.py index 317be2f..0f5b031 100644 --- a/configs/config_ae_static.py +++ b/configs/config_ae_static.py @@ -14,7 +14,7 @@ config['cond_ae']['upscale_output'] = False config['pretrained_model'] = '' -config['signature_dynamic'] = { 'id': (), } +config['signature_dynamic'] = { 'id': (), 'frame_nr': (), } config['signature_static'] = { 'uv_static': (512, 256, 3), 'mesh_static': (config['smpl_res'], 3,), 'mesh_mask': (config['smpl_res'],), diff --git a/configs/config_base.py b/configs/config_base.py index 90fd95b..34ca867 100644 --- a/configs/config_base.py +++ b/configs/config_base.py @@ -2,13 +2,24 @@ config = dict() config['batch_size'] = 4 +# config['train_dir'] = '/home/workspace/local-data/cape_processed/train/female' +# config['valid_dir'] = '/home/workspace/local-data/cape_processed/test/female' +# config['test_dir'] = '/home/workspace/local-data/cape_processed/test/female' config['train_dir'] = '/home/workspace/local-data/train' config['valid_dir'] = '/home/workspace/local-data/valid' config['test_dir'] = '/home/workspace/data/dataset/test_ready' +# config['train_dir'] = '/home/workspace/local-data/train_skirt' +# config['valid_dir'] = '/home/workspace/local-data/valid_skirt' +# config['test_dir'] = '/home/workspace/local-data/test_skirt_ready' config['use_filled'] = False config['resolution'] = 512 config['is_skirt'] = False config['dataset_in_memory'] = False +config['is_cape'] = False + +config['smpl_res'] = 14475 +if config['is_cape']: + config['smpl_res'] = 3638 config['latent_dim'] = 128 diff --git a/configs/config_cvae.json b/configs/config_cvae.json new file mode 100644 index 0000000..c52ec65 --- /dev/null +++ b/configs/config_cvae.json @@ -0,0 +1,190 @@ +{ + "batch_size": 4, + "train_dir": "/home/workspace/local-data/train", + "valid_dir": "/home/workspace/local-data/valid", + "test_dir": "/home/workspace/data/dataset/test_ready", + "use_filled": false, + "resolution": 512, + "is_skirt": false, + "dataset_in_memory": false, + "is_cape": false, + "smpl_res": 14475, + "latent_dim": 128, + "cond_ae": { + "is_label": false, + "upscale_output": false, + "latent_dim": 128, + "kernel_size": 7, + "bottleneck_size": 64, + "encoder_depths": [ + 3, + 3, + 9, + 9, + 3 + ], + "encoder_dims": [ + 32, + 64, + 128, + 256, + 64 + ], + "decoder_input": [ + 8, + 4, + 64 + ], + "decoder_depths": [ + 3, + 3, + 9, + 3, + 3 + ], + "decoder_dims": [ + 64, + 256, + 128, + 64, + 16 + ] + }, + "cond_ae_body": { + "latent_dim": 128, + "kernel_size": 7, + "upscale_output": true, + "bottleneck_size": 512, + "encoder_depths": [ + 3, + 3, + 9, + 9, + 3, + 3 + ], + "encoder_dims": [ + 32, + 64, + 128, + 256, + 256, + 512 + ], + "decoder_input": [ + 4, + 2, + 512 + ], + "decoder_depths": [ + 3, + 3, + 9, + 3 + ], + "decoder_dims": [ + 512, + 128, + 64, + 16 + ] + }, + "gpu": "0", + "name": "v2_7_4_3", + "notes": "offsets over average unposed garment. remove global orientation (in posed body input and in pose_shape parameters. | retrained body encoder with deoriented bodies | use mean l2 loss. small batch. l2 * 1000, balancing to 1 from 0.01 | fixed gender issue and retrained body encoder, FINAL | remove shape from unposed garment | training on 100 garments with offsets over the average of these | fixed autoencoders!!!!!!!!! | cvae only loads encoders instead AEs | increase balancing coeff sooner | use 3d mesh loss | add final gc layer | starting from v2_5_2, add tanh to cond_enc last layer | NOT using one-hot skinning | using new average garment with one-hot versions | fix collision for plotting | use 3d mesh loss | ", + "pretrained_model": "checkpoints/v2_5_2", + "reg_loss_coeff": 0.1, + "l2_coeff": 1, + "lr": 0.0001, + "starting_balancing_coeff": 0.0001, + "signature_dynamic": { + "id": [], + "pose_shape": [ + 83 + ], + "uv_body_posed": [ + 512, + 256, + 3 + ], + "mesh_body_posed": [ + 14475, + 3 + ], + "mesh_posed": [ + 14475, + 3 + ], + "mesh_unposed": [ + 14475, + 3 + ], + "uv_unposed": [ + 512, + 256, + 3 + ], + "uv_curvature": [ + 512, + 256, + 7 + ] + }, + "signature_static": { + "uv_static": [ + 512, + 256, + 3 + ], + "mesh_mask": [ + 14475 + ], + "uv_mask": [ + 512, + 256 + ] + }, + "avg_garment_path": "custom_data/train_no_shape_avg_uv.npy", + "static_model": "checkpoints/static_1", + "body_model": "checkpoints/body_1", + "curvature_model": "checkpoints/curv_1", + "upscale_enhancer": "", + "freeze_encoders": true, + "use_one_hot": false, + "cvae": { + "is_label": false, + "latent_dim": 128, + "add_noise": true, + "noise_amount": 0.025, + "kernel_size": 7, + "encoder_depths": [ + 3, + 3, + 9, + 3 + ], + "encoder_dims": [ + 32, + 64, + 128, + 256 + ], + "decoder_input": [ + 16, + 8, + 80 + ], + "decoder_depths": [ + 3, + 3, + 9, + 3 + ], + "decoder_dims": [ + 256, + 128, + 64, + 16 + ] + } +} \ No newline at end of file diff --git a/configs/config_cvae.py b/configs/config_cvae.py index c7aa603..9d28e74 100644 --- a/configs/config_cvae.py +++ b/configs/config_cvae.py @@ -1,7 +1,7 @@ from configs.config_base import config -config['gpu'] = '0' -config['name'] = 'v2_7_4_3' +config['gpu'] = '1' +config['name'] = 'v2_7_4_4' config['notes'] = '\ offsets over average unposed garment. remove global orientation (in posed body input and in pose_shape parameters. | \ retrained body encoder with deoriented bodies | \ @@ -19,6 +19,7 @@ NOT using one-hot skinning | \ using new average garment with one-hot versions | \ fix collision for plotting | \ use 3d mesh loss | \ +higher reg coeff | \ ' config['dataset_in_memory'] = False @@ -34,7 +35,7 @@ config['pretrained_model'] = 'checkpoints/v2_5_2' config['resolution'] = 512 config['is_skirt'] = False -config['reg_loss_coeff'] = 0.1 # set to 0 if don't want to use edge+collision +config['reg_loss_coeff'] = 1 # set to 0 if don't want to use edge+collision config['l2_coeff'] = 1 if config['resolution'] != 512: @@ -47,7 +48,7 @@ config['lr'] = 0.0001# 0.0001 ############### config['starting_balancing_coeff'] = 0.0001 -config['signature_dynamic'] = { 'id': (), +config['signature_dynamic'] = { 'id': (), 'frame_nr': (), 'pose_shape': (72 + 11,), 'uv_body_posed': (512, 256, 3), 'mesh_body_posed': (14475, 3,), diff --git a/configs/config_cvae_2.json b/configs/config_cvae_2.json new file mode 100644 index 0000000..bac4812 --- /dev/null +++ b/configs/config_cvae_2.json @@ -0,0 +1 @@ +{"batch_size": 4, "train_dir": "/home/workspace/local-data/train", "valid_dir": "/home/workspace/local-data/valid", "test_dir": "/home/workspace/data/dataset/test_ready", "use_filled": false, "resolution": 512, "is_skirt": false, "dataset_in_memory": false, "is_cape": false, "smpl_res": 14475, "latent_dim": 128, "cond_ae": {"is_label": false, "upscale_output": false, "latent_dim": 128, "kernel_size": 7, "bottleneck_size": 64, "encoder_depths": [3, 3, 9, 9, 3], "encoder_dims": [32, 64, 128, 256, 64], "decoder_input": [8, 4, 64], "decoder_depths": [3, 3, 9, 3, 3], "decoder_dims": [64, 256, 128, 64, 16]}, "cond_ae_body": {"latent_dim": 128, "kernel_size": 7, "upscale_output": true, "bottleneck_size": 512, "encoder_depths": [3, 3, 9, 9, 3, 3], "encoder_dims": [32, 64, 128, 256, 256, 512], "decoder_input": [4, 2, 512], "decoder_depths": [3, 3, 9, 3], "decoder_dims": [512, 128, 64, 16]}, "gpu": "0", "name": "v2_7_4_3", "notes": "offsets over average unposed garment. remove global orientation (in posed body input and in pose_shape parameters. | retrained body encoder with deoriented bodies | use mean l2 loss. small batch. l2 * 1000, balancing to 1 from 0.01 | fixed gender issue and retrained body encoder, FINAL | remove shape from unposed garment | training on 100 garments with offsets over the average of these | fixed autoencoders!!!!!!!!! | cvae only loads encoders instead AEs | increase balancing coeff sooner | use 3d mesh loss | add final gc layer | starting from v2_5_2, add tanh to cond_enc last layer | NOT using one-hot skinning | using new average garment with one-hot versions | fix collision for plotting | use 3d mesh loss | ", "pretrained_model": "checkpoints/v2_5_2", "reg_loss_coeff": 0.1, "l2_coeff": 1, "lr": 0.0001, "starting_balancing_coeff": 0.0001, "signature_dynamic": {"id": [], "pose_shape": [83], "uv_body_posed": [512, 256, 3], "mesh_body_posed": [14475, 3], "mesh_posed": [14475, 3], "mesh_unposed": [14475, 3], "uv_unposed": [512, 256, 3], "uv_curvature": [512, 256, 7]}, "signature_static": {"uv_static": [512, 256, 3], "mesh_mask": [14475], "uv_mask": [512, 256]}, "avg_garment_path": "custom_data/train_no_shape_avg_uv.npy", "static_model": "checkpoints/static_1", "body_model": "checkpoints/body_1", "curvature_model": "checkpoints/curv_1", "upscale_enhancer": "", "freeze_encoders": true, "use_one_hot": false, "cvae": {"is_label": false, "latent_dim": 128, "add_noise": true, "noise_amount": 0.025, "kernel_size": 7, "encoder_depths": [3, 3, 9, 3], "encoder_dims": [32, 64, 128, 256], "decoder_input": [16, 8, 80], "decoder_depths": [3, 3, 9, 3], "decoder_dims": [256, 128, 64, 16]}} \ No newline at end of file diff --git a/configs/config_cvae_curv.py b/configs/config_cvae_curv.py new file mode 100644 index 0000000..30baf6d --- /dev/null +++ b/configs/config_cvae_curv.py @@ -0,0 +1,90 @@ +config = dict() + +config['gpu'] = '2' +config['name'] = 'cvae_curv' +config['notes'] = '' + +config['reg_loss_coeff'] = 0.1 # set to 0 if don't want to use edge+collision + +config['batch_size'] = 4 +config['resolution'] = 512 +config['is_skirt'] = False +config['dataset_in_memory'] = False +config['is_cape'] = False + +config['train_dir'] = '/home/workspace/local-data/train' +config['valid_dir'] = '/home/workspace/local-data/valid' +config['test_dir'] = '/home/workspace/data/dataset/test_ready' + +config['static_model'] = 'checkpoints/static_1' +config['body_model'] = 'checkpoints/body_1' +config['curvature_model'] = 'checkpoints/curv_1' + + +config['smpl_res'] = 14475 +if config['is_cape']: + config['smpl_res'] = 3638 + +config['latent_dim'] = 128 + +config['pretrained_model'] = '' + +############### +config['lr'] = 0.0001# 0.0001 +############### +config['starting_balancing_coeff'] = 0.1 + +config['signature_dynamic'] = { 'id': (), 'frame_nr': (), + 'pose_shape': (72 + 11,), + 'uv_body_posed': (512, 256, 3), + 'mesh_body_posed': (14475, 3,), + 'mesh_posed': (14475, 3,), + 'uv_curvature': (512, 256, 7), + # 'mesh_curvature': (14475) + } +config['signature_static'] = { 'uv_static': (512, 256, 3), + 'mesh_mask': (14475,), + 'uv_mask': (512, 256,), + } + + +config['upscale_enhancer'] = '' +config['freeze_encoders'] = True +config['use_one_hot'] = False + +config['cvae'] = dict() +config['cvae']['is_label'] = True +config['cvae']['latent_dim'] = config['latent_dim'] +config['cvae']['add_noise'] = True +config['cvae']['noise_amount'] = 0.001 + +config['cvae']['kernel_size'] = 7 +config['cvae']['encoder_depths'] = [3, 3, 9, 3] +config['cvae']['encoder_dims'] = [32, 64, 128, 256] +config['cvae']['decoder_input'] = (16, 8, 80) +config['cvae']['decoder_depths'] = [3, 3, 9, 3] +config['cvae']['decoder_dims'] = [256, 128, 64, 16] + + +config['cond_ae'] = dict() +config['cond_ae']['is_label'] = False +config['cond_ae']['upscale_output'] = False +config['cond_ae']['latent_dim'] = config['latent_dim'] +config['cond_ae']['kernel_size'] = 7 +config['cond_ae']['bottleneck_size'] = 64 +config['cond_ae']['encoder_depths'] = [3, 3, 9, 9, 3] +config['cond_ae']['encoder_dims'] = [32, 64, 128, 256, config['cond_ae']['bottleneck_size']] +config['cond_ae']['decoder_input'] = (8, 4, config['cond_ae']['bottleneck_size']) +config['cond_ae']['decoder_depths'] = [3, 3, 9, 3, 3] +config['cond_ae']['decoder_dims'] = [config['cond_ae']['bottleneck_size'], 256, 128, 64, 16] + +config['cond_ae_body'] = dict() +config['cond_ae_body']['latent_dim'] = config['latent_dim'] +config['cond_ae_body']['kernel_size'] = 7 +config['cond_ae_body']['upscale_output'] = True +config['cond_ae_body']['bottleneck_size'] = 512 +config['cond_ae_body']['encoder_depths'] = [3, 3, 9, 9, 3, 3] +config['cond_ae_body']['encoder_dims'] = [32, 64, 128, 256, 256, config['cond_ae_body']['bottleneck_size']] +config['cond_ae_body']['decoder_input'] = (4, 2, config['cond_ae_body']['bottleneck_size']) +config['cond_ae_body']['decoder_depths'] = [3, 3, 9, 3] +config['cond_ae_body']['decoder_dims'] = [config['cond_ae_body']['bottleneck_size'], 128, 64, 16] diff --git a/configs/config_cvae_test.py b/configs/config_cvae_test.py index e063baf..7e0e6be 100644 --- a/configs/config_cvae_test.py +++ b/configs/config_cvae_test.py @@ -7,19 +7,23 @@ config = dict() # DON'T FORGET TO LOAD FINAL UPSCALER UNLESS HAVE LEVEL 512 # DON'T FORGET TO CHECK AVG GARMENT USED -config['use_skinning'] = True # and deshaping -config['remove_global_orientation'] = False +config['use_skinning'] = False # and deshaping +config['remove_global_orientation'] = True config['use_curvature'] = True config['use_extra_losses'] = True # edge, collision, 3d mesh config['use_offsets'] = True -assert [config['use_skinning'], config['remove_global_orientation'], config['use_curvature'], config['use_extra_losses'], config['use_offsets']].count(False) == 1 +ablation_count = [config['use_skinning'], config['remove_global_orientation'], config['use_curvature'], config['use_extra_losses'], config['use_offsets']].count(False) +assert ablation_count == 1 or ablation_count == 0 config['gpu'] = '2' -config['name'] = 'ab_1' +config['name'] = 'test' config['notes'] = '' -config['avg_garment_path'] = 'custom_data/train_no_shape_avg_uv.npy' # train_no_shape_avg_uv train_no_shape_one_hot_avg_uv +config['avg_garment_path'] = '' #custom_data/train_no_shape_avg_uv.npy # train_no_shape_avg_uv train_no_shape_one_hot_avg_uv +if config['use_skinning']: + assert (config['use_offsets'] and config['avg_garment_path'] != '') or (not config['use_offsets'] and config['avg_garment_path'] == '') + config['reg_loss_coeff'] = 0.1 # set to 0 if don't want to use edge+collision config['batch_size'] = 4 @@ -44,20 +48,17 @@ if config['is_cape']: config['latent_dim'] = 128 config['pretrained_model'] = '' -config['l2_coeff'] = 1 ############### config['lr'] = 0.0001# 0.0001 ############### config['starting_balancing_coeff'] = 0.0001 -config['signature_dynamic'] = { 'id': (), +config['signature_dynamic'] = { 'id': (), 'frame_nr': (), 'pose_shape': (72 + 11,), 'uv_body_posed': (512, 256, 3), 'mesh_body_posed': (14475, 3,), 'mesh_posed': (14475, 3,), - 'mesh_unposed': (14475, 3,), - 'uv_unposed': (512, 256, 3), 'uv_curvature': (512, 256, 7), } config['signature_static'] = { 'uv_static': (512, 256, 3), @@ -65,6 +66,13 @@ config['signature_static'] = { 'uv_static': (512, 256, 3), 'uv_mask': (512, 256,), } +if config['use_skinning']: + config['signature_dynamic']['uv_unposed'] = (512, 256, 3) + config['signature_dynamic']['mesh_unposed'] = (14475, 3,) +else: + config['signature_dynamic']['uv_posed'] = (512, 256, 3) + + config['upscale_enhancer'] = '' config['freeze_encoders'] = True config['use_one_hot'] = False diff --git a/configs/config_pyramid.py b/configs/config_pyramid.py index c5087dd..1dede57 100644 --- a/configs/config_pyramid.py +++ b/configs/config_pyramid.py @@ -40,7 +40,7 @@ config['lr'] = 0.0001 config['starting_balancing_coeff'] = 0.0001 config['reg_loss_coeff'] = 0.1 # set to 0 if don't want to use edge+collision -config['signature_dynamic'] = { 'id': (), +config['signature_dynamic'] = { 'id': (), 'frame_nr': (), 'pose_shape': (72 + 11,), 'uv_body_posed': (512, 256, 3), 'mesh_body_posed': (config['smpl_res'], 3,),