diff --git a/aaa_helpers.txt b/aaa_helpers.txt index eab40df..39aaac4 100644 --- a/aaa_helpers.txt +++ b/aaa_helpers.txt @@ -2,6 +2,11 @@ nohup python cvae.py --name="lhunor_abl_all_10p_curv_10_r2" > nohup/review/abl_a nohup python auto_encoder_curv.py --name="lhunor_ae_curv_1_orig_curv_10_10p_r2" > nohup/review/curv_1_orig_curv_10_10p_r2.out 2>&1 & nohup python auto_encoder_curv.py --name="lhunor_ae_curv_1_orig_curv_25_10p_r2" > nohup/review/curv_1_orig_curv_25_10p_r2.out 2>&1 & nohup python auto_encoder_curv.py --name="lhunor_ae_curv_1_orig_curv_100_10p_r2_2" > nohup/review/curv_1_orig_curv_100_10p_r2_2.out 2>&1 & +nohup python cvae.py --name="lhunor_abl_all_10p_curv_10_r2" > nohup/review/abl_all_10p_curv_10_r2.out 2>&1 & +nohup python cvae.py --name="lhunor_abl_all_10p_curv_25_r2" > nohup/review/abl_all_10p_curv_25_r2.out 2>&1 & +nohup python cvae.py --name="lhunor_abl_all_10p_curv_100_r2" > nohup/review/abl_all_10p_curv_100_r2.out 2>&1 & + + one final convolutional layer for smoothing, on the final coordinates diff --git a/configs/config_abl_all_10p_curv_100_r2.py b/configs/config_abl_all_10p_curv_100_r2.py new file mode 100644 index 0000000..e009a64 --- /dev/null +++ b/configs/config_abl_all_10p_curv_100_r2.py @@ -0,0 +1,125 @@ +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 +config['only_curvatures'] = False + +config['curv_neighbourhood'] = 100 + +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_all_10p_curv_100_r2' +config['notes'] = '' +config['tags'] = ['review_2'] + +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/data/dataset/local-cache/train_skirt' +config['valid_dir'] = '/home/workspace/local-data/valid_skirt' +config['test_dir'] = '/home/workspace/data/dataset/test_skirt_ready_2' + +config['frames_file'] = 'frames_skirt_10p.txt' +config['frames_file_valid'] = 'frames_skirt_10p.txt' +# config['frames_file_test'] = 'frames_dress_30k.txt' + +config['static_model'] = 'checkpoints/static_1_skirt' +config['body_model'] = 'checkpoints/body_1_skirt_2_2' +config['curvature_model'] = 'checkpoints/post/curv_1_orig_curv_100_10p_r2_2' + + +config['smpl_res'] = 14475 +if config['is_cape']: + config['smpl_res'] = 3638 + + +config['pretrained_model'] = '' +config['latent_dim'] = 128 + +############### +config['lr'] = 0.0001# 0.0001 +############### +config['starting_balancing_coeff'] = 0.001 + +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), + } +config['signature_static'] = { 'uv_static': (512, 256, 3), + 'mesh_mask': (config['smpl_res'],), + 'uv_mask': (512, 256,), + } + +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['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_all_10p_curv_10_r2.py b/configs/config_abl_all_10p_curv_10_r2.py index 200b8bd..4fcbe36 100644 --- a/configs/config_abl_all_10p_curv_10_r2.py +++ b/configs/config_abl_all_10p_curv_10_r2.py @@ -22,7 +22,7 @@ ablation_count = [config['use_skinning'], config['remove_global_orientation'], c assert ablation_count == 1 or ablation_count == 0 config['gpu'] = '6' -config['name'] = 'abl_all_10p_curv_10_r2' +config['name'] = 'abl_all_10p_curv_10_r2_2' config['notes'] = '' config['tags'] = ['review_2'] @@ -48,7 +48,7 @@ config['frames_file_valid'] = 'frames_skirt_10p.txt' config['static_model'] = 'checkpoints/static_1_skirt' config['body_model'] = 'checkpoints/body_1_skirt_2_2' -config['curvature_model'] = 'checkpoints/post/curv_1_orig_curv_25_10p_r2' +config['curvature_model'] = 'checkpoints/post/curv_1_orig_curv_10_10p_r2_2' config['smpl_res'] = 14475 diff --git a/configs/config_abl_all_10p_curv_25_r2.py b/configs/config_abl_all_10p_curv_25_r2.py new file mode 100644 index 0000000..67dc76c --- /dev/null +++ b/configs/config_abl_all_10p_curv_25_r2.py @@ -0,0 +1,125 @@ +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 +config['only_curvatures'] = False + +config['curv_neighbourhood'] = 25 + +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_all_10p_curv_25_r2' +config['notes'] = '' +config['tags'] = ['review_2'] + +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'] = True +config['is_cape'] = False + +config['train_dir'] = '/home/workspace/data/dataset/local-cache/train_skirt' +config['valid_dir'] = '/home/workspace/local-data/valid_skirt' +config['test_dir'] = '/home/workspace/data/dataset/test_skirt_ready_2' + +config['frames_file'] = 'frames_skirt_10p.txt' +config['frames_file_valid'] = 'frames_skirt_10p.txt' +# config['frames_file_test'] = 'frames_dress_30k.txt' + +config['static_model'] = 'checkpoints/static_1_skirt' +config['body_model'] = 'checkpoints/body_1_skirt_2_2' +config['curvature_model'] = 'checkpoints/post/curv_1_orig_curv_25_10p_r2' + + +config['smpl_res'] = 14475 +if config['is_cape']: + config['smpl_res'] = 3638 + + +config['pretrained_model'] = '' +config['latent_dim'] = 128 + +############### +config['lr'] = 0.0001# 0.0001 +############### +config['starting_balancing_coeff'] = 0.001 + +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), + } +config['signature_static'] = { 'uv_static': (512, 256, 3), + 'mesh_mask': (config['smpl_res'],), + 'uv_mask': (512, 256,), + } + +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['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/cvae.py b/cvae.py index 21c8ffa..7dcb9ba 100644 --- a/cvae.py +++ b/cvae.py @@ -1,6 +1,6 @@ import os import sys -from configs.config_abl_all_10p_curv_10_r2 import config +from configs.config_abl_all_10p_curv_100_r2 import config os.environ["CUDA_VISIBLE_DEVICES"] = config['gpu'] import tensorflow as tf