Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

failed to allocate tensors for face_landmark_with_attension model #12

Open
deshmukhavd opened this issue Apr 28, 2022 · 3 comments
Open

Comments

@deshmukhavd
Copy link

Thank you @pntt3011 for your good work.
I was trying to use the face_landmark_with_attension model to get more accurate eyelids points.

But it gets failed to allocate tensor. Can you please help/suggest resolving this issue?

error log:

INFO: Created TensorFlow Lite XNNPACK delegate for CPU.
ERROR: Encountered unresolved custom op: Landmarks2TransformMatrix.
ERROR: Node number 192 (Landmarks2TransformMatrix) failed to prepare.

ERROR: Failed to apply the default TensorFlow Lite delegate indexed at 0.
Failed to allocate tensors.

@pntt3011
Copy link
Owner

Thank you for your issue,
It seems that the Attention model uses a custom op named Landmarks2TransformMatrix along with other tflite built-in ops.

Tflite doc says that we can define custom operators in runtime. So I have tried doing it in my code based on mediapipe's implementation. However, in line 19, we can see that Mediapipe uses their custom version of tflite instead of the original one.

You may have to recompile tensorflow lite with some modifications. I find this file related to the changes but don't know how to use it.

@deshmukhavd
Copy link
Author

Thank you for your answer!!!
Feels like a complicated thing for me but definitely, I will try.
Do you have future plan to integrate the attention model into the current pipeline?

@pntt3011
Copy link
Owner

I'm currently using the prebuilt version of tensorflowlite from this repo because I couldn't compile it for some reasons. So I have no plans to do it, at least in the near future, unless someone's kindly enough to build and public the modified version.
I'm sorry that I can't be of more help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants