Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TCN: CSV Dive file generation, data generation with correct step GT, re-training #26

Merged
merged 12 commits into from
Jun 11, 2024
102 changes: 59 additions & 43 deletions configs/experiment/m2/feat_v6.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
# to execute this experiment run:
# python train.py experiment=example
task: "m2"
feature_version: 6
topic: "medical"

defaults:
- override /data: ptg
- override /model: ptg
Expand All @@ -13,16 +16,10 @@ defaults:

# all parameters below will be merged with parameters from default configurations set above
# this allows you to overwrite only specified parameters
# exp_name: "p_m2_tqt_data_test_feat_v6_with_pose" #[_v2_aug_False]
# exp_name: "p_m2_tqt_data_test_feat_v6_with_pose_v3_aug_False_reshuffle_True" #[_v2_aug_False]
exp_name: "p_m2_feat_v6_with_pose_v3_aug_False_reshuffle_True"
# exp_name: "p_m2_feat_v6_no_pose_v3_aug_False_reshuffle_True"
# exp_name: "p_m2_tqt_data_test_feat_v6_with_pose_v2_aug_False_reshuffle_False" #[_v2_aug_False]
# exp_name: "p_m2_tqt_data_test_feat_v6_with_pose_v2_aug_True_reshuffle_True" #[_v2_aug_False]
# exp_name: "p_m2_tqt_data_test_feat_v6_with_pose_v2_aug_True_reshuffle_False" #[_v2_aug_False]
# exp_name: "p_m2_feat_v6_with_pose_v3_aug_False_reshuffle_True"


tags: ["m2", "ms_tcn"]
tags: ["m2", "ms_tcn", "debug"]

seed: 12345

Expand All @@ -35,15 +32,61 @@ model:
compile: false

net:
dim: 209 # length of feature vector
dim: 297 # length of feature vector

IMAGE_HZ: 30 # zed bags
#IMAGE_HZ: 15 # BBN hololens live
OBJECT_DET_HZ: 15
POSE_HZ: 4



data_gen:
top_k_objects: 1
pose_repeat_rate: 7.5
num_augs: 5

data_type: "pro"
# dataset_kwcoco: "/data/users/peri.akiva/datasets/ptg/m2_all_all_obj_results_with_dets_and_pose.mscoco.json"
dataset_kwcoco: "/data/PTG/medical/coco/m2_all_all_obj_results_with_dets_and_pose.mscoco.json"


activity_config_fn: "/home/local/KHQ/peri.akiva/projects/angel_system/config/activity_labels/medical/m2.yaml"
exp_ext: "_NEW_ORDER_fix_overlap_gt_step_gt" # anything unique about this run that isn't already in ``exp_name``
exp_name: "${task}_${data_gen.data_type}_data_top_${data_gen.top_k_objects}_objs_feat_v${feature_version}_pose_rate_${data_gen.pose_repeat_rate}${data_gen.exp_ext}"
raw_data_root: /data/PTG/medical/bbn_data/Release_v0.5/v0.56
dive_output_root: /data/PTG/medical/activity_anns

filter_black_gloves: false
filter_blue_gloves: false
train_vid_ids: [1, 2, 4, 8, 9, 10, 11, 12, 16, 17,18, 20, 19, 30, 31, 32, 33, 34,35,36,
7,132,133,50,51,54,56,52,61,53,57,65,66,67,68,69,58,60,64,125,126,
127,129,131,134,135,136,119,122,124,70,72,92,93,94,95,97,98,100,
101,102,103,104,105,107,108,112,114,117,118,73]
val_vid_ids: [5, 59,106,130,138, 77, 123, 71]
test_vid_ids: [3,14,55,62,96,109,128,137,139, 120, 75, 21, 13]

names_black_gloves: [22,23,26,24,25,27,29,28,41,42,43,44,45,46,47,48,49,78,
79,84,88,90,80,81,82,83,85,86,87,89,91,99,110,111,121,113,115,116]
names_blue_gloves: [132,133,50,51,54,55,56,52,61,59,53,57,62,65,66,67,68,69,
58,60,63,64,125,126,127,129,131,134,135,136,128,130,137,
138,139]

train_vid_ids_bbn: [3, 4, 5, 9, 10, 11, 12,
13, 14, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28,
31, 32, 33, 34,35,36, 37, 38, 39, 40,
41, 42, 43, 44, 45, 46, 48, 49,
51, 52, 53, 54]
val_vid_ids_bbn: [1, 6, 7, 29, 50]
test_vid_ids_bbn: [2, 8, 30, 47]

data:
num_classes: 9 # activities: includes background
batch_size: 512
num_workers: 16
epoch_length: 20000
window_size: 30
sample_rate: 1
window_size: 25
sample_rate: 2

all_transforms:
train_order: [] #["MoveCenterPts", "NormalizePixelPts"]
Expand All @@ -58,46 +101,19 @@ data:
feat_version: 6
num_obj_classes: 9 # not including background

data_gen:
reshuffle_datasets: true
augment: false
num_augs: 5
feat_type: "with_pose" #[no_pose, with_pose, only_hands_joints, only_objects_joints]
filter_black_gloves: false
filter_blue_gloves: false
train_vid_ids: [1, 2, 4, 8, 9, 10, 11, 12, 16, 17,18, 20, 19, 30, 31, 32, 33, 34,35,36,
7,132,133,50,51,54,56,52,61,53,57,65,66,67,68,69,58,60,64,125,126,
127,129,131,134,135,136,119,122,124,70,72,92,93,94,95,97,98,100,
101,102,103,104,105,107,108,112,114,117,118,73]
val_vid_ids: [5, 59,106,130,138, 77, 123, 71]
test_vid_ids: [3,14,55,62,96,109,128,137,139, 120, 75, 21, 13]
names_black_gloves: [22,23,26,24,25,27,29,28,41,42,43,44,45,46,47,48,49,78,
79,84,88,90,80,81,82,83,85,86,87,89,91,99,110,111,121,113,115,116]
names_blue_gloves: [132,133,50,51,54,55,56,52,61,59,53,57,62,65,66,67,68,69,
58,60,63,64,125,126,127,129,131,134,135,136,128,130,137,
138,139]
exp_name: ${data_gen.exp_name}_win_${data.window_size}_obj_sample_${data.sample_rate}


paths:
# data_dir: "/data/PTG/TCN_data/m2/p_m2_tqt_data_test_feat_v6_with_pose_v2_aug_False_reshuffle_True" #[_v2_aug_False]
data_dir: "/data/PTG/TCN_data/m2/p_m2_feat_v6_with_pose_v3_aug_False_reshuffle_True" #[_v2_aug_False]
# data_dir: "/data/PTG/TCN_data/m2/p_m2_feat_v6_no_pose_v3_aug_False_reshuffle_True" #[_v2_aug_False]
# data_dir: "/data/PTG/TCN_data/m2/p_m2_feat_v6_no_pose_v3_aug_False_reshuffle_True" #[_v2_aug_False]
# data_dir: "/data/PTG/TCN_data/m2/p_m2_tqt_data_test_feat_v6_with_pose_v2_aug_False_reshuffle_False" #[_v2_aug_False]
# data_dir: "/data/PTG/TCN_data/m2/p_m2_tqt_data_test_feat_v6_with_pose_v2_aug_True_reshuffle_True" #[_v2_aug_False]
# data_dir: "/data/PTG/TCN_data/m2/p_m2_tqt_data_test_feat_v6_with_pose_v2_aug_True_reshuffle_False" #[_v2_aug_False]

# root_dir: "/data/PTG/medical/training/activity_classifier/TCN_HPL"
root_dir: "/data/users/peri.akiva/PTG/medical/training/activity_classifier/TCN_HPL"

# dataset_kwcoco: "/data/users/peri.akiva/datasets/ptg/m2_good_images_only_no_amputation_stump_train_activity_obj_results_with_dets_and_pose.mscoco.json"
data_dir: "/data/PTG/medical/training/activity_classifier/TCN_data/${task}/${data_gen.exp_name}"
root_dir: "/data/PTG/medical/training/activity_classifier/TCN_HPL/"
dataset_kwcoco: "/data/users/peri.akiva/datasets/ptg/m2_all_all_obj_results_with_dets_and_pose.mscoco.json"
activity_config_root: "/home/local/KHQ/peri.akiva/projects/angel_system/config/activity_labels"
dataset_kwcoco_lab:
activity_config_root: "/home/local/KHQ/peri.akiva/projects/angel_system/config/activity_labels/medical"
activity_config_fn: "${paths.activity_config_root}/${task}"
ptg_root: "/home/local/KHQ/peri.akiva/angel_system"
activity_config_path: "${paths.ptg_root}/config/activity_labels/medical"
output_data_dir_root: "/data/PTG/TCN_data"
# bbn_data_root: "{bbn_data_dir}/Release_v0.5/v0.56"
bbn_data_dir: "/data/PTG/medical/bbn_data"


Expand Down
95 changes: 51 additions & 44 deletions configs/experiment/m3/feat_v6.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
# to execute this experiment run:
# python train.py experiment=example
task: "m3"
feature_version: 6
topic: "medical"

defaults:
- override /data: ptg
- override /model: ptg
Expand All @@ -13,16 +16,10 @@ defaults:

# all parameters below will be merged with parameters from default configurations set above
# this allows you to overwrite only specified parameters
# exp_name: "p_m2_tqt_data_test_feat_v6_with_pose" #[_v2_aug_False]
# exp_name: "p_m2_tqt_data_test_feat_v6_with_pose_v3_aug_False_reshuffle_True" #[_v2_aug_False]
exp_name: "p_m3_feat_v6_with_pose_v3_aug_False_reshuffle_True"
# exp_name: "p_m2_feat_v6_no_pose_v3_aug_False_reshuffle_True"
# exp_name: "p_m2_tqt_data_test_feat_v6_with_pose_v2_aug_False_reshuffle_False" #[_v2_aug_False]
# exp_name: "p_m2_tqt_data_test_feat_v6_with_pose_v2_aug_True_reshuffle_True" #[_v2_aug_False]
# exp_name: "p_m2_tqt_data_test_feat_v6_with_pose_v2_aug_True_reshuffle_False" #[_v2_aug_False]
# exp_name: "p_m3_feat_v6_with_pose_v3_aug_False_reshuffle_True"


tags: ["m3", "ms_tcn"]
tags: ["m3", "ms_tcn", "debug"]

seed: 12345

Expand All @@ -35,15 +32,51 @@ model:
compile: false

net:
dim: 188 # length of feature vector
dim: 246 # length of feature vector



data_gen:
top_k_objects: 1
pose_repeat_rate: 7.5
num_augs: 5
feat_type: "with_pose" #[no_pose, with_pose, only_hands_joints, only_objects_joints]

data_type: "pro"
# dataset_kwcoco: "/data/users/peri.akiva/datasets/ptg/m2_all_all_obj_results_with_dets_and_pose.mscoco.json"
dataset_kwcoco: "/data/PTG/medical/coco/m3_all_all_obj_results_with_dets_and_pose.mscoco.json"

activity_config_fn: "/home/local/KHQ/peri.akiva/projects/angel_system/config/activity_labels/medical/m3.yaml"
exp_ext: "_NEW_ORDER_fix_overlap_gt_step_gt" # anything unique about this run that isn't already in ``exp_name``
exp_name: "${task}_${data_gen.data_type}_data_top_${data_gen.top_k_objects}_objs_feat_v${feature_version}_pose_rate_${data_gen.pose_repeat_rate}${data_gen.exp_ext}"
raw_data_root: /data/PTG/medical/bbn_data/Release_v0.5/v0.56
dive_output_root: /data/PTG/medical/activity_anns

