This is a preview video of the reviewed code for mediapipe.
Making mediapipe more stable when creating an armature is a crucial part to be able to continue the idea of a modular mocap solution.
Its not perfect, but it is getting much better.
Attached is a blend file with the code needed for you to test.
To run your own video, change the path to videofile in the script line 131

-------
The easiest way to install the python packages inside blender to be able to use this blend file and run your own pose estimation, is doing this:
go to your blender installation folder, and copy its path
In this example, the path to blender is:
D:\Blender\Blender_exe\blender-2.93.1-windows-x64\2.93
replace the path below with the one in your system:
D:\Blender\Blender_exe\blender-2.93.1-windows-x64\2.93\python\bin\python.exe D:\Blender\Blender_exe\blender-2.93.1-windows-x64\2.93\python\lib\site-packages\pip install mediapipe
D:\Blender\Blender_exe\blender-2.93.1-windows-x64\2.93\python\bin\python.exe D:\Blender\Blender_exe\blender-2.93.1-windows-x64\2.93\python\lib\site-packages\pip install opencv-python
This update was only possible mainly due to a code I saw in blendypose.
those 3 lines starting from
https://github.com/zonkosoft/BlendyPose/blob/b3cc7e31324a777723c87fae9815f06d6b2b6bc0/blendy_pose.py#L159
where what made the depth starting to make sense
Unfortunately I dont remember who suggested me to look at blendypose. I thank a lot this person, because of that, this update was possible. 😍