ageitgey / face_recognition

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

face_recognition module does not recognise any face covered with mask. #1163

Open harry418 opened 4 years ago

harry418 commented 4 years ago

i tried every functions like face_recognition.batch_face_locations , face_recognition.face_locations(image, number_of_times_to_upsample=0, model="cnn") but it do not detect "face with mask"

zenjieli commented 4 years ago

That's because the pretrained model provided by Dlib didn't consider face with masks. But you can train your own Dlib face detection model according to http://dlib.net/train_object_detector.py.html.

harry418 commented 4 years ago

That's because the pretrained model provided by Dlib didn't consider face with masks. But you can train your own Dlib face detection model according to http://dlib.net/train_object_detector.py.html.

Thank you, but you can use various models:- (1) Deep Learning based Face Detector in OpenCV (2) Histogram of Oriented Gradients (HOG) in Dlib (3) NMOD Convolutional Neural Network in Dlib you can check reference on https://github.com/AyushExel/ml4face-detection/blob/master/Final-Face%20Detection%20Notebook.ipynb