Closed Arezki93 closed 3 years ago
Hi @Arezki93, Could you please provide the steps to reproduce the above error. Thanks!
Hi @sgowroji, thank you for the answer, here are the steps I followed : 1) I loaded the hair_segmentation.tflite file 2) I did a allocate_tensors() -> it generates an error (Encountered unresolved custom op: MaxPoolingWithArgmax2D.Node number 12 (MaxPoolingWithArgmax2D) failed to prepare)
import tensorflow as tf
import numpy as np
interpreter = tf.lite.Interpreter('hair_segmentation.tflite')
interpreter.allocate_tensors()
**---------------------------------------------------------------------------
RuntimeError Traceback (most recent call last)
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you.
I also encountered this issue, @Arezki93 did you find a solution?
unfortunately I did not find a solution !
Le dim. 8 août 2021 à 15:29, TomerJakobovich @.***> a écrit :
I also encountered this issue, @Arezki93 https://github.com/Arezki93 did you find a solution?
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/google/mediapipe/issues/2312#issuecomment-894798054, or unsubscribe https://github.com/notifications/unsubscribe-auth/AOMHEADMGTH2B4SVGH4LA53T32BDHANCNFSM5AT6KHVA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&utm_campaign=notification-email .
Hi @Arezki93, MediaPipe tflite where updated with ops here https://github.com/google/mediapipe/blob/ecb5b5f44ab23ea620ef97a479407c699e424aa7/mediapipe/util/tflite/cpu_op_resolver.cc#:~:text=void%20MediaPipe_RegisterTfLiteOpResolver(tflite,%7D But not sure about it in python.
MediaPipe repo has custom ops for the hair segmentation model. So, using the model with tflite python interpreter directly doesn't work. You need to copy the custom ops to a local TensorFlow repo and rebuild its python package.
Since it's not a MediaPipe Python issue, reassign this back to @sgowroji .
Closing this issue w.r.t the above comments, answers your query.
Hi,
I am trying to use mediapipe's hair segmentation model in script but I am coming across the error of
RuntimeError:`` Encountered unresolved custom op: MaxPoolingWithArgmax2D.Node number 12 (MaxPoolingWithArgmax2D) failed to prepare.
can you please explain how did you created the without custom op version of the mediapipe model ?