Comments (31)
@shoutOutYangJie I closed my repo because of some private reason.
You can use "palm_detection_without_custom_op.tflite" in the below link.
https://github.com/metalwhale/hand_tracking
from mediapipe.
Can any one give a little bit more details on how to incorporate these custom ops to be able to run it in regular python enviroment.
from mediapipe.
Got the same error in python when I tried to load the tflite model into the Interpreter.
ValueError: Didn't find custom op for name 'Convolution2DTransposeBias' with version 1
Registration failed.
Code:
import tensorflow as tf
interpreter = tf.lite.Interpreter(model_path="palm_detection.tflite")
I can see that it can be resolved using the tflite::InterpreterBuilder in C api
but in python tf.lite.Interpreter alone is available InterpreterBuilder is not available
Environment:
Python - 3.7
Tensorflow - 1.14
from mediapipe.
I really don't think so because it's a Tensorflow lite package and not Tensorflow's.
And I don't think there is an API for loading ops into TensorFlow lite yet in Python, but you can do your research
cc: @fanzhanggoogle @jiuqiant
from mediapipe.
Thanks to @junhwanjang and his awesome repo, now I can load palm detection model without custom op.
It is work for me. That is important to use python3.7 and install specified version of tensorflow
the [repo] has been deleted,can you tell me what is the 'specified version of tensorflow' please?
from mediapipe.
Thanks to @junhwanjang and his awesome repo, now I can load palm detection model without custom op.
from mediapipe.
Thanks to @junhwanjang and his awesome repo, now I can load palm detection model without custom op.
@junhwanjang , except for the 'specified version of tensorflow', is there any other modifications of the usage of tflite intenpreter? I still encountered this error:unresolved custom op: Convolution2DTransposeBias using "tensorflow-lite:1.13.0".
from mediapipe.
Thanks to @junhwanjang and his awesome repo, now I can load palm detection model without custom op.
It is work for me. That is important to use python3.7 and install specified version of tensorflow
from mediapipe.
We have some custom ops in mediapipe/util/tflite/operations.
from mediapipe.
Is their any way i can use these custom operations and include them in my tflite setup.
i am very new to this and want help to up the model on android device.
from mediapipe.
You may find the creation of the custom op resolver here:
And how to use it instead builtin op resolver is here:
from mediapipe.
will is possible i compile only the tflite in mediapipe, and use this as instead of offfical tflite?
from mediapipe.
To avoid stress you can use it with Tensorflow C++ Lite. And build with Bazel.
It's faster than compiling the whole Tensorflow. I've done that and it works fine for me.
Just copy the custom op from mediapipe's tensorflow sub folder.
Then Create a class to inherit from the BuiltinOpResolver and add the Custom Op from there just as in mediapipe.
from mediapipe.
To avoid stress you can use it with Tensorflow C++ Lite. And build with Bazel.
It's faster than compiling the whole Tensorflow. I've done that and it works fine for me.
Just copy the custom op from mediapipe's tensorflow sub folder.
Then Create a class to inherit from the BuiltinOpResolver and add the Custom Op from there just as in mediapipe.
@lamarrr, and then can I load the compiled op in python by using tf.load_op_library
like that?
from mediapipe.
Thanks to @junhwanjang and his awesome repo, now I can load palm detection model without custom op.
It is work for me. That is important to use python3.7 and install specified version of tensorflow
the [repo] has been deleted,can you tell me what is the 'specified version of tensorflow' please?
@caocao1989 Tensorflow - 1.13.1 and python 3.7.3
from mediapipe.
@junhwanjang thank you very much!!!
from mediapipe.
@jiuqiant The ops in mediapipe/util/tflite/operations seems to the cpu impls. I am wondering how the model works on the GPU?
@fanzhanggoogle I looked at the op_resolver, which seems to be used by mediapipe when it is using the GPU delegate. But the registrations for ConvTranspose is (nullptr, nullptr, nullptr, nullptr). Which means there is no function in the registration. I am curious as to where the ConvTranspose GPU kernel is implemented.
I am trying to run the TFLite model using the GPU delegate, and I am running into some errors. I am running in a EXC_BAD_ACCESS in the function Convolution2DTransposeBianParser::IsSupported. Do you guys have any info?
from mediapipe.
Thanks to @junhwanjang and his awesome repo, now I can load palm detection model without custom op.
@junhwanjang , except for the 'specified version of tensorflow', is there any other modifications of the usage of tflite intenpreter? I still encountered this error:unresolved custom op: Convolution2DTransposeBias using "tensorflow-lite:1.13.0".
do you solve this problem? I meet the same question.
from mediapipe.
To avoid stress you can use it with Tensorflow C++ Lite. And build with Bazel.
It's faster than compiling the whole Tensorflow. I've done that and it works fine for me.
Just copy the custom op from mediapipe's tensorflow sub folder.
Then Create a class to inherit from the BuiltinOpResolver and add the Custom Op from there just as in mediapipe.
Can tensorflow lite C++ depoly on Visual studio project and windows system?
from mediapipe.
Thanks to @junhwanjang and his awesome repo, now I can load palm detection model without custom op.
can you tell me how to solve the problem, I meet same error when running "interpreter.allocate_tensors()". The repo has been deleted, Please tell me how to avoid the problem or can you share me your tflite which can directly be used to tflite python API without C++.
from mediapipe.
@junhwanjang thank you very much!!!
can you share how to resolve this problem?
from mediapipe.
Can any one give a little bit more details on how to incorporate these custom ops to be able to run it in regular python enviroment.
have you solved this difficult question?
from mediapipe.
Got the same error in python when I tried to load the tflite model into the Interpreter.
ValueError: Didn't find custom op for name 'Convolution2DTransposeBias' with version 1 Registration failed.
Code:
import tensorflow as tf interpreter = tf.lite.Interpreter(model_path="palm_detection.tflite")
I can see that it can be resolved using the tflite::InterpreterBuilder in C api
but in python tf.lite.Interpreter alone is available InterpreterBuilder is not availableEnvironment:
Python - 3.7
Tensorflow - 1.14
So if I just want to run this tflite model on python environment, How to avoid this problem
from mediapipe.
@shoutOutYangJie I closed my repo because of some private reason.
You can use "palm_detection_without_custom_op.tflite" in the below link.
https://github.com/metalwhale/hand_tracking
Thanks you very much. You save my life!! Could you introduce roughly what important steps you did ? How to generate this new tflite model without custom ops.
from mediapipe.
from mediapipe.
lo
@lamarrr Hi, could you please share a little bit more on the TF Lite C++ part? E.g. how to build and be linked with applications for C++ usage?
from mediapipe.
@junhwanjang
Hi Thanks for sharing model. I have same question
#35 (comment)
from mediapipe.
@Akshaysharma29 @shoutOutYangJie Did you find the solution?
from mediapipe.
@ragavendranbala No I have not changed there custom_ops have you tried that?
from mediapipe.
@Akshaysharma29 @shoutOutYangJie @ragavendranbala
Sorry for late reply first.
As I checked their operations manually, actually their custom ops (Conv2dTransposeBiasAdd) was combined with Conv2DTranspose and BiasAdd. So I "rephrased" it as Conv2DTranspose and BiasAdd separately. It was simple solution I found.
from mediapipe.
@Akshaysharma29 @shoutOutYangJie @ragavendranbala
Sorry for late reply first.
As I checked their operations manually, actually their custom ops (Conv2dTransposeBiasAdd) was combined with Conv2DTranspose and BiasAdd. So I "rephrased" it as Conv2DTranspose and BiasAdd separately. It was simple solution I found.
Can you share your code
from mediapipe.
Related Issues (20)
- Broken links in docs/getting_started
- Broken links in docs/getting_started
- ImageEmbedderOption quantize behavior HOT 1
- Reuse video texture for mask mixing HOT 4
- Mediapipe tasks-vision iOS 17+ inside Web Workers not working, despite iOS 17+ already support it. HOT 2
- HandLandmarker's min_hand_detection_confidence is not consistent HOT 2
- How to implement mediapipe hair segmentation using mindAR ? HOT 1
- Ability to fine-tune pose landmark detection model with model maker HOT 1
- Unable to build with Webpack after importing Mediapipe (Module parse failed: Unexpected token) HOT 5
- mediapipe_tasks_vision_image_segmenter_imagesegmentergraph__mediapipe_tasks_components_processors_imagepreprocessinggraph__ImageToTensorCalculator HOT 9
- Android x86 tasks_genai - llm inference runtime error `mediapipe.tasks.core.jni.LlmResponseContext.responses' contains invalid UTF-8 data when serializing a protocol buffer` HOT 1
- Is there a way to improve performance through some configuration parameters? HOT 3
- i was not able to install pip3 install mediapipe-silicon ,it is for mac os air HOT 6
- iOS: Can't merge user_target_xcconfig for pod targets: ["MediaPipeTasksCommon", "MediaPipeTasksGenAIC"]. HOT 6
- After a few minutes, the image segmenter starts working very slowly with the SelfieMulticlass model (256 x 256) HOT 2
- Clarification Needed on Python Compatibility HOT 3
- Add GPU support to LLM C API HOT 3
- You may need an additional loader to handle the result of these loaders. HOT 3
- convert ImageFrame to Image
- customize Object detect HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mediapipe.