omni-us / research-seq2seq-HTR

MIT License
20 stars 13 forks source link

Calculating the CER #1

Open mayang1 opened 5 years ago

mayang1 commented 5 years ago

hello, in order to Calculating the CER , i run ''python3 pytasas_words.py 1000 si'',the result as follow : image

can you help me to solve the problem

thank you

leitro commented 5 years ago

Hi! Could you provide some samples in your ground truth file and the prediction file? You need to replace the urls of the ground truth and prediction with your own files in pytasas_words.py. Have a try!

mayang1 commented 5 years ago

yes , it is right,but the result is above

mayang1 commented 5 years ago

when i run python3 pytasas_words.py 40 no i have the error: htrsh.inc.sh: error: required run_parallel.inc.sh not found in path htrsh.inc.sh: error: required run_parallel.inc.sh not found in path ./tasas_cer.sh: line 3: htrsh_prep_tasas: command not found ./tasas_cer.sh: line 3: htrsh_prep_tasas: command not found

can you help me , thank you very much

mauvilsa commented 5 years ago

I have modified htrsh.inc.sh so that it also works if run_parallel.inc.sh is in the same directory as htrsh.inc.sh but not in the path. @mayang1 please pull the changes and try again.

mayang1 commented 5 years ago

I just tested the new code and I have successfully completed the WER calculation. Thank you for your sharing and help. Thank you again.

mayang1 commented 5 years ago

valid_predict_serq.8.log

e04-068-00-03,171 incuuded f01-053-06-06,162 wocabuetry b03-109-05-07,191 - b06-053-01-06,184 practice c06-043-00-03,177 an e04-062-07-09,166 one r06-126-03-05,185 helped c06-020-03-06,182 untertien

ground_truth.thresh

n02-000-00-00,177 DARKNESS n02-000-00-01,177 had n02-000-00-02,177 descended n02-000-00-03,177 like n02-000-00-04,177 a I want to know if I have to consider the inconsistency of the data order when calculating WER.

mayang1 commented 5 years ago

cer_valid .log

0.56144434 0.3129064 0.21466828 0.16654824999999998 0.13386255 0.11146773 0.09625288 0.0844089 0.07435356 0.06895859 0.060859079999999996 0.05581309 0.051558719999999995 0.0470168 0.04370005

but in you artical " Convolve, Attend and Spell: An Attention-based Sequence-to-Sequence Model for Handwritten Word Recognition." the best result Valid_CER is 5.01