Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

is possible to face recognition with mediapipe in python

I try to make app with python to be able recognition face, recently use cv2+dlib and face_recognition module for recognition, but i have two problems:

  1. have 3 or 4 second delay
  2. low accuracy

That's why I decided to use another library, after so many search, find MediaPipe, this library is very fast (real time) and find this example for face detection, but I need face recognition! but not found any example for face recognition Is there a solution?

like image 556
A.Motahari Avatar asked Jan 20 '26 22:01

A.Motahari


1 Answers

Mediapipe doesn't provide a face recognition method, only face detector.

The face_recognition library has really good accuracy, It's claimed accuracy is 99%+. your dataset probably isn't good enough.

Solutions:

  1. For better speed performance, use the "hog" model instead of "cnn" model. you can modify it when you use the face_locations method like the following code line.

    locations = face_recognition.face_locations(frame, model="hog")
    
  2. For accuracy, use better dataset images (higher quality, a face looking straight at the camera, more pictures for the same person but usually 1-3 pictures is enough)

like image 169
Roy Amoyal Avatar answered Jan 23 '26 13:01

Roy Amoyal



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!