From 6320275ea56ae91e788bb19cf8cd8c65ea5b7ccd Mon Sep 17 00:00:00 2001 From: Hunor Laczko Date: Tue, 28 Feb 2023 20:00:09 +0000 Subject: [PATCH] fix --- aaa_helpers.txt | 1 + configs/iccv/config_abl_all.py | 10 +++++----- cvae.py | 3 +++ models/gnn.py | 16 ++++++++-------- 4 files changed, 17 insertions(+), 13 deletions(-) diff --git a/aaa_helpers.txt b/aaa_helpers.txt index ea6153a..14ba4f7 100644 --- a/aaa_helpers.txt +++ b/aaa_helpers.txt @@ -15,6 +15,7 @@ nohup python cvae.py --name="lhunor_cvae_iccv_gnn_1" > nohup/iccv/cvae_iccv_gnn_ nohup python cvae.py --name="lhunor_abl_all" > nohup/iccv/ablation/abl_all.out 2>&1 & nohup python cvae.py --name="lhunor_abl_all_gnn" > nohup/iccv/ablation/abl_all_gnn.out 2>&1 & +nohup python cvae.py --name="lhunor_abl_all_gnn_3" > nohup/iccv/ablation/abl_all_gnn_3.out 2>&1 & nohup python upscale_test.py --name="iccv_32_2" > nohup/iccv/upscale/iccv_32_2.out 2>&1 & nohup python upscale_test.py --name="iccv_64_2" > nohup/iccv/upscale/iccv_64_2.out 2>&1 & diff --git a/configs/iccv/config_abl_all.py b/configs/iccv/config_abl_all.py index 558c532..736b38d 100644 --- a/configs/iccv/config_abl_all.py +++ b/configs/iccv/config_abl_all.py @@ -7,7 +7,7 @@ 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['use_skinning'] = False # and deshaping config['remove_global_orientation'] = True config['use_curvature'] = True config['use_extra_losses'] = True # edge, collision, 3d mesh @@ -19,12 +19,12 @@ 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'] = '0' -config['name'] = 'abl_all_gnn_2' +config['gpu'] = '2' +config['name'] = 'abl_all_gnn_3' config['notes'] = '' config['tags'] = ['iccv', 'abl_all_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 +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'] == '') @@ -54,7 +54,7 @@ if config['is_cape']: config['smpl_res'] = 3638 -config['pretrained_model'] = 'checkpoints/iccv/abl_all' +config['pretrained_model'] = 'checkpoints/iccv/abl_skin' ############### config['lr'] = 0.0001# 0.0001 diff --git a/cvae.py b/cvae.py index d172c1a..e6025ed 100644 --- a/cvae.py +++ b/cvae.py @@ -568,6 +568,9 @@ if __name__ == '__main__': train_accumulator.reset() valid_accumulator.reset() + if step % 5000 == 0: + manager.save(checkpoint_number=step) + print(step) step += 1 diff --git a/models/gnn.py b/models/gnn.py index 71d937a..9d5bcfe 100644 --- a/models/gnn.py +++ b/models/gnn.py @@ -16,20 +16,20 @@ class Smoother(tf.keras.Model): def __init__(self, ): super().__init__() self.a = sp_matrix_to_sp_tensor(sio.loadmat("custom_utils/ssmpl0.mat")['L'].tocoo()) - self.conv1 = GCNConv(512, activation='tanh', use_bias=False) - self.conv2 = GCNConv(512, activation='tanh', use_bias=False) - self.conv3 = GCNConv(512, activation='tanh', use_bias=False) - self.conv4 = GCNConv(512, activation='tanh', use_bias=False) - self.conv5 = GCNConv(64, activation='tanh', use_bias=False) + self.conv1 = GCNConv(16, activation='tanh', use_bias=False) + self.conv2 = GCNConv(3, activation='tanh', use_bias=False) + # self.conv3 = GCNConv(512, activation='tanh', use_bias=False) + # self.conv4 = GCNConv(512, activation='tanh', use_bias=False) + # self.conv5 = GCNConv(64, activation='tanh', use_bias=False) self.conv6 = GCNConv(3, activation='tanh', use_bias=False) def call(self, inputs, training=None): x = inputs x = self.conv1([x, self.a], training=training) x = self.conv2([x, self.a], training=training) - x = self.conv3([x, self.a], training=training) - x = self.conv4([x, self.a], training=training) - x = self.conv5([x, self.a], training=training) + # x = self.conv3([x, self.a], training=training) + # x = self.conv4([x, self.a], training=training) + # x = self.conv5([x, self.a], training=training) x = self.conv6([x, self.a], training=training) return x