Commit 518d5126 authored by Anthony Larcher's avatar Anthony Larcher
Browse files

new user simulation

parents cc7b0619 d0c92967
......@@ -58,4 +58,4 @@ __maintainer__ = "Anthony Larcher"
__email__ = "anthony.larcher@univ-lemans.fr"
__status__ = "Production"
__docformat__ = 'reStructuredText'
__version__="0.2.0"
__version__="0.2.6"
......@@ -578,9 +578,9 @@ def lium_xv_initial_training(model_cfg, train_data):
os.makedirs(f"{model_cfg['tmp_dir']}/model")
# Train the VAD and save to disk
train_data_vad = copy.deepcopy(train_data)
if not os.path.isfile(model_cfg['tmp_dir'] + "/model/best_vad.pt"):
lium_vad_training(model_cfg, train_data_vad)
#train_data_vad = copy.deepcopy(train_data)
#if not os.path.isfile(model_cfg['tmp_dir'] + "/model/best_vad.pt"):
# lium_vad_training(model_cfg, train_data_vad)
train_diar = s4d.diar.Diar()
df_data = dict()
......@@ -876,6 +876,7 @@ def allies_init_seg(model, system_config, show, file_info, filename, root_folder
current_vec = sidekit.StatServer(f"{model_cfg['tmp_dir']}/seg/first_th{model_cfg['first_seg']['thr_h']}/second_th{model_cfg['within_show']['th_w']}/{show}_{model_cfg['model']['vectors']['type']}v.h5")
else:
first_pass_diar = copy.deepcopy(current_diar)
current_vec = None
first_pass_vec = None
scores = None
......
#!/usr/bin/python
from user_simulation import *
uparams = {
"max_cost_per_file": 1000,
"request_collar_cost": 3,
"question_allow_boundaries": True,
"question_allow_same_intra_show": True,
"question_allow_different_intra_show": True,
"question_allow_same_inter_show": True,
"question_allow_different_inter_show": True,
"question_allow_name": True,
'minimal_validation_time': 60.0,
'minimal_validation_purity': 0.8
}
def load_uem(f):
st = []
en = []
for l in open(f, "r"):
e = l.split()
st.append(e[2])
en.append(e[3])
return UEM(np.cast["float64"](st), np.cast["float64"](en))
def load_ref(f):
spk = []
ref_st = []
ref_en = []
for l in open(f, "r"):
e = l.split()
ref_st.append(np.cast["float64"](round(float(e[2]), 3)))
ref_en.append(np.cast["float64"](round(float(e[2]) + float(e[3]), 3)))
spk.append(e[7])
return Reference(spk, ref_st, ref_en)
def load_hyp(f):
return load_ref(f)
us = UserSimulation(uparams)
ref = load_ref("utest/LCP_EntreLesLignes_2013-03-16_212400.mdtm")
uem = load_uem("utest/LCP_EntreLesLignes_2013-03-16_212400.uem")
hyp = load_hyp("utest/20130316.2124.LCP_EntreLesLignes.hyp.mdtm")
fi = FileInfo("20130316.2124.LCP_EntreLesLignes", "active", 0)
us.read(fi, uem, ref)
msg = MessageToUser(fi, hyp, Request('name', 1140, 0, ""))
ans = us.validate(msg)
print(ans)
val = us.final_commit(hyp)
print(val)
......@@ -46,7 +46,7 @@ The available questions are:
- Is the speaker at time <t1> in the current show the same as the speaker at time <t2> on show <s> (which may or may not be the current show)?
- Is the speaker at time <t1> in the current show named <n> where <n> is a previously validated name?
- What is the name of the speaker at time <t1>, if it is a previously validated name?
Note that the oracle, in user supervision, can potentially generate
......@@ -61,4 +61,20 @@ to identify a speaker at a given position):
- Boundaries: duration of the segment, with a minimum of 3s
- Same speaker? 6s, or 3 + (t2-t1) if <s> is the same show and t2-t1 < 3s (e.g. less to listen to)
- Is it that known speaker? 3s
- Who is the speaker? 3s
Timeline:
active tests: start soon
user superv. tests: march?
talking about it: april?
dev+tools: may
runs: july-beginning of september
papers: october
This diff is collapsed.
20130316.2124.LCP_EntreLesLignes 1 0 6.44 speaker na unknown S0
20130316.2124.LCP_EntreLesLignes 1 6.44 12.94 speaker na unknown S1
20130316.2124.LCP_EntreLesLignes 1 19.38 16.32 speaker na unknown S2
20130316.2124.LCP_EntreLesLignes 1 35.7 31.09 speaker na unknown S19
20130316.2124.LCP_EntreLesLignes 1 66.79 19.96 speaker na unknown S9
20130316.2124.LCP_EntreLesLignes 1 86.75 18.93 speaker na unknown S13
20130316.2124.LCP_EntreLesLignes 1 105.68 17.2 speaker na unknown S16
20130316.2124.LCP_EntreLesLignes 1 122.88 15.04 speaker na unknown S19
20130316.2124.LCP_EntreLesLignes 1 137.92 12.33 speaker na unknown S22
20130316.2124.LCP_EntreLesLignes 1 150.25 29.14 speaker na unknown S2
20130316.2124.LCP_EntreLesLignes 1 179.39 16.68 speaker na unknown S28
20130316.2124.LCP_EntreLesLignes 1 196.07 5.17 speaker na unknown S30
20130316.2124.LCP_EntreLesLignes 1 201.24 10.64 speaker na unknown S28
20130316.2124.LCP_EntreLesLignes 1 211.88 4.17 speaker na unknown S33
20130316.2124.LCP_EntreLesLignes 1 216.05 7.67 speaker na unknown S0
20130316.2124.LCP_EntreLesLignes 1 223.72 3.83 speaker na unknown S33
20130316.2124.LCP_EntreLesLignes 1 227.55 6.62 speaker na unknown S0
20130316.2124.LCP_EntreLesLignes 1 234.17 4.52 speaker na unknown S33
20130316.2124.LCP_EntreLesLignes 1 238.69 3.05 speaker na unknown S30
20130316.2124.LCP_EntreLesLignes 1 241.74 12.99 speaker na unknown S39
20130316.2124.LCP_EntreLesLignes 1 254.73 6.35 speaker na unknown S41
20130316.2124.LCP_EntreLesLignes 1 261.08 11.43 speaker na unknown S39
20130316.2124.LCP_EntreLesLignes 1 272.51 2.91 speaker na unknown S44
20130316.2124.LCP_EntreLesLignes 1 275.42 6.12 speaker na unknown S336
20130316.2124.LCP_EntreLesLignes 1 281.54 10.48 speaker na unknown S311
20130316.2124.LCP_EntreLesLignes 1 292.02 118.67 speaker na unknown S111
20130316.2124.LCP_EntreLesLignes 1 410.69 61.49 speaker na unknown S196
20130316.2124.LCP_EntreLesLignes 1 472.18 26.51 speaker na unknown S142
20130316.2124.LCP_EntreLesLignes 1 498.69 4.38 speaker na unknown S111
20130316.2124.LCP_EntreLesLignes 1 503.07 8.75 speaker na unknown S210
20130316.2124.LCP_EntreLesLignes 1 511.82 64.5 speaker na unknown S166
20130316.2124.LCP_EntreLesLignes 1 576.32 23.45 speaker na unknown S111
20130316.2124.LCP_EntreLesLignes 1 599.77 26.26 speaker na unknown S100
20130316.2124.LCP_EntreLesLignes 1 626.03 38.97 speaker na unknown S105
20130316.2124.LCP_EntreLesLignes 1 665 12.52 speaker na unknown S111
20130316.2124.LCP_EntreLesLignes 1 677.52 74.43 speaker na unknown S113
20130316.2124.LCP_EntreLesLignes 1 751.95 31.12 speaker na unknown S111
20130316.2124.LCP_EntreLesLignes 1 783.07 6.4 speaker na unknown S133
20130316.2124.LCP_EntreLesLignes 1 789.47 26.66 speaker na unknown S113
20130316.2124.LCP_EntreLesLignes 1 816.13 9.03 speaker na unknown S111
20130316.2124.LCP_EntreLesLignes 1 825.16 3.96 speaker na unknown S141
20130316.2124.LCP_EntreLesLignes 1 829.12 63 speaker na unknown S142
20130316.2124.LCP_EntreLesLignes 1 892.12 10.2 speaker na unknown S100
20130316.2124.LCP_EntreLesLignes 1 902.32 4.29 speaker na unknown S154
20130316.2124.LCP_EntreLesLignes 1 906.61 27.62 speaker na unknown S105
20130316.2124.LCP_EntreLesLignes 1 934.23 10.97 speaker na unknown S154
20130316.2124.LCP_EntreLesLignes 1 945.2 28.43 speaker na unknown S111
20130316.2124.LCP_EntreLesLignes 1 973.63 85.83 speaker na unknown S166
20130316.2124.LCP_EntreLesLignes 1 1059.46 19.45 speaker na unknown S111
20130316.2124.LCP_EntreLesLignes 1 1078.91 30.51 speaker na unknown S166
20130316.2124.LCP_EntreLesLignes 1 1109.42 14.08 speaker na unknown S113
20130316.2124.LCP_EntreLesLignes 1 1123.5 8.17 speaker na unknown S154
20130316.2124.LCP_EntreLesLignes 1 1131.67 13.84 speaker na unknown S190
20130316.2124.LCP_EntreLesLignes 1 1145.51 36.77 speaker na unknown S154
20130316.2124.LCP_EntreLesLignes 1 1182.28 24.98 speaker na unknown S196
20130316.2124.LCP_EntreLesLignes 1 1207.26 51.11 speaker na unknown S142
20130316.2124.LCP_EntreLesLignes 1 1258.37 16.19 speaker na unknown S111
20130316.2124.LCP_EntreLesLignes 1 1274.56 33.15 speaker na unknown S210
20130316.2124.LCP_EntreLesLignes 1 1307.71 6.15 speaker na unknown S190
20130316.2124.LCP_EntreLesLignes 1 1313.86 29.44 speaker na unknown S111
20130316.2124.LCP_EntreLesLignes 1 1343.3 68.25 speaker na unknown S210
20130316.2124.LCP_EntreLesLignes 1 1411.55 23.13 speaker na unknown S111
20130316.2124.LCP_EntreLesLignes 1 1434.68 46.72 speaker na unknown S113
20130316.2124.LCP_EntreLesLignes 1 1481.4 22.2 speaker na unknown S100
20130316.2124.LCP_EntreLesLignes 1 1503.6 7.06 speaker na unknown S105
20130316.2124.LCP_EntreLesLignes 1 1510.66 50.8 speaker na unknown S154
20130316.2124.LCP_EntreLesLignes 1 1561.46 8.64 speaker na unknown S111
20130316.2124.LCP_EntreLesLignes 1 1570.1 8.43 speaker na unknown S141
20130316.2124.LCP_EntreLesLignes 1 1578.53 71.4 speaker na unknown S142
20130316.2124.LCP_EntreLesLignes 1 1649.93 18.15 speaker na unknown S113
20130316.2124.LCP_EntreLesLignes 1 1668.08 24.95 speaker na unknown S210
20130316.2124.LCP_EntreLesLignes 1 1693.03 16.97 speaker na unknown S111
20130316.2124.LCP_EntreLesLignes 1 1710 16.43 speaker na unknown S196
20130316.2124.LCP_EntreLesLignes 1 1726.43 8.56 speaker na unknown S100
20130316.2124.LCP_EntreLesLignes 1 1734.99 36.13 speaker na unknown S105
20130316.2124.LCP_EntreLesLignes 1 1771.12 4.92 speaker na unknown S154
20130316.2124.LCP_EntreLesLignes 1 1776.04 4.61 speaker na unknown S196
20130316.2124.LCP_EntreLesLignes 1 1780.65 5.91 speaker na unknown S111
20130316.2124.LCP_EntreLesLignes 1 1786.56 10.51 speaker na unknown S190
20130316.2124.LCP_EntreLesLignes 1 1797.07 15.59 speaker na unknown S111
20130316.2124.LCP_EntreLesLignes 1 1812.66 22.42 speaker na unknown S210
20130316.2124.LCP_EntreLesLignes 1 1835.08 4.7 speaker na unknown S111
20130316.2124.LCP_EntreLesLignes 1 1839.78 8.61 speaker na unknown S141
20130316.2124.LCP_EntreLesLignes 1 1848.39 21.13 speaker na unknown S196
20130316.2124.LCP_EntreLesLignes 1 1869.52 19.96 speaker na unknown S111
20130316.2124.LCP_EntreLesLignes 1 1889.48 10.68 speaker na unknown S311
20130316.2124.LCP_EntreLesLignes 1 1900.16 9.65 speaker na unknown S30
20130316.2124.LCP_EntreLesLignes 1 1909.81 18.09 speaker na unknown S314
20130316.2124.LCP_EntreLesLignes 1 1927.9 16.02 speaker na unknown S316
20130316.2124.LCP_EntreLesLignes 1 1943.92 6.52 speaker na unknown S318
20130316.2124.LCP_EntreLesLignes 1 1950.44 1.95 speaker na unknown S316
20130316.2124.LCP_EntreLesLignes 1 1952.39 9.15 speaker na unknown S318
20130316.2124.LCP_EntreLesLignes 1 1961.54 1.84 speaker na unknown S316
20130316.2124.LCP_EntreLesLignes 1 1963.38 62.24 speaker na unknown S318
20130316.2124.LCP_EntreLesLignes 1 2025.62 7.44 speaker na unknown S332
20130316.2124.LCP_EntreLesLignes 1 2033.06 9.83 speaker na unknown S0
20130316.2124.LCP_EntreLesLignes 1 2042.89 8.04 speaker na unknown S334
20130316.2124.LCP_EntreLesLignes 1 2050.93 3.67 speaker na unknown S335
20130316.2124.LCP_EntreLesLignes 1 2054.6 4.68 speaker na unknown S336
20130316.2124.LCP_EntreLesLignes 1 2059.28 3.24 speaker na unknown S337
20130316.2124.LCP_EntreLesLignes 1 2062.52 4.82 speaker na unknown S30
20130316.2124.LCP_EntreLesLignes 1 2067.34 7.4 speaker na unknown S339
20130316.2124.LCP_EntreLesLignes 1 2074.74 6.39 speaker na unknown S340
20130316.2124.LCP_EntreLesLignes 1 2081.13 5.38 speaker na unknown S339
20130316.2124.LCP_EntreLesLignes 1 2086.51 7.69 speaker na unknown S340
20130316.2124.LCP_EntreLesLignes 1 2094.2 7.11 speaker na unknown S343
20130316.2124.LCP_EntreLesLignes 1 2101.31 5.44 speaker na unknown S337
20130316.2124.LCP_EntreLesLignes 1 2106.75 10.14 speaker na unknown S345
20130316.2124.LCP_EntreLesLignes 1 2116.89 34.01 speaker na unknown S347
20130316.2124.LCP_EntreLesLignes 1 2150.9 21.15 speaker na unknown S353
20130316.2124.LCP_EntreLesLignes 1 2172.05 9.54 speaker na unknown S347
20130316.2124.LCP_EntreLesLignes 1 2181.59 45.69 speaker na unknown S353
20130316.2124.LCP_EntreLesLignes 1 2227.28 22.01 speaker na unknown S347
20130316.2124.LCP_EntreLesLignes 1 2249.29 15.68 speaker na unknown S353
20130316.2124.LCP_EntreLesLignes 1 2264.97 47.71 speaker na unknown S347
20130316.2124.LCP_EntreLesLignes 1 2312.68 10.54 speaker na unknown S0
20130316.2124.LCP_EntreLesLignes 1 2323.22 16.65 speaker na unknown S347
LCP_EntreLesLignes_2013-03-16_212400 1 828.329 44.188 speaker na adult_female Anne_ROSENCHER
LCP_EntreLesLignes_2013-03-16_212400 1 872.517 0.992 speaker na adult_male Jerome_BEGLE
LCP_EntreLesLignes_2013-03-16_212400 1 873.509 18.638 speaker na adult_female Anne_ROSENCHER
LCP_EntreLesLignes_2013-03-16_212400 1 892.147 52.898 speaker na adult_female Carole_BARJON
LCP_EntreLesLignes_2013-03-16_212400 1 945.045 28.201 speaker na adult_male Christophe_RUAULTS
LCP_EntreLesLignes_2013-03-16_212400 1 973.816 85.645 speaker na adult_male Guillaume_ROQUETTE
LCP_EntreLesLignes_2013-03-16_212400 1 1059.461 19.425 speaker na adult_male Christophe_RUAULTS
LCP_EntreLesLignes_2013-03-16_212400 1 1078.886 30.629 speaker na adult_male Guillaume_ROQUETTE
LCP_EntreLesLignes_2013-03-16_212400 1 1109.515 13.614 speaker na adult_male Jerome_BEGLE
LCP_EntreLesLignes_2013-03-16_212400 1 1123.129 8.445 speaker na adult_female Carole_BARJON
LCP_EntreLesLignes_2013-03-16_212400 1 1131.574 4.316 speaker na adult_male Jerome_BEGLE
LCP_EntreLesLignes_2013-03-16_212400 1 1135.890 3.961 speaker na adult_female Carole_BARJON
LCP_EntreLesLignes_2013-03-16_212400 1 1139.851 4.828 speaker na adult_male Jerome_BEGLE
LCP_EntreLesLignes_2013-03-16_212400 1 1144.679 3.854 speaker na adult_female Carole_BARJON
LCP_EntreLesLignes_2013-03-16_212400 1 1148.533 0.966 speaker na adult_male Christophe_RUAULTS
LCP_EntreLesLignes_2013-03-16_212400 1 1149.499 32.138 speaker na adult_female Carole_BARJON
LCP_EntreLesLignes_2013-03-16_212400 1 1184.702 73.652 speaker na adult_female Anne_ROSENCHER
LCP_EntreLesLignes_2013-03-16_212400 1 1258.354 16.172 speaker na adult_male Christophe_RUAULTS
LCP_EntreLesLignes_2013-03-16_212400 1 1274.864 33.176 speaker na adult_male Guillaume_ROQUETTE
LCP_EntreLesLignes_2013-03-16_212400 1 1308.040 2.496 speaker na adult_male Jerome_BEGLE
LCP_EntreLesLignes_2013-03-16_212400 1 1310.536 0.558 speaker na adult_male Christophe_RUAULTS
LCP_EntreLesLignes_2013-03-16_212400 1 1311.094 2.639 speaker na adult_female Carole_BARJON
LCP_EntreLesLignes_2013-03-16_212400 1 1313.733 22.662 speaker na adult_male Christophe_RUAULTS
LCP_EntreLesLignes_2013-03-16_212400 1 1336.897 1.584 speaker na adult_male Christophe_RUAULTS
LCP_EntreLesLignes_2013-03-16_212400 1 1338.976 5.263 speaker na adult_male Christophe_RUAULTS
LCP_EntreLesLignes_2013-03-16_212400 1 1344.239 3.360 speaker na adult_male Guillaume_ROQUETTE
LCP_EntreLesLignes_2013-03-16_212400 1 1347.599 2.322 speaker na adult_male Christophe_RUAULTS
LCP_EntreLesLignes_2013-03-16_212400 1 1349.921 61.701 speaker na adult_male Guillaume_ROQUETTE
LCP_EntreLesLignes_2013-03-16_212400 1 1411.622 23.003 speaker na adult_male Christophe_RUAULTS
LCP_EntreLesLignes_2013-03-16_212400 1 1434.625 22.555 speaker na adult_male Jerome_BEGLE
LCP_EntreLesLignes_2013-03-16_212400 1 1457.659 23.855 speaker na adult_male Jerome_BEGLE
LCP_EntreLesLignes_2013-03-16_212400 1 1481.514 0.397 speaker na adult_male Christophe_RUAULTS
LCP_EntreLesLignes_2013-03-16_212400 1 1481.911 55.652 speaker na adult_female Carole_BARJON
LCP_EntreLesLignes_2013-03-16_212400 1 1540.877 20.466 speaker na adult_female Carole_BARJON
LCP_EntreLesLignes_2013-03-16_212400 1 1561.343 10.504 speaker na adult_male Christophe_RUAULTS
LCP_EntreLesLignes_2013-03-16_212400 1 1571.847 1.632 speaker na adult_female Anne_ROSENCHER
LCP_EntreLesLignes_2013-03-16_212400 1 1573.479 2.040 speaker na adult_male Christophe_RUAULTS
LCP_EntreLesLignes_2013-03-16_212400 1 1575.519 74.673 speaker na adult_female Anne_ROSENCHER
LCP_EntreLesLignes_2013-03-16_212400 1 1650.192 1.729 speaker na adult_male Christophe_RUAULTS
LCP_EntreLesLignes_2013-03-16_212400 1 1651.921 15.953 speaker na adult_male Jerome_BEGLE
LCP_EntreLesLignes_2013-03-16_212400 1 1667.874 25.511 speaker na adult_male Guillaume_ROQUETTE
LCP_EntreLesLignes_2013-03-16_212400 1 1693.385 16.537 speaker na adult_male Christophe_RUAULTS
LCP_EntreLesLignes_2013-03-16_212400 1 1709.922 17.361 speaker na adult_female Anne_ROSENCHER
LCP_EntreLesLignes_2013-03-16_212400 1 1727.283 18.880 speaker na adult_female Carole_BARJON
LCP_EntreLesLignes_2013-03-16_212400 1 1746.804 29.173 speaker na adult_female Carole_BARJON
LCP_EntreLesLignes_2013-03-16_212400 1 1775.977 5.357 speaker na adult_female Anne_ROSENCHER
LCP_EntreLesLignes_2013-03-16_212400 1 1781.334 5.264 speaker na adult_male Christophe_RUAULTS
LCP_EntreLesLignes_2013-03-16_212400 1 1786.598 3.619 speaker na adult_male Jerome_BEGLE
LCP_EntreLesLignes_2013-03-16_212400 1 1793.540 3.602 speaker na adult_female Carole_BARJON
LCP_EntreLesLignes_2013-03-16_212400 1 1797.142 15.390 speaker na adult_male Christophe_RUAULTS
LCP_EntreLesLignes_2013-03-16_212400 1 1812.532 22.613 speaker na adult_male Guillaume_ROQUETTE
LCP_EntreLesLignes_2013-03-16_212400 1 828.329 973.246
LCP_EntreLesLignes_2013-03-16_212400 1 973.816 1181.637
LCP_EntreLesLignes_2013-03-16_212400 1 1184.702 1274.526
LCP_EntreLesLignes_2013-03-16_212400 1 1274.864 1336.395
LCP_EntreLesLignes_2013-03-16_212400 1 1336.897 1338.481
LCP_EntreLesLignes_2013-03-16_212400 1 1338.976 1457.180
LCP_EntreLesLignes_2013-03-16_212400 1 1457.659 1537.563
LCP_EntreLesLignes_2013-03-16_212400 1 1540.877 1746.163
LCP_EntreLesLignes_2013-03-16_212400 1 1746.804 1790.217
LCP_EntreLesLignes_2013-03-16_212400 1 1793.540 1835.145
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