Commit 6a7c1eef authored by Anthony Larcher's avatar Anthony Larcher
Browse files

cleaning and debug HAL

parent bd58b919
......@@ -316,6 +316,7 @@ def allies_cross_show_clustering(show_idx, model, current_diar, current_vec, th_
lim=lim,
reference_path=reference_path,
do_hal=hal)
model["previous_vec"]=previous_vec
model["previous_diar"]=previous_diar
......
......@@ -1051,7 +1051,6 @@ def run_active_learning_tree(link,
stop_clustering_list = [] # a list of nodes that have gotten confirmation for clustering question
der, new_diar = check_der(init_diar, bottomline_cluster_list, temporary_link_list, ref, uem)
print("Initial DER based on bottomline_diar and linkage : ", der)
der_track_show = {"der_log": [der], "correction": ["initial"]}
for node in links_to_check:
......@@ -1277,12 +1276,12 @@ def allies_within_show_hal(model_cfg,
model_cfg["model"]["vad"]["type"] = "reference"
model_cfg['first_seg']['thr_h']=model_cfg['within_show']['thr_h']
bottomline_diar, link_within_clusters_dic, vec_within_clusters_dic = create_bottomline_clustering(model,
model_cfg,
show,
init_diar,
data_folder)
model_cfg["model"]["vad"]["type"] = backup_vad_type
model_cfg['first_seg']['thr_h'] = backup_thr_h
......@@ -1296,15 +1295,14 @@ def allies_within_show_hal(model_cfg,
# check does bottomline_diar plus sub cluster linkage make current_diar #
hyp = s4d_to_allies(init_diar)
der_init, fa_rate, miss_rate, conf_rate, error, time, newspkmap = compute_der([ref], [hyp], [uem], collar = 0.250)
print("Current DER (original) : ", der_init)
hyp = s4d_to_allies(bottomline_diar)
der, fa_rate, miss_rate, conf_rate, error, time, newspkmap = compute_der([ref], [hyp], [uem], collar = 0.250)
print("DER of bottomline_diar: ", der)
vec_per_seg.modelset = vec_per_seg.modelset.astype(object)
for idx in range(len(bottomline_diar)):
vec_per_seg.modelset[idx] = bottomline_diar[idx]['cluster']
#for idx in range(len(bottomline_diar)):
# vec_per_seg.modelset[idx] = bottomline_diar[idx]['cluster']
if c2s != 'ideal':
......
......@@ -68,11 +68,6 @@ def bic_linear_segmentation(init_diar, cep, model_cfg):
output_diar = s4d.segmentation(cep, output_diar)
output_diar = s4d.bic_linear(cep, output_diar, model_cfg['first_seg']['thr_l'], sr=False)
#for seg in output_diar:
# if seg.duration() > 3:
# final_diar.append_diar(seg)
#print(f"Nombre de segments apres BIC LIN filtering: {len(final_diar)}")
return output_diar
......
......@@ -209,7 +209,7 @@ def apply_link_on_diar(current_diar, cluster_list, full_link_tmp):
cluster_list.append(c_label)
current_diar.rename('cluster', [c0], c_label)
else:
print("in gone", full_link_tmp[i])
#print("in gone", full_link_tmp[i])
pass
i += 1
......
Supports Markdown
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