This commit is contained in:
sen.liang committed 2025-05-24 20:09:02 +08:00
1 parent 4a53051fee
commit 039ec3cf52
179 files changed
+22667

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
@@ -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
@@ -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
+25
View File
@@ -0,0 +1,25 @@
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
verbose: False
dirpath: "checkpoints/"
filename: "epoch_{epoch:03d}"
auto_insert_metric_name: False
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
model_summary:
_target_: pytorch_lightning.callbacks.RichModelSummary
max_depth: -1
rich_progress_bar:
_target_: pytorch_lightning.callbacks.RichProgressBar
View File
Whitespace-only changes.
+6
View File
@@ -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
+35
View File
@@ -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"
+32
View File
@@ -0,0 +1,32 @@
_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_render_train.MotionRenderTrainDataset
path_data: xxx/data_train.npz
fps: 50
sr: 16000
num_second_wind: 1
filter: "savgol"
dataset_valid:
_target_: src.datasets.components.motion_render_train.MotionRenderTrainDataset
path_data: xxx/data_valid.npz
fps: 50
sr: 16000
num_second_wind: 1
filter: "savgol"
dataset_test:
_target_: src.datasets.components.motion_render_train.MotionRenderTrainDataset
path_data: xxx/data_test.npz
fps: 50
sr: 16000
num_second_wind: 1
filter: "savgol"
+28
View File
@@ -0,0 +1,28 @@
# @package _global_
# default debugging setup, runs 1 full epoch
# other debugging configs can inherit from this one
defaults:
- override /log_dir: debug.yaml
trainer:
max_epochs: 1
gpus: 0 # debuggers don't like gpus
detect_anomaly: true # raise exception if NaN or +/-inf is detected in any tensor
track_grad_norm: 2 # track gradient norm with loggers
datamodule:
num_workers: 0 # debuggers don't like multiprocessing
pin_memory: False # disable gpu memory pin
# sets level of all command line loggers to 'DEBUG'
# https://hydra.cc/docs/tutorials/basic/running_your_app/logging/
hydra:
verbose: True
# use this to set level of only chosen command line loggers to 'DEBUG':
# verbose: [src.train, src.utils]
# config is already printed by hydra when `hydra/verbose: True`
print_config: False
+12
View File
@@ -0,0 +1,12 @@
# @package _global_
# uses only 1% of the training data and 5% of validation/test data
defaults:
- default.yaml
trainer:
max_epochs: 3
limit_train_batches: 0.01
limit_val_batches: 0.05
limit_test_batches: 0.05
+10
View File
@@ -0,0 +1,10 @@
# @package _global_
# overfits to 3 batches
defaults:
- default.yaml
trainer:
max_epochs: 20
overfit_batches: 3
+12
View File
@@ -0,0 +1,12 @@
# @package _global_
# runs with execution time profiling
defaults:
- default.yaml
trainer:
max_epochs: 1
profiler: "simple"
# profiler: "advanced"
# profiler: "pytorch"
+9
View File
@@ -0,0 +1,9 @@
# @package _global_
# runs 1 train, 1 validation and 1 test step
defaults:
- default.yaml
trainer:
fast_dev_run: true
+9
View File
@@ -0,0 +1,9 @@
# @package _global_
# runs only test epoch
defaults:
- default.yaml
train: False
test: True
@@ -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"
@@ -0,0 +1,63 @@
# @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_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/Actor5
specifict_folder: Actor5-raw-3h
trainer:
gpus: [0, 1, 2, 4, 5, 7]
min_epochs: 100
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_Actor5_mean_smile.npy
netG:
_target_: src.models.components.audio2mesh.Audio2Mesh
num_vertices: 5023
nc_condit: 1024
dataset:
batch_size_train: 1
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"
@@ -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_21-35-54/checkpoints/epoch_014.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
@@ -0,0 +1,93 @@
# @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/Actor7
specifict_folder: Actor7-raw-processing-2h
trainer:
gpus: [1]
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_Actor7_processing.npy
pretrain: True
pretrain_path: ${path_cwd}/logs/experiments/runs/audio2motion/2022-06-09_17-19-57/checkpoints/epoch_040.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
@@ -0,0 +1,59 @@
# @package _global_
# to execute this experiment run:
# python train.py experiment=audio2mesh/train_audio2mesh_CN_20220425.yaml
defaults:
- override /dataset: motion_audio2render.yaml
- override /model: model_audio2render.yaml
- override /callbacks: callback_audio2render.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: "audio2render"
seed: 12345
path_data: ${path_cwd}/data/Actor5
specifict_folder: data-list-smile-1h
trainer:
gpus: [0,1,2]
min_epochs: 100
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: 1
model:
lr: 0.0001
opt:
path_mean_dict: ${path_data}/DECA_Actor5_mean_smile.npy
netG:
_target_: src.models.components.audio2motion.Audio2Motion
nc_motion: 53
nc_condit: 1024
dataset:
batch_size_train: 1
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
+38
View File
@@ -0,0 +1,38 @@
# @package _global_
# to execute this experiment run:
# python train.py experiment=example
defaults:
- override /datamodule: mnist.yaml
- override /model: mnist.yaml
- override /callbacks: 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
# name of the run determines folder name in logs
name: "simple_dense_net"
seed: 12345
trainer:
min_epochs: 10
max_epochs: 100
gradient_clip_val: 0.5
model:
lr: 0.002
net:
lin1_size: 128
lin2_size: 256
lin3_size: 64
datamodule:
batch_size: 64
logger:
wandb:
tags: ["mnist", "${name}"]
+60
View File
@@ -0,0 +1,60 @@
# @package _global_
# example hyperparameter optimization of some experiment with Optuna:
# python train.py -m hparams_search=mnist_optuna experiment=example
defaults:
- override /hydra/sweeper: optuna
# choose metric which will be optimized by Optuna
# make sure this is the correct name of some metric logged in lightning module!
optimized_metric: "val/acc_best"
# here we define Optuna hyperparameter search
# it optimizes for value returned from function with @hydra.main decorator
# docs: https://hydra.cc/docs/next/plugins/optuna_sweeper
hydra:
sweeper:
_target_: hydra_plugins.hydra_optuna_sweeper.optuna_sweeper.OptunaSweeper
# storage URL to persist optimization results
# for example, you can use SQLite if you set 'sqlite:///example.db'
storage: null
# name of the study to persist optimization results
study_name: null
# number of parallel workers
n_jobs: 1
# 'minimize' or 'maximize' the objective
direction: maximize
# total number of runs that will be executed
n_trials: 25
# choose Optuna hyperparameter sampler
# docs: https://optuna.readthedocs.io/en/stable/reference/samplers.html
sampler:
_target_: optuna.samplers.TPESampler
seed: 12345
n_startup_trials: 10 # number of random sampling runs before optimization starts
# define range of hyperparameters
search_space:
datamodule.batch_size:
type: categorical
choices: [32, 64, 128]
model.lr:
type: float
low: 0.0001
high: 0.2
model.net.lin1_size:
type: categorical
choices: [32, 64, 128, 256, 512]
model.net.lin2_size:
type: categorical
choices: [32, 64, 128, 256, 512]
model.net.lin3_size:
type: categorical
choices: [32, 64, 128, 256, 512]
View File
Whitespace-only changes.
+8
View File
@@ -0,0 +1,8 @@
# @package _global_
hydra:
run:
dir: logs/debugs/runs/${name}/${now:%Y-%m-%d}_${now:%H-%M-%S}
sweep:
dir: logs/debugs/multiruns/${name}/${now:%Y-%m-%d}_${now:%H-%M-%S}
subdir: ${hydra.job.num}
+8
View File
@@ -0,0 +1,8 @@
# @package _global_
hydra:
run:
dir: logs/experiments/runs/${name}/${now:%Y-%m-%d}_${now:%H-%M-%S}
sweep:
dir: logs/experiments/multiruns/${name}/${now:%Y-%m-%d}_${now:%H-%M-%S}
subdir: ${hydra.job.num}
+8
View File
@@ -0,0 +1,8 @@
# @package _global_
hydra:
run:
dir: logs/evaluations/runs/${name}/${now:%Y-%m-%d}_${now:%H-%M-%S}
sweep:
dir: logs/evaluations/multiruns/${name}/${now:%Y-%m-%d}_${now:%H-%M-%S}
subdir: ${hydra.job.num}
+7
View File
@@ -0,0 +1,7 @@
# https://www.comet.ml
comet:
_target_: pytorch_lightning.loggers.comet.CometLogger
api_key: ${oc.env:COMET_API_TOKEN} # api key is loaded from environment variable
project_name: "template-tests"
experiment_name: ${name}
+7
View File
@@ -0,0 +1,7 @@
# csv logger built in lightning
csv:
_target_: pytorch_lightning.loggers.csv_logs.CSVLogger
save_dir: "."
name: "csv/"
prefix: ""
+9
View File
@@ -0,0 +1,9 @@
# train with many loggers at once
defaults:
# - comet.yaml
- csv.yaml
# - mlflow.yaml
# - neptune.yaml
- tensorboard.yaml
- wandb.yaml
+10
View File
@@ -0,0 +1,10 @@
# https://mlflow.org
mlflow:
_target_: pytorch_lightning.loggers.mlflow.MLFlowLogger
experiment_name: ${name}
tracking_uri: null
tags: null
save_dir: ./mlruns
prefix: ""
artifact_location: null
+11
View File
@@ -0,0 +1,11 @@
# https://neptune.ai
neptune:
_target_: pytorch_lightning.loggers.neptune.NeptuneLogger
api_key: ${oc.env:NEPTUNE_API_TOKEN} # api key is loaded from environment variable
project_name: your_name/template-tests
close_after_fit: True
offline_mode: False
experiment_name: ${name}
experiment_id: null
prefix: ""
+10
View File
@@ -0,0 +1,10 @@
# https://www.tensorflow.org/tensorboard/
tensorboard:
_target_: pytorch_lightning.loggers.tensorboard.TensorBoardLogger
save_dir: "tensorboard/"
name: null
version: ${name}
log_graph: False
default_hp_metric: True
prefix: ""
+15
View File
@@ -0,0 +1,15 @@
# https://wandb.ai
wandb:
_target_: pytorch_lightning.loggers.wandb.WandbLogger
project: "template-tests"
# name: ${name}
save_dir: "."
offline: False # set True to store all logs only locally
id: null # pass correct id to resume experiment!
# entity: "" # set to name of your wandb team
log_model: False
prefix: ""
job_type: "train"
group: ""
tags: []
+16
View File
@@ -0,0 +1,16 @@
_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
lin1_size: 256
lin2_size: 256
lin3_size: 256
output_size: 10
+48
View File
@@ -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
+54
View File
@@ -0,0 +1,54 @@
_target_: src.models.module_audio2motion_gan.Audio2RenderModel
opt:
dim_x: 53
dim_c: 1024
dim_z: 32
sr: 16000
fps: 50
num_vertices: 5023
path_mean_dict: xxx/DECA_actor_mean.npy
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
opt_optim:
lr_G: 0.0025
lr_D: 0.0025
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_netT:
# tex_type: 'BFM'
# tex_path: ${path_cwd}/data/mesh/FLAME_albedo_from_BFM.npz
# n_tex: 50
opt_netR:
rasterizer_type: pytorch3d
image_size: 512
uv_size: 512 #256
topology_path: ${path_cwd}/data/mesh/head_template.obj
face_mask_path: ${path_cwd}/data/mesh/uv_face_mask.png
face_eye_mask_path: ${path_cwd}/data/mesh/uv_face_eye_mask.png
mean_tex_path: ${path_cwd}/data/mesh/mean_texture.jpg
opt_netW:
path_ckpt_wav2vec: ${path_cwd}/checkpoints/wav2vec2
+57
View File
@@ -0,0 +1,57 @@
_target_: src.models.module_audio2render.Audio2RenderModel
lr: 0.001
weight_decay: 0.0005
opt:
speech_extractor: wav2vec
sr: 16000
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:
useSeg: True
lambda_lmk: 1
lambda_eyed: 1
lambda_lipd: 1
lambda_photo: 1
lambda_reg: 0.01
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_netT:
tex_type: 'BFM'
tex_path: ${path_cwd}/data/mesh/FLAME_albedo_from_BFM.npz
n_tex: 50
opt_netR:
rasterizer_type: pytorch3d
image_size: 512
uv_size: 512 #256
topology_path: ${path_cwd}/data/mesh/head_template.obj
face_mask_path: ${path_cwd}/data/mesh/uv_face_mask.png
face_eye_mask_path: ${path_cwd}/data/mesh/uv_face_eye_mask.png
mean_tex_path: ${path_cwd}/data/mesh/mean_texture.jpg
opt_netW:
path_ckpt_wav2vec: ${path_cwd}/checkpoints/wav2vec2
netG:
_target_: src.models.components.audio2motion.Audio2Motion
nc_motion: 53
nc_condit: 1024
+32
View File
@@ -0,0 +1,32 @@
# @package _global_
# specify here default evaluation configuration
defaults:
- _self_
- datamodule: mnist.yaml # choose the datamodule for evaluation
- model: mnist.yaml
- callbacks: null
- logger: null
- trainer: default.yaml
- log_dir: evaluation.yaml
- experiment: null
# enable color logging
- override hydra/hydra_logging: colorlog
- override hydra/job_logging: colorlog
path_cwd: ${hydra:runtime.cwd}
data_dir: ${path_cwd}/data/
print_config: True
ignore_warnings: True
seed: null
name: "default"
# passing checkpoint path is necessary
ckpt_path: ???
+59
View File
@@ -0,0 +1,59 @@
# @package _global_
# specify here default training configuration
defaults:
- _self_
- 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: example.yaml
# debugging config (enable through command line, e.g. `python train.py debug=default)
- debug: null
# config for hyperparameter optimization
- hparams_search: null
# optional local config for machine/user specific settings
# it's optional since it doesn't need to exist and is excluded from version control
- optional local: default.yaml
# enable color logging
- 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
path_cwd: ${hydra:runtime.cwd}
# path to folder with data
# data_dir: ${path_cwd}/data/
# pretty print config at the start of the run using Rich library
print_config: True
# disable python warnings if they annoy you
ignore_warnings: True
# set False to skip model training
train: True
# evaluate on test set, using best model weights achieved during training
# lightning chooses best weights based on the metric specified in checkpoint callback
test: True
# seed for random number generators in pytorch, numpy and python.random
seed: null
# default name for the experiment, determines logging folder path
# (you can overwrite this name in experiment configs)
name: "default"
+6
View File
@@ -0,0 +1,6 @@
defaults:
- default.yaml
gpus: [2,3,6]
strategy: ddp
sync_batchnorm: True
+13
View File
@@ -0,0 +1,13 @@
_target_: pytorch_lightning.Trainer
# gpus: [2,3,6]
gpus: [9,]
min_epochs: 1
max_epochs: 10
# number of validation steps to execute at the beginning of the training
# num_sanity_val_steps: 0
# ckpt path
resume_from_checkpoint: null