akshaybahadur21 / Facial-Recognition-using-Facenet

A simple implementation of facial recognition using facenets for humans 🧔 🔍
MIT License
280 stars 143 forks source link

TypeError: Can't parse 'center'. Sequence item with index 0 has a wrong type #27

Open uday-felix opened 3 years ago

uday-felix commented 3 years ago

Cant run the file create_face.py .. filing at File "D:\custom_projects\face_detection\venv\lib\site-packages\imutils\face_utils\facealigner.py", line 69, in align M = cv2.getRotationMatrix2D(center=eyesCenter, angle=angle, scale=1)

Wule-Lin commented 1 year ago

Have you solved this problem?I also want to solve this bug

HocJ2me commented 2 months ago

I eventually added all of the facealigner.py code into my code and got the same error. Adding int() to the tuple fixed it:

eyesCenter = (int((leftEyeCenter[0] + rightEyeCenter[0]) // 2),
        int((leftEyeCenter[1] + rightEyeCenter[1]) // 2))