/
task5.yaml
272 lines (235 loc) · 7.21 KB
/
task5.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
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
active_set: dev
sets:
- set_id: dev # development dataset (folds)
general:
active_fold_list: [1,2,3,4]
dataset:
method: baseline_development
feature_processing_chain:
method: DCASE2018_Task5_baseline
data_processing_chain:
method: DCASE2018_Task5_baseline
learner:
method: DCASE2018_Task5_baseline
- set_id: train # development dataset (full) to be used on eval set
dataset:
method: baseline_challenge_train
feature_processing_chain:
method: DCASE2018_Task5_baseline
data_processing_chain:
method: DCASE2018_Task5_baseline
learner:
method: DCASE2018_Task5_baseline
- set_id: eval # challenge evaluation set
dataset:
method: baseline_challenge_eval # available from DCASE util v0.2.4 (release 30/06/2018)
feature_processing_chain:
method: DCASE2018_Task5_baseline
data_processing_chain:
method: DCASE2018_Task5_baseline
learner:
method: DCASE2018_Task5_baseline
defaults:
flow:
feature_extraction: true
feature_normalization: true
learning: true
testing: true
evaluation: true
general:
overwrite: false # Overwrite previously stored data
eval_mode: true # challenge evaluation mode
active_fold_list: [1,2,3,4]
path:
dataset: dataset/
log: log/
application:
base: output/
feature_extractor: features
feature_normalizer: normalization
learner: learner
recognizer: recognizer
dataset:
method: baseline_development
dataset_method_parameters:
baseline_development:
dataset: DCASE2018_Task5_DevelopmentSet
evaluation_mode: folds
baseline_challenge_train:
dataset: DCASE2018_Task5_DevelopmentSet
evaluation_mode: full
baseline_challenge_eval:
dataset: DCASE2018_Task5_EvaluationSet
evaluation_mode: full
feature_extractor:
recipe: mel
win_length_seconds: 0.04
hop_length_seconds: 0.02
fs: 16000
channels: 4
feature_extractor_method_parameters:
mel:
spectrogram_type: magnitude
window_type: hamming_asymmetric
n_mels: 40
n_fft: 1024
fmin: 50
fmax: 8000
htk: false
normalize_mel_bands: false
logarithmic: true
feature_processing_chain:
method: DCASE2018_Task5_baseline
feature_processing_chain_method_parameters:
DCASE2018_Task5_baseline:
chain:
- processor_name: AudioReadingProcessor # read multi-channel audio
- processor_name: RepositoryFeatureExtractorProcessor # extract features based on 'feature_extractor'
data_processing_chain_method_parameters:
DCASE2018_Task5_baseline:
chain:
- processor_name: RepositoryFeatureReadingProcessor # read features into repository
- processor_name: RepositoryNormalizationProcessor # normalize features
init_parameters:
enable: true
- processor_name: RepositorySequencingProcessor # add dimension
init_parameters: # no sequencing
sequence_length: 501
hop_length: 501
- processor_name: RepositoryToMatrixProcessor # convert repo to matrix
init_parameters:
label: mel
expanded_dimension: first
- processor_name: DataShapingProcessor # rearrange dimensions to match keras model input
init_parameters:
axis_list:
- channel_axis
- sequence_axis
- data_axis
- time_axis
learner_method_parameters:
DCASE2018_Task5_baseline:
random_seed: 0
profile: deterministic
backend: tensorflow
validation_amount: 0.3
model:
constants:
CLASS_COUNT: 9
FEATURE_VECTOR_LENGTH: 40
INPUT_SEQUENCE_LENGTH: 501
CONVOLUTION_FILTER: 32
CONVOLUTION_INIT: he_normal
CONVOLUTION_BORDER_MODE: valid
CONVOLUTION_DATA_FORMAT: channels_first
CONVOLUTION_ACTIVATION: relu
CONVOLUTION_DROPOUT: 0.2
DENSE_UNITS: 64
DENSE_DROPOUT: 0.2
config:
# CNN layer 1
# ====================================
# Convolution layer
- class_name: Conv2D
config:
input_shape:
- 1 # channel_axis
- FEATURE_VECTOR_LENGTH # data_axis
- INPUT_SEQUENCE_LENGTH # time_axis
filters: CONVOLUTION_FILTER
kernel_size:
- FEATURE_VECTOR_LENGTH
- 5
strides:
- 1
- 1
padding: CONVOLUTION_BORDER_MODE
kernel_initializer: CONVOLUTION_INIT
data_format: CONVOLUTION_DATA_FORMAT
# Batch normalization
- class_name: BatchNormalization
config:
axis: 1 # data_axis
# Detection layer
- class_name: Activation
config:
activation: CONVOLUTION_ACTIVATION
# Pooling layer
- class_name: MaxPooling2D
config:
pool_size:
- 1
- 5
strides:
- 1
- 5
data_format: CONVOLUTION_DATA_FORMAT
# Drop out layer
- class_name: Dropout
config:
rate: CONVOLUTION_DROPOUT
# CNN layer 2
# ====================================
# Convolution layer
- class_name: Conv2D
config:
filters: CONVOLUTION_FILTER * 2
kernel_size:
- 1
- 3
strides:
- 1
- 1
padding: CONVOLUTION_BORDER_MODE
kernel_initializer: CONVOLUTION_INIT
data_format: CONVOLUTION_DATA_FORMAT
# Batch normalization
- class_name: BatchNormalization
config:
axis: 1 # data_axis
# Detection layer
- class_name: Activation
config:
activation: CONVOLUTION_ACTIVATION
# Pooling layer
- class_name: GlobalMaxPooling2D
config:
data_format: CONVOLUTION_DATA_FORMAT
# Drop out layer
- class_name: Dropout
config:
rate: CONVOLUTION_DROPOUT
# ====================================
# Fully connected layer
- class_name: Dense
config:
units: DENSE_UNITS
kernel_initializer: uniform
activation: relu
- class_name: Dropout
config:
rate: DENSE_DROPOUT
# ====================================
# Output layer
- class_name: Dense
config:
units: CLASS_COUNT
kernel_initializer: uniform
activation: softmax
compile:
loss: sparse_categorical_crossentropy
metrics:
- sparse_categorical_accuracy
optimizer:
class_name: Adam
config:
lr: 0.0001
fit:
epochs: 500
processing_interval: 10
batch_size: 256
shuffle: True
undersampling: uniform
recognizer:
fusion:
method: mean