Relative Content

Tag Archive for pythonopencvface-recognition

I face an “IndexError: list index out of range” in the following code

while True: sucess, img = cap.read() img = cv2.flip(img, 1) imgs = cv2.resize(img,(0,0) , None , 0.25 , 0.25) imgs = cv2.cvtColor(img, cv2.COLOR_BGR2RGB) facecurframe = face_recognition.face_locations(imgs) encodecurframe = face_recognition.face_encodings(imgs , facecurframe) imgBg[162:162+480,55:55+640] = img imgBg[44:44+633,808:808+414] = imgmodelist[2] for encodeface, faceloc in zip(encodecurframe , facecurframe): matches = face_recognition.compare_faces(encodelistknown,encodeface) facedis = face_recognition.face_distance(encodelistknown,encodeface) # print(“matches” , matches) # […]

Hi, i am a python beginner and i am face an “IndexError: list index out of range” in the following code

while True: sucess, img = cap.read() img = cv2.flip(img, 1) imgs = cv2.resize(img,(0,0) , None , 0.25 , 0.25) imgs = cv2.cvtColor(img, cv2.COLOR_BGR2RGB) facecurframe = face_recognition.face_locations(imgs) encodecurframe = face_recognition.face_encodings(imgs , facecurframe) imgBg[162:162+480,55:55+640] = img imgBg[44:44+633,808:808+414] = imgmodelist[2] for encodeface, faceloc in zip(encodecurframe , facecurframe): matches = face_recognition.compare_faces(encodelistknown,encodeface) facedis = face_recognition.face_distance(encodelistknown,encodeface) # print(“matches” , matches) # […]