Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
music-demixing-challenge-starter-kit
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
yoyololicon
music-demixing-challenge-starter-kit
Commits
4bf09366
Commit
4bf09366
authored
3 years ago
by
chinyun_yu_joey
Browse files
Options
Downloads
Patches
Plain Diff
draft
parent
49eba0d3
No related branches found
Branches containing commit
Tags
submission-fusion-3model
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
eval.py
+20
-0
20 additions, 0 deletions
eval.py
test_demucs.py
+1
-1
1 addition, 1 deletion
test_demucs.py
test_unet.py
+7
-2
7 additions, 2 deletions
test_unet.py
with
28 additions
and
3 deletions
eval.py
0 → 100644
+
20
−
0
View file @
4bf09366
import
museval
import
argparse
if
__name__
==
'
__main__
'
:
# Training settings
parser
=
argparse
.
ArgumentParser
(
description
=
'
MUSDB18 Evaluation
'
,
add_help
=
False
)
parser
.
add_argument
(
'
--eval-path
'
,
type
=
str
,
help
=
'
Path evaluation root folder
'
)
args
=
parser
.
parse_args
()
method
=
museval
.
EvalStore
()
method
.
add_eval_dir
(
args
.
eval_path
)
print
(
method
)
This diff is collapsed.
Click to expand it.
test_demucs.py
+
1
−
1
View file @
4bf09366
...
...
@@ -12,7 +12,7 @@ def separate(
audio
,
rate
,
model
,
shifts
=
5
,
shifts
=
1
,
device
=
"
cpu
"
):
...
...
This diff is collapsed.
Click to expand it.
test_unet.py
+
7
−
2
View file @
4bf09366
...
...
@@ -4,6 +4,7 @@ import norbert
import
numpy
as
np
import
soundfile
as
sf
import
torch
from
tqdm
import
tqdm
# from torch_specinv import griffin_lim
from
evaluator.music_demixing
import
MusicDemixingPredictor
...
...
@@ -47,7 +48,7 @@ def istft(X, n_fft=4096, n_hopsize=1024):
def
separate
(
audio
,
x_umx_target
,
niter
=
0
,
niter
=
1
,
softmask
=
False
,
alpha
=
1.0
,
residual_model
=
False
,
...
...
@@ -90,7 +91,11 @@ def separate(
with
torch
.
no_grad
():
mag
=
X
.
abs
()
masked_tf_rep
=
x_umx_target
(
mag
.
unsqueeze
(
0
)).
squeeze
()
*
mag
frames
=
2584
masked_tf_rep
=
[]
for
chunk
in
tqdm
(
mag
.
split
(
frames
,
dim
=-
1
)):
masked_tf_rep
+=
[
x_umx_target
(
chunk
.
unsqueeze
(
0
)).
squeeze
()]
masked_tf_rep
=
torch
.
cat
(
masked_tf_rep
,
-
1
)
*
mag
Vj
=
masked_tf_rep
.
cpu
().
numpy
()
if
softmask
:
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment