BadToBest / EchoMimic

Lifelike Audio-Driven Portrait Animations through Editable Landmark Conditioning
https://badtobest.github.io/echomimic.html
Apache License 2.0
2.79k stars 326 forks source link

Processing image got a critical error when running this webgui.py #128

Open pli2014 opened 2 months ago

pli2014 commented 2 months ago

fail error msg:

  • src is not a numerical tuple
  • Expected Ptr for argument 'src'

process_video function as below: face_img = crop_and_pad(face_img, crop_rect) face_mask = crop_and_pad(face_mask, crop_rect) face_img = cv2.resize(face_img, (width, height)) face_mask = cv2.resize(face_mask, (width, height))

changed these code as below: face_img = crop_and_pad(face_img, crop_rect) face_mask = crop_and_pad(face_mask, crop_rect) face_img = cv2.resize(face_img[0], (width, height)) face_mask = cv2.resize(face_mask[0], (width, height))

Cal-DCosta commented 2 months ago

Yep same error for me too File "webgui.py", line 233, in generate_video final_output_path = process_video( File "webgui.py", line 169, in process_video face_img = cv2.resize(face_img, (width, height)) cv2.error: OpenCV(4.10.0) :-1: error: (-5:Bad argument) in function 'resize'

Overload resolution failed:

  • src is not a numerical tuple
  • Expected Ptr for argument 'src'
Cal-DCosta commented 2 months ago

Thanks pli2014 !!!

malc27 commented 2 months ago

Sorted Thanks.👍🏼😁

robbieprevost commented 2 months ago

I'm having the same issue and I have the updated code mentioned in the other issue: faceimg, = crop_and_pad(face_img, crop_rect) facemask, = crop_and_pad(face_mask, crop_rect)

I'm still getting this: File "webgui.py", line 233, in generate_video final_output_path = process_video( File "webgui.py", line 169, in process_video face_img = cv2.resize(face_img, (width, height)) cv2.error: OpenCV(4.10.0) :-1: error: (-5:Bad argument) in function 'resize'

Overload resolution failed:

  • src is not a numerical tuple
  • Expected Ptr for argument 'src'
Cal-DCosta commented 2 months ago

face_img = cv2.resize(face_img[0], (width, height)) face_mask = cv2.resize(face_mask[0], (width, height))

Look at the code @robbieprevost - [0]