Comments (15)
@vpenades First, only the Accurate version of the model was committed.
https://github.com/PINTO0309/PINTO_model_zoo/tree/master/058_BlazePose_Full_Keypoints
from pinto_model_zoo.
It's not a huge amount of work, so I generated a .pb and committed it. Use download.sh to download the materials again.
https://github.com/PINTO0309/PINTO_model_zoo/tree/master/53_BlazePose/01_float32
from pinto_model_zoo.
Thanks for the effort, yes, I suspected it's a new requirement that's been added to TF v2.3 and it's impossible to make it run in TF v2.2
what's funny is that the TFLite version does run with the current version.
I'll wait for TF v2.3 on my platform...
Thanks a lot!
from pinto_model_zoo.
It looks like an Apache 2.0 license. I plan to do conversion work on weekends when I have time.
https://t.co/BU6b4cLHUu?amp=1
from pinto_model_zoo.
Thanks a lot!
When I try to load the models, they give me this error:
'NodeDef mentions attr 'explicit_paddings' not in Op<name=DepthwiseConv2dNative; signature=input:T, filter:T -> output:T;
attr=T:type,allowed=[DT_HALF, DT_BFLOAT16, DT_FLOAT, DT_DOUBLE];
attr=strides:list(int); attr=padding:string,allowed=["SAME", "VALID"];
attr=data_format:string,default="NHWC",allowed=["NHWC", "NCHW"];
attr=dilations:list(int),default=[1, 1, 1, 1]>;
NodeDef: {{node model/depthwise_conv2d/depthwise}}.
(Check whether your GraphDef-interpreting binary is up to date with your GraphDef-generating binary.).'
My inderstanding is that the generated PB files require TensorFlow 2.3 and since I am using Emgu.CV, it's still using TensowFlow 2.2... so I'll have to wait for Emgu.CV to update to TensorFlow 2.3....
from pinto_model_zoo.
If you're in a hurry, try generating a .pb file on your own using Tensorflow v2.2.0. Just run the script below.
https://github.com/PINTO0309/PINTO_model_zoo/blob/master/53_BlazePose/01_float32/01_pose_detection_tflite2h5_weight_int_fullint_float16_quant.py
I just tested loading with Tensorflow v2.3.0 and it completed loading successfully without any errors.
import tensorflow as tf
graph_def = tf.compat.v1.GraphDef()
# Import the TF graph
with tf.io.gfile.GFile('pose_detection_128x128_float32.pb', 'rb') as f:
graph_def.ParseFromString(f.read())
tf.import_graph_def(graph_def, name='')
In TF v2.3.0, explicit_paddings
has been added.
from pinto_model_zoo.
Unfortunately, generating .pb with Tensorflow v2.2.0 did not work correctly.
from pinto_model_zoo.
@PINTO0309 It seems someone extracted the FULL BODY models from MLKIT: https://github.com/asus4/tf-lite-unity-sample/tree/master/Assets/StreamingAssets/mlkit
I've just been able to add them to my project and I can confirm that it's the full body blazepose models.
You might want to take a look and include these into your repository? (PBs too please! ^_^; I might need to find time to learn python)
from pinto_model_zoo.
Thanks for sharing. I think I'll try to convert sooner or later. I've checked the structure of the model and it looks like it's only a little more OP's diagram below than the upper body only model. The structure of the model is almost identical.
What I'm wondering is what the license is for the tflite model of Blaze Pose Full.
from pinto_model_zoo.
I have no idea about the license... my impression is that they're releasing the model straight away into MLKit to make it easy to use for developers and nothing else. What seems to be preventing them releasing the models for other platforms is that it would imply that they need to give maintenance and support for these platforms.
For example, developers have requested the full body to be available in MediaPipe for windows, and for TensorFlow.JS... but right now they're having serious issues trying to compile the windows version of MediaPipe.
from pinto_model_zoo.
@vpenades
An additional Lite version has been committed.
https://github.com/PINTO0309/PINTO_model_zoo/tree/master/058_BlazePose_Full_Keypoints
from pinto_model_zoo.
Sorry to bother you again with this... I guess you're already working on converting the BlazePose TFLite models to Frozen model as long as saved model?
I've successfully ran the TfLite models, and even in desktop and using only CPU the models are very fast and responsive, it's definitely a much better solution than the PoseNet models.
My understanding is that PoseNet models are better suited for one shot detection, whereas BlazePose is better for continuous tracking, which makes it very good for realtime applications.
Hi @vpenades
How could you run BlazePose TFlite model on cpu? Can you please share the python script and TFLite model file for pose estimation?
Thanks a lot
from pinto_model_zoo.
@bhavikapanara I'm not using python, my project is in c# with Emgu.TF.Lite , which can run tflite models on the CPU.
from pinto_model_zoo.
@vpenades Thanks for the quick reply.
Actually, I am able to run the TFLite model on the CPU. But I am facing issues to decode output.
This is the output format:
[{'name': 'Identity',
'index': 285,
'shape': array([ 1, 128, 128, 1], dtype=int32),
'shape_signature': array([ -1, 128, 128, 1], dtype=int32),
'dtype': numpy.float32,
'quantization': (0.0, 0),
'quantization_parameters': {'scales': array([], dtype=float32),
'zero_points': array([], dtype=int32),
'quantized_dimension': 0},
'sparsity_parameters': {}},
{'name': 'Identity_1',
'index': 379,
'shape': array([1, 1, 1, 1], dtype=int32),
'shape_signature': array([-1, 1, 1, 1], dtype=int32),
'dtype': numpy.float32,
'quantization': (0.0, 0),
'quantization_parameters': {'scales': array([], dtype=float32),
'zero_points': array([], dtype=int32),
'quantized_dimension': 0},
'sparsity_parameters': {}},
{'name': 'Identity_2',
'index': 381,
'shape': array([ 1, 156], dtype=int32),
'shape_signature': array([ 1, 156], dtype=int32),
'dtype': numpy.float32,
'quantization': (0.0, 0),
'quantization_parameters': {'scales': array([], dtype=float32),
'zero_points': array([], dtype=int32),
'quantized_dimension': 0},
'sparsity_parameters': {}}]
Form this how to get all detected ket-points coordinates
@PINTO0309 Can you please help me with this?
Thanks,
Bhavika
from pinto_model_zoo.
I'm not an expert on python, I understand the official solution to use these models with python is this one: https://google.github.io/mediapipe/solutions/pose.html#python-solution-api
from pinto_model_zoo.
Related Issues (20)
- License of RAFT models HOT 3
- Script to convert RAFT models HOT 3
- Blazeface onnx model HOT 1
- BodyPix on MacOS - Dilation not supported for AutoPadType::SAME_UPPER or AutoPadType::SAME_LOWER HOT 8
- TOPK operator for RKNN export HOT 1
- InstructIR
- 064_Dense_Depth seems to have wrong dimensions HOT 1
- Midas2 model on coral edge TPU HOT 1
- Difference on model outputs (tflite, openvino IR, and Onnx) in model 227_face-detection-adas-0001 HOT 1
- bad results for 342_ALIKE HOT 1
- Aborted (core dumped) for full quantized tinyhitnet model
- 091_gaze-estimation-adas-0002 network HOT 1
- Release new 303_FAN with heatmaps HOT 3
- dataset HOT 1
- 410_FaceMeshV2 quantized tflite models are not functional HOT 1
- 053_BlazePose / 058_BlazePose_Full_Keypoints source HOT 3
- How to retrain simple MLP (palm_detection_full_inf_post_192x192.onnx) model with custom hand dataset ? HOT 2
- How to retrain simple MLP (palm_detection_full_inf_post_192x192.onnx) model with custom hand dataset ? HOT 2
- MiDaS conversion script to onnx
- Mismatch between BlendshapeV2 TensorFlow and TFLite Model
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 pinto_model_zoo.