Skip to content

Commit 5bc8174

Browse files
committed
Updated to v0.5.1.
1 parent 83105b1 commit 5bc8174

3 files changed

Lines changed: 9 additions & 9 deletions

File tree

NiLBS/pose/util.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ def calculate_bone_matrices_smplh(rotation_matrices, joints, bone_hierarchy):
8383
return None
8484

8585

86-
def pose_from_smplh(vertex_template, full_pose, bone_hierarchy, j_regressor):
86+
def pose_from_smplh(vertex_template, full_pose, bone_hierarchy, joints):
8787
"""
8888
8989
Produces a pose from the SMPLH configuration provided.
@@ -95,7 +95,7 @@ def pose_from_smplh(vertex_template, full_pose, bone_hierarchy, j_regressor):
9595
:return: Fully configured Pose which ban be used on any mesh with the same vertex template.
9696
"""
9797

98-
joints = calculate_joints(vertex_template, j_regressor)
98+
#joints = calculate_joints(vertex_template, j_regressor)
9999
rotation_matrices = rodrigues(full_pose)
100100
bone_matrices = calculate_bone_matrices_smplh(rotation_matrices, joints, bone_hierarchy)
101101
result = Pose(bone_matrices)

NiLBS/sampling/pose_sampler_amass.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11

22
import numpy as np
33

4-
from human_body_prior.tools.omni_tools import copy2cpu as c2c
54
from NiLBS.pose.util import pose_from_smplh
65

76
class PoseSamplerAMASS:
@@ -16,12 +15,13 @@ class PoseSamplerAMASS:
1615
def __init__(self, body_model, bdata):
1716
"""
1817
19-
:param body_model: human_body_prior.BodyModel
18+
:param body_model: HumanBody
2019
:param bdata: .npz file, must contain the following attributes: 'poses'
2120
"""
22-
self.v_template = c2c(body_model.v_template)[0]
23-
self.bone_hierachy = c2c(body_model.kintree_table)
24-
self.j_regressor = body_model.J_regressor
21+
self.v_template = body_model.vertex_template
22+
self.bone_hierachy = body_model.bone_hierarchy
23+
#self.j_regressor = body_model.J_regressor
24+
self.joints = body_model.joints
2525
self.bdata = bdata
2626

2727
def sample_frames(self, n_frames=-1, step=1, offset=0):
@@ -46,7 +46,7 @@ def sample_frames(self, n_frames=-1, step=1, offset=0):
4646
pose_hand = self.bdata['poses'][i:i + 1, 66:]
4747

4848
full_pose = np.concatenate((root_orient, pose_body), axis=1).transpose()
49-
pose = pose_from_smplh(self.v_template, full_pose, self.bone_hierachy, self.j_regressor)
49+
pose = pose_from_smplh(self.v_template, full_pose, self.bone_hierachy, self.joints)
5050

5151
poses.append(pose)
5252

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
setup(
44
name='NiLBS',
5-
version='0.5',
5+
version='0.5.1',
66
description='NiLBS 3D implementation.',
77
author='Joe March',
88
author_email='jgm45@cam.ac.uk',

0 commit comments

Comments
 (0)