From b8998d7f5ac59f6039ca43679bd1394000243445 Mon Sep 17 00:00:00 2001 From: aadha3 Date: Sun, 1 Sep 2019 00:31:11 +0200 Subject: [PATCH] np.squeeze expects int or tuple see:https://docs.scipy.org/doc/numpy/reference/generated/numpy.squeeze.html --- demo.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/demo.py b/demo.py index 9cfd869..35bf76e 100644 --- a/demo.py +++ b/demo.py @@ -61,9 +61,9 @@ def demo(): # reshape outputs input_img = np.squeeze(input_img) - shape = np.squeeze(face_shape,[0]) - color = np.squeeze(face_color,[0]) - landmarks_2d = np.squeeze(landmarks_2d,[0]) + shape = np.squeeze(face_shape, (0)) + color = np.squeeze(face_color, (0)) + landmarks_2d = np.squeeze(landmarks_2d, (0)) # save output files # cropped image, which is the direct input to our R-Net @@ -73,4 +73,4 @@ def demo(): save_obj(os.path.join(save_path,file.split('\\')[-1].replace('.png','_mesh.obj')),shape,tri,np.clip(color,0,255)/255) # 3D reconstruction face (in canonical view) if __name__ == '__main__': - demo() \ No newline at end of file + demo()