Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
144 changes: 144 additions & 0 deletions config/gtea/TSM_memory_tcn/resnet50tsm_memory_tcn_gtea_s1.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,144 @@
MODEL:
architecture: "StreamSegmentation2D"
backbone:
name: "ResNetTSM"
pretrained: "data/tsm_r50_dense_256p_1x1x8_100e_kinetics400_rgb_20200727-e1e0c785.pth"
clip_seg_num: 32
shift_div: 8
out_indices: (3, )
neck:
name: "AvgPoolNeck"
num_classes: 11
in_channels: 2048
clip_seg_num: 32
drop_ratio: 0.5
need_pool: True
head:
name: "MemoryTCNHead"
num_stages: 1
num_layers: 4
num_f_maps: 64
dim: 2048
num_classes: 11
sample_rate: 4
loss:
name: "SegmentationLoss"
num_classes: 11
sample_rate: 4
smooth_weight: 0.15
ignore_index: -100

POSTPRECESSING:
name: "StreamScorePostProcessing"
num_classes: 11
clip_seg_num: 32
sliding_window: 128
sample_rate: 4
ignore_index: -100

COLLATE:
name: "StreamBatchCompose"
to_tensor_keys: ["imgs", "labels", "masks", "precise_sliding_num"]

DATASET: #DATASET field
temporal_clip_batch_size: 3
video_batch_size: 2
num_workers: 0
train:
name: "RawFrameStreamSegmentationDataset"
data_prefix: "./" #Mandatory, train data root path
file_path: "data/gtea/splits/train.split1.bundle" #Mandatory, train data index file path
videos_path: "data/gtea/Videos"
gt_path: "data/gtea/groundTruth"
actions_map_file_path: "data/gtea/mapping.txt"
dataset_type: "gtea"
train_mode: True
sliding_window: 128
clip_seg_num: 32
sample_rate: 4
test:
name: "RawFrameStreamSegmentationDataset"
data_prefix: "./" #Mandatory, train data root path
file_path: "data/gtea/splits/test.split1.bundle" #Mandatory, train data index file path
videos_path: "./data/gtea/Videos"
gt_path: "./data/gtea/groundTruth"
actions_map_file_path: "data/gtea/mapping.txt"
dataset_type: "gtea"
train_mode: False
sliding_window: 128
clip_seg_num: 32
sample_rate: 4

PIPELINE: #PIPELINE field
train:
name: "BasePipline"
decode:
name: "VideoDecoder"
backend: "decord"
sample:
name: "VideoStreamSampler"
is_train: True
sample_rate: 4
clip_seg_num: 32
sliding_window: 128
sample_mode: "uniform"
transform: #Mandotary, image transform operator.
name: "VideoStreamTransform"
transform_list:
- Resize:
size: [256, 320]
- RandomCrop:
size: 224
- RandomHorizontalFlip:
- ToTensor:
- Normalize:
mean: [0.551, 0.424, 0.179]
std: [0.133, 0.141, 0.124]

test:
name: "BasePipline"
decode:
name: "VideoDecoder"
backend: "decord"
sample:
name: "VideoStreamSampler"
is_train: ""
sample_rate: 4
clip_seg_num: 32
sliding_window: 128
sample_mode: "uniform"
transform:
name: "VideoStreamTransform"
transform_list:
- Resize:
size: [256, 320]
- CenterCrop:
size: 224
- ToTensor:
- Normalize:
mean: [0.551, 0.424, 0.179]
std: [0.133, 0.141, 0.124]

OPTIMIZER:
name: "TSMAdamOptimizer"
learning_rate: 0.0005
weight_decay: 1e-4
betas: (0.9, 0.999)

LRSCHEDULER:
name: "MultiStepLR"
step_size: [50]
gamma: 0.1

METRIC:
name: "TASegmentationMetric"
overlap: [.1, .25, .5]
actions_map_file_path: "./data/gtea/mapping.txt"
file_output: True
score_output: True


