-
Notifications
You must be signed in to change notification settings - Fork 1
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
How to measure accuracy in %age? #1
Comments
Hi @ma-siddiqui, Thank you for your question. The library provides a function to calculate the distance between two face templates, distance is a float value more or equal to 0. The library uses distance thresholds to decide whether are faces the same or not (the default threshold is 1.306). Let's say that threshold in percentage should be 85%. Based on this we can use interpolation of distance for percentage calculation (see example below). ...
template<typename T>
T Lagrange(T X)
{
static const int n = 2;
static T y[n] = {100, 85};
static T x[n] = {0.0, 1.306};
T L, l;
int i, j;
L = 0;
for (i = 0; i < n; ++i)
{
l = 1;
for (j = 0; j < n; ++j)
if (i != j)
l *= (X - x[j]) / (x[i] - x[j]);
L += y[i] * l;
}
return return std::max(L, 0.0);;
}
int main (int argc, char *argv[])
{
...
double distance = matcherData["verification"]["result"]["distance"].getDouble();
double result_persent = Lagrange(distance);
...
} Let us know if you want to know details about this. |
Thank you for answering my question. May I know, is this a standard way of calculating similarity matching accuracy in %age? Or this method is only valid for 3DiVi face SDK? |
@ma-siddiqui There is no standard method to calculate face similarity percentage because the basis of this is vectors and the distance between two vectors. Distance between similar faces is less and between different faces is more. In our case, we define that percentage of similarity for the same vectors is 100, and the percentage of similarity for vectors for the different photos of one face is 85. To estimate intermediate points we use interpolation. Additional comment from our AI team:
Feel free to ask for additional details. |
Thank you. Its great explanation. |
Based on the results after matching two faces, how can I calculate the matching accuracy out of 100?
Thanks,
The text was updated successfully, but these errors were encountered: