VNRecognizeTextRequest Supported Languages

Hello,


I've been using the VNRecognizeTextRequest from the Vision framework to OCR some images and it works well. However, I'd like to be able to support many languages, but at this time, the VNRecognizeTextRequest only seems to support en-US. There is a property to change the language of the request, but changing this does not have any effect. VNRecognizeTextRequest.supportedRecognitionLanguages() always returns 1 value of en-US.


Does anyone know if there are plans to support other languages?


Thank you.

Replies

I have no idea, but I suspect each language takes a lot of space on drive, and having "all languages" supported in one device is over-the-top expensive for most use cases. I'd suspect they would come out sooner or later with a "current locale langs" or "currenct keyoard langs" supported.

My implementation intersects between a Set of my wanted / suspected / expected languages and the VNRecognizeTextRequest's

supportedRecognitionLanguages

As mentioned, currently this seems to be only US english.

Literally billions of non-english speakers would benefit from an OCR service in their native language. English speakers would benefit from an OCR service when abroad.


Some apps' feasibility would depend on whether VNRecognizeTextRequest supports only the current locale lang or the current keyboards langs, or somwhow deduces langs from current location or something else. Having no langs but en-US at this stage would probably drive many developers to opt to use the googpetition or another cloudy OCR service from the get go and forsake VisionKit... I'm considering this.

Some OCR implementations would definetely benefit from having OCR languages support added / removed "by demand", so that LocationServices / user preferences / location by ip services could allow better chances at detecting texts for users WHEN ABROAD, which is... hmmm... a time where I suspect OCR / Translation would have many use cases and would be in high demand.

Despite the fact that we are now several beta versions further on... the problem has remained the same.

You can choose different languages but I don't really notice a difference.


For a long time I wondered why my app does not recognize German umlauts (e.g. Ü ö ä or a ß).


Now I found out that umlauts are only recognized if I set the .recognitionLevel= .fast and the .usesLanguageCorrection = false

Unfortunately, the .customWords seem not to work anymore and the quality of the text recognition is not good.


That would be nice if Apple could improve this or better explain what to do to get better results.

Support for several new languages has been introduced to VNRecognizeTextRequest in iOS 14, iPadOS 14, macOS Big Sur, and tvOS 14.
What exactly are the supported languages in iOS 14?
Support for several new languages has been introduced to VNRecognizeTextRequest in iOS 14, iPadOS 14, macOS Big Sur, and tvOS 14. 

^^ Hey, can you please specify the languages?
Big Sur first beta still returns just "en__US"...

Running these lines.

import Vision
print(VNRecognizeTextRequest().revision)
print(VNRecognizeTextRequest().recognitionLanguages)
Indeed it seems I was asking the wrong question. Supported languages in Big Sur for accurate returns

VNRecognizeTextRequest
en, fr, it, de, es, pt, zh.

Great Leap Forward!
  • In case it is helpful for others, for Big Sur (as of 11.6.5), the supported languages appear to be as follows:

    VNRequestTextRecognitionLevelFast, VNRecognizeTextRequestRevision1: en-US VNRequestTextRecognitionLevelFast, VNRecognizeTextRequestRevision2: en-US, fr-FR, it-IT, de-DE, es-ES, pt-BR VNRequestTextRecognitionLevelAccurate, VNRecognizeTextRequestRevision1: en-US VNRequestTextRecognitionLevelAccurate, VNRecognizeTextRequestRevision2: en-US, fr-FR, it-IT, de-DE, es-ES, pt-BR, zh-Hans, zh-Hant

Add a Comment
Has anyone had any luck getting other languages to actually work in Big Sur? Here's my setup, but I never get ß or ü or any special characters like that. I just get B and u, and the text looks like it did in Catalina.

Code Block
textRecognitionRequest = VNRecognizeTextRequest(completionHandler: recognizeTextHandler)
textRecognitionRequest.recognitionLevel = .accurate
textRecognitionRequest.recognitionLanguages = ["de-DE"]
textRecognitionRequest.usesLanguageCorrection = true


I've even tried switching my system to German, but that has no effect. Does this only work in Xcode 12? I'm using 11 and the supported languages does have the new list of 8 languages, so it would be weird if that worked but the actual OCR didn't.
does it provides multi language text detection support using vision framework for ios 14 & macOS Big Sur now.
I also want to support Thai language.
iOS 14.2 is already available, but I still can't find an official list of supported languages in Apple's documentation. Could you please communicate the current status?