faceswap icon indicating copy to clipboard operation
faceswap copied to clipboard

IndexErroe:list index out of bound

Open sadhanareddy007 opened this issue 7 years ago • 3 comments

Hi, I an new to python and I am getting error like in line no. 202 im1, landmarks1 = read_im_and_landmarks(sys.argv[1]) IndexError: list index out of range. Please can any one tell me how to fix this error.

Thanks in advance..

sadhanareddy007 avatar Sep 06 '17 05:09 sadhanareddy007

I just tried the code, and met the same question with you, but later I find the reason, which is that I can't direct the correct path that the im1 and im2. Hope to help you.

SWHL avatar Mar 25 '18 12:03 SWHL

@SWHL how to set the correct path that the im1 and im2? I am in trouble too.

Elbertz avatar Apr 12 '18 02:04 Elbertz

`face_image_path = '8.png' head_image_path = '6.png'

im1, landmarks1 = read_im_and_landmarks(sys.argv[1])

im2, landmarks2 = read_im_and_landmarks(sys.argv[2])

im1, landmarks1 = read_im_and_landmarks(head_image_path) im2, landmarks2 = read_im_and_landmarks(face_image_path)`

I commented the meta code , changed the code like the under ,and hope to help you!

SWHL avatar Apr 12 '18 02:04 SWHL