127 lines
5.1 KiB
Python
127 lines
5.1 KiB
Python
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
|
|
|
|
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'] = 'iccv_gnn_3'
|
|
config['notes'] = ''
|
|
config['tags'] = ['iccv', 'gnn']
|
|
|
|
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_dress_30k.txt'
|
|
# config['frames_file_valid'] = 'frames_dress_30k.txt'
|
|
# config['frames_file_test'] = 'frames_dress_30k.txt'
|
|
|
|
config['static_model'] = 'checkpoints/post/static_post_2'
|
|
config['body_model'] = 'checkpoints/post/body_post_2'
|
|
config['curvature_model'] = 'checkpoints/post/curv_post_1'
|
|
|
|
|
|
config['smpl_res'] = 14475
|
|
if config['is_cape']:
|
|
config['smpl_res'] = 3638
|
|
|
|
|
|
config['pretrained_model'] = ''
|
|
|
|
###############
|
|
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']['add_noise'] = True
|
|
config['cvae']['noise_amount'] = 0.001
|
|
|
|
config['cvae']['kernel_size'] = 7
|
|
config['cvae']['encoder_depths'] = [3, 3, 3, 9, 3]
|
|
config['cvae']['encoder_dims'] = [32, 64, 128, 256, 64]
|
|
config['cvae']['decoder_depths'] = config['cvae']['encoder_depths']
|
|
config['cvae']['decoder_dims'] = config['cvae']['encoder_dims']
|
|
|
|
|
|
config['cond_ae_static'] = dict()
|
|
config['cond_ae_static']['is_label'] = False
|
|
config['cond_ae_static']['kernel_size'] = 7
|
|
config['cond_ae_static']['bottleneck_size'] = 8
|
|
config['cond_ae_static']['encoder_depths'] = [3, 3, 3, 9, 3]
|
|
config['cond_ae_static']['encoder_dims'] = [16, 32, 64, 64, config['cond_ae_static']['bottleneck_size']]
|
|
config['cond_ae_static']['decoder_depths'] = config['cond_ae_static']['encoder_depths']
|
|
config['cond_ae_static']['decoder_dims'] = config['cond_ae_static']['encoder_dims']
|
|
config['cond_ae_static']['activation'] = 'tanh'
|
|
|
|
config['cond_ae_curv'] = dict()
|
|
config['cond_ae_curv']['is_label'] = True
|
|
config['cond_ae_curv']['kernel_size'] = 7
|
|
config['cond_ae_curv']['bottleneck_size'] = 40
|
|
config['cond_ae_curv']['encoder_depths'] = [3, 3, 9, 9, 3]
|
|
config['cond_ae_curv']['encoder_dims'] = [16, 32, 64, 128, config['cond_ae_curv']['bottleneck_size']]
|
|
config['cond_ae_curv']['decoder_depths'] = config['cond_ae_curv']['encoder_depths']
|
|
config['cond_ae_curv']['decoder_dims'] = config['cond_ae_curv']['encoder_dims']
|
|
config['cond_ae_curv']['activation'] = 'tanh'
|
|
|
|
config['cond_ae_body'] = dict()
|
|
config['cond_ae_body']['is_label'] = False
|
|
config['cond_ae_body']['kernel_size'] = 7
|
|
config['cond_ae_body']['bottleneck_size'] = 16
|
|
config['cond_ae_body']['encoder_depths'] = [3, 3, 9, 9, 3]
|
|
config['cond_ae_body']['encoder_dims'] = [16, 32, 64, 128, config['cond_ae_body']['bottleneck_size']]
|
|
config['cond_ae_body']['decoder_depths'] = config['cond_ae_body']['encoder_depths']
|
|
config['cond_ae_body']['decoder_dims'] = config['cond_ae_body']['encoder_dims']
|
|
config['cond_ae_body']['activation'] = 'tanh' |