diff --git a/sample_pro.py b/sample_pro.py index ed5d161..bfe2eba 100644 --- a/sample_pro.py +++ b/sample_pro.py @@ -334,8 +334,8 @@ def plot_results(unposed, posed, body, mesh_mask): for i, c in enumerate(collision): fig.add_trace(go.Mesh3d( x=c[:,0], - y=c[:,1], - z=c[:,2], + y=c[:,2], + z=c[:,1], i=collision_faces[i][:,0], j=collision_faces[i][:,1], 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) 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() + pose_shape[:, :3] = 0 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])