Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"min_characters_to_try" parameter does not work #4212

Open
frank-pian opened this issue Mar 14, 2024 · 2 comments
Open

"min_characters_to_try" parameter does not work #4212

frank-pian opened this issue Mar 14, 2024 · 2 comments
Labels
OSD Orientation and Script Detection

Comments

@frank-pian
Copy link

frank-pian commented Mar 14, 2024

Current Behavior

"min_characters_to_try" parameter does not work.

ocr-training-20240305-184120

tesseract "C:\Users\bianyongfang\Downloads\ocr-training-20240305-184120.png" - -l eng --psm 12 -c min_characters_to_try=1

Too few characters. Skipping this page
OSD: Weak margin (0.00) for 5 blob text block, but using orientation anyway: 0
Empty page!!
Too few characters. Skipping this page
OSD: Weak margin (0.00) for 5 blob text block, but using orientation anyway: 0
Empty page!!

but

tesseract "C:\Users\bianyongfang\Downloads\ocr-training-20240305-184120.png" - -l eng --psm 6
1 6
2 5
3 4

Expected Behavior

No response

Suggested Fix

No response

tesseract -v

tesseract v5.3.3.20231005
leptonica-1.83.1
libgif 5.2.1 : libjpeg 8d (libjpeg-turbo 2.1.4) : libpng 1.6.40 : libtiff 4.6.0 : zlib 1.2.13 : libwebp 1.3.2 : libopenjp2 2.5.0
Found AVX2
Found AVX
Found FMA
Found SSE4.1
Found libarchive 3.7.2 zlib/1.3 liblzma/5.4.4 bz2lib/1.0.8 liblz4/1.9.4 libzstd/1.5.5
Found libcurl/8.3.0 Schannel zlib/1.3 brotli/1.1.0 zstd/1.5.5 libidn2/2.3.4 libpsl/0.21.2 (+libidn2/2.3.3) libssh2/1.11.0

Operating System

Windows 10

Other Operating System

No response

uname -a

No response

Compiler

No response

CPU

No response

Virtualization / Containers

No response

Other Information

No response

@amitdo amitdo added the OSD Orientation and Script Detection label Mar 14, 2024
@amitdo
Copy link
Collaborator

amitdo commented Mar 14, 2024

Do psm 0 and 1 work here?

@frank-pian
Copy link
Author

Do psm 0 and 1 work here?

same

tesseract "C:\Users\bianyongfang\Downloads\ocr-training-20240305-184120.png" - -l eng --psm 0 -c min_characters_to_try=1
Warning, detects only orientation with -l eng
Error, OSD requires a model for the legacy engine
tesseract "C:\Users\bianyongfang\Downloads\ocr-training-20240305-184120.png" - -l eng --psm 1 -c min_characters_to_try=1
Too few characters. Skipping this page
OSD: Weak margin (0.00) for 5 blob text block, but using orientation anyway: 0
Empty page!!
Too few characters. Skipping this page
OSD: Weak margin (0.00) for 5 blob text block, but using orientation anyway: 0
Empty page!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
OSD Orientation and Script Detection
Projects
None yet
Development

No branches or pull requests

2 participants