filter_black_gloves: false
filter_blue_gloves: false
train_vid_ids: [1, 2, 4, 5, 6, 8, 9, 11, 12, 15, 16, 17, 19, 20, 21,
22, 23, 24, 26, 28, 29, 30, 31, 33, 34, 35, 36, 37, 38, 39, 40,
42, 44, 45, 48, 49, 51, 52, 53, 54]
val_vid_ids: [3, 7, 10, 18, 27, 32]
test_vid_ids: [50, 13, 47, 25]
names_black_gloves: [22,23,26,24,25,27,29,28,41,42,43,44,45,46,47,48,49,78,
79,84,88,90,80,81,82,83,85,86,87,89,91,99,110,111,121,113,115,116]
names_blue_gloves: [132,133,50,51,54,55,56,52,61,59,53,57,62,65,66,67,68,69,
58,60,63,64,125,126,127,129,131,134,135,136,128,130,137,
138,139]
train_vid_ids_bbn: [1, 2, 3, 4, 5, 6, 7, 8]
val_vid_ids_bbn: [9]
test_vid_ids_bbn: [10]



data:
num_classes: 6 # activities: includes background
batch_size: 512
num_workers: 0
num_workers: 16
epoch_length: 20000
window_size: 45
sample_rate: 1
window_size: 25
sample_rate: 2

all_transforms:
train_order: [] #["MoveCenterPts", "NormalizePixelPts"]
Expand All @@ -58,45 +91,19 @@ data:
feat_version: 6
num_obj_classes: 4 # not including background

data_gen:
reshuffle_datasets: true
augment: false
num_augs: 5
feat_type: "with_pose" #[no_pose, with_pose, only_hands_joints, only_objects_joints]
filter_black_gloves: false
filter_blue_gloves: false
train_vid_ids: [1, 2, 4, 5, 6, 8, 9, 11, 12, 14, 15, 16, 17, 19, 20, 21,
22, 23, 24, 26, 28, 29, 30, 31, 33, 34, 35, 36, 37, 38, 39, 40,
42, 43, 44, 45, 46, 48, 49, 51, 52, 53, 54]
val_vid_ids: [3, 7, 10, 18, 27, 32, 41]
test_vid_ids: [50, 13, 47, 25]
names_black_gloves: [22,23,26,24,25,27,29,28,41,42,43,44,45,46,47,48,49,78,
79,84,88,90,80,81,82,83,85,86,87,89,91,99,110,111,121,113,115,116]
names_blue_gloves: [132,133,50,51,54,55,56,52,61,59,53,57,62,65,66,67,68,69,
58,60,63,64,125,126,127,129,131,134,135,136,128,130,137,
138,139]

exp_name: ${data_gen.exp_name}_win_${data.window_size}_obj_sample_${data.sample_rate}

paths:
# data_dir: "/data/PTG/TCN_data/m2/p_m2_tqt_data_test_feat_v6_with_pose_v2_aug_False_reshuffle_True" #[_v2_aug_False]
data_dir: "/data/PTG/TCN_data/m3/p_m3_feat_v6_with_pose_v3_aug_False_reshuffle_True" #[_v2_aug_False]
# data_dir: "/data/PTG/TCN_data/m2/p_m2_feat_v6_no_pose_v3_aug_False_reshuffle_True" #[_v2_aug_False]
# data_dir: "/data/PTG/TCN_data/m2/p_m2_feat_v6_no_pose_v3_aug_False_reshuffle_True" #[_v2_aug_False]
# data_dir: "/data/PTG/TCN_data/m2/p_m2_tqt_data_test_feat_v6_with_pose_v2_aug_False_reshuffle_False" #[_v2_aug_False]
# data_dir: "/data/PTG/TCN_data/m2/p_m2_tqt_data_test_feat_v6_with_pose_v2_aug_True_reshuffle_True" #[_v2_aug_False]
# data_dir: "/data/PTG/TCN_data/m2/p_m2_tqt_data_test_feat_v6_with_pose_v2_aug_True_reshuffle_False" #[_v2_aug_False]

# root_dir: "/data/PTG/medical/training/activity_classifier/TCN_HPL"
root_dir: "/data/users/peri.akiva/PTG/medical/training/activity_classifier/TCN_HPL"

# dataset_kwcoco: "/data/users/peri.akiva/datasets/ptg/m2_good_images_only_no_amputation_stump_train_activity_obj_results_with_dets_and_pose.mscoco.json"
# data_dir: "/data/PTG/TCN_data/m3/p_m3_feat_v6_with_pose_v3_aug_False_reshuffle_True" #[_v2_aug_False]
data_dir: "/data/PTG/medical/training/activity_classifier/TCN_data/${task}/${data_gen.exp_name}"
root_dir: "/data/PTG/medical/training/activity_classifier/TCN_HPL/"
dataset_kwcoco: "/data/users/peri.akiva/datasets/ptg/m3_all_all_obj_results_with_dets_and_pose.mscoco.json"
activity_config_root: "/home/local/KHQ/peri.akiva/projects/angel_system/config/activity_labels"
dataset_kwcoco_lab: /data/PTG/medical/coco/m3_lab_all_all_obj_results_with_dets_and_pose.mscoco.json
activity_config_root: "/home/local/KHQ/peri.akiva/projects/angel_system/config/activity_labels/medical"
activity_config_fn: "${paths.activity_config_root}/${task}"
ptg_root: "/home/local/KHQ/peri.akiva/angel_system"
activity_config_path: "${paths.ptg_root}/config/activity_labels/medical"
output_data_dir_root: "/data/PTG/TCN_data"
# bbn_data_root: "{bbn_data_dir}/Release_v0.5/v0.56"
bbn_data_dir: "/data/PTG/medical/bbn_data"


Expand Down
77 changes: 48 additions & 29 deletions configs/experiment/m5/feat_v6.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,10 @@

# to execute this experiment run:
# python train.py experiment=example
topic: "medical"
task: "m5"
feature_version: 6

defaults:
- override /data: ptg
- override /model: ptg
Expand All @@ -14,12 +17,10 @@ defaults:
# all parameters below will be merged with parameters from default configurations set above
# this allows you to overwrite only specified parameters
# exp_name: "p_m2_tqt_data_test_feat_v6_with_pose" #[_v2_aug_False]
exp_name: "p_m5_feat_v6_with_pose_v3_aug_False_reshuffle_True" #[_v2_aug_False]
# exp_name: "p_m2_tqt_data_test_feat_v6_with_pose_v2_aug_False_reshuffle_False" #[_v2_aug_False]
# exp_name: "p_m2_tqt_data_test_feat_v6_with_pose_v2_aug_True_reshuffle_True" #[_v2_aug_False]
# exp_name: "p_m2_tqt_data_test_feat_v6_with_pose_v2_aug_True_reshuffle_False" #[_v2_aug_False]
# exp_name: "p_m5_feat_v6_with_pose_v3_aug_False_reshuffle_True" #[_v2_aug_False]
# exp_name: "p_m5_feat_v6_with_pose_v3_aug_False_reshuffle_True_lab"

tags: ["m5", "ms_tcn"]
tags: ["m5", "ms_tcn", "debug"]

seed: 12345

Expand All @@ -32,15 +33,47 @@ model:
compile: false

net:
dim: 188 # length of feature vector
dim: 246 # length of feature vector

IMAGE_HZ: 30 # zed bags
#IMAGE_HZ: 15 # BBN hololens live
OBJECT_DET_HZ: 15
POSE_HZ: 4


data_gen:
top_k_objects: 1
pose_repeat_rate: 7.5
data_type: "pro"
# feat_type: "with_pose" #[no_pose, with_pose, only_hands_joints, only_objects_joints]
dataset_kwcoco: "/data/users/peri.akiva/datasets/ptg/m5_all_all_obj_results_with_dets_and_pose.mscoco.json"

filter_black_gloves: false
filter_blue_gloves: false
train_vid_ids: [1, 2, 4, 5, 6, 8, 9, 11, 12, 16, 19, 20, 21,
22, 23, 24, 26, 28, 29, 30, 31, 33, 34, 35, 36, 37,
42, 43, 44, 45, 46, 48, 49]
val_vid_ids: [3, 7, 10, 18, 27, 32, 41]
test_vid_ids: [50, 13, 47, 25]

