I tried converting a model and uploading it to a phone through android studio...
Can't seem to get it to work. Looks like I don't have metadata? Always something with tensorflow :(
E/AndroidRuntime: FATAL EXCEPTION: main
Process: org.tensorflow.lite.examples.detection, PID: 1960
java.lang.IllegalStateException: This model does not contain associated files, and is not a Zip file.
at org.tensorflow.lite.support.metadata.MetadataExtractor.assertZipFile(MetadataExtractor.java:325)
at org.tensorflow.lite.support.metadata.MetadataExtractor.getAssociatedFile(MetadataExtractor.java:165)
at org.tensorflow.lite.examples.detection.tflite.TFLiteObjectDetectionAPIModel.create(TFLiteObjectDetectionAPIModel.java:116)
at org.tensorflow.lite.examples.detection.DetectorActivity.onPreviewSizeChosen(DetectorActivity.java:99)
at org.tensorflow.lite.examples.detection.CameraActivity$7.onPreviewSizeChosen(CameraActivity.java:446)
at org.tensorflow.lite.examples.detection.CameraConnectionFragment.setUpCameraOutputs(CameraConnectionFragment.java:357)
at org.tensorflow.lite.examples.detection.CameraConnectionFragment.openCamera(CameraConnectionFragment.java:362)
at org.tensorflow.lite.examples.detection.CameraConnectionFragment.access$300(CameraConnectionFragment.java:66)
at org.tensorflow.lite.examples.detection.CameraConnectionFragment$3.onSurfaceTextureAvailable(CameraConnectionFragment.java:171)
at android.view.TextureView.getTextureLayer(TextureView.java:400java.lang.IllegalStateException: This model does not contain associated files, and is not a Zip file)
at android.view.TextureView.draw(TextureView.java:349)
at android.view.View.updateDisplayListIfDirty(View.java:20876)
at android.view.View.draw(View.java:21731)
at android.view.ViewGroup.drawChild(ViewGroup.java:4432)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4193)
at android.view.View.updateDisplayListIfDirty(View.java:20867)
at android.view.View.draw(View.java:21731)
at android.view.ViewGroup.drawChild(ViewGroup.java:4432)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4193)
at android.view.View.updateDisplayListIfDirty(View.java:20867)
at android.view.View.draw(View.java:21731)
at android.view.ViewGroup.drawChild(ViewGroup.java:4432)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4193)
at android.view.View.draw(View.java:22002)
at android.view.View.updateDisplayListIfDirty(View.java:20876)
at android.view.View.draw(View.java:21731)
at android.view.ViewGroup.drawChild(ViewGroup.java:4432)
at androidx.coordinatorlayout.widget.CoordinatorLayout.drawChild(CoordinatorLayout.java:1246)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4193)
at android.view.View.draw(View.java:22002)
at android.view.View.updateDisplayListIfDirty(View.java:20876)
at android.view.View.draw(View.java:21731)
at android.view.ViewGroup.drawChild(ViewGroup.java:4432)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4193)
at android.view.View.updateDisplayListIfDirty(View.java:20867)
at android.view.View.draw(View.java:21731)
at android.view.ViewGroup.drawChild(ViewGroup.java:4432)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4193)
at android.view.View.updateDisplayListIfDirty(View.java:20867)
at android.view.View.draw(View.java:21731)
at android.view.ViewGroup.drawChild(ViewGroup.java:4432)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4193)
at android.view.View.updateDisplayListIfDirty(View.java:20867)
at android.view.View.draw(View.java:21731)
at android.view.ViewGroup.drawChild(ViewGroup.java:4432)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4193)
at android.view.View.updateDisplayListIfDirty(View.java:20867)
at android.view.View.draw(View.java:21731)
at android.view.ViewGroup.drawChild(ViewGroup.java:4432)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4193)
at android.view.View.draw(View.java:22002)
at com.android.internal.policy.DecorView.draw(DecorView.java:826)
at android.view.View.updateDisplayListIfDirty(View.java:20876)
at android.view.ThreadedRenderer.updateViewTreeDisplayList(ThreadedRenderer.java:581)
at android.view.ThreadedRenderer.updateRootDisplayList(ThreadedRenderer.java:587)
at android.view.ThreadedRenderer.draw(ThreadedRenderer.java:664)
E/AndroidRuntime: at android.view.ViewRootImpl.draw(ViewRootImpl.java:3817)
at android.view.ViewRootImpl.performDraw(ViewRootImpl.java:3545)
at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:2829)
at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1795)
at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:7886)
at android.view.Choreographer$CallbackRecord.run(Choreographer.java:1041)
at android.view.Choreographer.doCallbacks(Choreographer.java:864)
at android.view.Choreographer.doFrame(Choreographer.java:798)
at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:1026)
at android.os.Handler.handleCallback(Handler.java:883)
at android.os.Handler.dispatchMessage(Handler.java:100)
at android.os.Looper.loop(Looper.java:239)
at android.app.ActivityThread.main(ActivityThread.java:7532)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:492)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:935)
W/System: A resource failed to call close.
A resource failed to call close.
W/mples.detection: type=1400 audit(0.0:44085): avc: denied { search } for name="game_mode" dev="sysfs" ino=60401 scontext=u:r:untrusted_app_25:s0:c512,c768 tcontext=u:object_r:sysfs_tencent:s0 tclass=dir permissive=0
I/Process: Sending signal. PID: 1960 SIG: 9
I tried converting a model and uploading it to a phone through android studio...
Can't seem to get it to work. Looks like I don't have metadata? Always something with tensorflow :(