facebookresearch / frankmocap

A Strong and Easy-to-use Single View 3D Hand+Body Pose Estimator
Other
2.15k stars 373 forks source link

Can you create a blender addon for this? #57

Open BluePrintRandom opened 3 years ago

BluePrintRandom commented 3 years ago

Can you create a blender addon for this?

there is a branch XR_Actions and I think this work could pair quite nicely with it.

penincillin commented 3 years ago

@BluePrintRandom That's a good suggestion. But we don't have bandwidth for this new feature in recent days. Please feel free to contribute to the project if it's handy for you.

carlosedubarreto commented 3 years ago

I was working on a windows build for the full Frankmocap. Finished that yesterday The next idea is to make a decent converter from PKL to FBX (I got one ready based on VIBE work) After that I was planning to ad a single click solution to make blender send a video to frankmocap and import the result.

@BluePrintRandom Where is this XR_Action you told? I searched and didnt find it.

mikgot commented 3 years ago

Hello, when will you upload the windows build?

BluePrintRandom commented 3 years ago

https://builder.blender.org/download/branches/ - XR_actions is here at the bottom.

On Sun, Jan 10, 2021 at 6:09 AM andreshev notifications@github.com wrote:

Hello, when will you upload the windows build?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/facebookresearch/frankmocap/issues/57#issuecomment-757482333, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABW3SWNPN2TOOE6RD2TN5ITSZGYLBANCNFSM4VSGJLKQ .

BluePrintRandom commented 3 years ago

can this work in realtime? - upbge - the game engine based on blender is wrapping openXR support - I was thinking this could be used for a realtime touch interface for AR.

like here is a PECS app for non verbal people I wrote in upbge/ XR - should also work with AR https://www.youtube.com/watch?v=BG5JSveYIwc

carlosedubarreto commented 3 years ago

Hello @andreshev , i was trying to build a tutorial to make easier to people to install on windows , but, life got in my way and lot of problems jumped in front of me. I have no idea of when I'll be able to do the tutorial.

But, here are the packages I was able to build on my win x64 with cuda 10.1 and 10.0 versions.

If you can try and give me feedback I would appreciate, because I dont have anywhere else to test it. And I know that works on my pc. detectron2_fasterrcnn_opendr.zip PS.: to install these packages on your pc, you should use this command: pip install "some-package.whl"

@BluePrintRandom thanks for the link, I'm going to check it out.

mikgot commented 3 years ago

I installed all wheel and requrements. I have new issue.

(venv_vibe) F: \ Python \ vibe> python -m demo.demo_bodymocap --input_path sample_video.mp4 --out_dir output/ Traceback (most recent call last): File "D: \ Users \ Webwork \ miniconda3 \ envs \ venv_vibe \ lib \ site-packages \ OpenGL \ platform \ egl.py", line 70, in EGL mode = ctypes.RTLD_GLOBAL File "D: \ Users \ Webwork \ miniconda3 \ envs \ venv_vibe \ lib \ site-packages \ OpenGL \ platform \ ctypesloader.py", line 45, in loadLibrary return dllType (name, mode) File "D: \ Users \ Webwork \ miniconda3 \ envs \ venv_vibe \ lib \ ctypes \ init.py", line 364, in init self._handle = _dlopen (self._name, mode) OSError: [WinError 126] The specified module could not be found

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "D: \ Users \ Webwork \ miniconda3 \ envs \ venv_vibe \ lib \ runpy.py", line 183, in _run_module_as_main mod_name, mod_spec, code = _get_module_details (mod_name, _Error) File "D: \ Users \ Webwork \ miniconda3 \ envs \ venv_vibe \ lib \ runpy.py", line 109, in _get_module_details import (pkg_name) File "F: \ Python \ vibe \ demo.py", line 33, in from lib.utils.renderer import Renderer File "F: \ Python \ vibe \ lib \ utils \ renderer.py", line 19, in import pyrender File "D: \ Users \ Webwork \ miniconda3 \ envs \ venv_vibe \ lib \ site-packages \ pyrender \ init.py", line 3, in from .light import Light, PointLight, DirectionalLight, SpotLight File "D: \ Users \ Webwork \ miniconda3 \ envs \ venv_vibe \ lib \ site-packages \ pyrender \ light.py", line 11, in from .texture import Texture File "D: \ Users \ Webwork \ miniconda3 \ envs \ venv_vibe \ lib \ site-packages \ pyrender \ texture.py", line 8, in from OpenGL.GL import File "D: \ Users \ Webwork \ miniconda3 \ envs \ venv_vibe \ lib \ site-packages \ OpenGL \ GL \ init.py", line 3, in from OpenGL import error as _error File "D: \ Users \ Webwork \ miniconda3 \ envs \ venv_vibe \ lib \ site-packages \ OpenGL \ error.py", line 12, in from OpenGL import platform, _configflags File "D: \ Users \ Webwork \ miniconda3 \ envs \ venv_vibe \ lib \ site-packages \ OpenGL \ platform \ init.py", line 35, in _load () File "D: \ Users \ Webwork \ miniconda3 \ envs \ venv_vibe \ lib \ site-packages \ OpenGL \ platform \ init.py", line 32, in _load plugin.install (globals ()) File "D: \ Users \ Webwork \ miniconda3 \ envs \ venv_vibe \ lib \ site-packages \ OpenGL \ platform \ baseplatform.py", line 92, in install namespace [name] = getattr (self, name, None) File "D: \ Users \ Webwork \ miniconda3 \ envs \ venv_vibe \ lib \ site-packages \ OpenGL \ platform \ baseplatform.py", line 14, in get value = self.fget (obj) File "D: \ Users \ Webwork \ miniconda3 \ envs \ venv_vibe \ lib \ site-packages \ OpenGL \ platform \ egl.py", line 93, in GetCurrentContext return self.EGL.eglGetCurrentContext File "D: \ Users \ Webwork \ miniconda3 \ envs \ venv_vibe \ lib \ site-packages \ OpenGL \ platform \ baseplatform.py", line 14, in get value = self.fget (obj) File "D: \ Users \ Webwork \ miniconda3 \ envs \ venv_vibe \ lib \ site-packages \ OpenGL \ platform \ egl.py", line 73, in EGL raise ImportError ("Unable to load EGL library", err.args) ImportError: ('Unable to load EGL library', 22, 'The specified module could not be found', None, 126, None, 'EGL', None)

BluePrintRandom commented 3 years ago

image so we can use

bone = bpy.data.objects['ArmatureObject'].pose.bones['BoneName'] bone.matrix = matrix

mariusl04 commented 3 years ago

image so we can use

bone = bpy.data.objects['ArmatureObject'].pose.bones['BoneName'] bone.matrix = matrix

Did you manage to use it in blender? If so could you explain how you did it? Thanks

BluePrintRandom commented 3 years ago

I have created / saved animations and also used setting the bone matrix in game in upbge. https://www.youtube.com/watch?v=AmttMFSDv74

basically it's a matter of channeling the addon into blender in realtime using a lib or a socket or something.

AhmedShalabe commented 3 years ago

Is there a chance for an update :')

carlosedubarreto commented 3 years ago

If you want to take a look, i have my addon to import frankmocap on github.

https://github.com/carlosedubarreto/b3d_mocap_import/

There is also another branch for realtime mocap using Mediapipe, if you want to test or study the code.

https://github.com/carlosedubarreto/b3d_mocap_import/tree/alpha_realtime