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

ML-Kit Text: Chinese OCR not working #24

Closed
minkiapps opened this issue Aug 17, 2020 · 3 comments
Closed

ML-Kit Text: Chinese OCR not working #24

minkiapps opened this issue Aug 17, 2020 · 3 comments
Assignees

Comments

@minkiapps
Copy link
Contributor

I am trying to use the offline Chinese text recognition on my Google Pixel 2 XL, it is not working.
I have HMS Core installed on my device. (Version: 5.0.1.313)

This is the code how I initialise MLTextAnalyser:

private val hmsTextRecognizer : MLTextAnalyzer by lazy {
     val setting = MLLocalTextSetting.Factory()
         .setOCRMode(MLLocalTextSetting.OCR_DETECT_MODE)
         .setLanguage("zh")
         .create()
     MLAnalyzerFactory.getInstance().getLocalTextAnalyzer(setting)
}

The TextAnalyser doesn't recognise any text.
I see following error:

E/CountryCodeBean: getVendorCountry=UNKNOWN
E/CountryCodeBean: getSimCountryCode by not enableNetwork, countryCode=at
E/CountryCodeBean: getVendorCountry=UNKNOWN
E/CountryCodeBean: getSimCountryCode by not enableNetwork, countryCode=at
E/HaLogProvider: forbiddenHiLog.getVenderCountry=UNKNOWN
E/HaLogProvider: forbiddenHiLog openHa = false
E/FocusShootOCREngine: ocr load model failed
E/HaLogProvider: forbiddenHiLog.getVenderCountry=UNKNOWN
E/HaLogProvider: forbiddenHiLog openHa = false

On my Huawei Mate 30 Pro it works.

@Mike-mei
Copy link
Contributor

@minkiapps What is the text dependencies that you integrate in build.gradle?

@minkiapps
Copy link
Contributor Author

Thanks for asking, I just realised I didn't include
implementation 'com.huawei.hms:ml-computer-vision-ocr-cn-model:2.0.1.300'
I wasn't paying attention because seems like on my Huawei Mate 30 Pro it works without it...

This issue can be closed.

I have another question, I see in the documentation that ML-Kit TTS is only available on Huawei phone, will it be sometime also available on non Huawei phones (but with HMS core installed)?

@Mike-mei
Copy link
Contributor

TTS is only available on Huawei phone now, non Huawei phones are temporarily unavailable, but we will consider your suggestions.

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

3 participants