Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Request for Enhancement: Customizable Thresholds in Deepface.find Function #972

Closed
RicaredoAndrade opened this issue Jan 25, 2024 · 2 comments
Labels
enhancement New feature or request

Comments

@RicaredoAndrade
Copy link

Description

I've been using Deepface for testing anonymization solutions and have found it to be a powerful tool. However, I've encountered a limitation in the Deepface.find function that I believe could significantly enhance its usability.

Issue

In the current implementation, the face recognition model thresholds are predefined and cannot be manually selected. This limitation poses challenges when computing the Cumulative Match Characteristic, particularly when comparing an image with all testing identities, as the predefined threshold restricts the computation of the rank for each identity.

Enhancement Request

I propose adding a feature to the Deepface.find function that allows users to manually define the face recognition model threshold. This enhancement would not only expedite the computation of the Cumulative Match Characteristic but also provide users with the flexibility to test different threshold values, improving overall testing capabilities.

Solution

Add a new parameter to the function

def find(

threshold = None

Add it to the return

return recognition.find(

threshold = None

Add the parameter to the function

threshold = None

Adjust the threhsold value

threshold = dst.findThreshold(model_name, distance_metric)

if threshold == None:
    threshold = dst.findThreshold(model_name, distance_metric)
@serengil serengil added the enhancement New feature or request label Jan 25, 2024
@serengil
Copy link
Owner

Seems a fair request. Will do it in a couple of days.

@serengil
Copy link
Owner

Closed with PR - #974

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants