facenet-realtime-face-recognition icon indicating copy to clipboard operation
facenet-realtime-face-recognition copied to clipboard

live detection

Open sai0905 opened this issue 5 years ago • 3 comments
trafficstars

Hello,

It s recognizing the faces from the phone also. To do real time recognition what we have to. plz suggest that.

Thanks

sai0905 avatar Jun 18 '20 11:06 sai0905

Hi sai0905,

You would first need to install an IP camera stream application on the phone then connect it to the same network the server would be using and start either an HTTP or RTSP stream from the mobile phone using the application.

Then replace the default '0' parameter of the cv2.VideoCapture() object instantiation code in 'server.py' in the function responsible for real-time face recognition with the url of your mobile phone camera stream url, the url format would depend on the streaming protocol you are using and the application should show you the url you have to use to access your stream.

tamerthamoqa avatar Jun 18 '20 12:06 tamerthamoqa

Thank you for ur response. Can we implement eye blink here.

sai0905 avatar Jun 18 '20 12:06 sai0905

No, eye blink detection is not available in this repository as the MTCNN face detection model I am using does not detect eye landmarks.

This blog post will be helpful since it helped me play around with this concept, using eye blinks as a validation for liveliness detection (making sure the face is of a real human) proved to be tricky and highly dependent on the distance of the face from the camera. I suppose using a mobile phone stream may be a lot better than an IP camera for this task: https://www.pyimagesearch.com/2017/04/24/eye-blink-detection-opencv-python-dlib/

tamerthamoqa avatar Jun 18 '20 12:06 tamerthamoqa