From 8eaf090e4c060f4a1853f66bb4857aae078ed9ad Mon Sep 17 00:00:00 2001 From: Hunor Laczko Date: Sun, 16 Oct 2022 23:27:24 +0000 Subject: [PATCH] save configs --- configs/config_ae_body.py | 2 +- configs/config_ae_curv.py | 8 ++++--- configs/config_ae_static.py | 11 ++++++++-- configs/config_base.py | 35 +++++++++++++++++++---------- configs/config_cvae.py | 44 ++++++++++++++++++++++--------------- configs/config_pyramid.py | 21 ++++++++++-------- 6 files changed, 77 insertions(+), 44 deletions(-) diff --git a/configs/config_ae_body.py b/configs/config_ae_body.py index 449db77..ab674dd 100644 --- a/configs/config_ae_body.py +++ b/configs/config_ae_body.py @@ -1,6 +1,6 @@ from configs.config_base import config -config['gpu'] = '0' +config['gpu'] = '1' config['lr'] = 0.0001 config['name'] = 'body_1' diff --git a/configs/config_ae_curv.py b/configs/config_ae_curv.py index 051c2ae..452dbaa 100644 --- a/configs/config_ae_curv.py +++ b/configs/config_ae_curv.py @@ -1,10 +1,12 @@ from configs.config_base import config -config['gpu'] = '2' +config['gpu'] = '5' config['lr'] = 0.001 -config['name'] = 'curv_1_3' #'ae_curv_9' +config['name'] = 'curv_1_5' #'ae_curv_9' config['notes'] = 'convnext + convnext, 16*8*32, ce loss. flattened latent dim of 128. trained on 100 garments. switched back to sparse CCE, normal one was giving NaN | \ - try ssim loss' + try ssim loss | \ + smaller model | \ + ' config['cond_ae']['is_label'] = True diff --git a/configs/config_ae_static.py b/configs/config_ae_static.py index 0c75b05..c653685 100644 --- a/configs/config_ae_static.py +++ b/configs/config_ae_static.py @@ -1,10 +1,17 @@ from configs.config_base import config -config['gpu'] = '5' +config['gpu'] = '4' config['lr'] = 0.0005 -config['name'] = 'static_1' +config['name'] = 'static_1_5' +config['notes'] = 'convnext + convnext, add dense with tanh at the end of reverse convnext, | \ + flattened latent dim to 128 | \ + train on 100 garments | \ + deeper model | \ + larger batch size | \ + ' config['cond_ae']['upscale_output'] = False +config['batch_size'] = 32 config['signature_dynamic'] = { 'id': (), } diff --git a/configs/config_base.py b/configs/config_base.py index a354bbf..90fd95b 100644 --- a/configs/config_base.py +++ b/configs/config_base.py @@ -4,6 +4,7 @@ config = dict() config['batch_size'] = 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['use_filled'] = False config['resolution'] = 512 config['is_skirt'] = False @@ -23,14 +24,26 @@ 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'] = config['cond_ae'] -# 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 +# 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, 3, 3, 3] +# config['cond_ae']['encoder_dims'] = [16, 32, 128, 128, config['cond_ae']['bottleneck_size']] +# config['cond_ae']['decoder_input'] = (8, 4, config['cond_ae']['bottleneck_size']) +# config['cond_ae']['decoder_depths'] = [3, 3, 3, 3, 3] +# config['cond_ae']['decoder_dims'] = [config['cond_ae']['bottleneck_size'], 128, 128, 32, 8] + +# config['cond_ae_body'] = config['cond_ae'] +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_cvae.py b/configs/config_cvae.py index 59dda57..389912c 100644 --- a/configs/config_cvae.py +++ b/configs/config_cvae.py @@ -1,23 +1,31 @@ from configs.config_base import config -config['gpu'] = '2' -config['name'] = 'cvae_19_skirt' +config['gpu'] = '4' +config['name'] = 'v2_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 \ -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\ +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 | \ ' -config['dataset_in_memory'] = True +config['dataset_in_memory'] = False + + +# 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 config['resolution'] = 512 -config['is_skirt'] = True -config['reg_loss_coeff'] = 0 # set to 0 if don't want to use edge+collision +config['is_skirt'] = False +config['reg_loss_coeff'] = 0.1 # set to 0 if don't want to use edge+collision if config['resolution'] != 512: config['notes'] += '\ @@ -50,14 +58,14 @@ if config['resolution'] != 512: config['signature_static']['uv_mask' + res_modifier] = (config['resolution'], config['resolution']//2) if config['resolution'] == 512: - config['avg_garment_path'] = 'custom_data/train_skirt_25_2_no_shape_avg_uv.npy' + config['avg_garment_path'] = 'custom_data/train_no_shape_avg_uv.npy' else: config['avg_garment_path'] = '' -config['static_model'] = 'checkpoints/ae_static_7_2_skirt_x' -config['body_model'] = 'checkpoints/ae_body_10_3_skirt_x' -config['curvature_model'] = 'checkpoints/ae_curv_9_skirt_x' -config['upscale_enhancer'] = 'checkpoints/up_2_3_skirt_x_d32' +config['static_model'] = 'checkpoints/static_1' +config['body_model'] = 'checkpoints/body_1' +config['curvature_model'] = 'checkpoints/curv_1' +config['upscale_enhancer'] = '' config['freeze_encoders'] = True config['cvae'] = dict() diff --git a/configs/config_pyramid.py b/configs/config_pyramid.py index 1e35434..0f935e9 100644 --- a/configs/config_pyramid.py +++ b/configs/config_pyramid.py @@ -1,7 +1,7 @@ from configs.config_base import config -config['gpu'] = '1' -config['name'] = 'cvae_pyr_7_32_64_128_256_512' +config['gpu'] = '3' +config['name'] = 'pyr_1_32_64_128' 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 | \ @@ -56,9 +56,9 @@ config['pyramid'] = dict() config['pyramid']['is_label'] = False config['pyramid']['latent_dim'] = config['latent_dim'] -config['pyramid']['resolutions'] = [32, 64, 128, 256, 512] +config['pyramid']['resolutions'] = [32, 64, 128] config['pyramid']['loss_weights'] = [1,1,1,1,1] -config['pyramid']['pretrained_pyramid'] = 'checkpoints/cvae_pyr_7_32_64_128_256_50k' +config['pyramid']['pretrained_pyramid'] = 'checkpoints/pyr_1_32_64' for res in config['pyramid']['resolutions']: if res != 512: @@ -73,13 +73,16 @@ for res in config['pyramid']['resolutions']: # config['pyramid']['static_model'] = 'checkpoints/ae_static_7_2_x' # config['pyramid']['body_model'] = 'checkpoints/ae_body_9_x' # config['pyramid']['curvature_model'] = 'checkpoints/ae_curv_9_x' +# config['pyramid']['static_model'] = 'checkpoints/static_1' +# config['pyramid']['body_model'] = 'checkpoints/body_1' +# config['pyramid']['curvature_model'] = 'checkpoints/curv_1' config['pyramid']['static_model'] = '' config['pyramid']['body_model'] = '' config['pyramid']['curvature_model'] = '' config['pyramid']['freeze_encoders'] = True config['avg_garment_path'] = '' -config['pyramid']['final_upscale_enhancer'] = '' +config['pyramid']['final_upscale_enhancer'] = 'checkpoints/128_512_3' config['pyramid']['levels'] = [] @@ -108,7 +111,7 @@ for res in config['pyramid']['resolutions']: 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'] = ''#'checkpoints/up_3_d256_512_2' level['upscale_enhancer_freeze'] = True config['pyramid']['levels'].append(level) elif res == 128: @@ -122,7 +125,7 @@ for res in config['pyramid']['resolutions']: level['decoder_depths'] = [16, 16, 9, 9] level['decoder_dims'] = [256, 256, 128, 64] level['avg_garment_path'] = '' - level['upscale_enhancer'] = 'checkpoints/up_3_d128_256_2' + level['upscale_enhancer'] = ''#'checkpoints/up_3_d128_256_2' level['upscale_enhancer_freeze'] = True config['pyramid']['levels'].append(level) elif res == 64: @@ -136,7 +139,7 @@ for res in config['pyramid']['resolutions']: level['decoder_depths'] = [27, 27, 16] level['decoder_dims'] = [256, 256, 256] level['avg_garment_path'] = '' - level['upscale_enhancer'] = 'checkpoints/up_3_d64_128_2' + level['upscale_enhancer'] = 'checkpoints/64_512_2'#checkpoints/up_3_d64_128_2' level['upscale_enhancer_freeze'] = False config['pyramid']['levels'].append(level) elif res == 32: @@ -150,7 +153,7 @@ for res in config['pyramid']['resolutions']: level['decoder_depths'] = [27, 27] level['decoder_dims'] = [256, 256] level['avg_garment_path'] = '' - level['upscale_enhancer'] = 'checkpoints/up_3_d32_64_2' + level['upscale_enhancer'] = 'checkpoints/32_512_4'#'checkpoints/up_3_d32_64_2' level['upscale_enhancer_freeze'] = True config['pyramid']['levels'].append(level) else: