Search before asking
Question
I used the PT file trained by yolov5, converted it to tflite file, and ran it with the official android code. An error was reported
java.lang.IllegalStateException: Error occurred when initializing ObjectDetector: AllocateTensors() failed. at org.tensorflow.lite.task.vision.detector.ObjectDetector.initJniWithModelFdAndOptions(Native Method)
the tflite added metadata by https://github.com/ultralytics/yolov5
tflite file see attach files: assets.zip

the command:
cd yolov5 dir; python3 export.py --weight runs/train/exp4/weights/best.pt --include tflite --int8 --nms --agnostic-nms --data /mnt/yolov5-beev2/bee-linux.yaml --imgsz 320
the android code, like ImageClassifier https://github.com/tensorflow/examples/tree/master/lite/examples/image_classification/android_java

But when I run it, I get an error
assets.zip
Can someone help me with this problem? !! 3q
I'll show you the source code.
android_java.zip
Additional
No response
Search before asking
Question
I used the PT file trained by yolov5, converted it to tflite file, and ran it with the official android code. An error was reported
java.lang.IllegalStateException: Error occurred when initializing ObjectDetector: AllocateTensors() failed. at org.tensorflow.lite.task.vision.detector.ObjectDetector.initJniWithModelFdAndOptions(Native Method)the tflite added metadata by https://github.com/ultralytics/yolov5
tflite file see
attach files: assets.zipthe command:
cd yolov5 dir; python3 export.py --weight runs/train/exp4/weights/best.pt --include tflite --int8 --nms --agnostic-nms --data /mnt/yolov5-beev2/bee-linux.yaml --imgsz 320the android code, like ImageClassifier https://github.com/tensorflow/examples/tree/master/lite/examples/image_classification/android_java
But when I run it, I get an error
assets.zip
Can someone help me with this problem? !! 3q
I'll show you the source code.
android_java.zip
Additional
No response