serengil / deepface

A Lightweight Face Recognition and Facial Attribute Analysis (Age, Gender, Emotion and Race) Library for Python
https://bit.ly/deepface-py
MIT License
14.89k stars 2.25k forks source link

[BUG]: Too many false positives #1297

Closed yunisguliyev closed 3 months ago

yunisguliyev commented 3 months ago

Before You Report a Bug, Please Confirm You Have Done The Following...

DeepFace's version

0.0.92

Python version

3.12.4

Operating System

Macos

Dependencies

DeepFace

Reproducible example

from deepface import DeepFace

DeepFace.stream(db_path="database")

Relevant Log Output

No response

Expected Result

To detect my face

What happened instead?

Detected several faces that are not mine

Additional Info

So here I am using the Deepface for my auto-attendance project. I created dataset folder with the picture of 237 people(open source database + a picture of mine).

I tried the library in two different ways:

[ identity hash target_x target_y ... source_w source_h threshold distance 0 database/CFD-IM-688-322-N.jpg d14f0387f476a6bca7d28c7a0faef9cd77765470 668 1608 ... 336 480 0.68 0.440456 1 database/CFD-IM-696-001-N.jpg d4849a942f7b324da584f5ee27f6911fd881e55b 727 1619 ... 336 480 0.68 0.471839 2 database/CFD-MF-300-002-N.jpg 140d3d1b1e4d5902b9bf41523dd15069eaa01192 1820 1525 ... 336 480 0.68 0.555065 3 database/CFD-IM-715-013-N.jpg 2c391f02dd2627d0fb320065fe2c5c0c8e59c0d5 678 1599 ... 336 480 0.68 0.574597 4 database/CFD-IM-630-134-N.jpg 59aa030687fb7eb9d996f28946e37155b1c34f2b 753 1622 ... 336 480 0.68 0.580401 5 database/CFD-IF-633-012-N.jpg 2e276a78b10fa91d9e700f9d54ba9eae082b7d4c 1931 1462 ... 336 480 0.68 0.606692 6 database/CFD-IM-702-101-N.jpg ad68bb0719e09a2865ad09335473dad17cfd2dcb 1597 1636 ... 336 480 0.68 0.652795 7 database/CFD-IM-702-101-N.jpg ad68bb0719e09a2865ad09335473dad17cfd2dcb 655 1610 ... 336 480 0.68 0.654903

[8 rows x 12 columns]]

Again, my face was the only at the frame.

serengil commented 3 months ago

Individual misclassifications are not bug. Deepface does not promise 100% accuracy. Its models precision and recall ratios on lfw are acceptable.

yunisguliyev commented 3 months ago

Any recommendations for troubleshooting ?