Hello,
I don’t know how it happened, but I now have this error on Android whenever I launch the project from android studio, with my own project integrating Object Detection:
E/AndroidRuntime: FATAL EXCEPTION: main
Process: org.tensorflow.lite.examples.detection, PID: 28595
java.lang.AssertionError: Error occurred when initializing ObjectDetector: Expected BoundingBoxProperties for tensor probability_0, found none.
    at org.tensorflow.lite.task.vision.detector.ObjectDetector.initJniWithModelFdAndOptions(Native Method)
    at org.tensorflow.lite.task.vision.detector.ObjectDetector.access$000(ObjectDetector.java:82)
    at org.tensorflow.lite.task.vision.detector.ObjectDetector$1.createHandle(ObjectDetector.java:119)
    at org.tensorflow.lite.task.vision.detector.ObjectDetector$1.createHandle(ObjectDetector.java:112)
    at org.tensorflow.lite.task.core.TaskJniUtils$1.createHandle(TaskJniUtils.java:70)
    at org.tensorflow.lite.task.core.TaskJniUtils.createHandleFromLibrary(TaskJniUtils.java:91)
    at org.tensorflow.lite.task.core.TaskJniUtils.createHandleFromFdAndOptions(TaskJniUtils.java:66)
    at org.tensorflow.lite.task.vision.detector.ObjectDetector.createFromFileAndOptions(ObjectDetector.java:110)
    at org.tensorflow.lite.examples.detection.tflite.TFLiteObjectDetectionAPIModel.<init>(TFLiteObjectDetectionAPIModel.java:80)
    at org.tensorflow.lite.examples.detection.tflite.TFLiteObjectDetectionAPIModel.create(TFLiteObjectDetectionAPIModel.java:74)
    at org.tensorflow.lite.examples.detection.DetectorActivity.onPreviewSizeChosen(DetectorActivity.java:110)
    at org.tensorflow.lite.examples.detection.CameraActivity$8.onPreviewSizeChosen(CameraActivity.java:656)
    at org.tensorflow.lite.examples.detection.CameraConnectionFragment.setUpCameraOutputs(CameraConnectionFragment.java:392)
    at org.tensorflow.lite.examples.detection.CameraConnectionFragment.openCamera(CameraConnectionFragment.java:397)
    at org.tensorflow.lite.examples.detection.CameraConnectionFragment.access$300(CameraConnectionFragment.java:94)
    at org.tensorflow.lite.examples.detection.CameraConnectionFragment$3.onSurfaceTextureAvailable(CameraConnectionFragment.java:207)
    at android.view.TextureView.getTextureLayer(TextureView.java:402)
    at android.view.TextureView.draw(TextureView.java:351)
    at android.view.View.updateDisplayListIfDirty(View.java:22776)
    at android.view.View.draw(View.java:23631)
    at android.view.ViewGroup.drawChild(ViewGroup.java:5336)
    at android.view.ViewGroup.dispatchDraw(ViewGroup.java:5093)
    at android.view.View.updateDisplayListIfDirty(View.java:22762)
    at android.view.View.draw(View.java:23631)
    at android.view.ViewGroup.drawChild(ViewGroup.java:5336)
    at android.view.ViewGroup.dispatchDraw(ViewGroup.java:5093)
    at android.view.View.draw(View.java:23904)
    at android.view.View.updateDisplayListIfDirty(View.java:22776)
    at android.view.View.draw(View.java:23631)
    at android.view.ViewGroup.drawChild(ViewGroup.java:5336)
    at android.view.ViewGroup.dispatchDraw(ViewGroup.java:5093)
    at android.view.View.draw(View.java:23904)
    at android.view.View.updateDisplayListIfDirty(View.java:22776)
    at android.view.View.draw(View.java:23631)
    at android.view.ViewGroup.drawChild(ViewGroup.java:5336)
    at android.view.ViewGroup.dispatchDraw(ViewGroup.java:5093)
    at android.view.View.updateDisplayListIfDirty(View.java:22762)
    at android.view.View.draw(View.java:23631)
    at android.view.ViewGroup.drawChild(ViewGroup.java:5336)
    at android.view.ViewGroup.dispatchDraw(ViewGroup.java:5093)
    at android.view.View.draw(View.java:23904)
    at android.view.View.updateDisplayListIfDirty(View.java:22776)
    at android.view.View.draw(View.java:23631)
    at android.view.ViewGroup.drawChild(ViewGroup.java:5336)
    at androidx.coordinatorlayout.widget.CoordinatorLayout.drawChild(CoordinatorLayout.java:1246)
    at android.view.ViewGroup.dispatchDraw(ViewGroup.java:5093)
    at android.view.View.draw(View.java:23904)
    at android.view.View.updateDisplayListIfDirty(View.java:22776)
    at android.view.View.draw(View.java:23631)
    at android.view.ViewGroup.drawChild(ViewGroup.java:5336)
    at android.view.ViewGroup.dispatchDraw(ViewGroup.java:5093)
    at android.view.View.updateDisplayListIfDirty(View.java:22762)

E/AndroidRuntime:     at android.view.View.draw(View.java:23631)
at android.view.ViewGroup.drawChild(ViewGroup.java:5336)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:5093)
at android.view.View.updateDisplayListIfDirty(View.java:22762)
at android.view.View.draw(View.java:23631)
at android.view.ViewGroup.drawChild(ViewGroup.java:5336)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:5093)
at android.view.View.updateDisplayListIfDirty(View.java:22762)
at android.view.View.draw(View.java:23631)
at android.view.ViewGroup.drawChild(ViewGroup.java:5336)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:5093)
at android.view.View.updateDisplayListIfDirty(View.java:22762)
at android.view.View.draw(View.java:23631)
at android.view.ViewGroup.drawChild(ViewGroup.java:5336)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:5093)
at android.view.View.draw(View.java:23904)
at com.android.internal.policy.DecorView.draw(DecorView.java:1282)
at android.view.View.updateDisplayListIfDirty(View.java:22776)
at android.view.ThreadedRenderer.updateViewTreeDisplayList(ThreadedRenderer.java:579)
at android.view.ThreadedRenderer.updateRootDisplayList(ThreadedRenderer.java:585)
at android.view.ThreadedRenderer.draw(ThreadedRenderer.java:662)
at android.view.ViewRootImpl.draw(ViewRootImpl.java:5055)
at android.view.ViewRootImpl.performDraw(ViewRootImpl.java:4762)
at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:3879)
at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:2631)
at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:9984)
at android.view.Choreographer$CallbackRecord.run(Choreographer.java:1010)
at android.view.Choreographer.doCallbacks(Choreographer.java:809)
at android.view.Choreographer.doFrame(Choreographer.java:744)
at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:995)
at android.os.Handler.handleCallback(Handler.java:938)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:246)
at android.app.ActivityThread.main(ActivityThread.java:8512)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:602)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1130)
I didn’t have this error before, but now, even when I return to an old comit, I get this error.
Thanks for helping,
Nicolas