PINTO0309 / tflite2tensorflow

Generate saved_model, tfjs, tf-trt, EdgeTPU, CoreML, quantized tflite, ONNX, OpenVINO, Myriad Inference Engine blob and .pb from .tflite. Support for building environments with Docker. It is possible to directly access the host PC GUI and the camera to verify the operation. NVIDIA GPU (dGPU) support. Intel iHD GPU (iGPU) support. Supports inverse quantization of INT8 quantization model.
https://qiita.com/PINTO
MIT License
258 stars 38 forks source link

Error converting face_landmark_with_attention.tflite #22

Closed hovnatan closed 2 years ago

hovnatan commented 2 years ago

Issue Type

Bug

OS

Mac OS

OS architecture

x86_64

Programming Language

Python

Framework

TensorFlowLite

Download URL for tflite file

https://github.com/google/mediapipe/blob/master/mediapipe/modules/face_landmark/face_landmark_with_attention.tflite

Description

Converting with tflite2tensorflow --model_path face_landmark_with_attention.tflite --flatc_path ../flatc --schema_path ../schema.fbs --output_pb gives error

RuntimeError: Encountered unresolved custom op: Landmarks2TransformMatrix.
See instructions: https://www.tensorflow.org/lite/guide/ops_customNode number 192 (Landmarks2TransformMatrix) failed to prepare.
Failed to apply the default TensorFlow Lite delegate indexed at 0.

Relevant Log Output

RuntimeError: Encountered unresolved custom op: Landmarks2TransformMatrix.
See instructions: https://www.tensorflow.org/lite/guide/ops_customNode number 192 (Landmarks2TransformMatrix) failed to prepare.
Failed to apply the default TensorFlow Lite delegate indexed at 0.

Source code for simple inference testing code

No response

PINTO0309 commented 2 years ago

Please read my exchange on the issue here. Unfortunately, it is practically impossible to implement. https://github.com/PINTO0309/PINTO_model_zoo/issues/143 Request: FaceMesh-with-Attention model conversion (unsupported custom ops)

hovnatan commented 2 years ago

Ok, thanks!