train_vid_ids_bbn: [3, 4, 6, 7, 9, 11, 12, 13,
14, 16, 17, 18, 20, 21, 19, 22, 23]
val_vid_ids_bbn: [1, 5, 10]
test_vid_ids_bbn: [2, 8]

activity_config_fn: "/home/local/KHQ/peri.akiva/projects/angel_system/config/activity_labels/medical/m5.yaml"
exp_ext: "_NEW_ORDER_fix_overlap_gt_step_GT_corrected" # anything unique about this run that isn't already in ``exp_name``
exp_name: "${task}_${data_gen.data_type}_data_top_${data_gen.top_k_objects}_objs_feat_v${feature_version}_pose_rate_${data_gen.pose_repeat_rate}${data_gen.exp_ext}"
raw_data_root: /data/PTG/medical/bbn_data/Release_v0.5/v0.56
dive_output_root: /data/PTG/medical/activity_anns

data:
num_classes: 6 # activities: includes background
batch_size: 512
num_workers: 0
num_workers: 12
epoch_length: 20000
window_size: 30
sample_rate: 1
window_size: 25
sample_rate: 2


all_transforms:
Expand All @@ -55,29 +88,15 @@ data:
feat_version: 6
num_obj_classes: 6 # not including background


data_gen:
reshuffle_datasets: true
augment: false
num_augs: 5
feat_type: "with_pose" #[no_pose, with_pose, only_hands_joints, only_objects_joints]
filter_black_gloves: false
filter_blue_gloves: false
train_vid_ids: [1, 2, 4, 5, 6, 8, 9, 11, 12, 14, 15, 16, 17, 19, 20, 21,
22, 23, 24, 26, 28, 29, 30, 31, 33, 34, 35, 36, 37, 38, 39, 40,
42, 43, 44, 45, 46, 48, 49]
val_vid_ids: [3, 7, 10, 18, 27, 32, 41]
test_vid_ids: [50, 13, 47, 25]
exp_name: ${data_gen.exp_name}_win_${data.window_size}_obj_sample_${data.sample_rate}

paths:
data_dir: "/data/PTG/TCN_data/m5/p_m5_feat_v6_with_pose_v3_aug_False_reshuffle_True" #[_v2_aug_False]
# data_dir: "/data/PTG/TCN_data/m2/p_m2_tqt_data_test_feat_v6_with_pose_v2_aug_False_reshuffle_False" #[_v2_aug_False]
# data_dir: "/data/PTG/TCN_data/m2/p_m2_tqt_data_test_feat_v6_with_pose_v2_aug_True_reshuffle_True" #[_v2_aug_False]
# data_dir: "/data/PTG/TCN_data/m2/p_m2_tqt_data_test_feat_v6_with_pose_v2_aug_True_reshuffle_False" #[_v2_aug_False]
# root_dir: "/data/PTG/medical/training/activity_classifier/TCN_HPL"
root_dir: "/data/users/peri.akiva/PTG/medical/training/activity_classifier/TCN_HPL"
data_dir: "/data/PTG/medical/training/activity_classifier/TCN_data/${task}/${data_gen.exp_name}"
root_dir: "/data/PTG/medical/training/activity_classifier/TCN_HPL/"

dataset_kwcoco: "/data/users/peri.akiva/datasets/ptg/m5_all_all_obj_results_with_dets_and_pose.mscoco.json"
activity_config_root: "/home/local/KHQ/peri.akiva/projects/angel_system/config/activity_labels"
dataset_kwcoco_lab: "/data/users/peri.akiva/datasets/ptg/m5_lab_all_all_obj_results_with_dets_and_pose.mscoco.json"
activity_config_root: "/home/local/KHQ/peri.akiva/projects/angel_system/config/activity_labels/medical"
activity_config_fn: "${paths.activity_config_root}/${task}"
ptg_root: "/home/local/KHQ/peri.akiva/angel_system"
activity_config_path: "${paths.ptg_root}/config/activity_labels/medical"
Expand Down
Loading
Loading