ageitgey / face_recognition

The world's simplest facial recognition api for Python and the command line
MIT License
53.28k stars 13.48k forks source link

raspberry pi4 with camera v2.1 unable to recognize face #1080

Closed TrevorC85 closed 4 years ago

TrevorC85 commented 4 years ago

Description

I'm trying to setup face recognition on the raspberry pi using the raspberry pi camera. I'm using the raspberry pi camera 2.1 I bought from a reputable source.

Using the pi camera I'm unable to identify faces. It also has a hard time finding a face even when I'm clearly in the image. But it does find a face sometimes. Using the pi camera it never identified a face. When I use a different IP camera (Amcrest IP2m) this works right away and correctly identifies faces.

I've also check the pi camera independently and see good quality video/pictures through it.

What I Did

using the current latest example of 'facerec_on_raspberry_pi.py'

pi@raspberrypi:~/face_recognition/examples $ python3 facerec_on_raspberry_pi.py
Loading known face image(s)
Capturing image.
Found 0 faces in image.
Capturing image.
Found 0 faces in image.
...

I've verified the program and the camera so perhaps this setup has poor performance? Could something be failing in the background? How could I test this?

TrevorC85 commented 4 years ago

Has anyone been able to replicate this issue or tested a similar setup? What results did you get?

I believe I found a bug, though I'm not sure if DLIB or Face_recognition has anything to do with it. I found this similar issue post. https://github.com/ageitgey/face_recognition/issues/1047

TrevorC85 commented 4 years ago

Feel a little stupid now but the orientation of the reference picture, as well as the orientation of the pi camera, both caused this issue. 90deg off left or right.

closing issue