tried normalization, did not work
This commit is contained in:
+3
-3
@@ -67,7 +67,7 @@ class DataReader:
|
||||
V -= J[0:1]
|
||||
# Apply rotation on z-axis
|
||||
zRot = zRotMatrix(info['zrot'])
|
||||
return zRot.dot(V.T).T, self.smpl[gender].faces, zRot.dot(trans.T).T[None,:]
|
||||
return zRot.dot(V.T).T, self.smpl[gender].faces, zRot.dot(trans.T).T[None,:], zRot.dot((J - J[0:1] + trans[None,:]).T).T[None,:], zRot.dot((J - J[0:1]).T).T[None,:]
|
||||
|
||||
""" Garment data """
|
||||
"""
|
||||
@@ -84,9 +84,9 @@ class DataReader:
|
||||
# Read garment vertices (relative to root joint)
|
||||
pc16_path = os.path.join(self.SRC, sample, garment + '_registered.pc16')
|
||||
V = readPC2Frame(pc16_path, frame, True)
|
||||
# Read sample data
|
||||
info = self.read_info(sample)
|
||||
if absolute:
|
||||
# Read sample data
|
||||
info = self.read_info(sample)
|
||||
# Transform to absolute
|
||||
V += info['trans'][:,frame][None]
|
||||
# Apply rotation on z-axis
|
||||
|
||||
@@ -75,6 +75,8 @@ class SMPLModel():
|
||||
self.beta = beta
|
||||
if trans is not None:
|
||||
self.trans = trans
|
||||
else:
|
||||
self.trans = np.zeros(self.trans_shape)
|
||||
self.update()
|
||||
return self.verts, self.J
|
||||
|
||||
|
||||
Reference in New Issue
Block a user