Skip to content
Snippets Groups Projects
Commit c122850f authored by chinyun_yu_joey's avatar chinyun_yu_joey
Browse files

use shifts 3 to avoid timeout

parent a44b8981
No related branches found
Tags submission-fusion-3model
No related merge requests found
......@@ -10,8 +10,8 @@ from evaluator.music_demixing import MusicDemixingPredictor
fusion_weights = np.array([0.27203053, 0.73882418])
fusion_weights_batch = np.array([[0.25, 0.27, 0.5, 0.6],
[0.75, 0.73, 0.5, 0.4]])
fusion_weights_batch = np.array([[0.2, 0.3, 0.5, 0.6],
[0.8, 0.7, 0.5, 0.4]])
fusion_weights_full = np.array(
[[0.12421362233786719, 0.053170121998740195, -0.023004887368765208, -0.030820051344791908, 0.7362167118453092, -0.2011487819137626, -0.1254105898553318, -0.11682101700727994, 0.14540460690976179],
[0.06420106209073237, 0.07177930713127706, 0.0035666737989309845, 0.0005502465774743552, -
......@@ -47,7 +47,7 @@ def separate(
unet_model,
demucs_model,
niter=0,
shifts=4
shifts=3
):
unet_predict = unet_separate(audio, unet_model, niter=niter)
demucs_predict = demucs_separate(audio, 44100, demucs_model, shifts=shifts)
......@@ -60,8 +60,8 @@ def separate(
# chunks = vad(estimates[3].sum(0), 44100, threshold=0.3)
# for on, off in chunks:
# estimates[3, :, on:off] = 0
# gains = lstsq(estimates.reshape(4, -1), mix.ravel())
# estimates *= gains[:, None, None]
gains = lstsq(estimates.reshape(4, -1), mix.ravel())
estimates *= gains[:, None, None]
return estimates
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment