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
14.31k stars 2.2k forks source link

Deepface verify on LFW- not working on other models and detectors than 'ArcFace' with 'opencv' #309

Closed Kamil-Rajewski closed 3 years ago

Kamil-Rajewski commented 3 years ago

Hey, I would like to compare the metrics for all of the models, detectors and distance metric available on DeepFace framework on LFW dataset. The problem is, that my code is working only on ArcFace and opencv with the default distance metric. The source code is based on this video: https://www.youtube.com/watch?v=9fT-9TFjeDQ.

Attached sample of errors for mtcnn and ssd detectors on Arcface. Also attacked colab link - you can edit it.

mtcnn ssd

I will appreciate your help :)

link: https://colab.research.google.com/drive/1u4AA0HOSG1gezsc2LyG4dYWhCokxW4Dr?usp=sharing

serengil commented 3 years ago

what was your tf version?

serengil commented 3 years ago

It seems that you are using tf 2.5 in the colab. Could you downgrade to 2.2.0? That might be a tf version based trouble.

Kamil-Rajewski commented 3 years ago

what was your tf version? So I changed the version of tf to 2.20, and there is still the same problem. If you want, you can comment and also edit the code in colab.

serengil commented 3 years ago

Oke, it seems a probably bug. I'm going to study it tonight or tomorrow. I'll inform you here.

serengil commented 3 years ago

I just pushed an update to the code repo. You can pull the latest code to have the fixed code. I'm also going to publish it on pip in the next couple of days.