Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Anthony Larcher
evALLIES
Commits
72c906a8
Commit
72c906a8
authored
Jun 04, 2021
by
Anthony Larcher
Browse files
debug
parent
004ecc58
Changes
3
Hide whitespace changes
Inline
Side-by-side
lium_baseline/cross_show.py
View file @
72c906a8
...
...
@@ -280,7 +280,7 @@ def allies_cross_show_clustering(show,
shows
=
[]
archive_models
=
[]
a_xv
=
numpy
.
empty
((
len
(
speaker_dictionary
),
256
))
a_xv
=
numpy
.
empty
((
len
(
speaker_dictionary
),
model_cfg
[
"model"
][
"vectors"
][
"size"
]
))
for
idx
,
(
k
,
v
)
in
enumerate
(
speaker_dictionary
.
items
()):
shows
.
append
(
k
[
0
])
spk_ids
.
append
(
k
[
1
])
...
...
lium_baseline/interactive.py
View file @
72c906a8
...
...
@@ -80,7 +80,8 @@ def create_bottomline_clustering(model, model_cfg, show, current_diar, file_path
diar_per_cluster
=
init_clustering
(
copy
.
deepcopy
(
init_diar
),
cep
,
model_cfg
)
model_cfg
,
"reference"
)
print
(
f
"cluster_
{
cluster
}
with
{
len
(
diar_per_cluster
)
}
segs changed to "
f
"
{
len
(
diar_per_cluster
.
unique
(
'cluster'
))
}
clusters"
)
...
...
@@ -95,10 +96,10 @@ def create_bottomline_clustering(model, model_cfg, show, current_diar, file_path
if
len
(
diar_per_cluster
.
unique
(
'cluster'
))
>
1
:
# calculate vector per cluster
_
,
current_vec_within_cluster
=
extract_vectors
(
diar_per_cluster
,
file_path
,
# f"{show}_{cluster}",
model_cfg
,
show
,
model
)
file_path
,
model_cfg
,
show
,
model
)
vec_within_clusters_dic
[
cluster
]
=
current_vec_within_cluster
# calculate score and link for each cluster
...
...
@@ -1218,6 +1219,7 @@ def allies_within_show_hal(model_cfg,
c2s
=
float
(
'inf'
)):
"""
:param data_folder:
:param model_cfg:
:param model:
:param show:
...
...
lium_baseline/system.py
View file @
72c906a8
...
...
@@ -72,7 +72,7 @@ def bic_linear_segmentation(init_diar, cep, model_cfg):
return
output_diar
def
init_clustering
(
init_diar
,
cep
,
model_cfg
):
def
init_clustering
(
init_diar
,
cep
,
model_cfg
,
vad_type
=
"none"
):
"""
Calculate HAC diarization for a given segmentation
Starting from a
...
...
@@ -798,7 +798,7 @@ def allies_init_seg(model, model_cfg, show, data_folder, verbose=False):
# Run the first pass of segmentation
logger
.
info
(
"
\t
* run 1st clustering"
)
current_diar
=
init_clustering
(
init_diar
,
cep
,
model_cfg
)
current_diar
=
init_clustering
(
init_diar
,
cep
,
model_cfg
,
model_cfg
[
"model"
][
"vad"
][
"type"
]
)
# Extract segment representation (i-vectors or x-vectors)
logger
.
info
(
"
\t
* extract vectors"
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment