Request: FaceMesh-with-Attention model conversion (unsupported custom ops)

See original GitHub issue

MediaPipe has released a new FaceMesh-with-Attention model

That’s basically an old FaceMesh model augmented with 3 additional new attention models that refine results, all inside single TFlite model:

I’ve tried converting it:

tflite2tensorflow --model_path face_landmark_with_attention.tflite --flatc_path ./flatc --schema_path schema.fbs --output_pb

but it fails with

RuntimeError: Encountered unresolved custom op: Landmarks2TransformMatrix.Node number 192 (Landmarks2TransformMatrix) failed to prepare.

It seems that TFLite model is using custom ops to link different execution paths inside it - that is beyond me…

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:31 (22 by maintainers)

github_iconTop GitHub Comments

3reactions
vladmandiccommented, Apr 14, 2022

fyi, i’ve just added facemesh attention to https://vladmandic.github.io/human,
works nice but it is ~%25 slower than facemesh + iris models combined

i’ve also added keypoint mapping of new attention keypoints back to original mesh keypoints
plus remapping of z-coord since augmented data is 2d only
(in https://github.com/vladmandic/human/blob/main/src/face/attention.ts

anyhow, results from https://github.com/vladmandic/human-motion image

3reactions
PINTO0309commented, Mar 28, 2022

@KenjiAsaba @mayerjTNG Thank you for your cooperation. All have been merged into the main branch. 👍

https://github.com/PINTO0309/tflite2tensorflow

Read more comments on GitHub >

github_iconTop Results From Across the Web

Custom operators | TensorFlow Lite
To allow conversion, users can provide their own custom implementation of an unsupported TensorFlow operator in TensorFlow Lite, ...
Read more >
TOCO unable to convert unsupported operation using
And then I convert model to tflite using toco command. ... error: Cannot create interpreter: Didn't find custom op for name 'ExpandDims' ...
Read more >
Custom Operators - coremltools
While converting a model to Core ML, you may encounter an unsupported operation that can't be represented by a composite operator.
Read more >
How to deal with "Unsupported operation _Cast"? - TensorRT
Converting concat_box_conf as custom op: FlattenConcat_TRT ... deprecated from TensorRT 7 onwards, hence request you to try ONNX parser.
Read more >
Custom operators | onnxruntime
Call OrtAddCustomOpDomain to add the custom domain of ops to the session ... Using Custom Ops with TF2ONNX: This notebook covers converting a...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found