NokiMo
cebstudios
cebstudios

patreon


New markerless Mocap solution to use with Blender (OpenPose,Pose2Sim and OpenSim)

If you want to talk more about it, head to our discord server: https://discord.gg/BRuu43Nv2J 

---------------------------------------------------------


Files you will need:


OpenPose

The openpose version that worked for me:

https://github.com/CMU-Perceptual-Computing-Lab/openpose/releases/tag/v1.6.0 


OpenPose Model

How to get model body_25b

https://github.com/CMU-Perceptual-Computing-Lab/openpose_train/tree/master/experimental_models#body_25b-model---option-2-recommended 


OpenSim(you need a free login to download it)

https://simtk.org/frs/index.php?group_id=91




Pose2Sim (Python package)

https://gitlab.inria.fr/perfanalytics/pose2sim#installation


Other Files, provided here

Skeleton OpenSim model (Model_Pose2Sim_Body25b.osim and Geometry folder, are inside Model_Opensim.zip)

OpenSim IK setup with markers (IK_MARKER_Setup_Pose2Sim_Body25b.xml)

Config file for Pose2Sim, to have in the project directiory, "User" sub folder (Config.toml)

----------------------------

##############################################################################


Calibrate camera Intrinsic and extrinsic following the what says pose2sim

you can also convert easymocap calibration.


Previous video talking about it:

Instrinsic:

https://youtu.be/S8nSDZjcaSA?t=949 


Extrinsic:

https://youtu.be/S8nSDZjcaSA?t=1243 


Fixing extrinsic calibration, if needed:

https://youtu.be/S8nSDZjcaSA?t=1404 


Hot to get openpose:

https://youtu.be/S8nSDZjcaSA?t=1722




Folder you need at you project root folder

calib-2d

pose-2d

User


The other folders are going to be created automatically


running in windows CMD

openpose

bin\OpenPoseDemo.exe --model_pose BODY_25B --video C:\MOCAP\Pose2Sim\2022-06-01_apt_walk_cam2_4_youtube\cam1_walk_0001-0566.mp4 --write_json C:\MOCAP\Pose2Sim\2022-06-01_apt_walk_cam2_4_youtube\pose-2d\pose_cam1_json\

bin\OpenPoseDemo.exe --model_pose BODY_25B --video C:\MOCAP\Pose2Sim\2022-06-01_apt_walk_cam2_4_youtube\cam2_walk_0001-0566.mp4 --write_json C:\MOCAP\Pose2Sim\2022-06-01_apt_walk_cam2_4_youtube\pose-2d\pose_cam2_json\



Go to you project folder

run: python.exe


All the codes bellow are in python

-------------------------------------


from Pose2Sim.Utilities import calib_yml_to_toml

calib_yml_to_toml.calib_yml_to_toml_func(r'C:\MOCAP\Pose2Sim\2022-06-01_apt_walk_cam2_4_youtube/calib-2D/intri.yml', r'C:\MOCAP\Pose2Sim\2022-06-01_apt_walk_cam2_4_youtube/calib-2D/extri.yml')


from Pose2Sim import Pose2Sim as ps


ps.track2D()

ps.triangulate3D()

ps.filter3D()



--------------------

OpenSim

Open Opensim and load "Model_Pose2Sim_Body25b.osim"

Go to "Tools -> Inverse kinematics -> Load" Load the "IK_MARKER_Setup_Pose2Sim_Body25b.xml" file

An error will show because you dont have the file configured

Click ok and choose your TRC file created with pose2sim, its in the "pose-3d" folder


Choose the time range for it to run. (the start and end of animation that you want)


On Blender

Open "OpenSim load animation.blend"

on the script view, change the folder location to the of your project and click run.






New markerless Mocap solution to use with Blender (OpenPose,Pose2Sim and OpenSim)

Related Creators