Git Product home page Git Product logo

Comments (7)

Mike-mei avatar Mike-mei commented on May 28, 2024

Please check whether you have loaded Chinese model or not.

implementation ‘com.huawei.hms : ml-computer-vision-ocr-cn-model : 2.0.2.200.013’

from hms-ml-demo.

minkiapps avatar minkiapps commented on May 28, 2024

I have

    implementation 'com.huawei.hms:ml-computer-vision-ocr-latin-model:2.0.1.300'
    implementation 'com.huawei.hms:ml-computer-vision-ocr-cn-model:2.0.1.300'
    implementation 'com.huawei.hms:ml-computer-vision-ocr:2.0.1.300'

from hms-ml-demo.

Mike-mei avatar Mike-mei commented on May 28, 2024

We plan to release new 2.0.3.300 version on 10th September, and this issue will be fixed

from hms-ml-demo.

minkiapps avatar minkiapps commented on May 28, 2024

please tell me as soon as they are released

from hms-ml-demo.

minkiapps avatar minkiapps commented on May 28, 2024

I updated the version to
implementation 'com.huawei.hms:ml-computer-translate:2.0.3.300'

code is opensource, find it here
now I face the issue again with translation model download failed, here the log:

E/MLInitializerProvider: MLInitializerProvider Done
E/ML_CountryCodeHelper: getVendorCountry=eu
E/ML_CountryCodeHelper: getVendorCountry equals eu or la ,not reliable
E/ML_CountryCodeHelper: getSimCountryCode by not enableNetwork, countryCode=it
E/.livetranslato: Invalid ID 0x00000000.
E/CountryCodeBean: getVendorCountry=eu
E/CountryCodeBean: getVendorCountry equals eu or la ,not reliable
E/CountryCodeBean: getSimCountryCode by not enableNetwork, countryCode=it
E/ML_TTS_SpeakerProvider: Response error! errcode=[7010] retMsg=[Token is invalid or expired]
E/ML_TTS_SpeakerProvider: Use default List; Voice list parse error.[{"retCode":"7010","retMsg":"Token is invalid or expired"}]
E/AbstractInitializer: huawei_module_mlkit_translate -> isForce = false, isCreatorClassRemote = true, isLocalExisted = true
E/AbstractInitializer: huawei_module_mlkit_translate -> The context of the dynamic module belongs to REMOTE
E/HaLogProvider: forbiddenHiLog.getVenderCountry=UNKNOWN
E/HaLogProvider: forbiddenHiLog openHa = true
E/HaLogProvider: forbiddenHiLog.getVenderCountry=UNKNOWN
E/HaLogProvider: forbiddenHiLog openHa = true
E/HaLogProvider: initlizeHaSdk APK mode,BUILD_MODE=APK
E/HaLogProvider: GrsApi.synGetGrsUrl=https://metrics2.data.hicloud.com:6447,BuildConfig.HIA_MODE=com.huawei.cloud.mlkithianalytics
E/CountryCodeBean: getVendorCountry=eu
E/CountryCodeBean: getVendorCountry equals eu or la ,not reliable
E/CountryCodeBean: getSimCountryCode by not enableNetwork, countryCode=it
E/HaLogProvider: forbiddenHiLog.getVenderCountry=UNKNOWN
E/HaLogProvider: forbiddenHiLog openHa = true
E/HaLogProvider: forbiddenHiLog.getVenderCountry=UNKNOWN
E/HaLogProvider: forbiddenHiLog openHa = true
E/AbstractInitializer: huawei_module_mlkit_translate -> Something wrong, need to switch context, current is REMOTE
E/AbstractInitializer: huawei_module_mlkit_translate -> Switch the context of the dynamic module to LOCAL
E/HaLogProvider: forbiddenHiLog.getVenderCountry=UNKNOWN
E/HaLogProvider: forbiddenHiLog openHa = true
E/HaLogProvider: forbiddenHiLog.getVenderCountry=UNKNOWN
E/HaLogProvider: forbiddenHiLog openHa = true
E/HaLogProvider: initlizeHaSdk APK mode,BUILD_MODE=APK
E/HaLogProvider: GrsApi.synGetGrsUrl=https://metrics2.data.hicloud.com:6447,BuildConfig.HIA_MODE=com.huawei.cloud.mlkithianalytics
E/CountryCodeBean: getVendorCountry=eu
E/CountryCodeBean: getVendorCountry equals eu or la ,not reliable
E/CountryCodeBean: getSimCountryCode by not enableNetwork, countryCode=it
E/HaLogProvider: forbiddenHiLog.getVenderCountry=UNKNOWN
E/HaLogProvider: forbiddenHiLog openHa = true
E/HaLogProvider: forbiddenHiLog.getVenderCountry=UNKNOWN
E/HaLogProvider: forbiddenHiLog openHa = true
E/AbstractInitializer: huawei_module_mlkit_translate -> Something wrong, need to switch context, current is LOCAL
E/CountryCodeBean: getVendorCountry=eu
E/CountryCodeBean: getVendorCountry equals eu or la ,not reliable
E/CountryCodeBean: getSimCountryCode by not enableNetwork, countryCode=it
E/MainViewModel: Failed to download language models
    java.util.concurrent.ExecutionException: com.huawei.hms.mlsdk.common.MLException: Download model failed
        at com.huawei.hmf.tasks.a.j.a(Unknown Source:17)
        at com.huawei.hmf.tasks.Tasks.await(Unknown Source:33)
        at com.minkiapps.livetranslator.MainViewModel.downloadModel(MainViewModel.kt:60)
        at com.minkiapps.livetranslator.MainViewModel.access$downloadModel(MainViewModel.kt:15)
        at com.minkiapps.livetranslator.MainViewModel$initModels$2$chinesModelAvailableTask$1.invokeSuspend(MainViewModel.kt:41)
        at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
        at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:56)
        at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:571)
        at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:738)
        at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:678)
        at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:665)
     Caused by: com.huawei.hms.mlsdk.common.MLException: Download model failed
        at com.huawei.hms.mlsdk.model.download.p.s.a(RemoteDownloadManager.java:162)
        at com.huawei.hms.mlsdk.model.download.p.s.a(RemoteDownloadManager.java:33)
        at com.huawei.hms.mlsdk.model.download.p.u.a(TranslateModelManagerDelegate.java:31)
        at com.huawei.hms.mlsdk.model.download.p.e.a(ModelDownloadManagerDelegate.java:13)
        at com.huawei.hms.mlsdk.model.download.MLLocalModelManager$b.call(MLLocalModelManager.java:3)
        at com.huawei.hmf.tasks.a.j$1.run(Unknown Source:4)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
        at java.lang.Thread.run(Thread.java:929)

from hms-ml-demo.

Mike-mei avatar Mike-mei commented on May 28, 2024

Hello @minkiapps
As is shown in the log, "Token is invalid or expired", the cause of "model download failed" maybe is Token is empty or invalid.

E/ML_TTS_SpeakerProvider: Response error! errcode=[7010] retMsg=[Token is invalid or expired]

We find your code is that:

MLApplication.getInstance().apiKey = config.getString("client/api_key")

The agc file has been set right?
please see the wiki

from hms-ml-demo.

minkiapps avatar minkiapps commented on May 28, 2024

Hey, I found out my app id in json file had a space in the middle, sorry on my side.

Nevertheless, my original error still persists after updating the dependency.. see first my first post.
checkout my branch, as soon as I try to use the second ocr model, it stops recognising anything..

from hms-ml-demo.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.