-
Notifications
You must be signed in to change notification settings - Fork 15
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
Image classification fails calling .ClassifyImage #20
Comments
Hello, so this looks like an issue where AppInventor is not sending over the required libraries. I don't know how many other people this is affecting, so I have removed the need for that library. The latest version should work now. |
Contributes to: kylecorry31/ML4K-AI-Extension#20 Signed-off-by: Dale Lane <dale.lane@uk.ibm.com>
Hello Kyle, now it works! I'm not sure if solution was new version, or problem was that I made so many tests and so many apps with different mi4k projects that my phone (two phones, actually) had charged in memory an incorrect version of extension. In case it is usefull, I tell you about the process I have tested an app make by Dale Lane with my key, and at first It didn't work in my phones. I have installed this app in a third phone (with no other app with MI4K installed) ... and it worked! I had to uninstall from my phones all different apps and versions I generated with app inventor and ML4K extension, I've reboot my phone and installed only one version (new extension?)....and it runned! This is a project of my son and some friends, and I was helping them to solve the problem. Thank you very much! |
I am trying to solve a similar issue but I cannot get it to work. |
Hello. I am trying with my first app with MI4K but I've never got a version that gives me back an image classification. I have tried different ways to send the image, but now the application fails. I don't know if the problem is the key, the way i send the image...
To simplify my tests, I leaved my project and I took the example CirclesAndRectangles, I created a project in machine learning for kids, I generated the model, and I copied the key from the url:
https://machinelearningforkids.co.uk/api/appinventor/b27f9f70-1694-11e9-b8e9-6f11f826e259e313c6de-ffb5-492e-8340-2390b8ae4ee4/extension
but when executing it on my phone it fails (see error message below) just like my project ... what am I doing wrong?
Thank you very much!
java.lang.NoClassDefFoundError: Failed resolution of: Lcom/google/gson/JsonParser;
at com.kylecorry.ml4k.ML4K$Classification.fromJson(ML4K.java:426)
at com.kylecorry.ml4k.ML4K$Classification.access$400(ML4K.java:414)
at com.kylecorry.ml4k.ML4K$1.run(ML4K.java:118)
at java.lang.Thread.run(Thread.java:760)
Caused by: java.lang.ClassNotFoundException: Didn't find class "com.google.gson.JsonParser" on path: DexPathList[[zip file "/data/app/appinventor.ai_gsebastia.eFAP_1_c-2/base.apk"],nativeLibraryDirectories=[/data/app/appinventor.ai_gsebastia.eFAP_1_c-2/lib/arm64, /system/lib64, /vendor/lib64]]
at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:74)
at java.lang.ClassLoader.loadClass(ClassLoader.java:380)
at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
... 4 more
many thanks
The text was updated successfully, but these errors were encountered: