Comments (11)
hey stephanschulz,
happy to hear that you enjoy it :)
A key feature of this addon is that it eases the inference of any TensorFlow 2 SavedModel. Such a model may be:
- incluced in the repository your are aiming at
- created from a weight file and the code to contstruct the model
- for .h5 files: see keyword spotting example
- for check-points: see style transfer example
- saved after/during running the training: see pix2pix example training step
if I stumble accross a TensorFlow2 implementation i ll let you know.
from ofxtensorflow2.
@bytosaur thanks for the reply.
i realize people certainly have different levels of working with TensorFlow; people that can and want to train their own models and beginners like me that just want to run existing model.
If i understand you correctly, if i want to use the handpose model i saw in the JS example i need to first find a TensorFlow2 implementations of it?
I will keep at it and try to learn more :)
Cheers.
from ofxtensorflow2.
this might be what you are looking for https://github.com/MikeOfZen/Yet-Another-Openpose-Implementation
it s a TF2 implementation with pretrained models.
looking forward to see what you can do with it! Let us know as we can not have too less examples here :)
from ofxtensorflow2.
Thanks for finding this.
It does indeed have the saved_model.pd
and variables
files. https://github.com/MikeOfZen/Yet-Another-Openpose-Implementation/tree/master/trained_models/model11_test-15Sun1219-2101
Now i just have to figure out how to send me images / video stream to the model.
Maybe the pix2pix example is a good start since it uses input = ofxTF2::imageToTensor(imgIn);
and ofxTF2::tensorToImage(output, imgOut);
from ofxtensorflow2.
make sure to check out the READMEs in the examples. Especially example_basics gives a good overview of how to use this addon.
Afterwards, check both example_pix2pix and example_style_transfer as they are dealing with image input. It's also a good way to learn how to use the ThreadedModel. Altough for test purposes it is not required.
Are you sure this model outputs an image? i would expect it to output a vector of joints...
from ofxtensorflow2.
You are right it does not output an image but a long vector with about 139000 entries.
The repo you found has a Skeletonizer
class which seems take the model output and converts it to the skeleton points, i guess ?
pafs, kpts = self.model.predict(input_img)
pafs = pafs[0]
kpts = kpts[0]
skeletonizer = post.Skeletonizer(kpts, pafs)
I believe the next step would be to translate this Skeletonizer
to c++.
https://github.com/MikeOfZen/Yet-Another-Openpose-Implementation/blob/dbbb558bc95b15dfa3976514dad2c7803599f5c3/post_processing/post.py#L206
from ofxtensorflow2.
Yes, pre and postprocessing are important steps to tackle. Overriding the runModel()
function of a ofxTF2::Model
is the recommended way to insert these steps.
For some codes, even operations that are not-related to AI are embedded into the SavedModel. The authors of the pyhton code for example_keyword_spotting use kapre
. It's a pyhton package that formulates the computation of e.g spectrograms as Tensorflow graphs. This way we dont have to care about it when running the model :)
from ofxtensorflow2.
thanks again.
this is a lot of new information for my brain. i will see if i can make sense of it all.
from ofxtensorflow2.
happy to help :)
btw, i also found these implementations:
https://github.com/tensorlayer/hyperpose
https://github.com/michalfaber/tensorflow_Realtime_Multi-Person_Pose_Estimation
from ofxtensorflow2.
i will check them out. maybe they are easier to extract keypoints from.
i should mention that i am actually looking for handpose not bodypose detection ;)
from ofxtensorflow2.
Thanks again for providing this information.
As of now i have not managed to make this work. Will keep on trying !
But if you happen to have time to add handpose and bodypose examples i am sure me and other people would be very happy ;)
All the best.
from ofxtensorflow2.
Related Issues (20)
- off topic model issue HOT 3
- "Undefined symbols for architecture arm64: "_TF_NewSessionOptions", referenced from:" on macOS ? HOT 6
- Do you have plans to implement 3d skeleton detection via BlazePose? HOT 4
- word2vec / universal sentence encoder example? HOT 8
- Error compiling: No member named 'exchange' in namespace 'std' HOT 14
- arbitrary-image-stylization-v1-256 HOT 13
- trained model different format? HOT 5
- GPU training issue HOT 1
- Training with larger image size - pix2pix HOT 2
- example_video_and_image_colorization HOT 7
- Yolo v4 example HOT 12
- Chatbot example :)
- music generation example HOT 6
- Stable diffusion or other text-to-image networks? HOT 3
- Compilation issues for M1 / arm64 HOT 3
- configure_xcode.sh script breaks Xcode projects HOT 1
- git submodule update not working on macOS HOT 12
- error: Library not loaded HOT 5
- error: Signing Identity: “-” HOT 2
- error: Library not loaded: "@rpath/libtensorflow.2.dylib' HOT 4
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 ofxtensorflow2.