Commit ee8ce1fd authored by Rémi Bèges's avatar Rémi Bèges

BPM on a balanced dataset m17_dataclean_300k_balanced

parent 91b063e1
......@@ -63,7 +63,8 @@ def fetch_dataset_slices(dir, test_percent=10, block_ms=32, framerate=16000):
#feat = feat[:, :16]
#feat = dct(feat)
feat = feat[:, :14]
feat = feat / 1000.0
# Remap to approx. 0 - 1
#feat = feat / 1000.0 + 1.0
print('Feats min/max: {}/{}'.format(
np.amin(feat),
np.amax(feat)
......
......@@ -17,7 +17,7 @@ def sync(movie, sub):
meta_graph_def = tf.saved_model.loader.load(
sess,
[tf.saved_model.tag_constants.SERVING],
'saved_models/m13_dataclean_300k',
'saved_models/m17_dataclean_300k_balanced',
)
signature = meta_graph_def.signature_def
signature_key = tf.saved_model.signature_constants.DEFAULT_SERVING_SIGNATURE_DEF_KEY
......
......@@ -32,7 +32,7 @@ def train(dir='.'):
epochs = 200
batch_size = 32
# m6 is just feat normalized
model_id = 'm15_dataclean_300k'
model_id = 'm17_dataclean_300k_balanced'
logsess = 'logs/' + model_id
training_set = create_dataset(train_audio, train_subs)
......@@ -229,7 +229,7 @@ def train(dir='.'):
'''
def main():
dir = ["datasets/Song*.avi", "datasets/Game*.mkv"]
dir = ["datasets/10*.avi", "datasets/Game*.mkv"]
print('Beginning training, data dir: {}'.format(dir))
train(dir=dir)
......
......@@ -19,7 +19,7 @@ def verify(dir):
meta_graph_def = tf.saved_model.loader.load(
sess,
[tf.saved_model.tag_constants.SERVING],
'saved_models/m15_dataclean_300k',
'saved_models/m17_dataclean_300k_balanced',
)
signature = meta_graph_def.signature_def
signature_key = tf.saved_model.signature_constants.DEFAULT_SERVING_SIGNATURE_DEF_KEY
......@@ -55,7 +55,7 @@ def verify(dir):
result_bin = np.zeros(result[:, 0].shape)
result_bin[result[:, 0] > 0.5] = 1
result_bin_f = medfilt(result_bin, kernel_size=11)
result_bin_f = medfilt(result_bin, kernel_size=21)
reconstruct_sub(result_bin_f, block_len_ms=32)
plt.plot(xaxis, result[:, 0])
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment