Skip to content

Commit

Permalink
Adding support for ASLLVD and RWTH-PHOENIX_SIGNER03-CUTOUT (#32)
Browse files Browse the repository at this point in the history
* Adding support for ASLLVD dataset

* Adding support for rwth-phoenix-weather-signer03-cutout
  • Loading branch information
Sumit-Negi-github committed Mar 1, 2022
1 parent f0f3e37 commit 5b2e4f8
Show file tree
Hide file tree
Showing 10 changed files with 1,068 additions and 0 deletions.
138 changes: 138 additions & 0 deletions examples/configs/asllvd/decoupled_gcn.yaml
@@ -0,0 +1,138 @@
data:
modality: "pose"
train_pipeline:
dataset:
_target_: openhands.datasets.isolated.ASLLVDDataset
split_file: "ASLLVD/splitted/train_label.json"
root_dir: "ASLLVD/PKL_POSES"
class_mappings_file_path: "ASLLVD/segmented/label_name.txt"
splits: "train"
modality: "pose"

transforms:
- PoseSelect:
preset: mediapipe_holistic_minimal_27
# - PoseTemporalSubsample:
# num_frames: 32
# - RandomMove:
- CenterAndScaleNormalize:
reference_points_preset: shoulder_mediapipe_holistic_minimal_27
scale_factor: 1
- ShearTransform:
shear_std: 0.1
- RotatationTransform:
rotation_std: 0.1
# - ScaleTransform:
# scale_std: 0.2

dataloader:
_target_: torch.utils.data.DataLoader
batch_size: 64
shuffle: true
num_workers: 6
pin_memory: true
drop_last: true

valid_pipeline:
dataset:
_target_: openhands.datasets.isolated.ASLLVDDataset
split_file: "ASLLVD/splitted/test_label.json"
root_dir: "ASLLVD/PKL_POSES"
class_mappings_file_path: "ASLLVD/segmented/label_name.txt"
splits: "test"
modality: "pose"

transforms:
- PoseSelect:
preset: mediapipe_holistic_minimal_27
# - PoseTemporalSubsample:
# num_frames: 32
- CenterAndScaleNormalize:
reference_points_preset: shoulder_mediapipe_holistic_minimal_27
scale_factor: 1

dataloader:
_target_: torch.utils.data.DataLoader
batch_size: 32
shuffle: false
num_workers: 8
pin_memory: true
drop_last: false

model:
encoder:
type: decoupled-gcn
params:
graph_args:
num_nodes: 27
inward_edges:
[
[2, 0],
[1, 0],
[0, 3],
[0, 4],
[3, 5],
[4, 6],
[5, 7],
[6, 17],
[7, 8],
[7, 9],
[9, 10],
[7, 11],
[11, 12],
[7, 13],
[13, 14],
[7, 15],
[15, 16],
[17, 18],
[17, 19],
[19, 20],
[17, 21],
[21, 22],
[17, 23],
[23, 24],
[17, 25],
[25, 26],
]
decoder:
type: fc
params:
dropout_ratio: 0.2

optim:
loss: 'CrossEntropyLoss'
optimizer:
name: Adam
params:
lr: 1e-3

scheduler:
name: CosineAnnealingLR
params:
last_epoch: -1
T_max: 10

trainer:
gpus: 1
max_epochs: 1000

exp_manager:
create_tensorboard_logger: true
create_wandb_logger: false
wandb_logger_kwargs:
name: null
project: null

create_checkpoint_callback: true
checkpoint_callback_params:
monitor: "val_acc"
mode: "max"
save_top_k: 3
dirpath: "experiments/asllvd/decoupled_gcn/"

early_stopping_callback: true
early_stopping_params:
monitor: "val_acc"
patience: 100
verbose: true
mode: "max"
109 changes: 109 additions & 0 deletions examples/configs/asllvd/pose_lstm.yaml
@@ -0,0 +1,109 @@
data:
modality: "pose"
train_pipeline:
dataset:
_target_: openhands.datasets.isolated.ASLLVDDataset
split_file: "ASLLVD/splitted/train_label.json"
root_dir: "ASLLVD/PKL_POSES"
class_mappings_file_path: "ASLLVD/segmented/label_name.txt"
splits: "train"
modality: "pose"

transforms:
- PoseSelect:
preset: mediapipe_holistic_minimal_27
# - PoseTemporalSubsample:
# num_frames: 32
- CenterAndScaleNormalize:
reference_points_preset: shoulder_mediapipe_holistic_minimal_27
- ShearTransform:
shear_std: 0.1
- RotatationTransform:
rotation_std: 0.1
# - ScaleTransform:
# scale_std: 0.2

dataloader:
_target_: torch.utils.data.DataLoader
batch_size: 64
shuffle: true
num_workers: 1
pin_memory: true
drop_last: true

valid_pipeline:
dataset:
_target_: openhands.datasets.isolated.ASLLVDDataset
split_file: "ASLLVD/splitted/test_label.json"
root_dir: "ASLLVD/PKL_POSES"
class_mappings_file_path: "ASLLVD/segmented/label_name.txt"
splits: "test"
modality: "pose"

transforms:
- PoseSelect:
preset: mediapipe_holistic_minimal_27
# - PoseTemporalSubsample:
# num_frames: 32
- CenterAndScaleNormalize:
reference_points_preset: shoulder_mediapipe_holistic_minimal_27

dataloader:
_target_: torch.utils.data.DataLoader
batch_size: 32
shuffle: false
num_workers: 3
pin_memory: true
drop_last: false

model:
encoder:
type: pose-flattener
params:
num_points: 27
decoder:
type: rnn
params:
rnn_type: LSTM
hidden_size: 256
num_layers: 2
bidirectional: true
use_attention: true

optim:
loss: 'CrossEntropyLoss'
optimizer:
name: Adam
params:
lr: 5e-3

scheduler:
name: CosineAnnealingLR
params:
last_epoch: -1
T_max: 10

trainer:
gpus: 1
max_epochs: 1000

exp_manager:
create_tensorboard_logger: true
create_wandb_logger: false
wandb_logger_kwargs:
name: null
project: null

create_checkpoint_callback: true
checkpoint_callback_params:
monitor: "val_acc"
mode: "max"
save_top_k: 3
dirpath: "experiments/asllvd/lstm/"

early_stopping_callback: true
early_stopping_params:
monitor: "val_acc"
patience: 100
verbose: true
mode: "max"
114 changes: 114 additions & 0 deletions examples/configs/asllvd/pose_transformer.yaml
@@ -0,0 +1,114 @@
data:
modality: "pose"
train_pipeline:
dataset:
_target_: openhands.datasets.isolated.ASLLVDDataset
split_file: "ASLLVD/splitted/train_label.json"
root_dir: "ASLLVD/PKL_POSES"
class_mappings_file_path: "ASLLVD/segmented/label_name.txt"
splits: "train"
modality: "pose"

transforms:
- PoseSelect:
preset: mediapipe_holistic_minimal_27
# - PoseTemporalSubsample:
# num_frames: 32
# - RandomMove:
- CenterAndScaleNormalize:
reference_points_preset: shoulder_mediapipe_holistic_minimal_27
scale_factor: 1
- ShearTransform:
shear_std: 0.1
- RotatationTransform:
rotation_std: 0.1
# - ScaleTransform:
# scale_std: 0.2

dataloader:
_target_: torch.utils.data.DataLoader
batch_size: 64
shuffle: true
num_workers: 6
pin_memory: true
drop_last: true

valid_pipeline:
dataset:
_target_: openhands.datasets.isolated.ASLLVDDataset
split_file: "ASLLVD/splitted/test_label.json"
root_dir: "ASLLVD/PKL_POSES"
class_mappings_file_path: "ASLLVD/segmented/label_name.txt"
splits: "val"
modality: "pose"

transforms:
- PoseSelect:
preset: mediapipe_holistic_minimal_27
# - PoseTemporalSubsample:
# num_frames: 32
- CenterAndScaleNormalize:
reference_points_preset: shoulder_mediapipe_holistic_minimal_27
scale_factor: 1

dataloader:
_target_: torch.utils.data.DataLoader
batch_size: 32
shuffle: false
num_workers: 6
pin_memory: true
drop_last: false

model:
encoder:
type: pose-flattener
params:
num_points: 27
decoder:
type: bert
params:
max_position_embeddings: 256
layer_norm_eps: 1e-12
hidden_dropout_prob: 0.1
hidden_size: 64
num_attention_heads: 8
num_hidden_layers: 3
cls_token: true

optim:
loss: 'CrossEntropyLoss'
optimizer:
name: Adam
params:
lr: 1e-4

scheduler:
name: CosineAnnealingLR
params:
last_epoch: -1
T_max: 10

trainer:
gpus: 1
max_epochs: 1500

exp_manager:
create_tensorboard_logger: true
create_wandb_logger: false
wandb_logger_kwargs:
name: null
project: null

create_checkpoint_callback: true
checkpoint_callback_params:
monitor: "val_acc"
mode: "max"
save_top_k: 3
dirpath: "experiments/asllvd/pose_transformer/"

early_stopping_callback: true
early_stopping_params:
monitor: "val_acc"
patience: 100
verbose: true
mode: "max"

0 comments on commit 5b2e4f8

Please sign in to comment.