serengil / deepface

A Lightweight Face Recognition and Facial Attribute Analysis (Age, Gender, Emotion and Race) Library for Python
https://www.youtube.com/watch?v=WnUVYQP4h44&list=PLsS_1RYmYQQFdWqxQggXHynP1rqaYXv_E&index=1
MIT License
10.85k stars 1.91k forks source link

[FEATURE]: Classify faces as covered or uncovered for robust facial feature extraction. #1254

Closed annoyingCode closed 3 weeks ago

annoyingCode commented 3 weeks ago

Description

First of all, thank you so much for this open-course repository. It is highly appreciated!

It would be great if we have a feature to identify whether a face is covered or not. This is particularly useful for security related face recognition tasks because if a face is uncovered, the feature extraction models like Dlib's ResNet or any other will generate more robust features of the face. Even though models like YOLOv8, and MediaPipe perform very well in detecting faces (they can detect a face even if most of it is covered), facial feature extraction models are trained with the assumption of uncovered faces and because of that, they tend to produce unreliable face embedding.

Let me know if you need more details on this request.

Thank you.

Additional Info

No response

serengil commented 3 weeks ago

extract faces is already returning confidence score and if face is covered, its confidence score will be low. you can discard faces with a confidence score less than a threshold.