Step 1: Human Pose Estimation
I mentioned about the Human pose estimations article on this “page” and I clone GitHub repo and everything work fine. For this source code, I create new anaconda environment because I used the different OpenCV version. Also, I didn’t use the Tensorflow GPU. You can use the GPU version it also creates much more estimated results.
Now, Pose estimation is working good but I need the send this key points on the Unity. First of all, I must the understand the code and I understand the which code ‘s results give the key points array. If I can create a connection with Unity also I can create the 3D skeleton with Vuforia for the Augmented Reality
When running the run.py with single photo results like these;
In the run.py code I saw codes I noticed the
1 2 3 |
import sys sys.exit(0) |
System close when come to this line and bellow of this code’s purposes are 3D key-points modelling wih matplotlib.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
logger.info('3d lifting initialization.') poseLifting = Prob3dPose('./src/lifting/models/prob_model_params.mat') image_h, image_w = image.shape[:2] standard_w = 640 standard_h = 480 pose_2d_mpiis = [] visibilities = [] for human in humans: pose_2d_mpii, visibility = common.MPIIPart.from_coco(human) pose_2d_mpiis.append([(int(x * standard_w + 0.5), int(y * standard_h + 0.5)) for x, y in pose_2d_mpii]) visibilities.append(visibility) pose_2d_mpiis = np.array(pose_2d_mpiis) visibilities = np.array(visibilities) transformed_pose2d, weights = poseLifting.transform_joints(pose_2d_mpiis, visibilities) pose_3d = poseLifting.compute_3d(transformed_pose2d, weights) for i, single_3d inenumerate(pose_3d): plot_pose(single_3d) plt.show() pass |
When I delete sys.exit(0) 3D plot shows up
pose_3d = poseLifting.compute_3d(transformed_pose2d, weights)
pose_3d is the key points of the graph so that if I can send these values with internet to Unity Platform I can move the skeleton based on the human body moving. When I print pose_3d output like that;
Your posts about Human Pose Estimation and 3D posing on Unity are very helpful for me.But in the process of running, I have 2 problems.When I delete sys.exit(0),3D plot didn’t show.And how to print pose_3d output?Hope to reply me.
First of all, are you clone github projects without any problem? I use this github repo If you have any problem to clone repo you can e-mail me ylmzcmlttn@gmail.com
I couldn’t refrain from commenting. Well written!
I used to be able to find good information from your
blog articles. https://www.Post2015hlp.org/
Thanks for one’s marvelous posting! I actually enjoyed reading
it, you could be a great author. I will make certain to bookmark
your blog and definitely will come back someday.
I want to encourage you to continue your great work, have
a nice holiday weekend!
What’s up to every , since I am in fact eager of reading this blog’s post to be
updated on a regular basis. It includes pleasant
stuff.