update audio2motion_gan

This commit is contained in:
sen.liang committed 2022-06-10 10:26:12 +08:00
1 parent 4785646e32
commit 5a6725072a
24 files changed
+20496 -132

No files matched your search

@@ -0,0 +1,35 @@
model_checkpoint:
_target_: pytorch_lightning.callbacks.ModelCheckpoint
# monitor: "val/best" # name of the logged metric which determines when model is improving
# mode: "min" # "max" means higher metric value is better, can be also "min"
# save_top_k: 3 # save k best models (determined by above metric)
# save_last: True # additionaly always save model from last epoch
# verbose: False
# every_n_epochs: 1
save_weights_only: False
dirpath: "checkpoints/"
filename: "epoch_{epoch:03d}"
auto_insert_metric_name: False
# every_n_train_steps: 500
# early_stopping:
# _target_: pytorch_lightning.callbacks.EarlyStopping
# monitor: "val/best" # name of the logged metric which determines when model is improving
# mode: "max" # "max" means higher metric value is better, can be also "min"
# patience: 10 # how many validation epochs of not improving until training stops
# min_delta: 0 # minimum change in the monitored metric needed to qualify as an improvement
model_summary:
_target_: pytorch_lightning.callbacks.RichModelSummary
max_depth: 2
rich_progress_bar:
# _target_: pytorch_lightning.callbacks.TQDMProgressBar
_target_: pytorch_lightning.callbacks.RichProgressBar
leave: True
# save_test_video:
# _target_: src.modles.callbacks.audio2mesh_callback.Audio2MeshCallback
# path_data_raw: "/yrfs/lsen/DATA/LuoXData/processing2/"
# fps: 50.0
@@ -5,7 +5,7 @@
defaults:
- override /dataset: motion.yaml
- override /model: model_audio2motion_gan.yaml
- override /callbacks: callback_audio2render.yaml
- override /callbacks: callback_audio2motion.yaml
- override /logger: tensorboard.yaml
- override /trainer: ddp.yaml
@@ -48,8 +48,8 @@ model:
dim_z: 32
path_mean_dict: ${path_data}/mean_deca_coeff_Actor7_processing.npy
pretrain: False
pretrain_path: ${path_cwd}/logs/experiments/runs/ganrender/2022-06-07_13-08-41/checkpoints/epoch_000.ckpt
pretrain: True
pretrain_path: ${path_cwd}/logs/experiments/runs/audio2motion/2022-06-09_17-19-57/checkpoints/epoch_009-v1.ckpt
opt_optim:
lr_G: 0.0005 # 0.00125
@@ -65,7 +65,7 @@ model:
dataset:
batch_size_train: 1
batch_size_train: 128
batch_size_test: 16
num_workers: 4
@@ -79,3 +79,14 @@ dataset:
path_data: ${path_data}/${specifict_folder}/data_test.npz
callbacks:
model_summary:
max_depth: 2
model_checkpoint:
monitor: "metric/valid/best" # name of the logged metric which determines when model is improving
mode: "min" # "max" means higher metric value is better, can be also "min"
save_top_k: 3 # save k best models (determined by above metric)
save_last: True # additionaly always save model from last epoch
# every_n_train_steps: 200
every_n_epochs: 1
@@ -0,0 +1,91 @@
# @package _global_
# to execute this experiment run:
# python train.py experiment=audio2mesh/train_audio2mesh_CN_20220425.yaml
defaults:
- override /dataset: motion.yaml
- override /model: model_audio2motion_gan.yaml
- override /callbacks: callback_audio2motion.yaml
- override /logger: tensorboard.yaml
- override /trainer: ddp.yaml
# all parameters below will be merged with parameters from default configurations set above
# this allows you to overwrite only specified parameters
# name of the run determines folder name in logs
name: "audio2motion"
seed: 12345
path_data: ${path_cwd}/data/Actor6
specifict_folder: Actor6-raw-processing2-2h
trainer:
gpus: [0]
min_epochs: 100
max_epochs: 300
# accumulate_grad_batches: 8
gradient_clip_val: 0.5
gradient_clip_algorithm: 'norm'
# precision: 16
num_sanity_val_steps: 1
# check_val_every_n_epoch: 100
val_check_interval: 0.25
enable_checkpointing: True
log_every_n_steps: 10
# resume_from_checkpoint: ${path_cwd}/logs/experiments/runs/audio2render/2022-05-30_14-29-24/checkpoints/last.ckpt
model:
_target_: src.models.module_audio2motion_gan.Audio2MotionGANModel
opt:
dim_x: 53
dim_c: 1024
dim_z: 32
path_mean_dict: ${path_data}/mean_deca_coeff_Actor6_processing2.npy
pretrain: True
pretrain_path: ${path_cwd}/logs/experiments/runs/audio2motion/2022-06-09_17-19-57/checkpoints/epoch_009-v1.ckpt
opt_optim:
lr_G: 0.0005 # 0.00125
lr_D: 0.0005 # 0.00125
opt_loss:
lambda_rec_exp: 0.5
lambda_rec_pos: 1
lambda_rec_geo: 100
lambda_vel_exp: 10
lambda_vel_pos: 10
lambda_vel_geo: 100
dataset:
batch_size_train: 128
batch_size_test: 16
num_workers: 4
dataset_train:
path_data: ${path_data}/${specifict_folder}/data_train.npz
dataset_valid:
path_data: ${path_data}/${specifict_folder}/data_valid.npz
dataset_test:
path_data: ${path_data}/${specifict_folder}/data_test.npz
callbacks:
model_summary:
max_depth: 2
model_checkpoint:
monitor: "metric/valid/best" # name of the logged metric which determines when model is improving
mode: "min" # "max" means higher metric value is better, can be also "min"
save_top_k: 3 # save k best models (determined by above metric)
save_last: True # additionaly always save model from last epoch
# every_n_train_steps: 200
every_n_epochs: 1
@@ -8,8 +8,6 @@ opt:
fps: 50
num_vertices: 5023
path_mean_dict: xxx/DECA_actor_mean.npy
path_init_expression_basis: ${path_cwd}/checkpoints/init_expression_basis.npy
opt_loss:
lambda_rec_exp: 0.5