-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
wrong datatype for eyesCenter in facealiner #254
Comments
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 |
Hey folks, Thanks for the issue. Could you give us a reproducible bug to check? A colab notebook with the bug would do! TIA 😄 |
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:
|
Hi @ariG23498 this is still an issue as I got a ticket from a customer today about this |
Tagging @abhishekthanki and @ritwikraha to this issue! |
I had this issue too with opencv-python 4.6.0.66 and numpy 1.19.5. Thanks @AKSoapy29 for the easy fix. |
det = dlib.get_frontal_face_detector() This makes this error 'Can't parse 'Center'' frame = cv2.imread('img.jpg') File ~\AppData\Local\Programs\Python\Python310\lib\site-packages\imutils\face_utils\facealigner.py:68, in FaceAligner.align(self, image, gray, rect) TypeError: Can't parse 'center'. Sequence item with index 0 has a wrong type |
For me, casting the eyesCenter from in faceAligner.py:64 I did: eyesCenter = (int((leftEyeCenter[0] + rightEyeCenter[0]) // 2),
int((leftEyeCenter[1] + rightEyeCenter[1]) // 2)) |
This works for me! Thanks @dunland |
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#}
|
the actual shape of eyesCenter is (np.int64, np.int64), but must be (int, int)
it can be easyly fixed by
[int(x) for x in eyesCenter]
I will provide PR fixing that
The text was updated successfully, but these errors were encountered: