FirebaseExtended / mlkit-material-android

ML Kit Showcase App with Material Design

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Not able to add custom model

amitkhurana92 opened this issue · comments

For Adding custom model I am writing my code in SearchEngine.java and there I am passing the image to labeler.processImage(image) function.

But the issue is that I am getting below error

E/ODAutoMLImgLabelerTask: Error when loading automl module. com.google.android.gms.dynamite.DynamiteModule$LoadingException: No acceptable module found. Local version is 0 and remote version is 0. at com.google.android.gms.dynamite.DynamiteModule.load(Unknown Source:8) at com.google.android.gms.internal.firebase_ml.zzso.zzol(com.google.firebase:firebase-ml-vision@@24.0.3:49) at com.google.android.gms.internal.firebase_ml.zzqr.zzf(com.google.firebase:firebase-ml-common@@22.1.1:53) at com.google.android.gms.internal.firebase_ml.zzqr$zza.zzoo(com.google.firebase:firebase-ml-common@@22.1.1:7) at com.google.android.gms.internal.firebase_ml.zzqr$zza.call(com.google.firebase:firebase-ml-common@@22.1.1:24) at com.google.android.gms.internal.firebase_ml.zzpx.zza(com.google.firebase:firebase-ml-common@@22.1.1:32) at com.google.android.gms.internal.firebase_ml.zzpw.run(Unknown Source:4) at android.os.Handler.handleCallback(Handler.java:873) at android.os.Handler.dispatchMessage(Handler.java:99) at com.google.android.gms.internal.firebase_ml.zze.dispatchMessage(com.google.firebase:firebase-ml-common@@22.1.1:6) at android.os.Looper.loop(Looper.java:226) at android.os.HandlerThread.run(HandlerThread.java:65) E/ModelResourceManager: Error preloading model resource com.google.firebase.ml.common.FirebaseMLException: Cannot load automl module. Please add dependency firebase-ml-vision-automl. at com.google.android.gms.internal.firebase_ml.zzso.zzol(com.google.firebase:firebase-ml-vision@@24.0.3:74) at com.google.android.gms.internal.firebase_ml.zzqr.zzf(com.google.firebase:firebase-ml-common@@22.1.1:53) at com.google.android.gms.internal.firebase_ml.zzqr$zza.zzoo(com.google.firebase:firebase-ml-common@@22.1.1:7) at com.google.android.gms.internal.firebase_ml.zzqr$zza.call(com.google.firebase:firebase-ml-common@@22.1.1:24) at com.google.android.gms.internal.firebase_ml.zzpx.zza(com.google.firebase:firebase-ml-common@@22.1.1:32) at com.google.android.gms.internal.firebase_ml.zzpw.run(Unknown Source:4) at android.os.Handler.handleCallback(Handler.java:873) at android.os.Handler.dispatchMessage(Handler.java:99) at com.google.android.gms.internal.firebase_ml.zze.dispatchMessage(com.google.firebase:firebase-ml-common@@22.1.1:6) at android.os.Looper.loop(Looper.java:226) at android.os.HandlerThread.run(HandlerThread.java:65)

and if include implementation 'com.google.firebase:firebase-ml-vision-automl:18.0.5'
then again I am getting error

`In project 'app' a resolved Google Play services library dependency depends on another at an exact version (e.g. "[22.1.
0]", but isn't being resolved to that version. Behavior exhibited by the library will be unknown.

Dependency failing: com.google.firebase:firebase-ml-vision-internal-vkp:17.0.0 -> com.google.firebase:firebase-ml-common
@[22.1.0], but firebase-ml-common version was 22.1.1.`

dependency I am using

implementation 'com.google.firebase:firebase-ml-vision-automl:18.0.5' implementation 'com.google.firebase:firebase-ml-vision:24.0.2' implementation 'com.google.firebase:firebase-ml-vision-object-detection-model:19.0.4'

Kindly suggest the solution or if you have running sample application that uses automl custom model then do share that.