model_name: "ResnetTSM_Memory_TCN_gtea_latest"
log_interval: 4 #Optional, the interal of logger, default:10
epochs: 50 #Mandatory, total epoch
save_interval: 50
144 changes: 144 additions & 0 deletions config/gtea/TSM_memory_tcn/resnet50tsm_memory_tcn_split1.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,144 @@
MODEL:
architecture: "StreamSegmentation2D"
backbone:
name: "ResNetTSM"
pretrained: "clsLess_tsm_r50_256p_1x1x8_kinetics400_rgb_.pth"
clip_seg_num: 32
shift_div: 8
out_indices: (3, )
neck:
name: "AvgPoolNeck"
num_classes: 5
in_channels: 2048
clip_seg_num: 32
drop_ratio: 0.5
need_pool: True
head:
name: "MemoryTCNHead"
num_stages: 1
num_layers: 4
num_f_maps: 64
dim: 2048
num_classes: 5
sample_rate: 4
loss:
name: "SegmentationLoss"
num_classes: 5
sample_rate: 4
smooth_weight: 0.15
ignore_index: -100

POSTPRECESSING:
name: "StreamScorePostProcessing"
num_classes: 5
clip_seg_num: 32
sliding_window: 128
sample_rate: 4
ignore_index: -100

COLLATE:
name: "StreamBatchCompose"
to_tensor_keys: ["imgs", "labels", "masks", "precise_sliding_num"]

DATASET: #DATASET field
temporal_clip_batch_size: 3
video_batch_size: 2
num_workers: 0
train:
name: "RawFrameStreamSegmentationDataset"
data_prefix: "./" #Mandatory, train data root path
file_path: "./data/thal/splits/train.split1.bundle" #Mandatory, train data index file path
videos_path: "./data/thal/Videos"
gt_path: "./data/thal/groundTruth"
actions_map_file_path: "./data/thal/mapping.txt"
dataset_type: "gtea"
train_mode: True
sliding_window: 128
clip_seg_num: 32
sample_rate: 4
test:
name: "RawFrameStreamSegmentationDataset"
data_prefix: "./" #Mandatory, train data root path
file_path: "./data/thal/splits/test.split1.bundle" #Mandatory, train data index file path
videos_path: "./data/thal/Videos"
gt_path: "./data/thal/groundTruth"
actions_map_file_path: "./data/thal/mapping.txt"
dataset_type: "gtea"
train_mode: False
sliding_window: 128
clip_seg_num: 32
sample_rate: 4

PIPELINE: #PIPELINE field
train:
name: "BasePipline"
decode:
name: "VideoDecoder"
backend: "decord"
sample:
name: "VideoStreamSampler"
is_train: True
sample_rate: 4
clip_seg_num: 32
sliding_window: 128
sample_mode: "uniform"
transform: #Mandotary, image transform operator.
name: "VideoStreamTransform"
transform_list:
- Resize:
size: [256, 320]
- RandomCrop:
size: 224
- RandomHorizontalFlip:
- ToTensor:
- Normalize:
mean: [0.485, 0.456, 0.406]
std: [0.229, 0.224, 0.225]

test:
name: "BasePipline"
decode:
name: "VideoDecoder"
backend: "decord"
sample:
name: "VideoStreamSampler"
is_train: False
sample_rate: 4
clip_seg_num: 32
sliding_window: 128
sample_mode: "uniform"
transform:
name: "VideoStreamTransform"
transform_list:
- Resize:
size: [256, 320]
- CenterCrop:
size: 224
- ToTensor:
- Normalize:
mean: [0.485, 0.456, 0.406]
std: [0.229, 0.224, 0.225]

OPTIMIZER:
name: "TSMAdamOptimizer"
learning_rate: 0.0005
weight_decay: 1e-4
betas: (0.9, 0.999)

LRSCHEDULER:
name: "MultiStepLR"
step_size: [50]
gamma: 0.1

METRIC:
name: "TASegmentationMetric"
overlap: [.1, .25, .5]
actions_map_file_path: "./data/thal/mapping.txt"
file_output: True
score_output: True


model_name: "ResnetMemTCN_Thal_Areas_45_4_32SW"
log_interval: 1 #Optional, the interal of logger, default:10
epochs: 150 #Mandatory, total epoch
save_interval: 50
Loading