plotting fix
This commit is contained in:
+3
-2
@@ -334,8 +334,8 @@ def plot_results(unposed, posed, body, mesh_mask):
|
|||||||
for i, c in enumerate(collision):
|
for i, c in enumerate(collision):
|
||||||
fig.add_trace(go.Mesh3d(
|
fig.add_trace(go.Mesh3d(
|
||||||
x=c[:,0],
|
x=c[:,0],
|
||||||
y=c[:,1],
|
y=c[:,2],
|
||||||
z=c[:,2],
|
z=c[:,1],
|
||||||
i=collision_faces[i][:,0],
|
i=collision_faces[i][:,0],
|
||||||
j=collision_faces[i][:,1],
|
j=collision_faces[i][:,1],
|
||||||
k=collision_faces[i][:,2],
|
k=collision_faces[i][:,2],
|
||||||
@@ -373,6 +373,7 @@ def sample(folder, variable_condition, fix_noise, nr=4):
|
|||||||
gender = tf.cast(tf.greater_equal(pose_shape[:, -1] , 0.5), tf.int32)
|
gender = tf.cast(tf.greater_equal(pose_shape[:, -1] , 0.5), tf.int32)
|
||||||
shape_offsets = tf.stack([tf.gather(tf.tensordot(pose_shape[i,72:-1][tf.newaxis, :], smpl.shapedirs[gender[i]], axes=[[1], [2]])[0,:,:], smpl.to_keep, axis=0) for i in range(len(frames))])
|
shape_offsets = tf.stack([tf.gather(tf.tensordot(pose_shape[i,72:-1][tf.newaxis, :], smpl.shapedirs[gender[i]], axes=[[1], [2]])[0,:,:], smpl.to_keep, axis=0) for i in range(len(frames))])
|
||||||
mesh_pred_shaped = (mesh_pred + shape_offsets).numpy()
|
mesh_pred_shaped = (mesh_pred + shape_offsets).numpy()
|
||||||
|
pose_shape[:, :3] = 0
|
||||||
mesh_posed = smpl.run_garment(pose_shape[:, :72], pose_shape[:, 72:], mesh_pred_shaped).numpy()
|
mesh_posed = smpl.run_garment(pose_shape[:, :72], pose_shape[:, 72:], mesh_pred_shaped).numpy()
|
||||||
|
|
||||||
plot_inputs(unposed[0], static[0], body[0], curv[0], mesh_mask[0])
|
plot_inputs(unposed[0], static[0], body[0], curv[0], mesh_mask[0])
|
||||||
|
|||||||
Reference in New Issue
Block a user