init first
This commit is contained in:
1 parent
a4b5299c26
commit
c4ed7854e7
74 files changed
+9565
-89
No files matched your search
@@ -0,0 +1,36 @@
|
||||
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: False # additionaly always save model from last epoch
|
||||
verbose: False
|
||||
every_n_epochs: 1
|
||||
save_weights_only: True
|
||||
dirpath: "checkpoints/"
|
||||
filename: "epoch_{epoch:03d}"
|
||||
auto_insert_metric_name: False
|
||||
|
||||
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
|
||||
@@ -1,9 +1,9 @@
|
||||
model_checkpoint:
|
||||
_target_: pytorch_lightning.callbacks.ModelCheckpoint
|
||||
monitor: "val/acc" # name of the logged metric which determines when model is improving
|
||||
mode: "max" # "max" means higher metric value is better, can be also "min"
|
||||
save_top_k: 1 # save k best models (determined by above metric)
|
||||
save_last: True # additionaly always save model from last epoch
|
||||
monitor: "val/acc" # name of the logged metric which determines when model is improving
|
||||
mode: "max" # "max" means higher metric value is better, can be also "min"
|
||||
save_top_k: 1 # save k best models (determined by above metric)
|
||||
save_last: True # additionaly always save model from last epoch
|
||||
verbose: False
|
||||
dirpath: "checkpoints/"
|
||||
filename: "epoch_{epoch:03d}"
|
||||
@@ -11,10 +11,10 @@ model_checkpoint:
|
||||
|
||||
early_stopping:
|
||||
_target_: pytorch_lightning.callbacks.EarlyStopping
|
||||
monitor: "val/acc" # 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: 100 # 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
|
||||
monitor: "val/acc" # 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: 100 # 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
|
||||
@@ -22,3 +22,4 @@ model_summary:
|
||||
|
||||
rich_progress_bar:
|
||||
_target_: pytorch_lightning.callbacks.RichProgressBar
|
||||
|
||||
@@ -1,7 +0,0 @@
|
||||
_target_: src.datamodules.mnist_datamodule.MNISTDataModule
|
||||
|
||||
data_dir: ${data_dir} # data_dir is specified in config.yaml
|
||||
batch_size: 64
|
||||
train_val_test_split: [55_000, 5_000, 10_000]
|
||||
num_workers: 0
|
||||
pin_memory: False
|
||||
@@ -0,0 +1,35 @@
|
||||
_target_: src.datasets.motion_datamodule.MotionDataModule
|
||||
|
||||
batch_size_train: 128
|
||||
batch_size_test: 32
|
||||
num_workers: 8
|
||||
pin_memory: False
|
||||
|
||||
|
||||
dataset_train:
|
||||
_target_: src.datasets.components.motion_train.MotionTrainDataset
|
||||
path_data: xxx/data_train.npz
|
||||
fps: 50
|
||||
sr: 16000
|
||||
num_windows: 3
|
||||
filter: "savgol"
|
||||
flip: False
|
||||
shifting_speed: False
|
||||
|
||||
|
||||
dataset_valid:
|
||||
_target_: src.datasets.components.motion_eval.MotionEvalDataset
|
||||
path_data: xxx/data_valid.npz
|
||||
fps: 50
|
||||
sr: 16000
|
||||
num_windows: 3
|
||||
filter: "savgol"
|
||||
|
||||
|
||||
dataset_test:
|
||||
_target_: src.datasets.components.motion_eval.MotionEvalDataset
|
||||
path_data: xxx/data_test.npz
|
||||
fps: 50
|
||||
sr: 16000
|
||||
num_windows: 15
|
||||
filter: "savgol"
|
||||
Whitespace-only changes.
@@ -0,0 +1,6 @@
|
||||
_target_: src.datasets.minist_datamodule.MNISTDataModule
|
||||
|
||||
data_dir: ${data_dir} # data_dir is specified in config.yaml
|
||||
batch_size: 64
|
||||
num_workers: 4
|
||||
pin_memory: False
|
||||
@@ -0,0 +1,32 @@
|
||||
_target_: src.datasets.motion_datamodule.MotionDataModule
|
||||
|
||||
batch_size: 64
|
||||
num_workers: 4
|
||||
pin_memory: False
|
||||
|
||||
dataset_train:
|
||||
_target_: src.datasets.components.motion_train.MotionTrainDataset
|
||||
path_data: ${path_data}/data_train.npz
|
||||
fps: 50
|
||||
sr: 16000
|
||||
num_windows: 3
|
||||
filter: "savgol"
|
||||
flip: False
|
||||
shifting_speed: False
|
||||
|
||||
|
||||
dataset_valid:
|
||||
_target_: src.datasets.components.motion_eval.MotionEvalDataset
|
||||
path_data: ${path_data}/data_valid.npz
|
||||
fps: 50
|
||||
sr: 16000
|
||||
num_windows: 3
|
||||
filter: "savgol"
|
||||
|
||||
dataset_test:
|
||||
_target_: src.datasets.components.motion_eval.MotionEvalDataset
|
||||
path_data: ${path_data}/data_test.npz
|
||||
fps: 50
|
||||
sr: 16000
|
||||
num_windows: 15
|
||||
filter: "savgol"
|
||||
@@ -0,0 +1,41 @@
|
||||
GPUS: '9'
|
||||
WORKERS: 4
|
||||
OUTPUT_DIR: 'experiments/audio2mesh'
|
||||
|
||||
DEBUG: False
|
||||
verbose: False
|
||||
isTrain: False
|
||||
|
||||
|
||||
MODEL:
|
||||
# name: 'audio2mesh'
|
||||
name: 'audio2mesh'
|
||||
name_netG: "audio2mesh"
|
||||
|
||||
dim_motion: 53 # 68*2
|
||||
dim_speech: 1024
|
||||
num_vertices: 5023
|
||||
|
||||
pretrain: True
|
||||
# path_checkpoint: "experiments/audio2mesh/train_audio2mesh_CN_20220312/20220315-16H55M15S"
|
||||
# load_epoch: 35
|
||||
# path_checkpoint: "experiments/audio2mesh/train_audio2mesh_CN_20220312/20220315-16H46M54S"
|
||||
# load_epoch: 75
|
||||
|
||||
# path_checkpoint: "experiments/audio2mesh/train_audio2mesh_CN_20220312/20220321-15H11M43S"
|
||||
# load_epoch: 65
|
||||
|
||||
# 5h, 1:10, epoch 25
|
||||
path_checkpoint: "experiments/audio2mesh/train_audio2mesh_CN_20220312/20220321-15H10M14S"
|
||||
load_epoch: 25
|
||||
|
||||
|
||||
DATASET:
|
||||
fps: 50
|
||||
sr: 16000
|
||||
path_mean_dict: './data/Actor2/DECA_Actor2_mean.npy'
|
||||
|
||||
TRAIN:
|
||||
apply_testing: True
|
||||
apply_validation: True
|
||||
|
||||
@@ -0,0 +1,45 @@
|
||||
# @package _global_
|
||||
# to execute this experiment run:
|
||||
# python train.py experiment=example
|
||||
|
||||
defaults:
|
||||
- override /datamodule: motion.yaml
|
||||
- override /model: audio2mesh_CN.yaml
|
||||
- override /callbacks: audio2mesh_callback.yaml
|
||||
- override /logger: tensorboard.yaml
|
||||
- override /trainer: default.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: "audio2mesh"
|
||||
seed: 12345
|
||||
|
||||
trainer:
|
||||
gpus: [9,]
|
||||
min_epochs: 50
|
||||
max_epochs: 200
|
||||
|
||||
gradient_clip_val: 0.5
|
||||
num_sanity_val_steps: 0
|
||||
check_val_every_n_epoch: 5
|
||||
enable_checkpointing: True
|
||||
log_every_n_steps: 20
|
||||
|
||||
|
||||
model:
|
||||
lr: 0.0001
|
||||
|
||||
netG:
|
||||
_target_: src.models.components.audio2mesh.Audio2Mesh
|
||||
num_vertices: 5023
|
||||
nc_condit: 1024
|
||||
|
||||
datamodule:
|
||||
batch_size: 128
|
||||
batch_size_test: 32
|
||||
# data_dir: "./data/LuoXData-raw-8h"
|
||||
|
||||
|
||||
@@ -0,0 +1,62 @@
|
||||
# @package _global_
|
||||
# to execute this experiment run:
|
||||
# python train.py experiment=audio2mesh/train_audio2mesh_CN_20220425.yaml
|
||||
|
||||
defaults:
|
||||
- override /dataset: data_actor4.yaml
|
||||
- override /model: model_audio2mesh.yaml
|
||||
- override /callbacks: callback_audio2mesh.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: "audio2mesh"
|
||||
seed: 12345
|
||||
path_data: /ssdata1/lsen/CODE/Audio2Motion/data/Actor4
|
||||
specifict_folder: Actor4-raw-1h
|
||||
|
||||
trainer:
|
||||
gpus: [2, 3, 4, 5]
|
||||
min_epochs: 300
|
||||
max_epochs: 300
|
||||
|
||||
gradient_clip_val: 0.5
|
||||
num_sanity_val_steps: 0
|
||||
check_val_every_n_epoch: 1
|
||||
enable_checkpointing: True
|
||||
log_every_n_steps: 20
|
||||
|
||||
|
||||
model:
|
||||
lr: 0.0001
|
||||
|
||||
opt:
|
||||
path_mean_dict: ${path_data}/DECA_Actor4_mean.npy
|
||||
|
||||
netG:
|
||||
_target_: src.models.components.audio2mesh.Audio2Mesh
|
||||
num_vertices: 5023
|
||||
nc_condit: 1024
|
||||
|
||||
|
||||
dataset:
|
||||
batch_size_train: 128
|
||||
batch_size_test: 32
|
||||
|
||||
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
|
||||
|
||||
# data_dir: "./data/LuoXData-raw-8h"
|
||||
|
||||
|
||||
@@ -7,8 +7,8 @@ defaults:
|
||||
- override /datamodule: mnist.yaml
|
||||
- override /model: mnist.yaml
|
||||
- override /callbacks: default.yaml
|
||||
- override /logger: null
|
||||
- override /trainer: default.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
|
||||
@@ -20,7 +20,7 @@ seed: 12345
|
||||
|
||||
trainer:
|
||||
min_epochs: 10
|
||||
max_epochs: 10
|
||||
max_epochs: 100
|
||||
gradient_clip_val: 0.5
|
||||
|
||||
model:
|
||||
|
||||
@@ -1,7 +1,12 @@
|
||||
_target_: src.models.mnist_module.MNISTLitModule
|
||||
|
||||
opt:
|
||||
speech_extractor: wav2vec
|
||||
AA: ss
|
||||
BB: 22
|
||||
|
||||
lr: 0.001
|
||||
weight_decay: 0.0005
|
||||
|
||||
net:
|
||||
_target_: src.models.components.simple_dense_net.SimpleDenseNet
|
||||
input_size: 784
|
||||
|
||||
@@ -0,0 +1,48 @@
|
||||
_target_: src.models.module_audio2mesh.Audio2MeshModel
|
||||
|
||||
|
||||
lr: 0.001
|
||||
weight_decay: 0.0005
|
||||
|
||||
opt:
|
||||
speech_extractor: wav2vec
|
||||
sr: 16000
|
||||
fps: 50
|
||||
num_vertices: 5023
|
||||
lambda_rec_geo: 1
|
||||
lambda_vel_geo: 10
|
||||
path_mean_dict: xxx/DECA_actor_mean.npy
|
||||
path_init_expression_basis: ${path_cwd}/checkpoints/init_expression_basis.npy
|
||||
|
||||
opt_LOSS:
|
||||
lambda_rec_geo: 1
|
||||
lambda_vel_geo: 10
|
||||
lambda_rec_ldmk: 0
|
||||
lambda_closure_x: 0
|
||||
lambda_closure_y: 0
|
||||
|
||||
|
||||
opt_netF:
|
||||
n_shape: 100
|
||||
n_exp: 50
|
||||
flame_model_path: ${path_cwd}/data/mesh/generic_model.pkl
|
||||
flame_lmk_embedding_path: ${path_cwd}/data/mesh/landmark_embedding.npy
|
||||
|
||||
opt_netR:
|
||||
rasterizer_type: pytorch3d
|
||||
image_size: 512
|
||||
uv_size: 256
|
||||
topology_path: ${path_cwd}/data/mesh/head_template.obj
|
||||
|
||||
opt_netW:
|
||||
path_ckpt_wav2vec: ${path_cwd}/checkpoints/wav2vec2
|
||||
|
||||
|
||||
netG:
|
||||
_target_: src.models.components.audio2mesh.Audio2Mesh
|
||||
num_vertices: 5023
|
||||
nc_condit: 1024
|
||||
|
||||
|
||||
|
||||
|
||||
+2
-2
@@ -16,9 +16,9 @@ defaults:
|
||||
- override hydra/hydra_logging: colorlog
|
||||
- override hydra/job_logging: colorlog
|
||||
|
||||
original_work_dir: ${hydra:runtime.cwd}
|
||||
path_cwd: ${hydra:runtime.cwd}
|
||||
|
||||
data_dir: ${original_work_dir}/data/
|
||||
data_dir: ${path_cwd}/data/
|
||||
|
||||
print_config: True
|
||||
|
||||
|
||||
+7
-5
@@ -3,16 +3,16 @@
|
||||
# specify here default training configuration
|
||||
defaults:
|
||||
- _self_
|
||||
- datamodule: mnist.yaml
|
||||
- dataset: mnist.yaml
|
||||
- model: mnist.yaml
|
||||
- callbacks: default.yaml
|
||||
- logger: null # set logger here or use command line (e.g. `python train.py logger=tensorboard`)
|
||||
- trainer: default.yaml
|
||||
- log_dir: default.yaml
|
||||
|
||||
|
||||
# experiment configs allow for version control of specific configurations
|
||||
# e.g. best hyperparameters for each combination of model and datamodule
|
||||
- experiment: null
|
||||
- experiment: example.yaml
|
||||
|
||||
# debugging config (enable through command line, e.g. `python train.py debug=default)
|
||||
- debug: null
|
||||
@@ -28,13 +28,15 @@ defaults:
|
||||
- override hydra/hydra_logging: colorlog
|
||||
- override hydra/job_logging: colorlog
|
||||
|
||||
|
||||
|
||||
# path to original working directory
|
||||
# hydra hijacks working directory by changing it to the new log directory
|
||||
# https://hydra.cc/docs/next/tutorials/basic/running_your_app/working_directory
|
||||
original_work_dir: ${hydra:runtime.cwd}
|
||||
path_cwd: ${hydra:runtime.cwd}
|
||||
|
||||
# path to folder with data
|
||||
data_dir: ${original_work_dir}/data/
|
||||
# data_dir: ${path_cwd}/data/
|
||||
|
||||
# pretty print config at the start of the run using Rich library
|
||||
print_config: True
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
defaults:
|
||||
- default.yaml
|
||||
|
||||
gpus: 4
|
||||
gpus: [2,3,6]
|
||||
strategy: ddp
|
||||
sync_batchnorm: True
|
||||
@@ -1,6 +1,7 @@
|
||||
_target_: pytorch_lightning.Trainer
|
||||
|
||||
gpus: 0
|
||||
# gpus: [2,3,6]
|
||||
gpus: [9,]
|
||||
|
||||
min_epochs: 1
|
||||
max_epochs: 10
|
||||
|
||||
Reference in new issue
Block a user