google-coral/project-posenet

python3 simple_pose.py run error:Unsupported data type in custom op handler: 924963Node number 2 (EdgeTpuDelegateForCustomOp) failed to prepare.

Closed this issue · 5 comments

raspi4B + buster + Coral USB Accelerator +Python 3.7.3

All library file new download

pi@pi4:~/project-posenet $ lsb_release -a
No LSB modules are available.
Distributor ID: Raspbian
Description: Raspbian GNU/Linux 10 (buster)
Release: 10
Codename: buster

pi@pi4:~/project-posenet $ python3 simple_pose.py
INFO: Initialized TensorFlow Lite runtime.
Traceback (most recent call last):
File "simple_pose.py", line 29, in
'models/mobilenet/posenet_mobilenet_v1_075_481_641_quant_decoder_edgetpu.tflite')
File "/home/pi/project-posenet/pose_engine.py", line 83, in init
self._interpreter.allocate_tensors()
File "/usr/local/lib/python3.7/dist-packages/tflite_runtime/interpreter.py", line 244, in allocate_tensors
return self._interpreter.AllocateTensors()
File "/usr/local/lib/python3.7/dist-packages/tensorflow_core/lite/python/interpreter_wrapper/tensorflow_wrap_interpreter_wrapper.py", line 106, in AllocateTensors
return _tensorflow_wrap_interpreter_wrapper.InterpreterWrapper_AllocateTensors(self)
RuntimeError: Internal: Unsupported data type in custom op handler: 924963Node number 2 (EdgeTpuDelegateForCustomOp) failed to prepare.

Hi @lixy123 can you please share the following info. Thanks


Python 3.9.7 (default, Sep  3 2021, 06:18:44) 
[GCC 10.2.1 20210110] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import tflite_runtime as tflite
>>> import pycoral
>>> from pycoral.utils.edgetpu import get_runtime_version
>>> get_runtime_version()
'BuildLabel(COMPILER=6.3.0 20170516,DATE=redacted,TIME=redacted), RuntimeVersion(14)'
>>> tflite.__version__
'2.5.0.post1'
>>> pycoral.__version__
'2.0.0'
>>> 

I see. It shows that this is a problem of runtime library compatibility.
I downloaded the latest library file. Tell me the library version you use I can check it myself.
Can you tell me the version of the underlying library you use

Hi @lixy123 please try with the latest library versions(RuntimeVersion(14), pycoral 2.0.0, tflite_runtime 2.5.0.post1). Thanks!

get_runtime_version()
'BuildLabel(COMPILER=6.3.0 20170516,DATE=redacted,TIME=redacted), RuntimeVersion(14)'
tflite.version
report error
pycoral.version
'2.0.0'

pi@pi4:~ $ pip3 list | grep tflite
tflite-runtime 1.14.0

The reason of runtime error is that the version of tflite-runtime is incompatible with pycoral 2.0.0
I download new tflite_runtime from here, and runtime error is solved
https://github.com/google-coral/pycoral/releases/download/v2.0.0/tflite_runtime-2.5.0.post1-cp37-cp37m-linux_armv7l.whl

thanks!

Are you satisfied with the resolution of your issue?
Yes
No