The pose_landmarker_lite.task
model contains two TFLite models: pose_landmarks_detector.tflite
and pose_detector.tflite
(I’ve checked that their total size equals that of the pose_landmarker_lite.task
file). However, converting the file to ONNX fails with the error reported below.
My question is: should these two models be separated and converted to .hef
individually, or should they be merged into a single file and then converted together, how? I attempted to convert them to .hef
, but I couldn’t figure out how to do it.
Error:
latex
Copia
Error in cpuinfo: prctl(PR_SVE_GET_VL) failed
INFO: Created TensorFlow Lite XNNPACK delegate for CPU.
Traceback (most recent call last):
File "/home/btsrasp/Mediapipe/conversion.py", line 23, in <module>
convert_tflite_to_onnx(pose_detector_tflite, pose_detector_onnx)
File "/home/btsrasp/Mediapipe/conversion.py", line 15, in convert_tflite_to_onnx
onnx_model, _ = tf2onnx.convert.from_tflite(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/btsrasp/Hailo-Application-Code-Examples/runtime/python/pose_estimation/venv/lib/python3.11/site-packages/tf2onnx/convert.py", line 689, in from_tflite
model_proto, external_tensor_storage = _convert_common(
^^^^^^^^^^^^^^^^
File "/home/btsrasp/Hailo-Application-Code-Examples/runtime/python/pose_estimation/venv/lib/python3.11/site-packages/tf2onnx/convert.py", line 168, in _convert_common
g = process_tf_graph(tf_graph, const_node_values=const_node_values,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/btsrasp/Hailo-Application-Code-Examples/runtime/python/pose_estimation/venv/lib/python3.11/site-packages/tf2onnx/tfonnx.py", line 453, in process_tf_graph
main_g, subgraphs = graphs_from_tflite(tflite_path, input_names, output_names)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/btsrasp/Hailo-Application-Code-Examples/runtime/python/pose_estimation/venv/lib/python3.11/site-packages/tf2onnx/tflite_utils.py", line 153, in graphs_from_tflite
parse_tflite_graph(tfl_graph, opcodes, model, prefix, tensor_shapes_from_interpreter)
File "/home/btsrasp/Hailo-Application-Code-Examples/runtime/python/pose_estimation/venv/lib/python3.11/site-packages/tf2onnx/tflite_utils.py", line 354, in parse_tflite_graph
np_data = tensor_util.MakeNdarray(t)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/btsrasp/Hailo-Application-Code-Examples/runtime/python/pose_estimation/venv/lib/python3.11/site-packages/tensorflow/python/framework/tensor_util.py", line 674, in MakeNdarray
dtype=dtype).copy().reshape(shape))
^^^^^^^^^^^^^^
ValueError: cannot reshape array of size 96 into shape (16,1,1,24)