-
Notifications
You must be signed in to change notification settings - Fork 381
/
tsn_k400_frames.yaml
138 lines (125 loc) · 4.9 KB
/
tsn_k400_frames.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
MODEL: #MODEL field
framework: "Recognizer2D" #Mandatory, indicate the type of network, associate to the 'paddlevideo/modeling/framework/' .
backbone: #Mandatory, indicate the type of backbone, associate to the 'paddlevideo/modeling/backbones/' .
name: "ResNet" #Mandatory, The name of backbone.
pretrained: "data/ResNet50_pretrain.pdparams" #Optional, pretrained model path.
depth: 50 #Optional, the depth of backbone architecture.
head:
name: "TSNHead" #Mandatory, indicate the type of head, associate to the 'paddlevideo/modeling/heads'
num_classes: 400 #Optional, the number of classes to be classified.
in_channels: 2048 #input channel of the extracted feature.
drop_ratio: 0.4 #the ratio of dropout
std: 0.01 #std value in params initialization
DATASET: #DATASET field
batch_size: 32 #Mandatory, bacth size
valid_batch_size: 32
test_batch_size: 1
num_workers: 4 #Mandatory, XXX the number of subprocess on each GPU.
train:
format: "FrameDataset" #Mandatory, indicate the type of dataset, associate to the 'paddlevidel/loader/dateset'
data_prefix: "data/k400/rawframes" #Mandatory, train data root path
file_path: "data/k400/train_frames.list" #Mandatory, train data index file path
suffix: 'img_{:05}.jpg'
valid:
format: "FrameDataset" #Mandatory, indicate the type of dataset, associate to the 'paddlevidel/loader/dateset'
data_prefix: "data/k400/rawframes" #Mandatory, valid data root path
file_path: "data/k400/val_frames.list" #Mandatory, valid data index file path
suffix: 'img_{:05}.jpg'
test:
format: "FrameDataset" #Mandatory, indicate the type of dataset, associate to the 'paddlevidel/loader/dateset'
data_prefix: "data/k400/rawframes" #Mandatory, valid data root path
file_path: "data/k400/val_frames.list" #Mandatory, valid data index file path
suffix: 'img_{:05}.jpg'
PIPELINE: #PIPELINE field
train: #Mandotary, indicate the pipeline to deal with the training data, associate to the 'paddlevideo/loader/pipelines/'
decode:
name: "FrameDecoder"
sample:
name: "Sampler"
num_seg: 3
seg_len: 1
valid_mode: False
select_left: True
transform: #Mandotary, image transfrom operator
- Scale:
short_size: 256
fixed_ratio: False
do_round: True
backend: 'cv2'
- MultiScaleCrop:
target_size: 224
allow_duplication: True
more_fix_crop: False
backend: 'cv2'
- RandomFlip:
- Image2Array:
- Normalization:
mean: [0.485, 0.456, 0.406]
std: [0.229, 0.224, 0.225]
valid: #Mandatory, indicate the pipeline to deal with the validing data. associate to the 'paddlevideo/loader/pipelines/'
decode:
name: "FrameDecoder"
sample:
name: "Sampler"
num_seg: 3
seg_len: 1
valid_mode: True
select_left: True
transform:
- Scale:
short_size: 256
fixed_ratio: False
do_round: True
backend: 'cv2'
- CenterCrop:
target_size: 224
do_round: False
- Image2Array:
- Normalization:
mean: [0.485, 0.456, 0.406]
std: [0.229, 0.224, 0.225]
test:
decode:
name: "FrameDecoder"
sample:
name: "Sampler"
num_seg: 25
seg_len: 1
valid_mode: True
select_left: True
transform:
- Scale:
short_size: 256
fixed_ratio: False
do_round: True
backend: 'cv2'
- TenCrop:
target_size: 224
- Image2Array:
- Normalization:
mean: [0.485, 0.456, 0.406]
std: [0.229, 0.224, 0.225]
OPTIMIZER: #OPTIMIZER field
name: 'Momentum' #Mandatory, the type of optimizer, associate to the 'paddlevideo/solver/'
momentum: 0.9
learning_rate: #Mandatory, the type of learning rate scheduler, associate to the 'paddlevideo/solver/'
name: 'PiecewiseDecay'
boundaries: [40, 80]
values: [0.01, 0.001, 0.0001] #4 cards * 32 batch size
weight_decay:
name: 'L2'
value: 0.0001
grad_clip:
name: 'ClipGradByGlobalNorm'
value: 40.0
METRIC:
name: 'CenterCropMetric'
INFERENCE:
name: 'ppTSN_Inference_helper'
num_seg: 25
target_size: 224
model_name: "TSN"
log_interval: 20 #Optional, the interal of logger, default:10
save_interval: 10
epochs: 100 #Mandatory, total epoch
log_level: "INFO" #Optional, the logger level. default: "INFO"