matthewearl / faceswap

Python script to put facial features from one face onto another
MIT License
1.4k stars 496 forks source link

IndexErroe:list index out of bound #13

Open sadhanareddy007 opened 7 years ago

sadhanareddy007 commented 7 years ago

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..

SWHL commented 6 years ago

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.

Elbertz commented 6 years ago

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

SWHL commented 6 years ago

`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!