You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I can confirm that this is still an issue. I was following the face align tutorial, and kept running into this exact issue. I eventually added all of the facealigner.py code into my code and got the same error. Adding int() to the tuple fixed it:
det = dlib.get_frontal_face_detector()
pred = dlib.shape_predictor(r'...\shape_predictor_68_face_landmarks.dat')
alg = FaceAligner(pred, desiredFaceWidth = 256)
This tries to do face-normalisation
Hi Pyimagesearch/imutils,
We know how annoying auto-reply and email confirmation responses are, but
we wanted to send you a quick reply and let you know that your email has
safely landed in our inbox. Hooray!
We try to respond to emails within 72 hours, Monday-Friday.
In the meantime, here’s a few quick tips to help you out:
1. *We prioritize customer emails.* Full transparency, we receive tens
of thousands of emails a year, and we prioritize customer support emails.
If you’d like to become a customer, you can see our full catalog of
books and courses here <https://www.pyimagesearch.com/books-and-courses/>
.
2. *Not sure which of our books/courses is right for you? Need a
personalized recommendation from us?* No problem, we can get you
unblocked and moving forward in < 13.84 seconds (*seriously, we’ve
tested it!*) To start, take this short multiple choice survey
<https://www.pyimagesearch.com/survey/> — it will compile your answers
and recommend our book/course best suited for you and your needs.
3. *If you are not a customer and not interested in becoming a customer,
you probably won’t get a response.* We do our best to respond to all
emails we receive, but there’s only so much time in the day to offer free
help and support and we continue to get more and more emails. Therefore, we
have elected to “do the most good” with our limited resources and serve the
computer vision and deep learning community at large by publishing weekly,
high-quality (and did we mention *free*) tutorials. We hope these give
you everything you need to be successful with your project or research.
4. *If you are a customer, we can only help with questions directly
related to my books, courses, and blog posts.* If you have a question
related to a topic covered in our books/courses, or have an issue with
code error’ing out, we’ll be more than happy to help. Otherwise, if you
need targeted 1:1 help with your specific project, we've partnered with Dr.
Tim Oates, who offers office hours and consulting on behalf of
PyImageSearch. Here’s a quick survey
<https://www.pyimagesearch.com/consulting/> you can fill out to start
the office hours/consulting request with Tim.
We really appreciate your understanding, we hope this email didn’t let you
down. See you at pyimagesearch.com!
*PyImageSearch Team*
{#HS:2604959745-309633#}
Hi Pyimagesearch/imutils,
We know how annoying auto-reply and email confirmation responses are, but
we wanted to send you a quick reply and let you know that your email has
safely landed in our inbox. Hooray!
We try to respond to emails within 72 hours, Monday-Friday.
In the meantime, here’s a few quick tips to help you out:
1. *We prioritize customer emails.* Full transparency, we receive tens
of thousands of emails a year, and we prioritize customer support emails.
If you’d like to become a customer, you can see our full catalog of
books and courses here <https://www.pyimagesearch.com/books-and-courses/>
.
2. *Not sure which of our books/courses is right for you? Need a
personalized recommendation from us?* No problem, we can get you
unblocked and moving forward in < 13.84 seconds (*seriously, we’ve
tested it!*) To start, take this short multiple choice survey
<https://www.pyimagesearch.com/survey/> — it will compile your answers
and recommend our book/course best suited for you and your needs.
3. *If you are not a customer and not interested in becoming a customer,
you probably won’t get a response.* We do our best to respond to all
emails we receive, but there’s only so much time in the day to offer free
help and support and we continue to get more and more emails. Therefore, we
have elected to “do the most good” with our limited resources and serve the
computer vision and deep learning community at large by publishing weekly,
high-quality (and did we mention *free*) tutorials. We hope these give
you everything you need to be successful with your project or research.
4. *If you are a customer, we can only help with questions directly
related to my books, courses, and blog posts.* If you have a question
related to a topic covered in our books/courses, or have an issue with
code error’ing out, we’ll be more than happy to help. Otherwise, if you
need targeted 1:1 help with your specific project, we've partnered with Dr.
Tim Oates, who offers office hours and consulting on behalf of
PyImageSearch. Here’s a quick survey
<https://www.pyimagesearch.com/consulting/> you can fill out to start
the office hours/consulting request with Tim.
We really appreciate your understanding, we hope this email didn’t let you
down. See you at pyimagesearch.com!
*PyImageSearch Team*
{#HS:3145351818-332595#}
Activity
fix PyImageSearch#254
Wingscape commentedon Dec 28, 2021
Wow that's something why i can't fix this bug whenever i search on google. I think im gonna use haar cascade if this issue doesn't solve yet
ariG23498 commentedon Jan 27, 2022
Hey folks,
Thanks for the issue. Could you give us a reproducible bug to check? A colab notebook with the bug would do! TIA 😄
akapsch commentedon Apr 13, 2022
I can confirm that this is still an issue. I was following the face align tutorial, and kept running into this exact issue. I eventually added all of the facealigner.py code into my code and got the same error. Adding int() to the tuple fixed it:
Maybe I'm using a bad version? This is what my pip reports:
vikaskookna commentedon Jul 14, 2022
Hi @ariG23498 this is still an issue as I got a ticket from a customer today about this
ariG23498 commentedon Jul 19, 2022
Tagging @abhishekthanki and @ritwikraha to this issue!
ariskoutris commentedon Nov 2, 2022
I had this issue too with opencv-python 4.6.0.66 and numpy 1.19.5. Thanks @AKSoapy29 for the easy fix.
BilalAlsharif commentedon Nov 6, 2022
det = dlib.get_frontal_face_detector()
pred = dlib.shape_predictor(r'...\shape_predictor_68_face_landmarks.dat')
alg = FaceAligner(pred, desiredFaceWidth = 256)
This tries to do face-normalisation
This makes this error 'Can't parse 'Center''
frame = cv2.imread('img.jpg')
gray = cv2.cvtColor(frame, cv2.COLOR_BGR2GRAY)
rect = detector(gray,1)[0]
faceAligned = aligner.align(frame, gray, rect)
File ~\AppData\Local\Programs\Python\Python310\lib\site-packages\imutils\face_utils\facealigner.py:68, in FaceAligner.align(self, image, gray, rect)
64 eyesCenter = ((leftEyeCenter[0] + rightEyeCenter[0]) // 2,
65 (leftEyeCenter[1] + rightEyeCenter[1]) // 2)
67 # grab the rotation matrix for rotating and scaling the face
---> 68 M = cv2.getRotationMatrix2D(eyesCenter, angle, scale)
70 # update the translation component of the matrix
71 tX = self.desiredFaceWidth * 0.5
TypeError: Can't parse 'center'. Sequence item with index 0 has a wrong type
dunland commentedon Dec 25, 2022
For me, casting the eyesCenter from
<class 'numpy.int64>to type<class 'int'>instead of fixed it:in faceAligner.py:64 I did:
erfan-zekri commentedon May 22, 2024
This works for me! Thanks @dunland
abhishekthanki commentedon May 22, 2024
SanjithKumar2 commentedon Nov 20, 2025
Why has the issue not been corrected still it's nearly 4 years...
abhishekthanki commentedon Nov 20, 2025