how to check accuracy rate on tesseract using c#

423 views
Skip to first unread message

maina

unread,
Apr 28, 2017, 5:37:09 AM4/28/17
to tesseract-ocr

Hi,

I am beginner with tesseract. I recognized characters in c# using tesseract-ocr engine by following this tutorial:

https://www.youtube.com/watch?v=HCBUTBRGspU

 I need to recognize text from 100 urdu images and want to check accuracy rate (in percentage) of all of these images. Can anyone please help me(by sharing code or links ).


Thanks,

Regards,

maina

bmwmine

unread,
May 6, 2017, 7:06:38 AM5/6/17
to tesseract-ocr
Hi,
First of all to check the accuracy you should have both - recognized text and the original text if you dont have the original text you have to type it then follow these psuedo code:

all_orig_text.split(" ");
all_recog_text.split(" ");
countofcorrect = 0;
for (int = 0; i < all_orig_text.length ; i++)
          if (all_orig_text[i] == all_recog_text[i]) //this will help to check accuracy word wise
                countofcorrect++;
ratio = countofcorrect /  all_orig_text.length *100

you have to improve this code to suit your needs
Reply all
Reply to author
Forward
0 new messages