This commit is contained in:
2023-01-26 14:45:35 +00:00
parent ea683ac030
commit 5d91b56a63
5 changed files with 34 additions and 15 deletions
+1
View File
@@ -1,6 +1,7 @@
nohup python auto_encoder_static.py --name="lhunor_ae_static_r7_3" > nohup/review/ae_static_r7_3.out 2>&1 & nohup python auto_encoder_static.py --name="lhunor_ae_static_r7_3" > nohup/review/ae_static_r7_3.out 2>&1 &
nohup python auto_encoder_body.py --name="lhunor_ae_body_r7_3" > nohup/review/ae_body_r7_3.out 2>&1 & nohup python auto_encoder_body.py --name="lhunor_ae_body_r7_3" > nohup/review/ae_body_r7_3.out 2>&1 &
nohup python auto_encoder_curv.py --name="lhunor_ae_curv_r7_3" > nohup/review/ae_curv_r7_3.out 2>&1 & nohup python auto_encoder_curv.py --name="lhunor_ae_curv_r7_3" > nohup/review/ae_curv_r7_3.out 2>&1 &
nohup python cvae.py --name="lhunor_abl_all_resnet_r7" > nohup/review/abl_all_resnet_r7.out 2>&1 &
one final convolutional layer for smoothing, on the final coordinates one final convolutional layer for smoothing, on the final coordinates
+5 -5
View File
@@ -19,8 +19,8 @@ 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) 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 assert ablation_count == 1 or ablation_count == 0
config['gpu'] = '0' config['gpu'] = '4'
config['name'] = 'abl_all_r7' config['name'] = 'abl_all_resnet_r7'
config['notes'] = '' 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 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
@@ -43,9 +43,9 @@ config['test_dir'] = '/home/workspace/data/dataset/test_ready'
# config['frames_file_valid'] = 'frames_dress_30k.txt' # config['frames_file_valid'] = 'frames_dress_30k.txt'
# config['frames_file_test'] = 'frames_dress_30k.txt' # config['frames_file_test'] = 'frames_dress_30k.txt'
config['static_model'] = 'checkpoints/post/static_r7_2' config['static_model'] = 'checkpoints/post/static_r7_3'
config['body_model'] = 'checkpoints/post/body_r7_2' config['body_model'] = 'checkpoints/post/body_r7_3'
config['curvature_model'] = 'checkpoints/post/curv_r7_2' config['curvature_model'] = 'checkpoints/post/curv_r7_3'
config['smpl_res'] = 14475 config['smpl_res'] = 14475
+5 -3
View File
@@ -58,7 +58,9 @@ def init_wandb():
artifact.add_file('convnext/models/convnext_tf.py') artifact.add_file('convnext/models/convnext_tf.py')
config_file_names = [key for key in sys.modules.keys() if key.startswith('configs.')] config_file_names = [key for key in sys.modules.keys() if key.startswith('configs.')]
for config_file_name in config_file_names: for config_file_name in config_file_names:
artifact.add_file('/'.join(config_file_name.split('.')) + '.py') file_name = '/'.join(config_file_name.split('.')) + '.py'
if os.path.exists(file_name):
artifact.add_file(file_name)
run.log_artifact(artifact) run.log_artifact(artifact)
uv2mesh = UV2Mesh(res=256, is_skirt=config['is_skirt'], is_adaptive=False, is_smpl_orig=config['is_cape']) uv2mesh = UV2Mesh(res=256, is_skirt=config['is_skirt'], is_adaptive=False, is_smpl_orig=config['is_cape'])
@@ -73,7 +75,7 @@ def kl_loss(mean, logvar):
# 3d loss on posed !!!!!!!!!!!! # 3d loss on posed !!!!!!!!!!!!
# @tf.function @tf.function
def train_step(batch): def train_step(batch):
with tf.GradientTape() as tape: with tf.GradientTape() as tape:
@@ -474,7 +476,7 @@ def test():
if __name__ == '__main__': if __name__ == '__main__':
# init_wandb() init_wandb()
parser = argparse.ArgumentParser(description='') parser = argparse.ArgumentParser(description='')
parser.add_argument('--name', type=str) parser.add_argument('--name', type=str)
args = vars(parser.parse_args()) args = vars(parser.parse_args())
+22 -6
View File
@@ -118,13 +118,29 @@ class VariationalEncoderNew(tf.keras.Model):
self.encoder = resnet_18(features) self.encoder = resnet_18(features)
self.mean_branch = make_basic_block_layer(filter_num=features, self.mean_branch = tf.keras.Sequential([
blocks=2, tf.keras.layers.Conv2D(filters=features,
stride=1) kernel_size=(3, 3),
strides=1,
padding="same"),
tf.keras.layers.BatchNormalization(),
tf.keras.layers.Conv2D(filters=features,
kernel_size=(3, 3),
strides=1,
padding="same")
])
self.var_branch = make_basic_block_layer(filter_num=features, self.var_branch = tf.keras.Sequential([
blocks=2, tf.keras.layers.Conv2D(filters=features,
stride=1) kernel_size=(3, 3),
strides=1,
padding="same"),
tf.keras.layers.BatchNormalization(),
tf.keras.layers.Conv2D(filters=features,
kernel_size=(3, 3),
strides=1,
padding="same")
])
self.flatten_mean = tf.keras.layers.Flatten() self.flatten_mean = tf.keras.layers.Flatten()
self.flatten_var = tf.keras.layers.Flatten() self.flatten_var = tf.keras.layers.Flatten()
+1 -1
View File
@@ -182,7 +182,7 @@ class CVAENew(tf.keras.Model):
self.encoder = VariationalEncoderNew(config['cvae']['encoder_dims'][-1]) self.encoder = VariationalEncoderNew(config['cvae']['encoder_dims'][-1])
self.decoder = DecoderNew(config['cvae']['decoder_dims'][-1], is_cvae=True) self.decoder = DecoderNew(config['cvae']['decoder_dims'][-1], is_cvae=True)
self.reshape = tf.keras.layers.Reshape((16, 8, config['cvae']['decoder_dims'][-1])) self.reshape = tf.keras.layers.Reshape((8, 4, config['cvae']['decoder_dims'][-1]))
if config['avg_garment_path'] != '': if config['avg_garment_path'] != '':
self.avg_garment = np.load(config['avg_garment_path']) self.avg_garment = np.load(config['avg_garment_path'])