Generating confusion matrix with HResults HTK Tool for handwriting recognition ICFHR’s example -
i studying how htk tools works handwriting recognition. following icfhr–2010 tutorial run examples "spanish-numbers" corpus , received resulting hmms (files stored in folder hmm , listed in hmmslist
), , res32.mlf
results of recognition received hvite
. have master label file samplesref.mlf. , want see recognition results statistics, i.e. studying hresults
tool.
when run hresults
as
hresults -i samplesref.mlf hmmslist res32.mlf
i see
====================== htk results analysis ======================= date: tue mar 31 15:21:11 2015 ref : samplesref.mlf rec : res32.mlf ------------------------ overall results -------------------------- sent: %correct=0.00 [h=0, s=2, n=2] word: %corr=77.78, acc=77.78 [h=7, d=0, s=2, i=0, n=9] ===================================================================
but if add option -p
in order have confusion matrix see following error message:
~/icfhr$ hresults -p -i samplesref.mlf hmmslist res32.mlf error [+3331] index: label millones not in list[0 of 19] fatal error - terminating program hresults
i understand message means there no hmm name "millones" , found in res32.mlf
samples looks like:
"’*’/210341.rec" mil seiscientos cincuenta y siete millones .
if change res32.mlf
text editor res33.mlf
content like:
"’*’/210341.rec" m l s e s c
... , on.
and use samples.mlf
(instead of samplesref.mlf
) inside looks like:
"*/210341.lab" m l @ q u n e n t o s @ c
... , on.
i have desired result:
~/icfhr$ hresults -p -i samples.mlf hmmslist res33.mlf ====================== htk results analysis ======================= date: tue mar 31 15:35:42 2015 ref : samples.mlf rec : res33.mlf ------------------------ overall results -------------------------- sent: %correct=0.00 [h=0, s=2, n=2] word: %corr=79.63, acc=77.78 [h=43, d=5, s=6, i=1, n=54] ------------------------ confusion matrix ------------------------- c d e l m n o s t u v y del [ %c / %e] @ 0 0 0 0 0 1 1 0 0 0 0 0 0 0 5 [ 0.0/3.7] 2 0 0 0 0 0 0 0 0 0 0 0 0 0 0 c 0 2 0 0 0 0 0 0 0 0 0 0 0 0 0 d 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 e 0 0 0 6 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 6 0 0 0 0 0 0 0 0 0 0 l 0 0 0 0 0 3 0 0 0 0 0 0 0 0 0 m 0 0 0 0 0 0 2 0 0 0 0 0 0 0 0 n 0 1 0 0 0 0 0 6 0 0 0 0 0 0 0 [85.7/1.9] o 0 0 0 0 0 0 0 0 4 0 0 0 0 0 0 q 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 [ 0.0/1.9] s 0 0 0 0 0 0 0 0 0 4 0 0 0 0 0 t 0 0 0 0 0 0 0 0 0 0 4 0 0 0 0 u 0 0 0 1 0 0 0 0 0 0 0 1 0 0 0 [50.0/1.9] v 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 y 0 0 0 0 1 0 0 0 0 0 0 0 0 1 0 [50.0/1.9] ins 0 0 0 0 0 0 0 0 0 1 0 0 0 0 ===================================================================
so, main question is:
what simplest way (without text editor) make mlf-files adapted making confusion matrix?
(i suppose miss option of htk tool… tool , option?)
any useful ideas highly appreciated.
in order use -p option, need provide labels list of classes not hmms, (i.e. if you're trying recognize words yes, no, never) "hmmslist" file should written as:
yes no never
regardless of hmms constitutes words. "hmmslist" file should "labelslist"
Comments
Post a Comment