faceswap
faceswap copied to clipboard
IndexErroe:list index out of bound
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..
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 how to set the correct path that the im1 and im2? I am in trouble too.
`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!