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

Multiple language detection within an image #4238

Open
metouitude opened this issue May 6, 2024 · 0 comments
Open

Multiple language detection within an image #4238

metouitude opened this issue May 6, 2024 · 0 comments

Comments

@metouitude
Copy link

Your Feature Request

Hello,

I'm currently working on a personal project that involves multiple languages detection, and the furthest i got is :

osd = pytesseract.image_to_osd(self.img)
script = re.search("Script: ([a-zA-Z]+)\n", osd).group(1)
conf = re.search("Script confidence: (\d+\.?(\d+)?)", osd).group(1)

Which is directly taken to be honest from https://stackoverflow.com/questions/70198974/how-to-detect-language-or-script-from-an-input-image-using-python-or-tesseract-o

so for example let's say we have an image with 2 or + languages like this one for example :

downloaded_image

In this case OSD will only detect Latin with a confidence of 2.22

but at the same time pytesseract.image_to_boxes(self.img,lang="ara") is returning an arabic text,

My point is :

  • Will it be possible to run 3 time the osd detection in ara/latin/hebrewto return multiple languages ? to make pytesseract.image_to_osd(self.img) detects multiple languages ?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant