Open gibiee opened 6 months ago
In fact face-alignment==1.3.5
is the latest working version.
I'll take it back. Best to stay with face-alignment==1.3.3
as you do in your version @gibiee
@kampelmuehler Thanks for your efforts!
I run this version, but I got this error in last section.
oup = model.run_single(source_path, target_path, crop_align=True,cat=True)
please help me
ValueError Traceback (most recent call last)
[<ipython-input-16-9f1905b26271>](https://localhost:8080/#) in <cell line: 1>()
----> 1 oup = model.run_single(source_path, target_path, crop_align=True,cat=True)
2 cv2_imshow(oup)
3 frames
[/content/HeadSwap/model/third/Deep3dRec/preprocess.py](https://localhost:8080/#) in align_img(img, lm, lm3D, mask, target_size, rescale_factor)
75 # processing the image
76 img_new, lm_new, mask_new = resize_n_crop_img(img, lm, t, s, target_size=target_size, mask=mask)
---> 77 trans_params = np.array([w0, h0, s, t[0], t[1]],dtype=np.float32)
78
79 return trans_params, img_new, lm_new, mask_new
ValueError: setting an array element with a sequence. The requested array has an inhomogeneous shape after 1 dimensions. The detected shape was (5,) + inhomogeneous part.
Try this version : https://colab.research.google.com/drive/1zoRLaQvpqEBLpxk-Vp4MtNnkaku5Lb5t?usp=sharing
I think the
face-alignment
version seems to be particularly prone to errors.
Thanks your reply. You can also change here to face_alignment.LandmarksType.THREE_D
I run this version, but I got this error in last section.
oup = model.run_single(source_path, target_path, crop_align=True,cat=True)
please help me
ValueError Traceback (most recent call last) [<ipython-input-16-9f1905b26271>](https://localhost:8080/#) in <cell line: 1>() ----> 1 oup = model.run_single(source_path, target_path, crop_align=True,cat=True) 2 cv2_imshow(oup) 3 frames [/content/HeadSwap/model/third/Deep3dRec/preprocess.py](https://localhost:8080/#) in align_img(img, lm, lm3D, mask, target_size, rescale_factor) 75 # processing the image 76 img_new, lm_new, mask_new = resize_n_crop_img(img, lm, t, s, target_size=target_size, mask=mask) ---> 77 trans_params = np.array([w0, h0, s, t[0], t[1]],dtype=np.float32) 78 79 return trans_params, img_new, lm_new, mask_new ValueError: setting an array element with a sequence. The requested array has an inhomogeneous shape after 1 dimensions. The detected shape was (5,) + inhomogeneous part.
Try this version : https://colab.research.google.com/drive/1zoRLaQvpqEBLpxk-Vp4MtNnkaku5Lb5t?usp=sharing I think the
face-alignment
version seems to be particularly prone to errors.
change the line 77 to
trans_params = np.array([w0, h0, s, t[0][0], t[1][0]],dtype=np.float32)
I tried on colab, but there is an error like: ![Uploading Capture.JPG…]()
I tried on colab, but there is an error like:
Try this version : https://colab.research.google.com/drive/1zoRLaQvpqEBLpxk-Vp4MtNnkaku5Lb5t?usp=sharing
I think the
face-alignment
version seems to be particularly prone to errors.