You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi,
After compute similarity, some scores are above 1. This part of code get person and score.
std::tuple<std::vector<std::string>, std::vector<float>> ArcFaceIR50::getOutputs(float *output_sims) {
/*
Get person corresponding to maximum similarity score based on cosine similarity matrix.
*/
std::vector<std::string> names;
std::vector<float> sims;
for (int i = 0; i < croppedFaces.size(); ++i) {
int argmax = std::distance(output_sims + i * classCount, std::max_element(output_sims + i * classCount, output_sims + (i + 1) * classCount));
float sim = *(output_sims + i * classCount + argmax);
std::string name = classNames[argmax];
names.push_back(name);
sims.push_back(sim);
}
return std::make_tuple(names, sims);
}
I put a cout, printing sim and name. name is the user ID in database and sim is a float, but get numbers liks 122.717. Is it possible to get these values ? Why ?
Another question is, How do you get the sim value ? May you explain me. Why compute memory position in that way?
Thanks,
The text was updated successfully, but these errors were encountered:
Hi,
After compute similarity, some scores are above 1. This part of code get person and score.
I put a cout, printing sim and name. name is the user ID in database and sim is a float, but get numbers liks 122.717. Is it possible to get these values ? Why ?
Another question is, How do you get the sim value ? May you explain me. Why compute memory position in that way?
Thanks,
The text was updated successfully, but these errors were encountered: