Tesseract v4 generated incorrect text output

120 views
Skip to first unread message

Hwa Chuang

unread,
Nov 26, 2018, 12:19:01 PM11/26/18
to tesseract-ocr
I was testing Tesseract v4 and found some text files generated by image have incorrect string. For example, I have image as below:


2018-11-26 11_29_42-Photos.png


$ ./tesseract.exe Korean.bmp Korean -l kor
Tesseract Open Source OCR Engine v4.0.0 with Leptonica

$ cat Korean.txt
을 만 나 서 반 가 워 요 ! 이 테 스 트 목 적 을 위해 사

志 巳
必 白

It's pretty clear that output text string is almost completely incorrect. However, I can have correct test string if page segmentation mode is 11.

$ ./tesseract.exe Korean.bmp Korean-psm11 -l kor --psm 11
Tesseract Open Source OCR Engine v4.0.0 with Leptonica

$ cat Korean-psm11.txt
당 신 이 선 생 님 을 만 나 서 반 가 워 요 ! 이 테 스 트 목 적 을 위해 사

용 된 다 .

The problem is I can not change psm image by image.

Any suggestion?


Korean.bmp
Korean.txt
Korean-psm11.txt

Seokbong Choi

unread,
Nov 26, 2018, 4:31:31 PM11/26/18
to tesser...@googlegroups.com
Hello,

OEM and PSM are values that you should set up whenever you execute tesseract.exe, which cannot be automatically detected under the current version. (I hope it can be improved in the next version)
I guess you are in the situation where the optimal result can be obtained through different psm values right? Unfortunately, it's a manual labor under this version.
psm 4 generally works, if your sentence is horizontally aligned, whereas psm 5 works in vertically aligned Chinese-Japanese-Korean (CJK) sentences.

I ran your bmp with psm 4 option, it worked. Although it prompted the result that you may not desire, by appending 용 된 다 at the end of the sentence. In that case, I would suggest you to retrain. It may improve accuracy. (I had a similar issue with Japanese) I hope it would help.

image.png


--
You received this message because you are subscribed to the Google Groups "tesseract-ocr" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tesseract-oc...@googlegroups.com.
To post to this group, send email to tesser...@googlegroups.com.
Visit this group at https://groups.google.com/group/tesseract-ocr.
To view this discussion on the web visit https://groups.google.com/d/msgid/tesseract-ocr/6d25e720-dcab-4659-b0bc-4d9928dbf0e4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages