Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
f0_estimation
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container 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
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Paul Best
f0_estimation
Commits
c07becfa
Commit
c07becfa
authored
1 year ago
by
Paul Best
Browse files
Options
Downloads
Patches
Plain Diff
small fixes
parent
86633898
No related branches found
No related tags found
No related merge requests found
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
freq_distrib.pdf
+0
-0
0 additions, 0 deletions
freq_distrib.pdf
plot_scores_bars.py
+2
-1
2 additions, 1 deletion
plot_scores_bars.py
run_all.py
+1
-1
1 addition, 1 deletion
run_all.py
scores.pdf
+0
-0
0 additions, 0 deletions
scores.pdf
train_crepe.py
+3
-3
3 additions, 3 deletions
train_crepe.py
with
6 additions
and
5 deletions
freq_distrib.pdf
+
0
−
0
View file @
c07becfa
No preview for this file type
This diff is collapsed.
Click to expand it.
plot_scores_bars.py
+
2
−
1
View file @
c07becfa
...
...
@@ -20,7 +20,8 @@ for i, metric in enumerate(metrics):
for
specie
in
species
:
df
=
pd
.
read_csv
(
f
'
scores/
{
specie
}
_scores
{
"
_minusvocs
"
if
drop_noisy_vocs
else
""
}{
"
_minusbins
"
if
drop_noisy_bins
else
""
}
.csv
'
,
index_col
=
0
)
df
[
'
Specificity
'
]
=
1
-
df
[
'
False alarm
'
]
ok
.
loc
[
specie
,
df
.
index
]
=
df
[
metric
]
ok
.
loc
[
specie
.
replace
(
'
_
'
,
'
'
),
df
.
index
]
=
df
[
metric
]
ok
=
ok
[
algos
]
# bar plot
m_ax
=
ax
[
int
(
i
//
2
),
i
%
2
]
...
...
This diff is collapsed.
Click to expand it.
run_all.py
+
1
−
1
View file @
c07becfa
...
...
@@ -60,7 +60,7 @@ for specie in species if args.specie =='all' else args.specie.split(' '):
out
=
pd
.
read_csv
(
f
'
{
fn
[
:
-
4
]
}
_preds.csv
'
)
# check if everything has already been computed, and if yes skip the file
for
algo
in
algos
:
if
out
[
algo
].
isna
().
all
():
if
algo
in
out
.
columns
and
out
[
algo
].
isna
().
all
():
out
.
drop
(
algo
,
axis
=
1
,
inplace
=
True
)
if
pd
.
Series
(
algos
).
isin
(
out
.
columns
).
all
():
continue
...
...
This diff is collapsed.
Click to expand it.
scores.pdf
+
0
−
0
View file @
c07becfa
No preview for this file type
This diff is collapsed.
Click to expand it.
train_crepe.py
+
3
−
3
View file @
c07becfa
...
...
@@ -18,15 +18,15 @@ model.load_state_dict(torch.load('/home/paul.best/.local/lib/python3.9/site-pack
model
=
model
.
train
().
to
(
'
cuda
'
)
FS
,
n_in
,
f0
=
16000
,
1024
,
10
dt
=
n_in
//
8
# winsize / 8
norm
=
lambda
s
:
(
s
-
np
.
mean
(
s
))
/
max
(
1e-8
,
np
.
std
(
s
))
if
not
os
.
path
.
isfile
(
f
'
crepe_ft/train_set_
{
suffix
}
.pkl
'
):
df
=
[]
for
specie
in
([
args
.
only
]
if
args
.
only
else
set
(
species
)
-
{
args
.
omit
}
if
args
.
omit
else
species
):
wavpath
,
fs
,
nfft
,
downsample
=
species
[
specie
].
values
()
wavpath
,
fs
,
nfft
,
downsample
,
step
=
species
[
specie
].
values
()
dt
=
int
(
n_in
*
step
)
# winsize / 8
files
=
glob
.
glob
(
wavpath
)
for
fn
in
tqdm
.
tqdm
(
pd
.
Series
(
files
).
sample
(
min
(
len
(
files
),
1000
)),
desc
=
specie
):
for
fn
in
tqdm
.
tqdm
(
pd
.
Series
(
files
).
sample
(
min
(
len
(
files
),
1000
)),
desc
=
'
Peparing dataset for
'
+
specie
):
if
os
.
path
.
isfile
(
f
'
noisy_pngs/
{
fn
[
:
-
4
]
}
.png
'
):
continue
annot
=
pd
.
read_csv
(
fn
[:
-
4
]
+
'
.csv
'
).
drop_duplicates
(
subset
=
'
Time
'
)
...
...
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